This patch fixes a problem I had with a client who was getting DHCP
request retries with our network device and their DHCP server.
It turns out that their Windows Server 2003 DHCP server couldn't handle
fast DHCP transactions and it just "forgets" some of them. I verified
this with my own Windows Server 2003 install and a network analyser
(Ethereal/Wireshark). It seems that a small, lean 200MHz embedded system
is too fast for a Windows Server 2003 system running on a 2GHz+ machine.
Go figure.
Adding a small (50ms) delay fixes this problem nicely and it only adds a
small amount of overhead in comparison to the DHCP request timeouts and
retries.
NOTE: This patch is ported from my old 1.1.3 U-Boot system. I have not
retested it with 1.3.2 U-Boot against Windows Server 2003. The patch is
very small and simple, so I don't think should be necessary.
I can retest this functionality if you wish, but it will require me to
reinstall Windows Server and set everything up again.
Aras
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
* added option CONFIG_BOOTP_DHCP_REQUEST_DELAY. This provides an optional delay
before sending "DHCP Request" in net/bootp.c. Required to overcome
interoperability problems with Windows Server 200x DHCP server when U-Boot
client responds too fast for server to handle.
--- a/README 2008-03-26 09:18:01.000000000 +1100
+++ b/README 2008-03-26 09:20:18.000000000 +1100
@@ -1131,6 +1131,20 @@
of the "hostname" environment variable is passed as
option 12 to the DHCP server.
+ CONFIG_BOOTP_DHCP_REQUEST_DELAY
+
+ A 32bit value in microseconds for a delay between
+ receiving a "DHCP Offer" and sending the "DHCP Request".
+ This fixes a problem with certain DHCP servers that don't
+ respond 100% of the time to a "DHCP request". E.g. On an
+ AT91RM9200 processor running at 180MHz, this delay needed
+ to be *at least* 15,000 usec before a Windows Server 2003
+ DHCP server would reply 100% of the time. I recommend at
+ least 50,000 usec to be safe. The alternative is to hope
+ that one of the retries will be successful but note that
+ the DHCP timeout and retry process takes a longer than
+ this delay.
+
- CDP Options:
CONFIG_CDP_DEVICE_ID
--- a/net/bootp.c 2008-03-25 15:01:00.000000000 +1100
+++ b/net/bootp.c 2008-03-26 09:24:10.000000000 +1100
@@ -879,7 +879,10 @@
iplen = BOOTP_HDR_SIZE - sizeof(bp->bp_vend) + extlen;
NetSetIP(iphdr, 0xFFFFFFFFL, PORT_BOOTPS, PORT_BOOTPC, iplen);
- debug ("Transmitting DHCPREQUEST packet: len = %d\n", pktlen);
+ debug ("Transmitting DHCPREQUEST packet: len = %d\n", pktlen);
+#ifdef CONFIG_BOOTP_DHCP_REQUEST_DELAY
+ udelay(CONFIG_BOOTP_DHCP_REQUEST_DELAY);
+#endif /* CONFIG_BOOTP_DHCP_REQUEST_DELAY */
NetSendPacket(NetTxPacket, pktlen);
}
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users