[ovs-discuss] Setting MTU for internal and trunk ports

Elias Raftopoulos elr at open.ch
Thu Oct 8 12:31:12 UTC 2015


Hello all,

we are trying to understand how the MTU value can be configured for internal and trunk ports on OVS. The behavior we are seeing, is that internal ports get a maximum MTU equal to the lowest MTU considering all trunk ports on a given switch, i.e. changing the MTU of a trunk port can potentially affect MTU values for internal ports. On the other hand, the same dependency is not observed when we lower the MTU of an internal port, i.e. trunk port MTU values are not affected.

Below you can see a concrete example. My switch switch_c, has two internal (eth0, eth2) and two trunk (peth0, peth2) ports:

    Bridge switch_c
        Controller "tcp:127.0.1.12:6633"
            is_connected: true
        fail_mode: secure
        Port switch_c
            Interface switch_c
                type: internal
        Port "peth0"
            Interface "peth0"
        Port "peth2"
            Interface "peth2"
        Port "eth0"
            Interface "eth0"
                type: internal
        Port "eth2"
            Interface "eth2"
                type: internal
        Port "c2a"
            Interface "c2a"
                type: patch
                options: {peer="a2c"}

Using "ip list set INTERFACE mtu VALUE” I can increase the mtu to 1700 from the default 1500 value for all interfaces (including the switch_c internal interface):

> ovs-vsctl list-ports switch_c | xargs -n1 ip link show  | grep mtu | column -t
458:  eth0:      <BROADCAST,MULTICAST,UP,LOWER_UP>  mtu  1700  qdisc  noqueue     state   UNKNOWN     mode   DEFAULT  group  default
457:  eth2:      <BROADCAST,MULTICAST,UP,LOWER_UP>  mtu  1700  qdisc  noqueue     state   UNKNOWN     mode   DEFAULT  group  default
20:   peth0:     <BROADCAST,MULTICAST,UP,LOWER_UP>  mtu  1700  qdisc  pfifo_fast  master  ovs-system  state  UP       mode   DEFAULT  group  default  qlen  1000
22:   peth2:     <BROADCAST,MULTICAST,UP,LOWER_UP>  mtu  1700  qdisc  pfifo_fast  master  ovs-system  state  UP       mode   DEFAULT  group  default  qlen  1000
> ip link list switch_c | grep mtu
449: switch_c: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1700 qdisc noqueue state UNKNOWN mode DEFAULT group default

Then consider that the MTU for a trunk port is set back to a lower value:

> ip link set peth2 mtu 1500

The corresponding trunk port and all internal ports have now an MTU of 1500

> ovs-vsctl list-ports switch_c | xargs -n1 ip link show  | grep mtu | column -t
458:  eth0:      <BROADCAST,MULTICAST,UP,LOWER_UP>  mtu  1500  qdisc  noqueue     state   UNKNOWN     mode   DEFAULT  group  default
457:  eth2:      <BROADCAST,MULTICAST,UP,LOWER_UP>  mtu  1500  qdisc  noqueue     state   UNKNOWN     mode   DEFAULT  group  default
20:   peth0:     <BROADCAST,MULTICAST,UP,LOWER_UP>  mtu  1700  qdisc  pfifo_fast  master  ovs-system  state  UP       mode   DEFAULT  group  default  qlen  1000
22:   peth2:     <BROADCAST,MULTICAST,UP,LOWER_UP>  mtu  1500  qdisc  pfifo_fast  master  ovs-system  state  UP       mode   DEFAULT  group  default  qlen  1000

Increasing the MTU for peth2 trunk port to 1700:

> ip link set peth2 mtu 1700

The respective trunk port and all internal ports report the increased MTU:

> ovs-vsctl list-ports switch_c | xargs -n1 ip link show  | grep mtu | column -t
Device "c2a" does not exist.
458:  eth0:      <BROADCAST,MULTICAST,UP,LOWER_UP>  mtu  1700  qdisc  noqueue     state   UNKNOWN     mode   DEFAULT  group  default
457:  eth2:      <BROADCAST,MULTICAST,UP,LOWER_UP>  mtu  1700  qdisc  noqueue     state   UNKNOWN     mode   DEFAULT  group  default
20:   peth0:     <BROADCAST,MULTICAST,UP,LOWER_UP>  mtu  1700  qdisc  pfifo_fast  master  ovs-system  state  UP       mode   DEFAULT  group  default  qlen  1000
22:   peth2:     <BROADCAST,MULTICAST,UP,LOWER_UP>  mtu  1700  qdisc  pfifo_fast  master  ovs-system  state  UP       mode   DEFAULT  group  default  qlen  1000

Decreasing the MTU for an internal port to 1500:

> ip link set eth2 mtu 1500

Only internal port eth2 MTU is affected:

> ovs-vsctl list-ports switch_c | xargs -n1 ip link show  | grep mtu | column -t
Device "c2a" does not exist.
458:  eth0:      <BROADCAST,MULTICAST,UP,LOWER_UP>  mtu  1700  qdisc  noqueue     state   UNKNOWN     mode   DEFAULT  group  default
457:  eth2:      <BROADCAST,MULTICAST,UP,LOWER_UP>  mtu  1500  qdisc  noqueue     state   UNKNOWN     mode   DEFAULT  group  default
20:   peth0:     <BROADCAST,MULTICAST,UP,LOWER_UP>  mtu  1700  qdisc  pfifo_fast  master  ovs-system  state  UP       mode   DEFAULT  group  default  qlen  1000
22:   peth2:     <BROADCAST,MULTICAST,UP,LOWER_UP>  mtu  1700  qdisc  pfifo_fast  master  ovs-system  state  UP       mode   DEFAULT  group  default  qlen  1000

I understand that ports on a switch within the same broadcast domain should have the same MTU, since there is no L2 fragmentation, but that would mean that lowering the MTU of an trunk port should only potentially affect the MTU of other trunk ports (and not that of internal ports).

Is the behavior we are observing expected? If that is the case is there a way we can “lock” the MTU of an internal port so that there is no dependency with the respective value on trunk ports?

Thank in advance,
 Elias







More information about the discuss mailing list