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

浅浅的花香味﹌ 2023-01-20 08:03 259阅读 0赞

一,创建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

发表评论

表情:
评论列表 (有 0 条评论,259人围观)

还没有评论,来说两句吧...

相关阅读

    相关 网卡7种模式

    网卡绑定7种模式 常用的三种: mode=0:平衡负载模式,有自动备援,但需要”Switch”支援及设定。 mode=1:自动备援模式,其中一条线若断线,其他线路将