1 |
On Jan 7, 2012 3:13 PM, "Nilesh Govindarajan" <contact@××××××××.com> wrote: |
2 |
> |
3 |
> On Sat 07 Jan 2012 01:27:45 PM IST, Nilesh Govindarajan wrote: |
4 |
> > Well, the title tells the question clearly; how do I configure network |
5 |
> > such that the first ip is obtained via dhcpcd and other is static? |
6 |
> > config_eth0="dhcp <static>" doesn't work. |
7 |
> > |
8 |
> > As a solution I wrote a dhcpcd hook containing /sbin/ifconfig eth0:0 |
9 |
> > <ip> netmask <netmask> |
10 |
> > |
11 |
> > Is there a direct way? |
12 |
> > |
13 |
> |
14 |
> Yikes! It works now :O |
15 |
> |
16 |
|
17 |
AFAIK dhcpcd will remove all IP addresses on an interface (i.e., all |
18 |
addresses listed by 'ip addr sh dev eth0') before it sets the interface's |
19 |
address using the values provided by the DHCP server. |
20 |
|
21 |
Thus, your configuration will work only if dhcpcd receives an address soon |
22 |
enough before the static address(es) gets assigned. |
23 |
|
24 |
If the dynamic address assignment is delayed, then the static addresses |
25 |
will be removed by dhcpcd, resulting in just one address on the interface. |
26 |
|
27 |
Of course, this is pure conjecture on my part. If there's anyone more |
28 |
familiar with how addresses gets assigned in Gentoo, feel free to correct |
29 |
me. |
30 |
|
31 |
Rgds, |