Management and construction of Linux Bridge

Source: Internet
Author: User



In a Linux network, when a physical device attached to another physical device to communicate, our most common virtual machine, and so on, he relies on the real host's network card to communicate, so we mentioned a bridge to change the concept, just can solve this kind of problem





Configuration of the Network Bridge

1:

<1> virtual interface on a real network card

[Email protected] desktop]# VIM/ETC/SYSCONFIG/NETWORK-SCRIPTS/IFCFG-ENP0S25 device=enp0s25bootproto=noneonboot= YESNAME=ENP0S25BRIDGE=BR0 # #虚拟出一个接口

<2> Configuring Br0 Bridges

[Email protected] desktop]# Vim/etc/sysconfig/network-scripts/ifcfg-br0device=br0onboot=yesbootproto=noneipaddr0 =172.25.254.20prefix0=24type=bridge # #类型为网桥

2: Manage bridge interfaces in a command way
<1> Add br0 NIC

Brctl ADDBR Br0

<2> Add IP

Ifconfig br0 172.25.254.120 netmask 255.255.255.0

<3> Adding a bridging interface to the BR0

Brctl addif br0 eth0

<4> Testing

Ping 172.25.254.x # #ping同一网段任意ip

<5> Delete a network bridge

Ifconfig dr0 down # #停用br0brctl delif de0 eth0 # #删除eth0桥接接口brctl DELBR br0 # #删除网桥

<6> Monitor Brctl Show # #查看网桥

This article is from the "12462896" blog, please be sure to keep this source http://12472896.blog.51cto.com/12462896/1955731

Management and construction of Linux Bridge

Related Article

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.