1
2
3
4
5
6
7
|
cat /etc/sysctl .conf | grep ip_forward net.ipv4.ip_forward = 1 如果没有开启,则 vim /etc/sysctl .conf net.ipv4.ip_forward = 1 /sbin/sysctl -p |
1
2
3
|
# brctl show bridge namebridge idSTP enabledinterfaces virbr08000.feffffffffffyesvif4.0 |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-br0 cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 TYPE=Ethernet UUID=**** ONBOOT= yes NM_CONTROLLED=no BOOTPROTO=static BRIDGE=br0 DEFROUTE= yes IPV4_FAILURE_FATAL= yes IPV6INIT=no NAME= "System eth0" HWADDR=**** cat /etc/sysconfig/network-scripts/ifcfg-br0 DEVICE=br0 TYPE=Bridge ONBOOT= yes NM_CONTROLLED=no BOOTPROTO=none IPADDR=**** PREFIX=** GATEWAY=**** DNS1=114.114.114.114 DOMAIN=114.114.114.114 DEFROUTE= yes NAME= "System br0" service network restart |
1
2
3
4
|
# brctl show bridge name bridge id STP enabled interfaces br 08000.0800278072e5 no eth0 virbr 08000.feffffffffff yes vif4.0 |