* bonding and IPv6 "doesn't work"?
@ 2011-07-12 16:05 Tomasz Chmielewski
2011-07-12 16:14 ` David Lamparter
0 siblings, 1 reply; 5+ messages in thread
From: Tomasz Chmielewski @ 2011-07-12 16:05 UTC (permalink / raw)
To: netdev
I'm trying to make bonding work with IPv6, using 2.6.39.3 kernel.
Unfortunately, it doesn't seem to work without some rather unintuitive
workarounds.
I make a bond0 of two interfaces, eth0 and eth1.
As soon as I assign them a IPv6 address, I can see the following message
in dmesg:
bond0: IPv6 duplicate address 2a01:4f8:120:14c4::1247 detected!
I'm not able to reach any host in the internet:
# assign an IP address
ip -6 addr add 2a01:4f8:120:14c4::1247/64 dev bond0
ip -6 route add 2a01:4f8:120:14c4::15 dev bond0
ip -6 route add default via 2a01:4f8:120:14c4::15
# ping a host in the internet
ping6 -c 1 kernel.org
PING kernel.org(pub1.kernel.org) 56 data bytes
--- kernel.org ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
However if I start bonding with just one interface, add IPv6 address to
it, then use ifenslave to add a second interface, I'm able to reach the
hosts in the internet.
# restart network
/etc/init.d/network restart
# remove eth1 from bonding
ifenslave -d bond0 eth1
# assign an IP address
ip -6 addr add 2a01:4f8:120:14c4::1247/64 dev bond0
ip -6 route add 2a01:4f8:120:14c4::15 dev bond0
ip -6 route add default via 2a01:4f8:120:14c4::15
# add eth1 to bonding
ifenslave bond0 eth1
# ping a host in the internet
ping6 -c 1 kernel.org
PING kernel.org(pub4.kernel.org) 56 data bytes
64 bytes from pub4.kernel.org: icmp_seq=0 ttl=49 time=61.6 ms
--- kernel.org ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 61.645/61.645/61.645/0.000 ms, pipe 2
This is 100% reproducible - is it expected?
I've tried setting these sysctl values, but it didn't help:
net.ipv6.conf.eth0.accept_dad = 0
net.ipv6.conf.eth1.accept_dad = 0
# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.0 (June 2, 2010)
Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth0
MII Status: up
Speed: 100 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 72:d2:6e:8e:07:4d
Slave queue ID: 0
Slave Interface: eth1
MII Status: up
Speed: 100 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 6a:f2:e9:64:01:76
Slave queue ID: 0
--
Tomasz Chmielewski
http://wpkg.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bonding and IPv6 "doesn't work"?
2011-07-12 16:05 bonding and IPv6 "doesn't work"? Tomasz Chmielewski
@ 2011-07-12 16:14 ` David Lamparter
2011-07-12 16:25 ` Tomasz Chmielewski
0 siblings, 1 reply; 5+ messages in thread
From: David Lamparter @ 2011-07-12 16:14 UTC (permalink / raw)
To: Tomasz Chmielewski; +Cc: netdev
On Tue, Jul 12, 2011 at 06:05:41PM +0200, Tomasz Chmielewski wrote:
> I make a bond0 of two interfaces, eth0 and eth1.
What kind of device do you have on the other side of those links?
> bond0: IPv6 duplicate address 2a01:4f8:120:14c4::1247 detected!
[...]
> However if I start bonding with just one interface, add IPv6 address to
> it, then use ifenslave to add a second interface, I'm able to reach the
> hosts in the internet.
Yeah, when you add the IPv6 address, IPv6 ND does its job and announces
your presence/does DAD. Your bonding peer is probably looping those
packets back on the other link, most likely because...
> Bonding Mode: load balancing (round-robin)
... most likely because you maybe have a switch on the other side, and
that switch expects you to do 802.3ad?
Just guessing,
-David
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bonding and IPv6 "doesn't work"?
2011-07-12 16:14 ` David Lamparter
@ 2011-07-12 16:25 ` Tomasz Chmielewski
2011-07-12 16:36 ` David Lamparter
2011-07-12 17:15 ` Chris Friesen
0 siblings, 2 replies; 5+ messages in thread
From: Tomasz Chmielewski @ 2011-07-12 16:25 UTC (permalink / raw)
To: David Lamparter; +Cc: netdev
On 12.07.2011 18:14, David Lamparter wrote:
> On Tue, Jul 12, 2011 at 06:05:41PM +0200, Tomasz Chmielewski wrote:
>> I make a bond0 of two interfaces, eth0 and eth1.
>
> What kind of device do you have on the other side of those links?
It's a virtual machine.
So, a bridge of the host.
I know it doesn't make much sense to set up bonding in a virtual
machine, but I'm trying to determine what possible problems I might have
in a production environment (and got stuck at the very beginning).
IPv4 bonding works fine in this setup.
>> bond0: IPv6 duplicate address 2a01:4f8:120:14c4::1247 detected!
> [...]
>> However if I start bonding with just one interface, add IPv6 address to
>> it, then use ifenslave to add a second interface, I'm able to reach the
>> hosts in the internet.
>
> Yeah, when you add the IPv6 address, IPv6 ND does its job and announces
> your presence/does DAD.
Shouldn't this disable DAD? Or am I confusing something here?
net.ipv6.conf.eth0.accept_dad = 0
net.ipv6.conf.eth1.accept_dad = 0
> Your bonding peer is probably looping those
> packets back on the other link, most likely because...
>
>> Bonding Mode: load balancing (round-robin)
>
> ... most likely because you maybe have a switch on the other side, and
> that switch expects you to do 802.3ad?
It's a virtual machine, so the host shouldn't know or care much about
802.3ad (I think!).
--
Tomasz Chmielewski
http://wpkg.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bonding and IPv6 "doesn't work"?
2011-07-12 16:25 ` Tomasz Chmielewski
@ 2011-07-12 16:36 ` David Lamparter
2011-07-12 17:15 ` Chris Friesen
1 sibling, 0 replies; 5+ messages in thread
From: David Lamparter @ 2011-07-12 16:36 UTC (permalink / raw)
To: Tomasz Chmielewski; +Cc: David Lamparter, netdev
On Tue, Jul 12, 2011 at 06:25:16PM +0200, Tomasz Chmielewski wrote:
> It's a virtual machine.
> So, a bridge of the host.
Just a bridge? No bonding device? You need to set it up on both sides...
> >> bond0: IPv6 duplicate address 2a01:4f8:120:14c4::1247 detected!
> > [...]
> >> However if I start bonding with just one interface, add IPv6 address to
> >> it, then use ifenslave to add a second interface, I'm able to reach the
> >> hosts in the internet.
> >
> > Yeah, when you add the IPv6 address, IPv6 ND does its job and announces
> > your presence/does DAD.
>
> Shouldn't this disable DAD? Or am I confusing something here?
>
> net.ipv6.conf.eth0.accept_dad = 0
> net.ipv6.conf.eth1.accept_dad = 0
Yes, you would need to set
net.ipv6.conf.bond0.accept_dad = 0
because eth0 and eth1 are not actually participating in the IPv6 stack.
(I'd recommend setting disable_ipv6=1 for them too)
However, you should not be getting that DAD error at all, it indicates
that broadcast/multicast packets that go out on eth0 are looped back on
eth1 (and vice versa). Your bonding setups on the host and the VM don't
seem to match each other.
-David
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bonding and IPv6 "doesn't work"?
2011-07-12 16:25 ` Tomasz Chmielewski
2011-07-12 16:36 ` David Lamparter
@ 2011-07-12 17:15 ` Chris Friesen
1 sibling, 0 replies; 5+ messages in thread
From: Chris Friesen @ 2011-07-12 17:15 UTC (permalink / raw)
To: Tomasz Chmielewski; +Cc: David Lamparter, netdev
On 07/12/2011 10:25 AM, Tomasz Chmielewski wrote:
> On 12.07.2011 18:14, David Lamparter wrote:
>> Your bonding peer is probably looping those
>> packets back on the other link, most likely because...
>>
>>> Bonding Mode: load balancing (round-robin)
>>
>> ... most likely because you maybe have a switch on the other side, and
>> that switch expects you to do 802.3ad?
>
> It's a virtual machine, so the host shouldn't know or care much about
> 802.3ad (I think!).
I suspect that connecting multiple links of a bond to the same unmanaged
switch (or virtual bridge) is going to confuse things.
Try using multiple virtual bridges instead, one for each slave in the
bond. That way they won't interfere with each other.
Chris
--
Chris Friesen
Software Developer
GENBAND
chris.friesen@genband.com
www.genband.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-07-12 17:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-12 16:05 bonding and IPv6 "doesn't work"? Tomasz Chmielewski
2011-07-12 16:14 ` David Lamparter
2011-07-12 16:25 ` Tomasz Chmielewski
2011-07-12 16:36 ` David Lamparter
2011-07-12 17:15 ` Chris Friesen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).