dhcpcd-discuss

Re: dhcpcd and secondary interface

Roy Marples

Fri Feb 08 09:46:43 2013

Hi Kobi

On 08/02/2013 6:06, Kobi Cohen-Arazi wrote:
I have a question related to dhcpcd with the following scenario:

Client is connected to one network say with IP subnet 192.168.1.0/24 [1].
Gets an IP e.g. 192.168.1.40.

Then it is switching to a different network without "if down" of the
interface. (for this e.g. wlan0 interface).
dhcpcd is restarted and DHCP request is sent to the DHCP server on
the seconds network. Second network has the same IP subnet
configuration as the previous one (192.168.1.0/24 [1]) and a different
DHCP  server.
dhcpcd receive a new IP, e.g. 192.168.1.50 but here is what I see when running:
$ _ip_ addr _show dev wlan0_

there are 2 interfaces for wlan0 one is with the original address
(192.168.1.40) and one with the new address 192.168.1.50 with
"SECONDARY" flag.

I already saw that dhcpcd is making sure that promote_secondary is == 1.

My question is why dhcpcd is not removing the primary/original
address so the secondary can be promoted.

The above scenario with DIFFERENT IP subnet configuration on the 2
different networks works fine. So the new incoming address from the
seconds DHCP server takes over the old address and there are no
issues.

Any pointers on how should I debug it in dhcpcd code?
I'm using the following commit:
http://gitorious.org/rowboat/external-dhcpcd/commits/rowboat-jb [2]

ver 5.5.6.

dhcpcd should remove the old ip address fine and should do this when the interface is down, however there are some scenarios where this won't occur. Basically dhcpcd will not do this if persistent address is enabled or carrier detection is disabled. Can you tell me how dhcpcd is started and what your configuration file is?

Thanks

Roy

Follow-Ups:
Re: dhcpcd and secondary interfaceKobi Cohen-Arazi
References:
dhcpcd and secondary interfaceKobi Cohen-Arazi
Archive administrator: postmaster@marples.name