Re: dhcpcd and secondary interface
Roy Marples
Fri Feb 08 18:38:41 2013
On 08/02/2013 18:01, Kobi Cohen-Arazi wrote:
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.
Wait a sec - so I do need to ifdown + ifup the device in order for
the secondary to be promoted and old IP address to be removed? That
might be my issue. I'm not doing it.
Yes, this is the issue, or sounds like it. But read below before doing
anything.
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?
I should have mention this in my previous email. I'm using dhcpcd on
Android JellyBean device. Android is using dhcpcd as DHCP client.
dhcpcd is started with:
dhcpcd -ABKLG -h <hostname>
There is no dhcpcd.conf file on the OS filesystem.
Really? I'm suprised it works for the most part then.
I would install the default dhcpcd.conf dhcpcd ships with into /etc
Here is what I see in if-options.c:
case 'A':
ifo->options &= ~DHCPCD_ARP;
/* IPv4LL requires ARP */
ifo->options &= ~DHCPCD_IPV4LL;
break;
case 'B':
ifo->options &= ~DHCPCD_DAEMONISE;
break;
case 'K':
ifo->options &= ~DHCPCD_LINK;
break;
case 'L':
ifo->options &= ~DHCPCD_IPV4LL;
break;
case 'G':
ifo->options &= ~DHCPCD_GATEWAY;
break;
Interesting.
I would try this
dhcpcd -h <hostname>
Do you know what starts dhcpcd? If it's just started as a system daemon
and left to itself then it should be fine.
Otherwise I would convert your 'droid to do this.
Thanks
Roy
Archive administrator: postmaster@marples.name