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