netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Packet capture and Bonding asymmetries
@ 2010-06-09 21:27 Paul LeoNerd Evans
  2010-06-09 22:52 ` Jay Vosburgh
  0 siblings, 1 reply; 4+ messages in thread
From: Paul LeoNerd Evans @ 2010-06-09 21:27 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]

We use ethernet bonding to bond eth0 + eth1 into bond0, in an
active/standby failover pair. Given this is for redundancy, we put the
two physical ethernet links into different switches that follow
different paths in the data centre.

Given this topology, it can be really useful to know which physical
interface packets are received on. It seems the bonding driver doesn't
make this happen:

  # uname -r
  2.6.31.12

  # head -1 /proc/net/bonding/bond0 
  Ethernet Channel Bonding Driver: v3.5.0 (November 4, 2008)

  # pktdump -f icmp
  [15:27:12] RX(bond0): ICMP| 192.168.57.6->192.168.57.1 echo-request seq=1
  [15:27:12] TX(bond0): ICMP| 192.168.57.1->192.168.57.6 echo-reply seq=1
  [15:27:12] TX(eth0): ICMP| 192.168.57.1->192.168.57.6 echo-reply seq=1

I.e. when we transmit we see both the virtual bond0 interface and the
physical eth0 doing so; but when we receive only the virtual bond0
appears to do so.

I believe this should be fixable with a one-line patch; just adding a
call to netif_nit_deliver(skb) from within the bonding driver... though
just offhand I'm unable to find exactly the line where packets received
on slaves gets passed up to the master. :)

Can anyone advise on the sensibility or otherwise of this plan? I really
would like the behaviour where I can see how packets are received - is
this a good plan to acheive it?

I may sometime have a hack at writing a patch for this anyway, presuming
no major objections...

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-06-11 12:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-09 21:27 Packet capture and Bonding asymmetries Paul LeoNerd Evans
2010-06-09 22:52 ` Jay Vosburgh
2010-06-10 12:10   ` Paul LeoNerd Evans
2010-06-11 12:18   ` Paul LeoNerd Evans

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).