Linux学习笔记之绑定两块网卡

1.创建出一个bond网卡

[root@linuxprobe ~]# nmcli connection add type bond con-name bond0 ifname bond0 bond.options "mode=balance-rr"

2.向bond0添加从属网卡(要将存在的网卡信息删除)

[root@linuxprobe ~]# nmcli connection add type ethernet slave-type bond con-name bond0-port1 ifname ens160 master bond0
Connection 'bond0-port1' (8a2f77ee-cc92-4c11-9292-d577ccf8753d) successfully added.
[root@linuxprobe ~]# nmcli connection add type ethernet slave-type bond con-name bond0-port2 ifname ens192 master bond0
Connection 'bond0-port2' (b1ca9c47-3051-480a-9623-fbe4bf731a89) successfully added.

3.配置bond0设备的网卡信息

[root@linuxprobe ~]# nmcli connection modify bond0 ipv4.addresses 192.168.10.10/24
[root@linuxprobe ~]# nmcli connection modify bond0 ipv4.gateway 192.168.10.1
[root@linuxprobe ~]# nmcli connection modify bond0 ipv4.dns 192.168.10.1
[root@linuxprobe ~]# nmcli connection modify bond0 ipv4.dns-search linuxprobe.com
[root@linuxprobe ~]# nmcli connection modify bond0 ipv4.method manual

4.启动

[root@linuxprobe ~]# nmcli connection up bond0

 







posted @ 2021-10-31 21:08  子车翰学  阅读(158)  评论(0)    收藏  举报