DHCP allows a machine to pick up basic network configuration by broadcasting on the network. This fetches
- IP address
- Host Netmask
- DNS configuration (resolv.conf)
- WINS configuration (for M$ machines)
Linux DHCP Startup
On a Lab Managed machine, to make Linux use DHCP, `where' should be set to point to an appropriate `config-info' entry which has an entry `eth0 dynconfig 1' to set up dynamic configuration.
(Still to be sorted - should the old `pump' key go ? How should there be a distinction between whether or not to manage resolv.conf ?).
On other RedHat machines, netcfg's `interface configuration protocol' option on the `interface' tab should be used to set `dhcp'. This should set BOOTPROTO to dhcp causing /etc/sysconfig/network-scripts/ifup to try /sbin/dhcpcd and /sbin/pump.
The result of these is that when the interface is up, there should be a process `dhcpcd eth0' or `pump -i eth0'.
Note that it has been reported that if pump does not succeed at boot time, it may bot succeed at all. dhcpcd seems better at this, so should normally be used.
/etc/resolf.conf on Managed Linux Systems
On managed Linux systems, the script /etc/rc.scripts/res.tailor is called from time to time to ensure that /etc/resolf.conf (the file used to find DNS servers) is set up correctly. This is normally to use the cl.cam.ac.uk internal name servers resolv[0-3]. This is not appropriate if the machine is not within the department, as access to the servers are blocked in the router. As such, the script looks at /etc/user-config/where to decide what to do. If eth0 has pump set to 1, then no action is taken. If ip has resolv set, the first three strings set the three nameserver to use. Thus sample settings might be
home eth0 pump 1
home ip resolv 126.96.36.199 188.8.131.52
M$ DHCP Startup
Dynamic DNS registration
If using DHCP, it may be useful to register with a suitable Dynamic DNS provider, such as dyndns.com (which seems to work fine). Code is available for Linux (e.g. ddclient) 1(as an rpm), M$ (e.g. DeeEnEs), etc.
follow the instructions in their
by clicking on
create an account.
Give a `name' and an email address, and a password is emailed,
When created, follow the instructions
to Create a Dynamic DNS Host.
There is a NIC `cl-cam-ac-uk' for managed machines.
Managed linux boxes should have the ddclient RPM loaded. It is then a matter of updating /etc/ddclient.conf to select use=if and then add a line `server=members.dyndns.org, protocol=dyndns2, $host.dyndns.org $nic $pw'. Then try running as `really ddclient -daemon=0 -debug -verbose -noquiet' which should end with `SUCCESS: updating $host.dyndns.org: good: IP address set to $ADDR'
Having acquired a dynamic name, arrange that there is
- a -c (cablemodem) or -h (home) CNAME in the DNS pointing at that name, e.g. basal-c.cl.cam.ac.uk.
and if Lab Managed (e.g. master runs and ownfiles collection)
- an alias in ssh_known_hosts for the cl name
and if the user is to be able to initiate a master run
- an entry in %collegename in updateme
- a suitable entry in authorized_keys
(work may be needed to make master runs work with truly dynamic names)