dodhcp option change

Topics about the networking software (ssh, nfs, samba, ...). No questions about network drivers there.
Post Reply
Loki
Posts: 5
Joined: 08 May 2008, 09:54
Location: London, UK

dodhcp option change

Post by Loki » 21 May 2008, 07:44

Can you explain a bit more about the change between 1.0.1 and 1.0.2.

I used to have dodhcp enabled on 1.0.1 but had to disable it for 1.0.2 as I ended up with a permanent loop if the device is not connected to a network.

admin
Site Admin
Posts: 2715
Joined: 17 Jul 2003, 09:44

Post by admin » 21 May 2008, 18:43

Several complained in that forum because their network may need some time to initialize and dhcp failed if it did not work immediately. And I also wanted dhcp to work on servers with more than one network interface, and when only one of these interfaces has a cable plugged.

Mike_Duffy
Posts: 14
Joined: 18 Mar 2008, 13:10
Location: Québec City

dodhcp option change

Post by Mike_Duffy » 13 Jun 2008, 12:55

I have this same problem with CD v1.0.3 and "dodhcp" boot option. My DHCP server is the integrated DHCP / DNS service on a Windows 2003 Server Active Domain primary domain controller.

During bootup, the "busybox" portion seems to get the IP address okay. I am not sure, but I believe that this is the pre-boot portion where DHCP might be used to get an IP# in order to download TFTP boot images:

udhdpc (v1.7.4) started
Sending discover
Sending select for 131.132.56.74
Lease of 131.132.56.74 obtained. Lease time 691200 seconds.
set new default route: 131.132.48.1
busybox udhdpc -n -i eth0 --> 0

Later on, during the actual boot of the Linux system, I get the line:

* Performing the SystemRescueCd specific initializations ...

Then the following lines are repeated indefinitely:

netconfig2:---eth0: link=link-ok, mac=00:B0:D0:DC:16:66
netconfig2:Attempting to get a DHCP address on eth0 ...
err, eth0: timed out
netconfig2: dhcpcd -L -n -t 10 -I '' -h sysresccd eth0 --> 1
netconfig2: Cannot get a DHCP address. Check the cables on the ethernet interfaces.

It may be helpful for you to know that I have found a workaround for the problem. I do NOT use the "dodhcp" boot option, but instead when I create a customized boot CD I execute the command:

echo "dhcpcd -n -L -I '' -H eth0" >> /mnt/custom/customcd/files/usr/share/sys.autorun/autorun

In other words, in the autorun script I start dhcpcd myself with the "-H" instead of the "-h" option. I do this in order to set the hostname to that found via reverse DNS lookup, because the Windows 2003 Server DHCP/DNS controller cannot seem to set the hostname properly if you use "-h". (You need to change the default DHCP scope settings on the Windows server as well.)

It may interest you to know that in a previous version of system rescue CD, (1.0.1 Beta?), I also needed to modify the call to dhcpcd in the bashlogin file to look like:

dhcpcd -T -L -t 5 -I eth0

I think I made a few forum entries at the time, and /var/log/messages clearly showed that this command had the effect of setting the netcard to full-duplex mode. (The "-T" option tells it to ask for a DHCP packet and display the results, but do not perform any changes in the system configuration.)

If you did not do the call with "-T", the dhcpcd calls in netconfig would fail exactly as they do now.

Now (v1.0.3), dhcpcd is no longer called in bashlogin. If you call dhcpcd in autorun yourself it works okay, but we get an error during netconfig if we use option "dodhcp". I do not think that using "-H" vs "-h" has anything to do with the problem. I believe instead that it has to do with setting the netcard to full-duplex mode after it has been initialized, before it sends the DHCP discover request. I do not remember, but I do not think that you used busybox with v1.0.1.

Post Reply