dhcpcd-discuss

Re: Question about bonding

Dallas Clement

Tue Dec 13 23:49:46 2011

What I said earlier is not correct.  I only have one instance of
dhcpcd running per bond interface.  There are none running for the
slaves.  What I'm seeing is that the slaves are getting configured
with the same IP address as the bond interface.

I've captures the dhcpcd log messages for two instances of dhcpcd that
are running for interfaces bond0 and bond 1.  The slaves for bond0 are
eth0 and eth1.  The slaves for bond1 are eth2 and eth3.  As you can
see, the slaves are getting configured:

Dec 14 08:34:20  dhcpcd[31530]: version 5.2.12 starting
Dec 14 08:34:20  dhcpcd[31530]: forked to background, child pid 31531
Dec 14 08:34:20  dhcpcd[31531]: bond0: waiting for carrier
Dec 14 08:34:21  dhcpcd[31616]: version 5.2.12 starting
Dec 14 08:34:21  dhcpcd[31616]: forked to background, child pid 31617
Dec 14 08:34:21  dhcpcd[31617]: bond1: rebinding lease of 192.168.1.132
Dec 14 08:34:21  dhcpcd[31617]: bond1: carrier lost
Dec 14 08:34:23  dhcpcd[31531]: bond0: carrier acquired
Dec 14 08:34:23  dhcpcd[31531]: bond0: rebinding lease of 192.168.1.142
Dec 14 08:34:23  dhcpcd[32566]: sending signal 14 to pid 31531
Dec 14 08:34:23  dhcpcd[31531]: received SIGALRM, rebinding
Dec 14 08:34:23  dhcpcd[31531]: eth0: rebinding lease of 192.168.1.142
Dec 14 08:34:23  dhcpcd[31617]: bond1: carrier acquired
Dec 14 08:34:23  dhcpcd[31617]: bond1: rebinding lease of 192.168.1.132
Dec 14 08:34:23  dhcpcd[31531]: eth1: rebinding lease of 192.168.1.142
Dec 14 08:34:23  dhcpcd[31617]: bond1: acknowledged 192.168.1.132 from
192.168.1.2
Dec 14 08:34:23  dhcpcd[31531]: eth2: rebinding lease of 192.168.1.132
Dec 14 08:34:24  dhcpcd[31531]: eth3: waiting for carrier
Dec 14 08:34:24  dhcpcd[31531]: bond0: rebinding lease of 192.168.1.142
Dec 14 08:34:24  dhcpcd[31617]: bond1: checking for 192.168.1.132
Dec 14 08:34:24  dhcpcd[31531]: bond1: rebinding lease of 192.168.1.132
Dec 14 08:34:24  dhcpcd[31531]: bond0: acknowledged 192.168.1.142 from
192.168.1.2
Dec 14 08:34:24  dhcpcd[538]: sending signal 14 to pid 31617
Dec 14 08:34:24  dhcpcd[31617]: received SIGALRM, rebinding
Dec 14 08:34:24  dhcpcd[31617]: eth0: rebinding lease of 192.168.1.142
Dec 14 08:34:24  dhcpcd[31531]: bond0: checking for 192.168.1.142
Dec 14 08:34:24  dhcpcd[31531]: eth0: acknowledged 192.168.1.142 from
192.168.1.2
Dec 14 08:34:24  dhcpcd[31617]: eth1: rebinding lease of 192.168.1.142
Dec 14 08:34:24  dhcpcd[31531]: eth0: checking for 192.168.1.142
Dec 14 08:34:24  dhcpcd[31531]: eth1: acknowledged 192.168.1.142 from
192.168.1.2
Dec 14 08:34:24  dhcpcd[31617]: eth2: rebinding lease of 192.168.1.132
Dec 14 08:34:24  dhcpcd[31617]: eth3: rebinding lease of 192.168.1.132
Dec 14 08:34:24  dhcpcd[31531]: eth1: checking for 192.168.1.142
Dec 14 08:34:24  dhcpcd[31531]: eth2: acknowledged 192.168.1.132 from
192.168.1.2
Dec 14 08:34:24  dhcpcd[31617]: bond0: rebinding lease of 192.168.1.142
Dec 14 08:34:24  dhcpcd[31617]: bond1: rebinding lease of 192.168.1.132
Dec 14 08:34:24  dhcpcd[31531]: eth2: checking for 192.168.1.132
Dec 14 08:34:24  dhcpcd[31531]: bond1: acknowledged 192.168.1.132 from
192.168.1.2
Dec 14 08:34:24  dhcpcd[31617]: eth0: acknowledged 192.168.1.142 from
192.168.1.2
Dec 14 08:34:24  dhcpcd[31531]: bond1: checking for 192.168.1.132
Dec 14 08:34:24  dhcpcd[31531]: eth3: carrier acquired
Dec 14 08:34:24  dhcpcd[31531]: eth3: rebinding lease of 192.168.1.132
Dec 14 08:34:25  dhcpcd[31617]: eth0: checking for 192.168.1.142
Dec 14 08:34:25  dhcpcd[31617]: eth1: acknowledged 192.168.1.142 from
192.168.1.2
Dec 14 08:34:25  dhcpcd[31531]: eth3: acknowledged 192.168.1.132 from
192.168.1.2
Dec 14 08:34:25  dhcpcd[31617]: eth1: checking for 192.168.1.142
Dec 14 08:34:25  dhcpcd[31531]: eth3: checking for 192.168.1.132
Dec 14 08:34:25  dhcpcd[31617]: eth2: acknowledged 192.168.1.132 from
192.168.1.2
Dec 14 08:34:25  dhcpcd[31617]: eth2: checking for 192.168.1.132
Dec 14 08:34:25  dhcpcd[31617]: eth3: acknowledged 192.168.1.132 from
192.168.1.2
Dec 14 08:34:25  dhcpcd[31617]: eth3: checking for 192.168.1.132
Dec 14 08:34:25  dhcpcd[31617]: bond0: acknowledged 192.168.1.142 from
192.168.1.2
Dec 14 08:34:25  dhcpcd[31617]: bond0: checking for 192.168.1.142
Dec 14 08:34:25  dhcpcd[31617]: bond1: acknowledged 192.168.1.132 from
192.168.1.2
Dec 14 08:34:25  dhcpcd[31617]: bond1: checking for 192.168.1.132
Dec 14 08:34:29  dhcpcd[31531]: eth1: leased 192.168.1.142 for 691200 seconds
Dec 14 08:34:29  dhcpcd[31531]: eth0: leased 192.168.1.142 for 691200 seconds
Dec 14 08:34:29  dhcpcd[31617]: eth0: leased 192.168.1.142 for 691200 seconds
Dec 14 08:34:29  dhcpcd[31531]: eth2: leased 192.168.1.132 for 691200 seconds
Dec 14 08:34:29  dhcpcd[31617]: eth0: add_route: No such process
Dec 14 08:34:29  dhcpcd[31617]: eth1: leased 192.168.1.142 for 691200 seconds
Dec 14 08:34:29  dhcpcd[31617]: eth0: add_route: No such process
Dec 14 08:34:29  dhcpcd[31617]: eth1: add_route: No such process
Dec 14 08:34:29  dhcpcd[31531]: bond0: leased 192.168.1.142 for 691200 seconds
Dec 14 08:34:29  dhcpcd[31617]: bond0: leased 192.168.1.142 for 691200 seconds
Dec 14 08:34:29  dhcpcd[31617]: eth0: add_route: No such process
Dec 14 08:34:29  dhcpcd[31617]: eth1: add_route: No such process
Dec 14 08:34:30  dhcpcd[31531]: bond1: leased 192.168.1.132 for 691200 seconds
Dec 14 08:34:30  dhcpcd[31617]: eth3: leased 192.168.1.132 for 691200 seconds
Dec 14 08:34:30  dhcpcd[31617]: eth0: add_route: No such process
Dec 14 08:34:30  dhcpcd[31617]: eth1: add_route: No such process
Dec 14 08:34:30  dhcpcd[31617]: eth2: leased 192.168.1.132 for 691200 seconds
Dec 14 08:34:30  dhcpcd[31617]: eth0: add_route: No such process
Dec 14 08:34:30  dhcpcd[31617]: eth1: add_route: No such process
Dec 14 08:34:30  dhcpcd[31617]: eth2: add_route: No such process
Dec 14 08:34:30  dhcpcd[31617]: bond1: leased 192.168.1.132 for 691200 seconds
Dec 14 08:34:30  dhcpcd[31617]: eth0: add_route: No such process
Dec 14 08:34:30  dhcpcd[31617]: eth1: add_route: No such process
Dec 14 08:34:30  dhcpcd[31617]: eth2: add_route: No such process
Dec 14 08:34:30  dhcpcd[31617]: bond1: add_route: No such process
Dec 14 08:34:31  dhcpcd[31531]: eth3: leased 192.168.1.132 for 691200 seconds
Dec 14 08:34:31  dhcpcd[31531]: eth3: add_route: No such process

Here are the configured IP addresses:

# ip address show
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,10800> mtu 1500 qdisc pfifo_fast
master bond0 qlen 1000
    link/ether cc:52:af:ea:7e:d8 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.142/23 brd 192.168.1.255 scope global eth0
3: eth1: <BROADCAST,MULTICAST,UP,10800> mtu 1500 qdisc pfifo_fast
master bond0 qlen 1000
    link/ether cc:52:af:ea:7e:d8 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.142/23 brd 192.168.1.255 scope global eth1
4: eth2: <BROADCAST,MULTICAST,UP,10800> mtu 1500 qdisc pfifo_fast
master bond1 qlen 1000
    link/ether cc:52:af:ea:7e:da brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.132/23 brd 192.168.1.255 scope global eth2
5: eth3: <BROADCAST,MULTICAST,UP,10800> mtu 1500 qdisc pfifo_fast
master bond1 qlen 1000
    link/ether cc:52:af:ea:7e:da brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.132/23 brd 192.168.1.255 scope global eth3
14: bond0: <BROADCAST,MULTICAST,UP,10400> mtu 1500 qdisc noqueue
    link/ether cc:52:af:ea:7e:d8 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.142/23 brd 192.168.1.255 scope global bond0
15: bond1: <BROADCAST,MULTICAST,UP,10400> mtu 1500 qdisc noqueue
    link/ether cc:52:af:ea:7e:da brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.132/23 brd 192.168.1.255 scope global bond1

I was not expecting the slave interfaces to be configured by the
dhcpcd instance which manages the bond interface.  Anything I can do
to avoid this?

Follow-Ups:
Re: Re: Question about bondingRoy Marples
References:
Question about bondingDallas Clement
Archive administrator: postmaster@marples.name