我正在尝试使用两个NIC配置成组。我正在VMware Workstation 14.1.2上运行CentOS 7.5.1804。
我已完成的步骤: 1)使用以下命令添加了团队界面
[root@client1 ~]# nmcli c a type team ifname myteam1 con-name myteam1 config my.conf
Connection 'myteam1' (6d95c6a4-cde9-437f-81e2-6c2cc2c0064e) successfully added.
my.conf文件的内容:
[root@client1 ~]# cat my.conf
{
"device": "myteam1",
"runner": {"name": "activebackup"}
}
2)我添加了2个从属接口:
[root@client1 ~]# nmcli c a type ethernet ifname ens33 con-name myteam1_slave1 master myteam1
Connection 'myteam1_slave1' (dd1d1bde-ff15-4d53-a174-96225e95f431) successfully added.
[root@client1 ~]# nmcli c a type ethernet ifname ens37 con-name myteam1_slave2 master myteam1
Connection 'myteam1_slave2' (bcd1319c-cb9b-4290-87ab-ef35d2a127b7) successfully added.
3)重新启动网络和NetworkManager服务。 4)检查了我的团队界面状态:
[root@client1 ~]# teamdctl myteam1 state
setup:
runner: activebackup
ports:
ens33
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
down count: 0
ens37
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
down count: 0
runner:
active port: ens33
当我尝试检查连接时,一切都很好。但是,当我尝试断开myteam1_slave1(ens33)的连接时,尽管它会将流道活动端口切换为ens37,但我却失去了连通性。
请协助!
以下信息可能对您有所帮助。
[root@client1 ~]# nmcli con down myteam1_slave1
Connection 'myteam1_slave1' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/3)
[root@client1 ~]#
[root@client1 ~]# teamdctl myteam1 state
setup:
runner: activebackup
ports:
ens37
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
down count: 0
runner:
active port: ens37
[root@client1 ~]#
[root@client1 ~]#
[root@client1 ~]# ping google.com
^C
[root@client1 ~]# nmcli c s
NAME UUID TYPE DEVICE
myteam1 6d95c6a4-cde9-437f-81e2-6c2cc2c0064e team myteam1
myteam1_slave2 bcd1319c-cb9b-4290-87ab-ef35d2a127b7 ethernet ens37
virbr0 cf294a4d-b615-4cb3-b191-2c806fd4eb9b bridge virbr0
myteam1_slave1 dd1d1bde-ff15-4d53-a174-96225e95f431 ethernet --
[root@client1 ~]# nmcli d s
DEVICE TYPE STATE CONNECTION
myteam1 team connected myteam1
virbr0 bridge connected virbr0
ens37 ethernet connected myteam1_slave2
ens33 ethernet disconnected --
lo loopback unmanaged --
virbr0-nic tun unmanaged --
[root@client1 ~]#
[root@client1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-myteam1
TEAM_CONFIG=$'{\n\t\"device\":\t\"myteam1\",\n\t\"runner\":\t{\"name\": \"activebackup\"}\n}\n'
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=myteam1
UUID=6d95c6a4-cde9-437f-81e2-6c2cc2c0064e
DEVICE=myteam1
ONBOOT=yes
DEVICETYPE=Team
[root@client1 ~]#
[root@client1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-myteam1_slave1
NAME=myteam1_slave1
UUID=dd1d1bde-ff15-4d53-a174-96225e95f431
DEVICE=ens33
ONBOOT=yes
TEAM_MASTER=myteam1
DEVICETYPE=TeamPort
[root@client1 ~]#
[root@client1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-myteam1_slave2
NAME=myteam1_slave2
UUID=bcd1319c-cb9b-4290-87ab-ef35d2a127b7
DEVICE=ens37
ONBOOT=yes
TEAM_MASTER=myteam1
DEVICETYPE=TeamPort
[root@client1 ~]#