一、聚合網(wǎng)絡
聚合網(wǎng)絡team的類型:
1、activebackup;
2、loadbalence;
3、roundrobin;
二、配置聚合網(wǎng)絡
三種方式:
1、命令行;
2、配置文件;
3、圖形化界面;
1、命令行方式:
添加team0
[root@linuxidc ~]# nmcli connection add con-name team0 type team ifname team0 config {"runner":{"name":"activebackup"}}
配置IP地址:
[root@linuxidc ~]# nmcli connection modify team0 ipv4.addresses "192.168.10.100/24"
[root@linuxidc ~]# nmcli connection modify team0 ipv4.method manual
添加接口,在添加之前,確保添加的接口的連接已刪除:
[root@linuxidc ~]# nmcli connection add con-name team0-port1 ifname ens34 type team-slave master team0
[root@linuxidc ~]# nmcli connection add con-name team0-port1 ifname ens38 type team-slave master team0
編輯ifcfg-team0配置文件,在這行加上單引號和雙引號:
TEAM_CONFIG='{"runner":{"name":"activebackup"}}'
重啟網(wǎng)絡服務:
[root@linuxidc network-scripts]# systemctl restart network
此時看到team0和綁定的2張網(wǎng)卡的Mac地址變?yōu)橐恢拢?/P>
查看team0的工作狀態(tài):
[root@linuxidc ~]# teamdctl team0 state
setup:
runner: activebackup
ports:
ens38
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
ens34
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
runner:
active port: ens34
2、配置文件
1 DEVICE=team0
2 DEVICETYPE=Team
3 ONBOOT=yes
4 BOOTPROTO=none
5 IPADDR=192.168.10.100
6 NETWORK=255.255.255.0
7 TEAM_CONFIG='{"runner":{"name":"roundrobin"}}'
1 DEVICE=ens34
2 DEVICETYPE=TeamPort
3 ONBOOT=yes
4 BOOTPROTO=none
5 TEAM_MASTER=team0
使用teamnl命令查看team的選項和端口:
[root@linuxidc network-scripts]# teamnl team0 ports
8: ens34: up 1000Mbit FD
4: ens38: up 1000Mbit FD
12345678910111213141516 [root@linuxidc network-scripts]# teamnl team0 options
queue_id (port:ens34) 0
priority (port:ens34) 0
user_linkup_enabled (port:ens34) false
user_linkup (port:ens34) true
enabled (port:ens34) true
queue_id (port:ens38) 0
priority (port:ens38) 0
user_linkup_enabled (port:ens38) false
user_linkup (port:ens38) true
enabled (port:ens38) true
mcast_rejoin_interval 0
mcast_rejoin_count 0
notify_peers_interval 0
notify_peers_count 0
mode roundrobin
[root@linuxidc network-scripts]# teamnl team0 getoption mode
2015職稱計算機考試書PowerPoint2007中 .. 定價:¥45 優(yōu)惠價:¥42 更多書籍 | |
2015年全國職稱計算機考試教材(2007模 .. 定價:¥225 優(yōu)惠價:¥213 更多書籍 |