# 负载均衡模式 Bonding Mode: adaptive load balancing Primary Slave: None # 当前对外连接网络额度是网卡ens33 Currently Active Slave: ens33 # 状态up MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0
Slave Interface: ens33 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 12:1d:21:fg:43:f1 Slave queue ID: 0
Slave Interface: ens37 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 12:1d:21:fg:43:f2 Slave queue ID: 0
查看bond0的mac地址,跟ens33的mac地址一样:12:1d:21:fg:43:f1
1 2 3 4 5 6 7 8 9 10 11
[root@nn ~]# ip a
2: ens33: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP group default qlen 1000 link/ether 12:1d:21:fg:43:f1 brd ff:ff:ff:ff:ff:ff 3: ens37: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP group default qlen 1000 link/ether 12:1d:21:fg:43:f2 brd ff:ff:ff:ff:ff:ff
191: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 12:1d:21:fg:43:f1 brd ff:ff:ff:ff:ff:ff inet 192.168.142.4/24 brd 192.168.142.255 scope global noprefixroute bond0 valid_lft forever preferred_lft forever
Bonding Mode: adaptive load balancing Primary Slave: None # 可以看到当ens33不工作后,网络连接已经切换到ens37 Currently Active Slave: ens37 MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0
Slave Interface: ens37 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 12:1d:21:fg:43:f2 Slave queue ID: 0