On Jan 7, 2012 3:13 PM, "Nilesh Govindarajan" <cont...@nileshgr.com> wrote:
>
> On Sat 07 Jan 2012 01:27:45 PM IST, Nilesh Govindarajan wrote:
> > Well, the title tells the question clearly; how do I configure network
> > such that the first ip is obtained via dhcpcd and other is static?
> > config_eth0="dhcp <static>" doesn't work.
> >
> > As a solution I wrote a dhcpcd hook containing /sbin/ifconfig eth0:0
> > <ip> netmask <netmask>
> >
> > Is there a direct way?
> >
>
> Yikes! It works now :O
>

AFAIK dhcpcd will remove all IP addresses on an interface (i.e., all
addresses listed by 'ip addr sh dev eth0') before it sets the interface's
address using the values provided by the DHCP server.

Thus, your configuration will work only if dhcpcd receives an address soon
enough before the static address(es) gets assigned.

If the dynamic address assignment is delayed, then the static addresses
will be removed by dhcpcd, resulting in just one address on the interface.

Of course, this is pure conjecture on my part. If there's anyone more
familiar with how addresses gets assigned in Gentoo, feel free to correct
me.

Rgds,

Reply via email to