dhcpcd-discuss

Re: NetComm modems/routers reject unrecognised leases in a way that confuses 'dhcpcd'

Roy Marples

Tue Mar 22 12:48:13 2011

Hi

Sorry for the late reply

On Wed, 2011-03-16 at 12:43 +1100, Xavion wrote:
> Hi All
> 
> I posted the following message to the NetworkManager and Arch Linux
> bug trackers.  For a broader background, you can follow those two
> threads here and here.  Based on the feedback from those developers, I
> now realise that this is probably something the 'dhcpcd' developers
> should look into.
> 
>         If my modem/router is switched off (e.g. overnight), I can't
>         reconnect - via Ethernet or wireless - the next time it's
>         switched on, without having to mess around first.
>         
>         This is because your script doesn't terminate 'dhcpcd' via the
>         '-k' option. The effect is that the stale ".lease" file from
>         the previous session (day) remains in "/var/lib/dhcpcd/".
>         
>         This ".lease" file is automatically reused when reconnecting,
>         but my modem/router forgot about it while switched off (e.g.
>         overnight). This means that initial connection attempts are
>         rejected until I delete it.
>         
>         I'm guessing that all users with NetComm modem/routers - and
>         probably others - would be facing this problem every time they
>         switch theirs on. Will you please terminate 'dhcpcd' using the
>         '-k' option in future releases?

This is clearly a bug with the DHCP server in your router.
I have no intention of making -k the default.
 
> The context is that I had a working connection and I rebooted my
> modem/router for testing purposes.  You can see from the attached
> output what happened when I then tried to reconnect.  Instead of
> rejecting the (now) unrecognised lease, my modem/router acknowledged
> it and set the IP address to "0.0.0.0".
> 
> I can see that this isn't the sort of behaviour that 'dhcpcd' should
> be expecting, but there would be heaps of Linux users with NetComm
> modems/routers out there.  For that reason, I thought you might want
> to add a workaround in your code to treat such a response as a
> rejection, before requesting a new lease.
> 
> I'm fairly sure that the Windows equivalent of 'dhcpcd' includes a
> similar workaround, because I never have this problem when
> reconnecting to my modem/router after restarting it (e.g. the next
> day).  I will also contact the technical support area of NetComm to
> see if they can provide any insight about the issue.

Any workaround would involve dhcpcd inspecting the ACK from your router
and rejecting invalid addresses.

So that I can do a good patch, could you please supply a tcpdump of the
DHCP transaction please? To make one do this in one terminal
tcpdump -w/tmp/dhcp.cap -s0 -ieth0
and then start dhcpcd normally in another. Once completed, kill the
tcpdump process and email me /tmp/dhcp.cap.

Thanks

Roy


Follow-Ups:
Re: NetComm modems/routers reject unrecognised leases in a way that confuses 'dhcpcd'Xavion
References:
NetComm modems/routers reject unrecognised leases in a way that confuses 'dhcpcd'Xavion
Archive administrator: postmaster@marples.name