centos7双网卡绑定
2016-03-22 15:46
411 查看
#安装必需的包:
yum install teamd -y
#停止NetworkManager
systemctl stop NetworkManager
systemctl disable NetworkManager
#Creating a Network Team Using ifcfg Files
cd /etc/sysconfig/network-scripts/
vi ifcfg-team0
DEVICE=team0
DEVICETYPE=Team
ONBOOT=yes
BOOTPROTO=none
IPADDR=192.168.11.1
PREFIX=24
#GATEWAY=192.168.11.254
TEAM_CONFIG='{"runner": {"name": "activebackup"}, "link_watch": {"name": "ethtool"}}'
#做好备份继续编辑需要绑定的网卡信息,调整prio优先级
vi ifcfg-eth0
DEVICE=eth0
DEVICETYPE=TeamPort
ONBOOT=yes
TEAM_MASTER=team0
TEAM_PORT_CONFIG='{"prio": 100}'
vi ifcfg-eth1
DEVICE=eth1
DEVICETYPE=TeamPort
ONBOOT=yes
TEAM_MASTER=team0
TEAM_PORT_CONFIG='{"prio": 99}'
#重启网络
systemctl restart network
#检查端口状态
teamnl team0 ports
1: eth0: up 1000Mbit FD
2: eth1: up 1000Mbit FD
#检查teaming状态
teamdctl team0 state
setup:
runner: activebackup
ports:
eth0
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
eth1
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
runner:
active port: eth0
#手动断开其中一条链路验证主备模式切换是否正常
ip link set eth1 down
teamdctl team0 state
setup:
runner: activebackup
ports:
eth0
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
eth1
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
runner:
active port: eth1
本文出自 “石头记” 博客,请务必保留此出处http://dodowolf.blog.51cto.com/793581/1753908
yum install teamd -y
#停止NetworkManager
systemctl stop NetworkManager
systemctl disable NetworkManager
#Creating a Network Team Using ifcfg Files
cd /etc/sysconfig/network-scripts/
vi ifcfg-team0
DEVICE=team0
DEVICETYPE=Team
ONBOOT=yes
BOOTPROTO=none
IPADDR=192.168.11.1
PREFIX=24
#GATEWAY=192.168.11.254
TEAM_CONFIG='{"runner": {"name": "activebackup"}, "link_watch": {"name": "ethtool"}}'
#做好备份继续编辑需要绑定的网卡信息,调整prio优先级
vi ifcfg-eth0
DEVICE=eth0
DEVICETYPE=TeamPort
ONBOOT=yes
TEAM_MASTER=team0
TEAM_PORT_CONFIG='{"prio": 100}'
vi ifcfg-eth1
DEVICE=eth1
DEVICETYPE=TeamPort
ONBOOT=yes
TEAM_MASTER=team0
TEAM_PORT_CONFIG='{"prio": 99}'
#重启网络
systemctl restart network
#检查端口状态
teamnl team0 ports
1: eth0: up 1000Mbit FD
2: eth1: up 1000Mbit FD
#检查teaming状态
teamdctl team0 state
setup:
runner: activebackup
ports:
eth0
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
eth1
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
runner:
active port: eth0
#手动断开其中一条链路验证主备模式切换是否正常
ip link set eth1 down
teamdctl team0 state
setup:
runner: activebackup
ports:
eth0
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
eth1
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
runner:
active port: eth1
本文出自 “石头记” 博客,请务必保留此出处http://dodowolf.blog.51cto.com/793581/1753908
相关文章推荐
- linux命令:head 命令 和tail 命令
- linux命令:nl命令
- Linux 在vim编辑器中显示行号
- centos7作为web服务器优化
- linux命令:cat 命令
- Linux IO实时监控iostat命令详解
- linux命令:cp 命令
- Linux基础1
- linux命令:mv命令
- linux操作进阶
- linux命令:rmdir 命令
- linux命令:rm 命令
- linux命令:mkdir命令
- Linux解决长时间占用CPU资源的方法(底半部)
- linux vmstat 使用
- linux命令:pwd命令
- VMware Workstation上安装CentOS7和VMTools实现文件共享
- 快速找出Linux下的大文件
- VMware Workstation上安装CentOS7和VMTools实现文件共享的经验总结
- linux iostat 命令的使用