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 重启系统
本文详细介绍了如何在Linux环境下配置两个物理网卡eth0和eth1为bond0虚拟设备,包括编辑modprobe.conf文件、创建ifcfg-bond0配置文件以及ifcfg-eth0/eth1子配置文件,并最终重启系统生效。
1187

被折叠的 条评论
为什么被折叠?



