Linuxにおけるリンク集約のbond 5型集約例
2305 ワード
NICのステータスを表示するには、次の手順に従います.
bond 5を作成します.モードはbalance-tlb
物理NICリンクをbond 5に追加
bond構成情報の表示
eth 1 NICをオフにしてbond 5が正常かどうかをテストします
[root@linfan ~]# nmcli device
DEVICE TYPE STATE CONNECTION
eth0 ethernet connected eth0
eth1 ethernet connected Wired connection 1
eth2 ethernet connected Wired connection 2
lo loopback unmanaged --
bond 5を作成します.モードはbalance-tlb
[root@linfan ~]# nmcli connection add type bond \
> mode balance-tlb con-name bond5 ifname bond5 \
> ipv4.method manual \
> ipv4.addresses 192.168.24.250/24 \
> ipv4.gateway 192.168.24.1 \
> ipv4.dns 8.8.8.8
Connection 'bond5' (933aff7a-9501-45fb-ab15-3039840e273e) successfully added.
物理NICリンクをbond 5に追加
[root@linfan ~]# nmcli connection add type bond-slave con-name bond-slave1 ifname eth1 master bond5
Connection 'bond-slave1' (99d54040-948c-4a32-8934-527962c0fa72) successfully added.
[root@linfan ~]# nmcli connection add type bond-slave con-name bond-slave2 ifname eth2 master bond5
Connection 'bond-slave2' (ad2bf7c6-e4fc-4268-aaa0-fc96e5c7525f) successfully added.
bond構成情報の表示
[root@linfan ~]# cat /proc/net/bonding/bond5
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: transmit load balancing
Primary Slave: None
Currently Active Slave: eth1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:0c:29:2e:e0:a9
Slave queue ID: 0
Slave Interface: eth2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:0c:29:2e:e0:b3
Slave queue ID: 0
eth 1 NICをオフにしてbond 5が正常かどうかをテストします
[root@linfan ~]# nmcli device disconnect eth1
Device 'eth2' successfully disconnected.
[root@linfan ~]# cat /proc/net/bonding/bond5
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: transmit load balancing
Primary Slave: None
Currently Active Slave: eth2
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:0c:29:2e:e0:a9
Slave queue ID: 0