ubuntu:network_-_netplan:anonymous_bridges_in_netplan
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ubuntu:network_-_netplan:anonymous_bridges_in_netplan [2019/11/30 19:25] – created peter | ubuntu:network_-_netplan:anonymous_bridges_in_netplan [2021/01/07 10:59] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Ubuntu - Network - Netplan - Anonymous bridges in netplan ====== | ||
- | |||
- | **Netplan** is the default network configuration system for new installs of Ubuntu 18.04 (Bionic). | ||
- | |||
- | An anonymous bridge is where the bridge doesn' | ||
- | |||
- | If you're trying to create a bridge without an IP address, the obvious first thing to try is this: | ||
- | |||
- | <code bash> | ||
- | network: | ||
- | version: 2 | ||
- | ethernets: | ||
- | ens8: | ||
- | match: | ||
- | macaddress: 52: | ||
- | ens9: | ||
- | match: | ||
- | macaddress: 52: | ||
- | bridges: | ||
- | br0: | ||
- | | ||
- | </ | ||
- | |||
- | This is neat, plausible, and wrong - the bridge will be created but will stay ' | ||
- | |||
- | Checking this: | ||
- | |||
- | <code bash> | ||
- | ip a | ||
- | </ | ||
- | |||
- | displays: | ||
- | |||
- | <code bash> | ||
- | 5: br0: < | ||
- | link/ether 0e: | ||
- | </ | ||
- | |||
- | This is because systemd requires a ' | ||
- | If you look at // | ||
- | |||
- | There' | ||
- | |||
- | <file bash / | ||
- | [Match] | ||
- | Name=br0 | ||
- | |||
- | [Network] | ||
- | LinkLocalAddressing=no | ||
- | IPv6AcceptRA=no | ||
- | </ | ||
- | |||
- | Then upon restarting networking (netplan apply or just reboot), you will see that the bridge comes up, and - as desired - has no address: | ||
- | |||
- | <code bash> | ||
- | 5: br0: < | ||
- | link/ether 0e: | ||
- | </ | ||
- | |||
- | Don't forget to include a comment in your netplan YAML to remind you that this extra file exists! | ||
- | |||
- | ---- | ||
- | |||
- | ====== Comments ====== | ||
- | |||
- | An alternate way, just add an systemd service. | ||
- | |||
- | <file bash / | ||
- | [Unit] | ||
- | Description=Bring br100 interface up after network settings are done (bug: anonymous bridges do not came up at boot-time) | ||
- | Wants=network-online.target | ||
- | After=network-online.target | ||
- | |||
- | [Service] | ||
- | Type=simple | ||
- | ExecStart=/ | ||
- | |||
- | [Install] | ||
- | WantedBy=multi-user.target | ||
- | </ | ||
- | |||
- | |||
- | <code bash> | ||
- | sudo systemctl start up-bridge-100-interface | ||
- | sudo systemctl status up-bridge-100-interface | ||
- | sudo systemctl enable up-bridge-100-interface | ||
- | </ | ||
- | |||
- | |||
- | You might find you get IPv6 link local addressing in that case though. | ||
- | |||
- | ---- | ||
- | |||
- | ===== References ===== | ||
- | |||
- | https:// | ||
- | | ||
ubuntu/network_-_netplan/anonymous_bridges_in_netplan.1575141904.txt.gz · Last modified: 2020/07/15 09:30 (external edit)