Setting up Bridge on SuSE Linux manually
SuSE Linux裡想要啟用bridge(IEEE 802.1d)功能,必須要先安裝bridge-utils套件;如果系統裡可以執行brctl這個指令,那麼你的系統已經可以建立bridge了。
假設現在要把eth0設定成bridge分享給VM作為與外部溝通的管道:
ifcfg-eth0 | ifcfg-br0 |
---|---|
BOOTPROTO='static' STARTMODE='auto' IPADDR='0.0.0.0/32' USERCONTROL='no' |
BOOTPROTO='static' BRIDGE='yes' BRIDGE_FORWARDDELAY='0' BRIDGE_PORTS='eth0' IPADDR='192.168.10.22/24' GATEWAY=192.168.10.1 BRIDGE_STP='off' STARTMODE='auto' USERCONTROL='no' |
重新啟動網路後,看看裡頭的資訊吧!
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP qlen 1000 link/ether f4:6d:04:7b:be:13 brd ff:ff:ff:ff:ff:ff 3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether f4:6d:04:7b:be:13 brd ff:ff:ff:ff:ff:ff inet 192.168.10.22/24 brd 192.168.10.255 scope global br0 inet6 fe80::f66d:4ff:fe7b:be13/64 scope link valid_lft forever preferred_lft forever 4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN link/ether ca:f4:7c:0b:34:1f brd ff:ff:ff:ff:ff:ff inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
Bridge on bonding
延續先前bonding的設定,我們把bond0設定成bridge:
ifcfg-bond0 | ifcfg-br0 |
---|---|
BONDING_MASTER='yes' BONDING_MODULE_OPTS='mode=6 miimon=100' BONDING_SLAVE0='eth0' BONDING_SLAVE1='eth1' BOOTPROTO='static' IPADDR='0.0.0.0/32' STARTMODE='auto' USERCONTROL='no' |
BOOTPROTO='dhcp' BRIDGE='yes' BRIDGE_FORWARDDELAY='0' BRIDGE_PORTS='bond0' IPADDR='192.168.10.22/24' GATEWAY=192.168.10.1 BRIDGE_STP='off' STARTMODE='auto' USERCONTROL='no' |
當然你想設定DHCP也行!別忘了重新啟動網路吧!
service network restart
Setting up Bridge on SuSE Linux by Yast2
我說不出我對於yast有多麼的崇敬,SuSE的yast真的可以說是系統管理工具的楷模,我深信所以試圖寫出比yast更優秀工具的工程師也會覺得黔驢技窮。
在Yast2 -> Network Device裡,可以新增一個網路裝置。 | |
選擇建立Bridge。 | |
勾選要建立bridge的裝置。 | |
按下OK就完成了,非常帥氣的Yast!!! |
Share |
沒有留言:
張貼留言