Welcome to the Linux Foundation Forum!

03. Network Configuration - bridged networks

I haven't progressed much further, but to the looks of it there is no example for a bridged network setup.

While it's not that hard to figure out, the ever-changing methods of configuring interfaces and bridges are sometimes getting to me. Here is what worked:

  1. Get the current configuration:

nmcli con show

  1. Add a bridge named "bridge0":

sudo nmcli con add ifname bridge0 type bridge con-name bridge0

  1. Add the Ethernet port ("eno1" in my case) as a slave to the bridge:

sudo nmcli con add type bridge-slave ifname eno1 master bridge0

Optional - disable STP:

sudo nmcli con modify bridge0 bridge.stp no

  1. Review the configuration:

nmcli con show
nmcli -f bridge con show bridge0

  1. Here comes the trick. One has to turn OFF the (default) Ethernet connection (in my case it was the "Wired connection 1", then turn on the bridge interface:

sudo nmcli con down "Wired connection 1"
sudo nmcli con up bridge0

  1. Let's check it:

nmcli con show

As to step 5, I always thought that systemctl restart networking.service would do the job, but it doesn't.

Hope it's useful.

Comments

  • lee42xlee42x Posts: 188

    In Chapter 3 the intention is to understand what a bridge is and that all the traffic is seen on all the segments. The example shows a physical bridge. Your example is a virtual bridge, a very handy construct but not at this part of the class.

    In your example , if you find the Network Manager keeps re-configuring the nic use the nmcli option to "unmanage" the nic.

    Thank you for the input. Lee

  • heiko_sheiko_s Posts: 52

    Thanks for the input, Lee, and the advice on "unmanage".

Sign In or Register to comment.