CentOS

How To Create a Network Bridge on CentOS 8

A network bridge is a device responsible for joining two networks and forming a single network. It operates on the famous OSI model’s data link layer, layer 2. The Network Bridge creates a table of MAC addresses used to forward traffic between the connected networks.

Each network, which the bridge is supposed to be connected, requires a network device to operate. The Network Bridge works as a virtual network switch. This article will show how a Network Bridge can be created in CentOS 8. Before going further, you should know that Network Bridge cannot be used or configured via Wi-Fi in Ad-Hoc.

How To Create a Network Bridge in CentOS 8

The network bridge can be created using the following methods:

First, we will go through the nmcli command and move on to the nm-connection editor.

nmcli command

Step 1: Make sure these conditions are met:

  • There are more than two network devices on the server.
  • Virtual or physical ethernet devices are installed, serving as a bridge port, and must be created before the bridge is built.

Step 2: Now, we will use the following command to create a bridge interface:


As we can see, the bridge is successfully added.

Step 3: You will see all the names of the interfaces to be used by the bridge by using the following highlighted command:

On the right of the center, you will see bridge0 that we created above.

Step 4: Now, we have to create new profiles for the ports that aren’t configured and add them to the bridge0 connection using the following command:

Step 5: We will now configure the IPv4 settings using the following commands in the same sequence:

After we are done configuring Ipv4, we will now configure Ipv6 settings using the following commands:

Step 6: We will now activate the connection as shown below:

As we can see, the connection is activated. Now, we will check the status of the port:

How To Create Device Type State Connection

Step 1: Make sure that these conditions are met:

  • There are more than two network devices on the server.
  • Virtual or physical ethernet devices are installed, serving as a bridge port, and must be created before the bridge is built.

Step 2: Open a new terminal and enter the following command:

Then a small window, like the one shown below, would appear.

And after clicking the “+” button, it would lead us to “choosing the connection type”. Here, we can select from multiple options that are up to you to decide. This is called “The Bridge Tab”.

Step 3: After we are done with step 2, we will now:

  • Enter Connection/interface name
  • Fill in the blanks and hit the save button
  • Follow the previously mentioned steps until each required interface is added to the bridge

Step 4: Save and close the nm-connection-editor.

Conclusion

This was a brief but effective article on how to Create Network Bridges. To help the audience understand better, we have added commands and their outputs so that you can see the differences in case of any error. We hope this article helps you in all possible ways. Do visit our official website for more information and articles on different domains.

Similar Posts