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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值