One error on Linux bridge

Source: Internet
Author: User

I. BACKGROUND notes

Recently participating in a private cloud project, network mode leverages the CENTOS7 default bridging mode. The operating system is CentOS7.4, the customer installs it himself, and then tells us that the usual toolkit is installed.


Ii. Problems and Solutions

A) Configure the NIC as follows:

# cat/etc/sysconfig/network-scripts/ifcfg-em1 type=ethernetname=em1device=em1onboot=yesbridge=br0# cat/etc/ Sysconfig/network-scripts/ifcfg-br0 type=bridgebootproto=staticpeedns=yesname=br0device=br0onboot=yesipaddr= 192.168.108.4netmask=255.255.255.0gateway=192.168.108.1userctl=no

b) After restarting the network card, found that the connection is not on the server, after the remote management card into the server, see the bridge does not take effect, but the network adapter configuration has been the problem,

Use Brctl, actually reported this command, actually did not install bridge-utils, also blame I think of course, think to do private cloud, this basic package should be installed, so I install the next bridge-utils

# yum-y Install bridge-utils# systemctl restart network# brctl showbridge namebridge idstp enabledinterfacesbr08000.d0946 6197542noem1vnet1vnet10vnet11vnet12vnet13vnet14vnet2vnet4vnet5vnet6vnet8vnet9cloud08000.fe00a9fe006enovnet0vnet3vnet7virb R08000.5254006e12d8yesvirbr0-nic

Here, the problem is resolved.


Third, the cause of thinking

When adjusting the network, especially not around the server, it is recommended to write a script, and then combine the planning tasks, in case the adjustment is wrong, can also be quickly restored, similar to the following, I think quite practical.

# cat/config/recover.network.sh#!/bin/bash# set for restore networkcp-rf/tmp/ifcfg-em1/etc/sysconfig/ network-scripts/rm-rf/etc/sysconfig/network-scripts/ifcfg-br0# CRONTAB-L50 1 * * */bin/bash/config/ recover.network.sh >/dev/null 2>&1


One error with Linux bridge

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.