标签:0.12 auto 轮询 soft etc serve pac name man
配置聚合连接(网卡绑定)team ,聚合连接(也称为链路聚合)
由多块网卡一起组建而成的虚拟网卡
作用1:轮询式(roundrobin)的流量负载均衡
作用2:热备份(activebackup)连接冗余
热备份配置: {"runner": {"name": "activebackup"}}
man帮助辅助记忆
/example #全文查找example
#按n 跳转到下一个匹配
找到热备份配置 粘贴
一.添加team团队设备
[root@server0 ~]# man teamd.conf
输入/example
...
"runner": {"name": "activebackup"}
...
[root@server0 ~]# nmcli connection add type team con-name team0 ifname team0 config '{"runner": {"name": "activebackup"}}'
Connection 'team0' (f52724d9-87b1-4986-9b75-7216e6f46735) successfully added.
[root@server0 ~]# vi /etc/sysconfig/network-scripts/ifcfg-team0 #查看配置文件
[root@server0 ~]# ifconfig
...
team0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 7e:0f:c4:0e:f1:12 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
...
二.添加成员
[root@server0 ~]# nmcli connection add type team-slave ifname eth1 master team0
Connection 'team-slave-eth1' (8723ebb9-75a2-4881-982a-12cd476da637) successfully added.
[root@server0 ~]# nmcli connection add type team-slave ifname eth2 master team0
Connection 'team-slave-eth2' (e453a802-d351-4381-a418-6354f1d673ec) successfully added.
三.配置team0的IP地址
[root@server0 ~]# nmcli connection modify team0 ipv4.method manual ipv4.addresses '192.168.1.1/24' connection.autoconnect yes
四.激活team0
[root@server0 ~]# nmcli connection up team-slave-eth1 #激活从设备eth1
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/4)
[root@server0 ~]# nmcli connection up team-slave-eth2 #激活从设备eth2
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/5)
[root@server0 ~]# nmcli connection up team0 #激活主设备team0
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/6)
五.验证
[root@server0 ~]# teamdctl team0 state #专用于查看team信息
setup:
runner: activebackup
ports:
eth1
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
eth2
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
runner:
active port: eth2
删除
[root@desktop0 ~]# nmcli connection delete team-slave-eth1
[root@desktop0 ~]# nmcli connection delete team-slave-eth1
[root@desktop0 ~]# nmcli connection delete team0
在RCHE的考试中有一道考试题目是:
在 server0 .example.com 和 desktop0 .example.com 之间按以下要求配置一个链路team0:
此链路使用接口 eth1 和 eth2
此链路在一个接口失效时仍然能工作
此链路在 server0 使用下面的地址 172.16.3.20/255.255.255.0
此链路在 desktop0 使用下面的地址 172.16.3.25/255.255.255.0
此链路在系统重启之后依然保持正常状态
具体步骤可以仿照上面的介绍 两个虚拟机使用的IP 根据 考试题目要求配置
===============================================================================================
配置IPv6地址
IPv6地址表示
128个二进制位,冒号分隔的十六进制数
每段内连续的前置0可省略,连续的多个:可简化位::
配置IPv6
[root@server0 ~]# nmcli connection modify 'System eth0' ipv6.method manual ipv6.addresses '2003:ac18::305/64' connection.autoconnect yes
[root@server0 ~]# nmcli connection up 'System eth0'
[root@desktop0 ~]# nmcli connection modify 'System eth0' ipv6.method manual ipv6.addresses '2003:ac18::306/64' connection.autoconnect yes
[root@desktop0 ~]# nmcli connection up 'System eth0'
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/9)
[root@desktop0 ~]# ping6 2003:ac18::305
PING 2003:ac18::305(2003:ac18::305) 56 data bytes
64 bytes from 2003:ac18::305: icmp_seq=1 ttl=64 time=0.124 ms
64 bytes from 2003:ac18::305: icmp_seq=2 ttl=64 time=0.097 ms
在RCHE的考试中有一道考试题目是:
在您的两个考试系统上配置接口 eth0 使用下列 IPv6 地址:
server0 上的地址应该是 2003:ac18::305/64
desktop0 上的地址应该是 2003:ac18::306/64
两个系统必须能与网络 2003:ac18/64 内的系统通信
地址必须在重启系统后依旧生效
两个系统必须保持当前的 IPv4 地址并仍然能够通信
具体步骤可以仿照上面的介绍 两个虚拟机使用的IP 根据 考试题目要求配置
全面分析RHCE7(红帽认证工程师)考试题目之 ----配置IPv6地址,配置聚合连接篇
标签:0.12 auto 轮询 soft etc serve pac name man
原文地址:http://blog.51cto.com/13558754/2058392