GETTING THE NETWORKS CARDS UP ============================= Simon Warner - 29Apr98 Playing with pop1 and the NE2000 (PCI 10Mb) and NetGear FA310TX (PCI 100Mb) cards. Got driver for NE2000 from http://cesdis.gsfc.nasa.gov/linux/drivers/ne2k-pci.html Got driver for NetGear FA310TX (a `tulip' chip based card) from http://cesdis.gsfc.nasa.gov/linux/drivers/tulip.html Both drivers were simple C files which have the code required for compilation in comments at the end (just do tail). Copied the sources to /usr/src/modules/ simeon@pop01 42% cd /usr/src/modules/ simeon@pop01 43% ls compile_ne2k-pci ne2k-pci.o tulip.o ne2k-pci.c tulip.c simeon@pop01 44% Added -D__SMP__ flag to compile code for ne2k-pci driver just in case it makes any difference. Code is now simeon@pop01 44% more compile_ne2k-pci gcc -D__SMP__ -DMODVERSIONS -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer -I/usr/src/linux/drivers/net/ -c ne2k-pci.c So just source that to compile. Net results are tulip.o and ne2k-pci.o in that directory. Can install on-the-fly using insmod filname.o. Must also specify 8390.o driver beforehand for the ne2k-pci.o driver. Can install these modules with a set of kernal modules by adding then to the appropriate directory before `make install_modules'. I did this for the 2.0.32 kernel. So, from /usr/src/linux-2.0.32 on can make the standard modules with `make modules'. This put links to the objects in /usr/src/linux-2.0.32/modules. To add in our new modules: cd modules rm -f tulip.o ln -s ../../modules/tulip.o tulip.o rm -f ne2k-pci.o ln -s ../../modules/ne2k-pci.o ne2k-pci.o Then edit NET_MODULES to include tulip.o and ne2k-pci.o (it actually already includes tulip.o since a driver is included). Then, back in /usr/src/linux-2.0.32 the modules can be installed in /lib/modules/2.0.32/ and subdirectories with 'make modules_install'. Check out /usr/src/linux-2.0.32/Documentation/modules.txt Put sensible things in the configuration file conf.modules: simeon@pop01 63% more /etc/conf.modules alias eth0 tulip options eth0 io=0xec80 alias eth1 ne2k-pci options eth1 io=0xef80 pre-install eth1 insmod /lib/modules/`uname -r`/net/8390.o alias eth1 ne2k-pci options eth1 io=0xef80 #Turn off a couple of things we just don't need #Simeon Warner - 29Apr98 alias net-pf-4 off #ipx alias net-pf-5 off #appletalk However, this doesn't seem to be enough to get things started at boot time. Can be started manually with: modprobe tulip (to install the tulip driver, then shows up if you run ifconfig) ifup eth0 (starts up eth0 now driver is there) Similarly, to get second ethernet (old NE2000) we can do modprobe ne2k-pci ifup eth1 To do this automatically (since the 'depmod -a' in /etc doesn't seem to be enough) I added a couple of lines to /etc/rc.d/rc.sysinit so it now reads: if [ -x /sbin/depmod -a -n "$USEMODULES" ]; then # Get ready for kerneld if module support in the kernel echo -n "Finding module dependencies" depmod -a echo "" echo "SIMEON(/etc/rc.d/rc.sysinit): insmod tulip (for NetGear card, eth0)" insmod tulip echo "" fi was: if [ -x /sbin/depmod -a -n "$USEMODULES" ]; then # Get ready for kerneld if module support in the kernel echo -n "Finding module dependencies" depmod -a echo "" fi Now seems to boot okay! Additional notes ---------------- System identity is stored in /etc/sysconfig/network. Currently: NETWORKING=yes FORWARD_IPV4=no HOSTNAME=pop01.phy.syr.edu DOMAINNAME=phy.syr.edu GATEWAY=128.230.72.254 GATEWAYDEV=eth0 Interface configurations in /etc/sysconfig/network-scripts: simeon@pop01 81% pwd /etc/sysconfig/network-scripts simeon@pop01 82% more ifcfg-eth0 DEVICE=eth0 USERCTL=no ONBOOT=yes BOOTPROTO=none BROADCAST=128.230.72.255 NETWORK=128.230.72.0 NETMASK=255.255.255.0 IPADDR=128.230.72.74 simeon@pop01 83% more ifcfg-eth1 DEVICE=eth1 USERCTL=no ONBOOT=no BOOTPROTO=none BROADCAST=128.230.72.255 NETWORK=128.230.72.0 NETMASK=255.255.255.0 IPADDR=128.230.72.81 Seems that networking is brought up and down by calls to /sbin/ifup and /sbin/ifdown (also linked from /etc/sysconfig/network-scripts) from /etc/rc.d/init.d/network. =============================================================================== CHANGING MACHINE IDENTITY AND MOVING TO 306closet ================================================= must change: /etc/hosts /etc/sysconfig/network /etc/sysconfig/network-scripts/ifcfg-eth? -- all seemed to work pretty easy. ================================================================================ ==============================================================================