[root@dyw219 ~]# brctl show bridge name bridge id STP enabled interfaces virbr0 8000.fe54000af4cf yes vnet0 vnet1 vnet3 vnet4 vnet5 vnet6
[root@dyw219 ~]# brctl addbr br0 [root@dyw219 ~]# brctl show bridge name bridge id STP enabled interfaces br0 8000.00ac3da01692 no virbr0 8000.fe54000af4cf yes vnet0 vnet1 vnet3 vnet4 vnet5 vnet6
[root@dyw219 ~]# brctl addif br0 eth0 [root@dyw219 ~]# brctl show bridge name bridge id STP enabled interfaces br0 8000.00ac3da01692 no eth0 virbr0 8000.fe54000af4cf yes vnet0 vnet1 vnet3 vnet4 vnet5 vnet6
[root@dyw219 ~]# brctl addif br0 eth0 [root@dyw219 ~]# brctl show bridge name bridge id STP enabled interfaces br0 8000.00ac3da01692 no eth0 virbr0 8000.fe54000af4cf yes vnet0 vnet1 vnet3 vnet4 vnet5 vnet6
tap_eth0
。
[root@dyw219 ~]# ifconfig | grep ^[a-z] | awk '{print $1}' br0 eth0 eth1 lo tap_eth0 virbr0 vnet0 vnet1 vnet3 vnet4 vnet5 vnet6
tap_eth0
。
[root@dyw219 ~]# brctl addif br0 eth0 [root@dyw219 ~]# brctl show bridge name bridge id STP enabled interfaces br0 8000.00ac8e8ec395 no eth0 tap_eth0 virbr0 8000.fe54000af4cf yes vnet0 vnet1 vnet3 vnet4 vnet5 vnet6
tap_eth0
設定檔。
[root@dyw219 ~]# cd /etc/sysconfig/network-scripts/ [root@dyw219 network-scripts]# cp ifcfg-eth0 ifcfg-br0 [root@dyw219 network-scripts]# cp ifcfg-eth0 ifcfg-tap_eth0 [root@dyw219 network-scripts]# vim ifcfg-br0 [root@dyw219 network-scripts]# cat ifcfg-br0 DEVICE="br0" IPADDR=192.168.1.254 NETMASK=255.255.255.0 GATEWAY=163.17.27.219 DNS1=120.110.21.249 DNS2=8.8.8.8 ONBOOT="yes" TYPE=Bridge [root@dyw219 network-scripts]# vim ifcfg-eth0 [root@dyw219 network-scripts]# cat ifcfg-eth0 DEVICE="eth0" ONBOOT="yes" BRIDGE=br0 TYPE=Ethernet [root@dyw219 network-scripts]# vim ifcfg-tap_eth0 [root@dyw219 network-scripts]# cat ifcfg-tap_eth0 DEVICE="tap_eth0" ONBOOT="yes" BRIDGE=br0 TYPE=Ethernet
[root@dyw219 network-scripts]# /etc/init.d/network restart
VPN Server/VPN>iptable IpTable command - Get the IP Address Table Database Item |Value ------------+------------------------ ID |1358754158 Session Name|SID-LOCALBRIDGE-3 IP Address |192.168.1.254 Created at |2016-05-17 08:03:50 Updated at |2016-05-17 08:03:54 Location |On 'dyw219' ------------+------------------------ ID |804511970 Session Name|SID-SECURENAT-1 IP Address |192.168.30.1 Created at |2016-05-17 07:30:31 Updated at |2016-05-17 08:03:55 Location |On 'dyw219' ------------+------------------------ ID |3996354065 Session Name|SID-LOCALBRIDGE-3 IP Address |fe80::2ac:3dff:fea0:1692 Created at |2016-05-17 08:01:49 Updated at |2016-05-17 08:03:54 Location |On 'dyw219' The command completed successfully.