netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul LeoNerd Evans <leonerd@leonerd.org.uk>
To: netdev@vger.kernel.org
Subject: Packet capture and Bonding asymmetries
Date: Wed, 9 Jun 2010 22:27:04 +0100	[thread overview]
Message-ID: <20100609212704.GY11110@cel.leo> (raw)

[-- 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 --]

             reply	other threads:[~2010-06-09 21:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-09 21:27 Paul LeoNerd Evans [this message]
2010-06-09 22:52 ` Packet capture and Bonding asymmetries Jay Vosburgh
2010-06-10 12:10   ` Paul LeoNerd Evans
2010-06-11 12:18   ` Paul LeoNerd Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100609212704.GY11110@cel.leo \
    --to=leonerd@leonerd.org.uk \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).