Recently I came across this Ask Ubuntu post about adding physical interfaces to an Open vSwitch bridge. The answers from Lukas Maerdian and Denis helped me a lot, but I still have one problem.
When I add the physical interface enp0s3
to the internal Open vSwitch port br-ex
using the interfaces
mapping inside the bridge br-ex
, I can't get enp0s3
to reach the UP state during boot, I have to manually run ip link set enp0s3 up
after the machine boots.
Here is my current Netplan configuration:
---
network:
ethernets:
enp0s3: {}
bridges:
br-ex:
openvswitch: {}
addresses:
- 10.2.0.0/8
gateway4: 10.0.0.1
nameservers:
addresses:
- 10.0.0.1
interfaces:
- enp0s3
version: 2
...
Here is my /var/log/syslog
file with only the systemd-networkd
lines (the whole file is huge).
Here is the stdout
of ip addr
:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master ovs-system state DOWN group default qlen 1000
link/ether 08:00:27:9a:24:d8 brd ff:ff:ff:ff:ff:ff
3: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 7e:46:ed:8f:ae:cd brd ff:ff:ff:ff:ff:ff
4: br-int: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 82:69:1e:06:a2:42 brd ff:ff:ff:ff:ff:ff
5: br-ex: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
link/ether 08:00:27:9a:24:d8 brd ff:ff:ff:ff:ff:ff
inet 10.2.0.0/8 brd 10.255.255.255 scope global br-ex
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fe9a:24d8/64 scope link
valid_lft forever preferred_lft forever
6: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:54:00:c3:00:4b brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
7: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 state DOWN group default qlen 1000
link/ether 52:54:00:c3:00:4b brd ff:ff:ff:ff:ff:ff
ovs-vsctl show
gives me:
6a9ff04c-316f-4ee8-82e1-f228c512cf74
Manager "ptcp:6640:127.0.0.1"
is_connected: true
Bridge br-int
fail_mode: secure
Port br-int
Interface br-int
type: internal
Port patch-br-int-to-provnet-8d56ff0f-c67a-4219-8cfc-bcf8aa009f28
Interface patch-br-int-to-provnet-8d56ff0f-c67a-4219-8cfc-bcf8aa009f28
type: patch
options: {peer=patch-provnet-8d56ff0f-c67a-4219-8cfc-bcf8aa009f28-to-br-int}
Bridge br-ex
fail_mode: standalone
Port patch-provnet-8d56ff0f-c67a-4219-8cfc-bcf8aa009f28-to-br-int
Interface patch-provnet-8d56ff0f-c67a-4219-8cfc-bcf8aa009f28-to-br-int
type: patch
options: {peer=patch-br-int-to-provnet-8d56ff0f-c67a-4219-8cfc-bcf8aa009f28}
Port enp0s3
Interface enp0s3
Port br-ex
Interface br-ex
type: internal
ovs_version: "2.13.3"
I need enp0s3
to automatically go up when the machine boots, but I can't figure out how to do so. Without adding enp0s3
as an interface to br-ex
, enp0s3
goes up during boot normally.