dhcpcd-discuss

RE: IPV4LL and EXPIRE

David Hauck

Tue Oct 21 19:45:17 2014

On Tuesday, October 21, 2014 12:25 PM, Roy Marples wrote:
> On 21/10/2014 19:59, David Hauck wrote:
>>> I don't think there is any guidance as such.
>>> 
>>> In the ideal world we should attempt both DHCP and IPv4LL at the
>>> same time, but the dhcpcd event loop cannot do that easily yet. One
>>> possibility is to create a pseudo interface for it as we do for the
>>> IA_NA + IA_PD DHCPv6 case, but that was very hard to manage.
>>> 
>>> But right now, dhcpcd rightly or wrongly attempts to configure
>>> IPv4LL on carrier up if the last address was IPv4LL.
>> 
>> I am interested in your opinion/gut feeling about this. Mine tells
>> me that
> this is the incorrect behaviour - i.e., there is now a DHCP server
> present on the network and the DHCP client now first try to establish contact with it.
> Another way to look at this is if I brought the interface down (ifdown
> eth1) and then back up (ifup eth1) the client would indeed establish
> contact with the DHCP server (and not attempt to renew the old IPV4LL lease).
> 
> dhcpcd cannot assume that if you plug in a cable there is a DHCP server.

Right, it's not so much assume a DHCP server as whether or not to attempt to discover one (and I'm suggesting this determination is subject to whether the previous state was IPV4LL or BOUND).
 
> Infact, if you have a DHCP lease, unplug the cable and replug it, it
> will attempt to re-obtain that lease. 

By contacting the DHCP server, right ;)?

> The same is true for IPv4LL, so
> in this view it is a perfect mirror of DHCP.

Except that it doesn't first attempt to contact the DHCP server (which I'm suggesting is relevant here since the IPV4LL configuration is a *fallback* configuration - i.e., so any attempt to re-obtain the lease should include attempting to contact the DHCP server - in the IPV4LL case).

> From the case where the user expects a working DHCP lease it's wrong
> because his network probably won't function with IPv4LL.
> From the use case where IPv4LL actually works as designed on the
> network then DHCP isn't needed.
> 
> You know after working this for more years than I care to remember I
> really don't know which of the two above is better. I'm probably
> leaning slightly to your view.

OK, no problem, it certainly is good to get your feedback on this since you've had years of experience with DHCP :). My experience as an engineer in this domain is only as a user (administrator) so my ponderings do have this slant. Have said this it's surprising to me that there isn't better guidance on something like this (which is a situation that can certainly occur in practice). Maybe worthwhile at some point to see what other clients do in these situations...
 
> Roy

Follow-Ups:
Re: IPV4LL and EXPIRERoy Marples
References:
IPV4LL and EXPIREDavid Hauck
RE: IPV4LL and EXPIREDavid Hauck
RE: IPV4LL and EXPIREDavid Hauck
RE: IPV4LL and EXPIRERoy Marples
RE: IPV4LL and EXPIREDavid Hauck
RE: IPV4LL and EXPIREDavid Hauck
RE: IPV4LL and EXPIRERoy Marples
RE: IPV4LL and EXPIREDavid Hauck
RE: IPV4LL and EXPIRERoy Marples
RE: IPV4LL and EXPIRERoy Marples
RE: IPV4LL and EXPIREDavid Hauck
Re: IPV4LL and EXPIRERoy Marples
RE: IPV4LL and EXPIREDavid Hauck
RE: IPV4LL and EXPIREDavid Hauck
Re: IPV4LL and EXPIRERoy Marples
RE: IPV4LL and EXPIREDavid Hauck
Re: IPV4LL and EXPIRERoy Marples
Archive administrator: postmaster@marples.name