[linux网络] 双网卡bonding实现冗余/负载均衡
1 编辑/etc/modprobe.conf在/etc/modprobe.conf里加入如下两行:alias bond0 bondingoptions bond0 mode=1 miimon=100 use_carrier=02 创建bond0虚拟设备vim /etc/sysconfig/network-scripts/ifcfg-bond0DEVICE=bond...
·
1 编辑/etc/modprobe.conf
在/etc/modprobe.conf里加入如下两行:
alias bond0 bonding
options bond0 mode=1 miimon=100 use_carrier=0
2 创建bond0虚拟设备
vim /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=192.168.68.150
GATEWAY=192.168.68.254
3 配置 eth0 eth1
vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
vim /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
4 重启系统
在/etc/modprobe.conf里加入如下两行:
alias bond0 bonding
options bond0 mode=1 miimon=100 use_carrier=0
2 创建bond0虚拟设备
vim /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=192.168.68.150
GATEWAY=192.168.68.254
3 配置 eth0 eth1
vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
vim /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
4 重启系统
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐

所有评论(0)