[Thinstation-developer] [Fwd: [Thinstation-general] Solved: DHCP problems]
Brought to you by:
doncuppjr
From: Kanwar R. S. <m3...@ro...> - 2006-07-20 14:21:29
|
It's better here then in the general list... -------- Forwarded Message -------- From: Jason Meers <Jas...@mv...> To: thinstation general <thi...@li...> Subject: [Thinstation-general] Solved: DHCP problems Date: Thu, 20 Jul 2006 14:14:33 +0100 Yesterday we lost power completely to our offices. The power went a couple of times in close succession throughout the day. I lost approx 100 TS clients for an hour because nobody could get a DHCP address. After a lot of troubleshooting the problem was identified as our old friend "spanning-tree protocol". For some reason when the power came back on all of our network switches had reverted back to factory defaults. Not only had spanning tree protocol been enabled on all of our switches, but our switches were now using DHCP addresses themselves instead of the fixed ones we normally assign them. We had to reconfigure all of our switches from a laptop with a serial cable which took AGES. After some further investigation it seems that the problems we and many other people on this list suffer from are caused by the "forward delay" setting used in the spanning-tree protocol. Most implementations of spanning-tree render the port effectively unusable for 15 seconds while "port discovery" is performed. Most implementations also seem to use a 2 second "initial hello" setting too. When the udhcp client in busybox tries to get a lease the client simply times out because of the "port discovery delay". As mentioned in previous posts the busybox dhcp client does not support a length of time to wait before failing. After looking at the code in /packages/base/etc/init.d/network it seems that TS makes two attempts to get a dhcp address, this is also mentioned by other users on the list. I decided to put a 20 second delay between the command to bring the interface up and the command to request a dhcp lease as follows: excerpt from /packages/base/etc/init.d/network (approx line 206) ---- snip ---- ifconfig $device up sleep 20 wireless_config ---- snip ---- This works flawlessly for me now and I can reproduce the problem and fix the problems at will. For any of you who would like to try this yourself you can test this by either turning spanning tree on and off on your switches or changing the "forward delay" setting on a particular port (the setting is also known as FDELAY, FAST-PORT or PORT-FAST depending on the switch manufacturer) I would like to suggest the following fix for ts 2.2 final: A variable called NET_DHCP_DELAY that is set to a value of "0" seconds by default but can be overridden using a "NET_DHCP_DELAY=" option in thinstation.conf.buildtime (this can not be done in the normal config files because you need a working IP Address to be able to retrieve them) We then only need to add a single line which reads: Sleep $NET_DHCP_DELAY This additional line in the existing network script has no knock-on effects on any other part of the distribution. I have tested this and it does not break anything (we simply add a zero second delay that can be increased to x number of seconds if required). Please could this be included in 2.2 final. Thanks Jason Meers ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Thinstation-general mailing list Thi...@li... https://lists.sourceforge.net/lists/listinfo/thinstation-general -- Kanwar Ranbir Sandhu Linux 2.6.17-1.2141_FC4 i686 GNU/Linux 10:17:53 up 3:47, 2 users, load average: 0.26, 0.17, 0.18 |