[systemd-devel] [networkd] Set MTU of disconnected OVS bridge

Ian Pilcher arequipeno at gmail.com
Thu Mar 24 14:52:58 UTC 2016


I have a "disconnected" Open vSwitch on my system named ovs1.  By
"disconnected" I mean that it is not connected to any physical
interface, bond, etc.; it exists only for inter-VM communication.

I just discovered that jumbo frames (anything larger than 1528 bytes)
are being dropped when traveling across the bridge.  I need to set the
MTU of the bridge (actually its internal port) to a larger value.

I haven't been able to figure out a way to get systemd-networkd to do
this.  I tried creating /etc/systemd/network/ovs1.link, but it had no
effect:

   [Match]
   OriginalName=ovs1

   [Link]
   MTUBytes=9000

Currently I'm using a service file, which feels very hacky:

   [Unit]
   Description=Set ovs1 MTU
   Requires=openvswitch.service
   After=openvswitch.service
   Before=libvirtd.service

   [Service]
   Type=OneShot
   ExecStart=/usr/sbin/ip link set dev ovs1 mtu 8996

   [Install]
   WantedBy=multi-user.target

Can anyone think of a better way?

-- 
========================================================================
Ian Pilcher                                         arequipeno at gmail.com
-------- "I grew up before Mark Zuckerberg invented friendship" --------
========================================================================



More information about the systemd-devel mailing list