How Ubuntu configures the bridge Ubuntu System Configuration Bridge Detailed tutorial

Source: Internet
Author: User

A bridge is a hardware device used to interconnect two or more data link layers (the second layer of the OSI seven-tier model) so that network devices on different network segments can access each other. When you want to interconnect multiple virtual machines or Ethernet interfaces in a host, you need to have a bridge-like concept in a Linux host. A soft bridge is used here.

There are a number of ways to configure a Linux network bridge. For example, in a server environment without an external display/keyboard, you can manually configure a network bridge using BRCT. In the desktop environment, the network manager also supports Network Bridge settings. So let's test how to configure a network bridge with the Web Manager.

Requirements: To avoid any problems, it is recommended that your network Manager version be 0.9.9 or higher, which is used in Ubuntu 15.04 or newer versions.

Copy the code as follows:

[$ apt-cache Show Network-manager | grep Version

version:0.9.10.0-4ubuntu15.1

Version:0.9.10.0-4ubuntu15

To create a network bridge, the easiest way to create a network bridge using Network Manager is through Nm-connection-editor. This GUI (graphical user interface) tool allows you to configure a network bridge in a fool-type way.

1, first, start Nm-connection-editor.

Copy code, code as follows: $ nm-connection-editor

The editor's window will show you a list of the currently configured network connections. Click the "Add" button in the upper right corner to create a network bridge.

2. Next, select "Bridge" as the connection type.

3. Now, start configuring the Network Bridge, including its name and bridged connection. If no other bridges have been created, the default bridge interface is named BRIDGE0.

To recap, the purpose of creating a network bridge is to share your Ethernet card interface over a network bridge, so you need to add an Ethernet card interface to the Network Bridge. Adding a new "bridging connection" to the graphical interface can accomplish this. Click the "Add" button.

4, select "Ethernet" as the connection type.

5, in the "MAC address of the device" area, select the interface you want to belong to the network Bridge. In this case, assume that the interface is eth0.

6, click on the "General" tab, and select two check boxes, respectively, "when they are available automatically connect to this network" and "all users can connect to the network."

7, switch to the "IPv4 Settings" tab, for the Network Bridge configuration DHCP or static IP address. Note that you should use the same IPV4 settings for the subordinate Ethernet card interface eth0. In this case, we assume that the eth0 was configured with DHCP. Therefore, choose Automatic (DHCP) here. If Eth0 is assigned a static IP address, you should also specify the same IP address to the Network Bridge.

8, finally, save the Network Bridge settings.

Now, you'll see a new bridge connection being created in the Network Connections window. Because has been subordinate with the Network Bridge, the previously configured wired connection eth0 no longer need, so to delete the original wired connection bar.

9, this time, the Network Bridge connection will be automatically activated. If the IP address assigned to eth0 is taken over by the bridge, you will temporarily lose the connection. When the IP address is assigned to the Network Bridge, you will connect back to your Ethernet card interface via the Network Bridge. You can confirm it with the "network" setting.

10, at the same time, check the available interfaces. To remind you, the bridge interface must have replaced any IP address that your Ethernet card interface has.

The

is so much, now, the bridge is ready to use.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.