How to set MTU value for an Open vSwitch bridge from command line?
I have tried man pages, I failed.
Thank you.
Best Answer
The bridge MTU is automatically set to the smallest port MTU. So you just have to set the MTU of each port of the bridge. You can get a list of them via ovs-vsctl list-ports <BRIDGENAME>.
There was also a brief text file from some Fedora people on similar subject: libvirt and OpenVSwitch in a form of text file... wasn't able to locate it though.
as per comment, here's short summary:
(1) Create vnet0 interface and br0 bridge:
ovs-vsctl add-br br0
ip tuntap add mode tap vnet0
ip link set vnet0 up
ovs-vsctl add-port br0 vnet0
ip link # (View the created interface)
(2) spin up VM that uses vnet0 interface (as a bridged adapter)
You must note that in host b you have given br1 an ip address 192.168.1.152. So whether you like it or not your tunnel terminates on br1. In openvswitch the bridge itself is an interface. So that explains your question.
If you had not done so and created only an interface in br2 called gre0 and connected to remote_ip 192.168.1.155, you should create a veth pair and attach br1 and br2.
Note that while using gre it is enough that any one of your interface in the machine have an ip address. That interface need not at all be added to your bridges. As long as your bridges have an endpoint they will be able to receive the packets from that tunnel.
Best Answer
The bridge MTU is automatically set to the smallest port MTU. So you just have to set the MTU of each port of the bridge. You can get a list of them via
ovs-vsctl list-ports <BRIDGENAME>
.