netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: linux bridge and MTU
Date: Wed, 29 Oct 2008 08:26:10 -0700	[thread overview]
Message-ID: <20081029082610.307520cd@extreme> (raw)
In-Reply-To: <49086423.9050104@msgid.tls.msk.ru>

On Wed, 29 Oct 2008 16:24:51 +0300
Michael Tokarev <mjt@tls.msk.ru> wrote:

> There's an interesting interaction between different
> MTU (max transmission unit) values on interfaces
> which are bridged together.  I'm trying to understand
> how it works.
> 
> Suppose there are 2 interfaces in the bridge, one is
> with standard 1500 mtu and another is, say 3500.
> 
> As far as I can see, bridge interface sets its mtu to
> be the smallest of all the components.  Which seems
> to be the right ting to do.
> 
> But now the question is - is it possible to communicate
> over the interface with larger MTU using full frames?
> 
> For example, here are a tcpdump from a single ping-pong
> "pair" between host "B" which is connected to a larger-MTU
> interface, and host "A" which is with the bridge described
> above, using 3000-byte packets:
> 
> IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 3028) B > A ICMP echo request, id 35331, seq 2, length 3008
> 
> IP (tos 0x0, ttl 64, id 39747, offset 0, flags [+], proto ICMP (1), length 1500) B > A: ICMP echo reply, id 35331, seq 2, length 1480
> IP (tos 0x0, ttl 64, id 39747, offset 1480, flags [+], proto ICMP (1), length 1500) B > A: icmp
> IP (tos 0x0, ttl 64, id 39747, offset 2960, flags [none], proto ICMP (1), length 68) B > A: icmp
> 
> So, the reply comes in 3 packets according to 1500 MTU of
> the bridge interface.
> 
> When forwarding from B to some host C connected to the other
> interface with standard 1500 mtu, host A correctly sends
> "fragmentation required" ICMP back, so that part works.
> Also, host A obviously is able to receive larger frames.
> But it can't SEND larger frames, even if the underlying
> interface has proper MTU settings?
> 
> Is there a way to achieve this?
> 

The bridge is a pure level 2 switch. It tries to conform to the 802.1d standard
and therefore is agnostic of higher level protocols. To quote spec

---------------------

6.3.8 Maximum Service Data Unit Size
The Maximum Service Data Unit Size that can be supported by an IEEE 802 LAN varies with the MAC
method and its associated parameters (speed, electrical characteristics, etc.). It may be constrained by the
owner of the LAN. The Maximum Service Data Unit Size supported by a Bridge between two LANs is the
smaller of that supported by the LANs. No attempt is made by a Bridge to relay a frame to a LAN that does
not support the size of Service Data Unit conveyed by that frame.

---------------------
You might be able to do something with netfilter.

  reply	other threads:[~2008-10-29 15:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-29 13:24 linux bridge and MTU Michael Tokarev
2008-10-29 15:26 ` Stephen Hemminger [this message]
2008-10-29 20:31   ` Michael Tokarev
2008-10-29 20:44     ` Stephen Hemminger
2008-10-29 21:10       ` Michael Tokarev

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=20081029082610.307520cd@extreme \
    --to=shemminger@vyatta.com \
    --cc=mjt@tls.msk.ru \
    --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).