一. 网络分组(Team)的配置

网络分组(Team)的运行模式,如下所示:

运行模式

描述

循环(roundrobin)

依次通过所有端口传输数据。

活动备份(activebackup)

通过一个端口传输数据,而其他端口则作为备份保留。

负载均衡(loadbalance)

使用主动 Tx 负载均衡和基于 Berkeley 数据包过滤器 (BPF) 的 Tx 端口选择器在所有端口上传输数据。

随机(random)

在随机选择的端口上传输数据。

LACP(lacp)

实施 802.3ad 链路聚合控制协议 (LACP)。

广播(broadcast)

通过所有端口传输数据。

显示网络设备

[root@rhel7 ~] nmcli device
DEVICE  TYPE      STATE      CONNECTION
eth0    ethernet  connected  System eth0
lo      loopback  unmanaged  --
或
[root@rhel7 ~] nmcli connection show
NAME         UUID                                  TYPE      DEVICE
System eth0  97ea747c-bdb5-4007-83ee-84913a7c6fad  ethernet  eth0
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.

删除现有网络连接

[root@rhel7 ~] nmcli connection delete enp1s0
  • 1.

添加一个新的团队设备(team0,可以修改成其它的名字)

[root@rhel7 ~] nmcli connection add type team con-name team0 ifname team0 config '{"runner": {"name": "roundrobin"}}'
Connection 'team0' (e0967a5e-fbd2-47c8-b779-1417db1e04ea) successfully added.
  • 1.
  • 2.

添加设备到组队设备

添加网卡0
[root@rhel7 ~] nmcli connection add type team-slave con-name team0-member0 ifname ens256 master team0
Connection 'team0-member0' (e0717622-19a7-4365-a494-d6630027b521) successfully added.


添加网卡1
[root@rhel7 ~] nmcli connection add type team-slave con-name team0-member1 ifname ens224 master team0
Connection 'team0-member1' (f1b3589a-39c3-49e4-b6fb-f7796f6a5669) successfully added. 


查看网口列表
[root@rhel7 ~] nmcli device
DEVICE  TYPE      STATE                                  CONNECTION
eth0    ethernet  connected                              System eth0
ens256  ethernet  connected                              Wired connection 1
ens224  ethernet  connected                              Wired connection 2
team0   team      connecting (getting IP configuration)  team0
lo      loopback  unmanaged
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.

设置team0团队设备的IP地址等参数

配置IP地址
root@rhel7 ~] nmcli connection modify team0 ipv4.addresses 10.255.255.30/24


配置网关
[root@rhel7 ~] nmcli connection modify team0 ipv4.gateway 10.255.255.1


配置DNS (需要设置多个DNS服务器,以空格分隔)
[root@rhel7 ~] nmcli connection modify team0 ipv4.dns "10.255.255.222 10.255.255.223"


设置IP获取方式为手动
nmcli connection modify team0 ipv4.method manual 


关闭端口并重新启用端口
nmcli connection down team0 && nmcli connection up team0


查看team组的组队状态
[root@rhel7 ~] teamdctl team0 state
setup:
  runner: roundrobin


查看端口的IP信息
[root@rhel7 ~]ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens256: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:50:56:88:3c:57 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::f2a0:644c:7dde:84d4/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
3: ens224: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:50:56:88:6f:31 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::8cb5:569b:39c0:8570/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
4: team0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 6a:ad:72:94:c1:0d brd ff:ff:ff:ff:ff:ff
    inet 10.255.255.30/24 brd 10.255.255.255 scope global noprefixroute team0
       valid_lft forever preferred_lft forever


查看端口的配置文件的路径和配置文件
[root@rhel7 network-scripts] ls
ifcfg-eth0           ifcfg-team0-member1  ifdown-ib    ifdown-post    ifdown-Team      ifup-aliases  ifup-ippp  ifup-plusb   ifup-sit       ifup-wireless
ifcfg-lo             ifdown               ifdown-ippp  ifdown-ppp     ifdown-TeamPort  ifup-bnep     ifup-ipv6  ifup-post    ifup-Team      init.ipv6-global
ifcfg-team0          ifdown-bnep          ifdown-ipv6  ifdown-routes  ifdown-tunnel    ifup-eth      ifup-isdn  ifup-ppp     ifup-TeamPort  network-functions
ifcfg-team0-member0  ifdown-eth           ifdown-isdn  ifdown-sit     ifup             ifup-ib       ifup-plip  ifup-routes  ifup-tunnel    network-functions-ipv6


查看team0网卡配置文件
[root@rhel7 network-scripts] cat ifcfg-team0
TEAM_CONFIG="{\"runner\": {\"name\": \"roundrobin\"}}"
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
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=team0
UUID=e0967a5e-fbd2-47c8-b779-1417db1e04ea
DEVICE=team0
ONBOOT=yes
DEVICETYPE=Team
IPADDR=10.255.255.30
PREFIX=24
GATEWAY=10.255.255.1
DNS1=10.255.255.222
DNS2=10.255.255.223


查看team0的子网卡0配置文件
[root@rhel7 network-scripts] cat ifcfg-team0-member0
NAME=team0-member0
UUID=e0717622-19a7-4365-a494-d6630027b521
DEVICE=ens256
ONBOOT=yes
TEAM_MASTER=team0
DEVICETYPE=TeamPort


查看team0的子网卡1配置文件
[root@rhel7 network-scripts] cat ifcfg-team0-member1
NAME=team0-member1
UUID=f1b3589a-39c3-49e4-b6fb-f7796f6a5669
DEVICE=ens224
ONBOOT=yes
TEAM_MASTER=team0
DEVICETYPE=TeamPort
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89.
  • 90.
  • 91.
  • 92.
  • 93.
  • 94.
  • 95.
  • 96.
  • 97.
  • 98.
  • 99.

删除网络组

关闭端口
[root@rhel7 network-scripts] nmcli connection  down team0
Connection 'team0' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/6) 


查看端口列表
[root@rhel7 network-scripts] nmcli c s
NAME                UUID                                  TYPE      DEVICE
System eth0         97ea747c-bdb5-4007-83ee-84913a7c6fad  ethernet  eth0
Wired connection 1  0911dc61-1ab9-3ac8-abfa-fd72cf032a5e  ethernet  ens256
Wired connection 2  eda4adb2-d0e3-37d8-8938-219367c32fd8  ethernet  ens224
team0               e0967a5e-fbd2-47c8-b779-1417db1e04ea  team      --
team0-member0       e0717622-19a7-4365-a494-d6630027b521  ethernet  --
team0-member1       f1b3589a-39c3-49e4-b6fb-f7796f6a5669  ethernet  --


删除team组的子网口1
[root@rhel7 network-scripts] nmcli  connection delete team0-member0
Connection 'team0-member0' (e0717622-19a7-4365-a494-d6630027b521) successfully deleted.


删除team组的子网口2
[root@rhel7 network-scripts]# nmcli  connection delete team0-member1
Connection 'team0-member1' (f1b3589a-39c3-49e4-b6fb-f7796f6a5669) successfully deleted.


查看网口列表
[root@rhel7 network-scripts]# nmcli c s
NAME                UUID                                  TYPE      DEVICE
System eth0         97ea747c-bdb5-4007-83ee-84913a7c6fad  ethernet  eth0
Wired connection 1  0911dc61-1ab9-3ac8-abfa-fd72cf032a5e  ethernet  ens256
Wired connection 2  eda4adb2-d0e3-37d8-8938-219367c32fd8  ethernet  ens224
team0               e0967a5e-fbd2-47c8-b779-1417db1e04ea  team      --


删除team0 
[root@rhel7 network-scripts]nmcli con delete team0
Connection 'team0' (e0967a5e-fbd2-47c8-b779-1417db1e04ea) successfully deleted.


查看端口列表
[root@rhel7 network-scripts]nmcli c s
NAME                UUID                                  TYPE      DEVICE
System eth0         97ea747c-bdb5-4007-83ee-84913a7c6fad  ethernet  eth0
Wired connection 1  0911dc61-1ab9-3ac8-abfa-fd72cf032a5e  ethernet  ens256
Wired connection 2  eda4adb2-d0e3-37d8-8938-219367c32fd8  ethernet  ens224 


查看配置文件已经自动删除
[root@rhel7 network-scripts] ls
ifcfg-eth0   ifdown-eth   ifdown-isdn    ifdown-sit       ifup          ifup-ib    ifup-plip   ifup-routes    ifup-tunnel        network-functions-ipv6
ifcfg-lo     ifdown-ib    ifdown-post    ifdown-Team      ifup-aliases  ifup-ippp  ifup-plusb  ifup-sit       ifup-wireless
ifdown       ifdown-ippp  ifdown-ppp     ifdown-TeamPort  ifup-bnep     ifup-ipv6  ifup-post   ifup-Team      init.ipv6-global
ifdown-bnep  ifdown-ipv6  ifdown-routes  ifdown-tunnel    ifup-eth      ifup-isdn  ifup-ppp    ifup-TeamPort  network-functions
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
二. 网络绑定(bonding)的配置

网络绑定(bonding)的运行模式一共有7种,详细信息如下所示:

网卡绑定mode共有七种(0~6) bond0、bond1、bond2、bond3、bond4、bond5、bond6;

模式

模式名称

描述

0

平衡负载模式(balance-rr)

为容错和负载均衡设置轮询策略,从第一个可用的接口开始,在每个绑定成员接口上按顺序接收和发送传输。

1

主-备份策略(active-backup)

设置主动备份策略以实现容错,传输通过第一个可用的绑定成员接口接收和发送,仅当活动的绑定成员接口发生故障时,才使用另一个绑定成员接口

2

平衡策略(balance-xor)

为容错和负载均衡设置 XOR(排除 or)策略,使用此方法,接口将传入请求的 MAC 地址与其中一个成员 NIC 的 MAC 地址进行匹配,一旦建立了此链路,传输将从第一个可用接口开始按顺序发送出去

3

广播策略(broadcast)

设置容错的广播策略,所有传输都在所有成员接口上发送

4

IEEE 802.3ad 动态链路聚合策略(LACP)

设置 IEEE 802.3ad 动态链路聚合策略,创建共享相同速度和双工设置的聚合组,在活动聚合器中的所有成员上传输和接收。需要符合 802.3ad 标准的交换机支持

5

适配器传输负载均衡(balance-tlb)

为容错和负载均衡设置传输负载均衡 (TLB) 策略,传出流量根据每个成员接口上的当前负载进行分配。传入流量由当前成员 NIC 接收,如果接收成员发生故障,则另一个成员将接管发生故障的成员的 MAC 地址

6

适配器适应性负载均衡(balance-alb)

为容错和负载均衡设置主动负载均衡 (ALB) 策略,包括 IPV4 流量的传输和接收负载均衡,接收负载均衡是通过ARP协商实现的。

查看端口列表

[root@rhel7 ~]# nmcli device
DEVICE  TYPE      STATE      CONNECTION
eth0    ethernet  connected  System eth0
ens256  ethernet  connected  Wired connection 1
ens224  ethernet  connected  Wired connection 2
lo      loopback  unmanaged  --


添加一个新的绑定设备(bond0,或其它随意名称)
[root@rhel7 ~]# nmcli connection add type bond ifname bond0 con-name bond0 bond.options "mode=balance-rr"
Connection 'bond0' (6250e440-0a84-42ca-8f90-672cc4b44136) successfully added.


查看网口列表
[root@rhel7 ~]# nmcli device
DEVICE  TYPE      STATE                                  CONNECTION
eth0    ethernet  connected                              System eth0
ens256  ethernet  connected                              Wired connection 1
ens224  ethernet  connected                              Wired connection 2
bond0   bond      connecting (getting IP configuration)  bond0
lo      loopback  unmanaged


为bond0 添加成员设备1
[root@rhel7 ~]# nmcli connection add type ethernet ifname ens256 master bond0
Connection 'bond-slave-ens256' (d7bb482b-09de-4c3a-bba5-a521133695a3) successfully added.


为bond0 添加成员设备2
[root@rhel7 ~]# nmcli connection add type ethernet ifname ens224 master bond0
Connection 'bond-slave-ens224' (272d6cff-be66-4b1b-96d0-f2cf9825d8e9) successfully added.


查看端口列表
[root@rhel7 ~]# nmcli c s
NAME                UUID                                  TYPE      DEVICE
bond0               6250e440-0a84-42ca-8f90-672cc4b44136  bond      bond0
System eth0         97ea747c-bdb5-4007-83ee-84913a7c6fad  ethernet  eth0
Wired connection 1  0911dc61-1ab9-3ac8-abfa-fd72cf032a5e  ethernet  ens256
Wired connection 2  eda4adb2-d0e3-37d8-8938-219367c32fd8  ethernet  ens224
bond-slave-ens224   272d6cff-be66-4b1b-96d0-f2cf9825d8e9  ethernet  --
bond-slave-ens256   d7bb482b-09de-4c3a-bba5-a521133695a3  ethernet  --
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.

设置绑定设备的IP地址等

配置IP地址
[root@rhel7 ~]nmcli connection modify bond0 ipv4.addresses 10.255.255.30/24


配置网关
[root@rhel7 ~]nmcli connection modify bond0 ipv4.gateway 10.255.255.1


配置DNS (需要设置多个DNS服务器,以空格分隔)
[root@rhel7 ~]# nmcli connection modify bond0 ipv4.dns "10.255.255.222 10.255.255.223"


IP获取方式设置成手动并重启端口
[root@rhel7 ~]nmcli connection modify bond0 ipv4.method manual
[root@rhel7 ~]nmcli connection down bond0 && nmcli connection up bond0


查看端口
[root@rhel7 ~]nmcli c s
NAME                UUID                                  TYPE      DEVICE
System eth0         97ea747c-bdb5-4007-83ee-84913a7c6fad  ethernet  eth0
Wired connection 1  0911dc61-1ab9-3ac8-abfa-fd72cf032a5e  ethernet  ens256
bond0               6250e440-0a84-42ca-8f90-672cc4b44136  bond      bond0
Wired connection 2  eda4adb2-d0e3-37d8-8938-219367c32fd8  ethernet  ens224
bond-slave-ens224   272d6cff-be66-4b1b-96d0-f2cf9825d8e9  ethernet  --
bond-slave-ens256   d7bb482b-09de-4c3a-bba5-a521133695a3  ethernet  --
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.

查看端口状态

[root@rhel7 ~] cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)


Bonding Mode: load balancing (round-robin)
MII Status: down
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0


查看端口IP、配置文件
[root@rhel7 ~] ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens256: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:50:56:88:3c:57 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::f2a0:644c:7dde:84d4/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
3: ens224: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:50:56:88:6f:31 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::8cb5:569b:39c0:8570/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
4: bond0: <NO-CARRIER,BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 82:cc:70:ed:e2:99 brd ff:ff:ff:ff:ff:ff
    inet 10.255.255.30/24 brd 10.255.255.255 scope global noprefixroute bond0
       valid_lft forever preferred_lft forever


查看bond0配置文件
[root@rhel7 network-scripts]cat ifcfg-bond0
BONDING_OPTS=mode=balance-rr
TYPE=Bond
BONDING_MASTER=yes
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
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=bond0
UUID=6250e440-0a84-42ca-8f90-672cc4b44136
DEVICE=bond0
ONBOOT=yes
IPADDR=10.255.255.30
PREFIX=24
GATEWAY=10.255.255.1
DNS1=10.255.255.222
DNS2=10.255.255.223


查看bond0子网卡1的配置文件
[root@rhel7 network-scripts] cat ifcfg-bond-slave-ens224
TYPE=Ethernet
NAME=bond-slave-ens224
UUID=272d6cff-be66-4b1b-96d0-f2cf9825d8e9
DEVICE=ens224
ONBOOT=yes
MASTER=bond0
SLAVE=yes


查看bond0子网卡2的配置文件
[root@rhel7 network-scripts] cat ifcfg-bond-slave-ens256
TYPE=Ethernet
NAME=bond-slave-ens256
UUID=d7bb482b-09de-4c3a-bba5-a521133695a3
DEVICE=ens256
ONBOOT=yes
MASTER=bond0
SLAVE=yes
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
删除端口
  • 1.
查看端口
[root@rhel7 network-scripts]nmcli connection show
NAME                UUID                                  TYPE      DEVICE
System eth0         97ea747c-bdb5-4007-83ee-84913a7c6fad  ethernet  eth0
Wired connection 1  0911dc61-1ab9-3ac8-abfa-fd72cf032a5e  ethernet  ens256
bond0               6250e440-0a84-42ca-8f90-672cc4b44136  bond      bond0
Wired connection 2  eda4adb2-d0e3-37d8-8938-219367c32fd8  ethernet  ens224
bond-slave-ens224   272d6cff-be66-4b1b-96d0-f2cf9825d8e9  ethernet  --
bond-slave-ens256   d7bb482b-09de-4c3a-bba5-a521133695a3  ethernet  --


删除端口bond0
[root@rhel7 network-scripts]nmcli connection delete bond0
Connection 'bond0' (6250e440-0a84-42ca-8f90-672cc4b44136) successfully deleted.


删除端口bond0的子网卡
[root@rhel7 network-scripts]nmcli connection delete bond-slave-ens224
Connection 'bond-slave-ens224' (272d6cff-be66-4b1b-96d0-f2cf9825d8e9) successfully deleted.


删除端口bond0的子网卡
[root@rhel7 network-scripts]nmcli connection delete bond-slave-ens256
Connection 'bond-slave-ens256' (d7bb482b-09de-4c3a-bba5-a521133695a3) successfully deleted.


配置文件,自动删除了
[root@rhel7 network-scripts]ls
ifcfg-eth0   ifdown-eth   ifdown-isdn    ifdown-sit       ifup          ifup-ib    ifup-plip   ifup-routes    ifup-tunnel        network-functions-ipv6
ifcfg-lo     ifdown-ib    ifdown-post    ifdown-Team      ifup-aliases  ifup-ippp  ifup-plusb  ifup-sit       ifup-wireless
ifdown       ifdown-ippp  ifdown-ppp     ifdown-TeamPort  ifup-bnep     ifup-ipv6  ifup-post   ifup-Team      init.ipv6-global
ifdown-bnep  ifdown-ipv6  ifdown-routes  ifdown-tunnel    ifup-eth      ifup-isdn  ifup-ppp    ifup-TeamPort  network-functions
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
三.网络分组(Team)和网络绑定(bonding)的区别

功能

bonding

Team

广播 Tx 策略

循环 Tx 策略

Active-backup Tx 策略

LACP(802.3ad)支持

是(仅活动)

基于 hash 的 Tx 策略

用户可以设置哈希功能

TX 负载均衡支持(TLB)

LACP 哈希端口选择

LACP 支持的负载均衡

ethtool 链接监控

ARP 链路监控

NS/NA(IPv6)链路监控

端口启动/关闭延迟

“端口优先级和粘性(主要选项增强” )

单独设置每个端口的链接监控设置

多个链路监控设置

有限

Lockless Tx/Rx 路径

否(rwlock)

是(RCU)

VLAN 支持

用户空间运行时控制

有限

full

用户空间中的逻辑

可扩展性

模块化设计

性能开销

非常低

D-Bus 接口

多设备堆栈

使用 LLDP 时零配置

(在计划中)

NetworkManager 支持

本文转自: https://mp.weixin.qq.com/s/NlCgyy5PKTku8RFrU_QhNQ