Subject: MINI-HOWTO: Connecting your Linux box to the Residence Hall Ethernet Author: John Gotts Date: Wed, 1 Oct 1997 19:42:55 -0400 I managed to get my Linux box connected to the Residence Hall Ethernet after a little bit of hacking. Here's what you need to do to get on the network: Download the DHCP client daemon for Linux from sunsite: ftp://sunsite.unc.edu/pub/Linux/system/network/daemons/dhcpcd-0.65.tar.gz The client is very rough [*], but it works. The only modification I made to the distribution was changing the CFLAGS variable in the Makefile from "-g -Wall" to -O3 -Wall." make && make install will suffice. Once you get the client installed, you'll need to run it by hand. After about 30 seconds or so (assuming your network card is configured properly and you are physically connected to the network), you will be able to obtain your IP address. To do this run /sbin/ifconfig by itself. Your IP address (listed as inet addr) will be in the form 141.213.x.y. Once you have it, try accessing the network. If the network is unreachable, you'll need to create a default route (the routing code in newer kernels has undergone significant changes the DHCP client doesn't yet support [*]). Use the following command: /sbin/route add default gw 141.213.x.y netmask 0.0.0.0 dev eth0 (Use one of the gateways listed below, depending on your IP address.) Make sure you have an appropriate /etc/resolv.conf. I use: domain reshall.umich.edu nameserver 141.211.251.10 nameserver 141.211.144.15 nameserver 141.211.144.17 search reshall.umich.edu umich.edu edu Now you can determine your actual hostname: nslookup 141.213.x.y Once you have all of this information, create the following script (or add the following lines to your network-related rc scripts): #!/bin/sh # dhcpcd /usr/sbin/dhcpcd /usr/bin/sleep 25 /sbin/route add default gw 141.213.x.1 netmask 0.0.0.0 dev eth0 /bin/hostname Since I'm running an updated version of Red Hat 3.0.3 in runlevel 5, I put this script in /etc/rc.d/init.d and created the following symlink: cd /etc/rc.d/rc5.d ; ln -s ../init.d/dhcpcd S15dhcpcd and removed any eth0 setup information from /etc/sysconfig/network-scripts. That's all. [*] The client should provide the information it obtains via the documented, but apparently unimplemented -c command line switch. There's no way to be sure that the DHCP server will answer your query in 25 seconds, so you may need to adjust the argument to sleep. (In general, the server responds rather quickly, so if it hasn't responded after a minute or so, there are other problems...) The client should also be updated to handle the automagic routing code in newer kernels. Finally, the syslog()ing of the client is a little bit inconsistent. Bursley * TWO POSSIBLE RANGES FOR BURSLEY IPs * IP Range 141.213.216.21 - 141.213.219.250 Netmask 255.255.252.0 Gateway 141.213.216.1 DNS Server 141.211.251.10 141.211.144.15 141.211.144.17 IP Range 141.213.220.5 - 141.213.221.250 Netmask 255.255.254.0 Gateway 141.213.220.1 DNS Server 141.211.251.10 141.211.144.15 141.211.144.17 Baits * TWO POSSIBLE RANGES FOR BAITS IPs * IP Range 141.213.208.41 - 141.213.211.250 Netmask 255.255.252.0 Gateway 141.213.208.1 DNS Server 141.211.251.10 141.211.144.15 141.211.144.17 IP Range 141.213.212.5 - 141.213.212.250 Netmask 255.255.255.0 Gateway 141.213.212.1 DNS Server 141.211.251.10 141.211.144.15 141.211.144.17 Enjoy, John