How to add tap0 to bridge0?

Andrei Borzenkov arvidjaar at gmail.com
Thu Sep 19 18:36:41 UTC 2024


19.09.2024 18:39, Simon Matter wrote:
> Hi,
> 
> I'm on AlmaLinux 9 with NetworkManager-1.46.0 and try to create a bridge
> with a tap device. This is used for a layer 2 vpn with openvpn. While this
> is working well with older Linux systems without NetworkManager, I fail to
> do the same with NetworkManager.
> 
> My config files look like this:
> 
> tap0.nmconnection:
> ------------------------------------------
> [connection]
> id=tap0
> uuid=403274e9-5459-4dd8-8ecf-21a702a1828e
> type=tun
> controller=bridge0
> interface-name=tap0
> master=bridge0
> port-type=bridge
> slave-type=bridge
> 
> [ethernet]
> 
> [bridge-port]
> ------------------------------------------
> 

AFAIK the default mode is tun which is L3 device and for bridge you need 
tap (L2). At least that is what works here.

> bridge0.nmconnection:
> ------------------------------------------
> [connection]
> id=bridge0
> uuid=c4806e1b-7f79-4f78-9088-74c058788fe2
> type=bridge
> autoconnect-ports=1
> autoconnect-slaves=1
> interface-name=bridge0
> timestamp=1726753716
> 
> [ethernet]
> 
> [bridge]
> 
> [ipv4]
> address1=192.168.128.254/24,192.168.1.254
> ignore-auto-dns=true
> may-fail=false
> method=manual
> 
> [ipv6]
> addr-gen-mode=default
> method=disabled
> 
> [proxy]
> ------------------------------------------
> 
> "ip link" shows both devices, bridge0 and tap0, but tap0 is not part of
> bridge0 as "ip link show master bridge0" and "bridge link show" both show
> nothing.
> 
> What am I doing wrong here? Any help is much appreciated.
> 
> Thanks,
> Simon
> 



More information about the Networkmanager mailing list