Short questions on DHCP
declan.moriarty at ntlworld.ie
Thu Oct 21 08:02:45 PDT 2004
Nathan Coulson wrote:
> On Wed, 20 Oct 2004 14:39:57 +0100, D.Moriarty
> <declan.moriarty at ntlworld.ie> wrote:
>>I'm not getting going with DHCP, and have found it difficult to
>>make sense of why. Every one else does it in their sleep, but that
>>isn't much use to me. Both the linux daemons just get to
>>DHCPDISCOVER and time out. They apparently get no answer
>>Windows sets up. ipconfig /all (In windoze) gives me
>>dhcp derver - 18.104.22.168
>>dns server - 22.214.171.124
>>netmask - 255.255.255.0
>>gateway - 126.96.36.199
>>IP - 188.8.131.52
>>Beyond that, it appears to use nothing fancy.
>>The setup scripts in linux are a mess, so I want to set it manually
>>once and then get the scripts to do what works. Manually adding routes
>>route add <several>
>>as suggested in various docs to get on using an existing lease fails
>>Why? The only difference I can spot is in the case of the hostname
>>Likewise asking NTL, who assure me that the cable
>>modem assigns the IP to the box it operates off and consequently
>>I don't need any info. NTL do talk more crap than sense, but
>>it's an ntl badged cable modem. Could that be?
>>The guy who put installed this lifted a serial number from it and
>>rang it in. Is that an item of information used in the protocol?
>>A little port scan under windows showed the system has the BOOTP
>>instead of DHCP on port 67, but the windoze box listens on port 68.
>> Declan Moriarty
> from BLFS, install dhcpcd, and then type in
> dhcpcd eth0.
> [or else download the blfs bootscripts, and type in make
> install-service-dhcpcd; echo "SERVICE=dhcpcd" >
> [I'm repeating the above from memory, it may not be entire correct]
Thanks for the reply.
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
(email forced into windoze) but there's a '$network_devices' referenced
in the scripts (/etc/rc.d/init.d/network I think) which isn't found. I
went in and hacked it to /etc/sysconfig/network-devices which seemed
like the right place, but then it barfs on an error about not finding an
IP. The whole $%@£! point of dhcp is that things don't have an IP to
begin with. It's an error from the script.
And, as given, dhcpcd isn't going to set much up. The
/etc/sysconfig/network script from the book leaves out the options
"cat > /etc/sysconfig/network-devices/ifconfig.eth0 << "EOF"
DHCP_START="[insert appropriate start options here]"
DHCP_STOP="-k [insert other stop options here]"
For more information on the appropriate DHCP_START and DHCP_STOP values,
examine the man page for dhcpcd. "
That is why I was trying a manual assault on it. Once I know what it
wants, I can have some guess at providing it. It's Catch 22.
So I get booted with no routes to anywhere, and no confidence that the
kernel isn't changing 255.255.255.255 to 255.255.255.0 which I am told
it is fond of doing.
The docs I can find refer to 2.0 and 2.2 kernels rpms, etc, and the man
pages of useful things like ifconfig or dhclient are wildly off.
ifconfig gives examples which throw errors if attempted :-(.
dhclient mentions options in the top which it never explains :-o.
More information about the blfs-support