Responce to DHCP failure
Jess Hampshire (158) 865 posts |
Hi, currently machines hang when there is no DHCP server. Could I request some choices of behaviour if DHCP fails? 1. Disable networking (if lease has expired), keep trying for new lease periodically. 2. Disable network adaptor (for machines usually not connected to a network, there could be an obey file to re-enable it if a cable were plugged in) 3. Keep using the previous address, (trying for a new lease regularly.) 4. Use configured static IP. 5. Use a microsoft style 169 autoconf. |
Chris Hall (132) 3554 posts |
The Pi distro is alpha. Having DHCP enabled from the word go is a compromise. A tidy response to no server is currently (with the existing software) not easy as the boot process was conceived for a desktop machine. This point has been raised in ‘community support’ and is being worked on. |
Jess Hampshire (158) 865 posts |
I disagree, having DHCP enabled from the word go is the sensible way forward. The current implementation of DHCP what is compromised. Wouldn’t the problem for a non networked machine be much simpler, i.e detect lack of network cable and give up? For a networked machine the issue is when the DHCP server vanishes. |
Rik Griffin (98) 264 posts |
See the thread in ‘community support’ for more details, but basically the new version of the DHCP module (0.23) addresses these issues to an extent. Booting with no network cable, or onto a network with no DHCP server, will result in DHCP timing out after 20 secs and assigning a private IP address (169.254.×.y) to the interface. Future enhancements, like falling back to a static IP for example, will probably be added in the future :) |
Chris Hall (132) 3554 posts |
Booting with no network cable I have tried this with the 20 July ROM added to the current alpha distro but it still hangs forever. I have tried the 20 July harddisc image and the 20th July ROM but that is incomplete and wouldn’t let me set up networking. Does the disk image, already set up for DHCP networking, need to change with the new ROM? |
Rik Griffin (98) 264 posts |
Yes, for all the details please see my thread in ‘code review’: https://www.riscosopen.org/forum/forums/3/topics/1166 In short: You need a ROM with DHCP 0.23 in it. I have modified InetSetup (the !Boot plugin) so that it adds that switch to the file but if you are using a preprepared file for the disc image you’ll need to update it. |
Chris Hall (132) 3554 posts |
Rik, many thanks (I had found your post but after I posted). It’ll be tomorrow’s ROM then… |