- 安装team
dnf -y install teamd
-
查看网卡:
[root@WJ720 network-scripts]# nmcli device
DEVICE TYPE STATE CONNECTION
eno1 ethernet 已连接 eno1
eno3 ethernet 已断开 –
eno4 ethernet 已断开 –
eno2 ethernet 不可用 –
lo loopback 未托管 – -
配置捆绑口,team0,模式采用lacp方式:
[root@WJ720 network-scripts]# nmcli connection add con-name team0-config ifname team0 type team config ‘{“runner”:{“name”:“lacp”}}’
\注意,上面的config 后面有一个空格的。
// con-name team0-config:配置文件名
// ifname team0:NIC teaming逻辑接口名
//type team:NIC teaming
//’{“runner”:{“name”:“lacp”}}’ :JSON格式,配置模式为LACP
-
查看网卡信息
[root@WJ720 network-scripts]# nmcli connection show
NAME UUID TYPE DEVICE
team0-config 19960873-8923-4320-ae6a-b91e683ec769 team team0
eno1 f4e3228d-96f1-4d39-bd77-c68106a17153 ethernet eno1
eno2 35752c9e-b485-4b07-bbe7-1aefa86da695 ethernet –
eno3 4ccadc50-1ae1-4f56-9fc9-68c35cb99d44 ethernet –
eno4 a2b2d144-9b2a-4f2f-ba7b-ed97dd9aec06 ethernet – -
添加:
[root@WJ720 network-scripts]# nmcli connection add type team-slave con-name team0-port1 ifname eno1 master team0
连接 “team0-port1” (ca88227f-db9a-40c8-924a-e77e75af9f5e) 已成功添加。
[root@WJ720 network-scripts]# nmcli connection add type team-slave con-name team0-port2 ifname eno2 master team0
连接 “team0-port2” (7d99c421-89ef-42b2-8d26-ff3b662fea13) 已成功添加。
[root@WJ720 network-scripts]# nmcli connection add type team-slave con-name team0-port3 ifname eno3 master team0
连接 “team0-port3” (dfbb5fe4-589d-48bc-98dc-9544f8e37fe4) 已成功添加。
[root@WJ720 network-scripts]# nmcli connection add type team-slave con-name team0-port4 ifname eno4 master team0
连接 “team0-port4” (5394ae3c-6124-4e0b-9690-fb7e17ad0b18) 已成功添加。
-
激活网卡:
[root@WJ720 network-scripts]# nmcli connection up team0-port1
[root@WJ720 network-scripts]# nmcli connection up team0-port2
[root@WJ720 network-scripts]# nmcli connection up team0-port3
[root@WJ720 network-scripts]# nmcli connection up team0-port4 -
配置捆绑口的IP地址:
nmcli connection modify team0-config ipv4.addresses “10.10.8.10/24”
nmcli connection modify team0-config ipv4.gateway “10.10.8.254”
nmcli connection modify team0-config ipv4.dns “115.144.122.193”
nmcli connection modify team0-config ipv4.method manual -
查看:
[root@WJ720 network-scripts]# teamdctl team0 state view -
交换机配置,以cisco交换机为例:
interface Port-channel9
description To-WenJian-Server-R720
switchport access vlan 8
switchport mode access
load-interval 30
end
S3560G#show running-config interface gigabitEthernet 0/18
Building configuration…
Current configuration : 151 bytes
!
interface GigabitEthernet0/18
description To-WenJianServer-R720
switchport access vlan 8
switchport mode access
channel-group 9 mode active
end
S3560G#show running-config interface gigabitEthernet 0/46
Building configuration…
Current configuration : 151 bytes
!
interface GigabitEthernet0/46
description To-WenJianServer-R720
switchport access vlan 8
switchport mode access
channel-group 9 mode active
end