redhat7linux双网卡绑定,RHEL7/RHEL8/CentOS7/CentOS8/双网卡绑定-Network bonding

一,创建bonding

创建名称为bond1的绑定

[root@localhost ~]# nmcli con add type bond con-name bond1 ifname bond1 mode active-backup

Connection 'bond1' (74659382-3e46-4a95-851d-66f90b2ece30) successfully added.

将enp7s0f0增加到bond1

[root@localhost ~]# nmcli connection add type bond-slave ifname enp7s0f0 master bond1

Connection 'bond-slave-enp7s0f0' (061f5c5c-3366-4025-8149-7c89e49ab1b3) successfully added.

将enp7s0f1增加到bond1

[root@localhost ~]# nmcli connection add type bond-slave ifname enp7s0f1 master bond1

Connection 'bond-slave-enp7s0f1' (45440593-243e-4618-ab1a-0845555e11c1) successfully added.

二,启动bonging

启动从属接口enp7s0f0

[root@localhost ~]# nmcli connection up bond-slave-enp7s0f0

Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/6)

启动从属接口enp7s0f1

[root@localhost ~]# nmcli connection up bond-slave-enp7s0f1

Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/7)

启动绑定

[root@localhost ~]# nmcli connection up  bond1

Connection successfully activated (master waiting for slaves) (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/11)

[root@localhost ~]# ifconfig

bond1: flags=5123  mtu 1500

ether a0:36:9f:dc:5c:48  txqueuelen 0  (Ethernet)

RX packets 34  bytes 6596 (6.4 KiB)

RX errors 0  dropped 0  overruns 0  frame 0

TX packets 12  bytes 1992 (1.9 KiB)TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

你可能感兴趣的:(redhat7linux双网卡绑定,RHEL7/RHEL8/CentOS7/CentOS8/双网卡绑定-Network bonding)