Short questions on DHCP

Ken Moffat ken at kenmoffat.uklinux.net
Thu Oct 21 13:58:33 PDT 2004


On Thu, 21 Oct 2004, D.Moriarty wrote:

> I've been there and tried most of that. It hangs because I still have
> LFS-3.3 and the boot scripts are a little different. I can't be exact

Ok, from my firewall which is running something around lfs-3.3 (doesn't
seem to have any /etc/lfs-* so I can't be sure of the exact version) and
uses *eth1* for the connection to the world (eth0 for my lan).  Probably
very badly done, but working.

Note also that I modprobe eth1 before trying to use it.

/etc/sysconfig/network-devices/ifconfig.eth1:

ONBOOT=yes
DHCP_PROG=/sbin/dhclient
DHCP_START='eth1 -1' # -1 to try only once
DHCP_STOP='-r'

/etc/sysconfig/network-devices/ifdown-eth1:

#!/bin/sh
source /etc/sysconfig/rc || exit
source $rc_functions || exit
source $network_devices/ifconfig.eth1 || exit
echo "Bringing down the eth1 interface..."
$DHCP_PROG $DHCP_STOP
evaluate_retval

/etc/sysconfig/network-devices/ifconfig.eth1
#!/bin/sh
source /etc/sysconfig/rc || exit
source $rc_functions || exit
source $network_devices/ifconfig.eth1 || exit
echo "Bringing up the eth1 interface..."
modprobe eth1
loadproc $DHCP_PROG $DHCP_START

Note also that for this version of dhclient the leases are in
/var/state/dhcp/dhclient.leases and you will need to touch that (or
wherever your version is looking) before you can get a lease.

HTH

Ken
-- 
 das eine Mal als Tragödie, das andere Mal als Farce




More information about the blfs-support mailing list