Archive

Posts Tagged ‘lan’

Tyan S2925 and FreeBSD 6.3 onboard LAN problem solution

10:37 AM No comments

Today I had to install a FreeBSD 6.3 on a server with a “Tyan S2925 Tomcat n3400B” mainboard. Unfortunatly, the chipset of this board (nForce Pro 3400 / MAC with Marvell 88E1116-CAA Gigabit Ethernet PHY) isn’t supported by FreeBSD 6.3. So after successfully installing the system, the ifconfig looked like this:

/root# ifconfig
lo0: flags=8049 mtu 16384
inet6 fe80::1%lo0 prefixlen 64 scopeid 0×4
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000

In this special case the onboard network interfaces had to be used, so I checked up FreeBSD 7.0 – and – I was lucky!

After downloading the driver-files from the FreeBSD sourectree, I made a Makefile for this driver:

.PATH: ${.CURDIR}
KMOD= if_nfe
SRCS= if_nfe.c miibus_if.h opt_bdg.h device_if.h bus_if.h pci_if.h

.include <bsd.kmod.mk>

So, the directory with the files looked like this:

drwxr-xr-x 4 root wheel 512 Dec 22 17:11 ..
-rw-r–r– 1 root wheel 156 Nov 24 2007 Makefile
-rw-r–r– 1 root wheel 82631 Nov 24 2007 if_nfe.c
-rw-r–r– 1 root wheel 10223 Nov 24 2007 if_nfereg.h
-rw-r–r– 1 root wheel 3633 Nov 24 2007 if_nfevar.h

Compiling the driver with a simple “make” on the commandline made no problems, but after installing the driver, there were some wired effects, that prevent the driver from working fine (You shouldn’t install the driver at this time, so I explain this later). After a lot of more work I found out, that the native nve-Support in the kernel must be disabled (you should do this first):

By editing the Kernel Config (Here you find how to make a new kernel for FreeBSD) and commenting out the following line:

device nve # nVidia nForce MCP on-board Ethernet Networking

change to:

#device nve # nVidia nForce MCP on-board Ethernet Networking // removed 21.12.2008 sch

After building the new kernel, the devices can be used as expected. To install the driver you compiled, you must copy the resulting driver into the modules directory:

/root# cp if_nfe.ko /boot/modules/.

To load this driver at boot-time of the system change the /boot/loader.conf, by adding the following line:

if_nfe_load="yes"

You do not need to restart the system. To load the driver during runtime, simply type the following into your command-line:

kldload if_nfe

After this, your ifconfig will look like this:

/root# ifconfig
nfe0: flags=8843 mtu 1500
options=1b
inet 192.168.1.110 netmask 0xffffff00 broadcast 192.168.1.255
ether 00:e0:81:b5:45:08
media: Ethernet autoselect (100baseTX )
status: active
nfe1: flags=8802 mtu 1500
options=1b
ether 00:e0:81:b5:45:09
media: Ethernet autoselect (none)
status: no carrier
lo0: flags=8049 mtu 16384
inet6 fe80::1%lo0 prefixlen 64 scopeid 0×4
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000

That’s it – happy networking!

Post to Twitter Tweet This Post

Categories: FreeBSD Tags: , , , , ,