Discussion:
[networkd] Unable to set MTU with .link file
(too old to reply)
Ian Pilcher
2017-06-08 20:34:32 UTC
Permalink
Raw Message
I am tearing my hair out trying to figure out why I an unable to set the
MTU of an OVS port with a .link file.

I am trying to create this:

+----------------+ +----------------+
| | | |
| eno1 | | eno2 |
| (MTU = 8996) | | (MTU = 8996) |
| | | |
+-------+--------+ +-------+--------+
| |
+-------------------+-------------------+
|
+-------+--------+
| |
| bond0 |
| (MTU = 8996) |
| |
+-------+--------+
|
+-------+--------+
| |
| ovs0 |
| (MTU = 8996) |
| |
+-------+--------+
|
+-------------------+-------------------+
| |
+-------+--------+ +-------+--------+
| | | |
| vlan248 | | vlan250 |
| (MTU = 8996) | | (MTU = 1500) |
| | | |
+----------------+ +----------------+

Everything works, except that vlan250 is inheriting the jumbo MTU from
ovs0. I've created a link file to set the MTU to 1500:

/etc/systemd/network/98-vlan250.link:

[Match]
OriginalName=vlan250

[Link]
MTUBytes=1500

For some reason, this isn't working.

I've set udev_log="debug" in /etc/udev/udev.conf and rebuilt my
initramfs. I've also created a drop-in for systemd-networkd that sets
SYSTEMD_LOG_LEVEL=debug.

A full boot log with these settings can be found at:

http://www.penurio.us/journal.txt

Any ideas or debugging techniques very much appreciated.
--
========================================================================
Ian Pilcher ***@gmail.com
-------- "I grew up before Mark Zuckerberg invented friendship" --------
========================================================================
Ian Pilcher
2017-06-09 04:03:07 UTC
Permalink
Raw Message
I am tearing my hair out trying to figure out why I an unable to set the
MTU of an OVS port with a .link file.

I am trying to create this:

+----------------+ +----------------+
| | | |
| eno1 | | eno2 |
| (MTU = 8996) | | (MTU = 8996) |
| | | |
+-------+--------+ +-------+--------+
| |
+-------------------+-------------------+
|
+-------+--------+
| |
| bond0 |
| (MTU = 8996) |
| |
+-------+--------+
|
+-------+--------+
| |
| ovs0 |
| (MTU = 8996) |
| |
+-------+--------+
|
+-------------------+-------------------+
| |
+-------+--------+ +-------+--------+
| | | |
| vlan248 | | vlan250 |
| (MTU = 8996) | | (MTU = 1500) |
| | | |
+----------------+ +----------------+

Everything works, except that vlan250 is inheriting the jumbo MTU from
ovs0. I've created a link file to set the MTU to 1500:

/etc/systemd/network/98-vlan250.link:

[Match]
OriginalName=vlan250

[Link]
MTUBytes=1500

For some reason, this isn't working.

I've set udev_log="debug" in /etc/udev/udev.conf and rebuilt my
initramfs. I've also created a drop-in for systemd-networkd that sets
SYSTEMD_LOG_LEVEL=debug.

A full boot log with these settings can be found at:

http://www.penurio.us/journal.txt

Any ideas or debugging techniques very much appreciated.
--
========================================================================
Ian Pilcher ***@gmail.com
-------- "I grew up before Mark Zuckerberg invented friendship" --------
========================================================================
Ian Pilcher
2017-06-09 21:36:10 UTC
Permalink
Raw Message
Post by Ian Pilcher
I am tearing my hair out trying to figure out why I an unable to set the
MTU of an OVS port with a .link file.
Replying to myself for posterity ...

As so often seems to be the case, my difficulties were due to that
recurring issue, "You're doing it wrong."

TL;DR - Setting different MTUs on different ports of an OVS bridge
doesn't work as expected, so using separate tagged ports on the host OS
isn't the way to go.

Instead, create VLAN netdevs on top of the trunked OVS port (treating
it as if it were a physical interface or bond). For example:

98-ovs0.link:

[Match]
OriginalName=ovs0

[Link]
MTUBytes=8996

ovs0.network:

[Match]
Name=ovs0

[Network]
VLAN=ovs0.248
VLAN=ovs0.250

ovs0.248.netdev:

[NetDev]
Name=ovs0.248
Kind=vlan

[VLAN]
Id=248

ovs0.250.netdev:

[NetDev]

Name=ovs0.250

Kind=vlan

MTUBytes=1500



[VLAN]

Id=250
--
========================================================================
Ian Pilcher ***@gmail.com
-------- "I grew up before Mark Zuckerberg invented friendship" --------
========================================================================
Loading...