5 ms·
It wasn't the client, but beyond that honestly I don't know, I didn't get into the nitty gritty of it. Could have been a terrible or overloaded piece of server
by smellf 10y ago
It wasn't the client, but beyond that honestly I don't know, I didn't get into the nitty gritty of it. Could have been a terrible or overloaded piece of server hardware, or maybe a network loop or something else misbehaving between the client and server.
We built a portable device that starts a DHCP client and tries to get a lease on an Ethernet plug event, and if no lease is acquired after a certain amount of time, the device assumes it has been plugged directly to a PC (or an "ad-hoc", isolated network with a switch and no router) and will kill the client and start a DHCP server itself, so you can access the device's webserver directly. I wasn't onsite, but the solution was simple - we just increased the timeout to wait for a lease before starting the server.
- Jaruzel 10y agoNot sure how it works on Linux, but on Windows, if the acquired DHCP IP has a lease time of 60 minutes, then Windows will try to renew that IP anytime after 1/2 the lease time (i.e. 30 minutes). This is why in Corporate environments good practice is to keep lease time 1 hour or more.
- BuildTheRobots 10y agoDepending on what switch you're plugging into, this could easily be Cisco Portfast or similar catching you out. When the port goes active (layer 2 link) the switch inspects but doesn't forward packets to try and ensure you've not just added a loop into your ethernet network. After a minute or so, if everything looks normal, the switch then starts letting the device talk to the rest of the network. If you don't know about it then this can be annoying at best as you seem to have a layer2 link but DHCP can seem to take an age to start working :)
- JoeAltmaier 10y agoI'd note that DHCP broadcasts are unreliable and could simply be dropped. Then the client is responsible for retrying them. Except that packets don't really get dropped for wire errors at all anymore. Not unless the bandwidth is oversubscribed and there's a collision (really a buffer overflow on a router).