RedHat / CentOS:如何在线更改当前网口 Slave的状态(bonding mode)
2017-09-12 16:03
981 查看
ifenslave 命令可用于连接或分离或更改当前活动的从接口与绑定。 现在,将主从接口更改
再次检查绑定状态以确保em1是新的active slave
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: fault-tolerance (active-backup) Primary Slave: None Currently Active Slave: em1 MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 5000 Down Delay (ms): 5000
Slave Interface: em0 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:21:28:b2:65:26 Slave queue ID: 0
Slave Interface: em1 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:21:28:b2:65:27 Slave queue ID: 0
增加新的 slave interface
删除旧的 slave interface
查看bond0:
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: em1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 5000
Down Delay (ms): 5000
Slave Interface: em1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:21:28:b2:65:27
Slave queue ID: 0
Slave Interface: em2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:29:3a:c1:63:71
Slave queue ID: 0
做永久保存
DEVICE=em2
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
保存退出即可
ifenslave -c bond0 em1
再次检查绑定状态以确保em1是新的active slave
cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: fault-tolerance (active-backup) Primary Slave: None Currently Active Slave: em1 MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 5000 Down Delay (ms): 5000
Slave Interface: em0 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:21:28:b2:65:26 Slave queue ID: 0
Slave Interface: em1 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:21:28:b2:65:27 Slave queue ID: 0
增加新的 slave interface
ifenslave bond0 em2
删除旧的 slave interface
ifenslave -d bond0 em0
查看bond0:
cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: em1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 5000
Down Delay (ms): 5000
Slave Interface: em1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:21:28:b2:65:27
Slave queue ID: 0
Slave Interface: em2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:29:3a:c1:63:71
Slave queue ID: 0
做永久保存
rm /etc/sysconfig/network-scripts/ifcfg-em0 vi /etc/sysconfig/network-scripts/ifcfg-em2
DEVICE=em2
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
保存退出即可
相关文章推荐
- 如何在RedHat/CentOS 7.x中使用nmcli管理网络
- git 如何更改某个提交内容/如何把当前改动追加到某次commit上? git rebase
- IOS中如何判断当前网络状态
- 如何查看系统是 centos 还是 redhat
- ACCESS中如何在退出前更新当前用户的状态
- linux下如何关闭防火墙?如何查看防火墙当前的状态
- 如何获取当前屏幕状态?左横屏 右横屏 竖屏
- mac电脑很卡,如何在命令行查看当前电脑中的运行状态
- 如何监听textview 状态的变化。。。textview被更改的变化
- linux下如何关闭防火墙、查看当前的状态、开放端口
- redhat centos 红帽 acl权限 如何查看 设置acl权限 删除acl权限
- Android端如何获取手机当前的网络状态,比如wifi还是3G, 还是2G, 电信还是联通,还是移动
- Domino b/s中如何显示当前在线人数的数量
- linux下如何关闭防火墙?如何查看防火墙当前的状态
- 【ios开发】如何判断当前网络连接状态(网络是否正常)
- 使用PHP处理数据库数据如何将数据返回客户端并显示当前状态
- 如何判断键盘当前的输入状态是大写还是小写
- GTxxxx系列------如何读取某个gpio的当前的状态
- IOS中如何判断当前网络状态
- shell如何更改当前工作路径