|
|
| 首页
> 技术频道 >
软件学院
> 浏览技术 关键字: Linux 双网卡 |
| Linux下绑定双网卡配置方法 |
| 2005-9-5 10:27:34 Equal Null 来源:中华服务器网
点击:6081次 加入收藏夹 |
|
|
1.编辑虚拟网络接口配置文件,指定网卡IP vi /etc/sysconfig/ network-scripts/ ifcfg-bond0 [root@rhas-13 root]# cp /etc/sysconfig/network-scripts/ifcfg-eth0 ifcfg-bond0 2 #vi ifcfg-bond0 将第一行改成 DEVICE=bond0 # cat ifcfg-bond0 DEVICE=bond0 BOOTPROTO=static IPADDR=172.31.0.13 NETMASK=255.255.252.0 BROADCAST=172.31.3.254 ONBOOT=yes TYPE=Ethernet 这里要主意,不要指定单个网卡的IP 地址、子网掩码或网卡 ID。将上述信息指定到虚拟适配器(bonding)中即可。 [root@rhas-13 network-scripts]# cat ifcfg-eth0 DEVICE=eth0 ONBOOT=yes BOOTPROTO=dhcp [root@rhas-13 network-scripts]# cat ifcfg-eth1 DEVICE=eth0 ONBOOT=yes BOOTPROTO=dhcp
3 # vi /etc/modules.conf 编辑 /etc/modules.conf 文件,加入如下一行内容,以使系统在启动时加载bonding模块,对外虚拟网络接口设备为 bond0 加入下列两行 alias bond0 bonding options bond0 miimon=100 mode=1 说明:miimon是用来进行链路监测的。 比如:miimon=100,那么系统每100ms监测一次链路连接状态,如果有一条线路不通就转入另一条线路;mode的值表示工作模式,他共有0,1,2,3四种模式,常用的为0,1两种。 对不起,您需要登录后才能查看全部详细内容
|
|
|
|