Linux的双网卡绑定(即bond0)

http://www.linuxidc.com/Linux/2012-05/59738.htm

bond网卡的制作

一:在机其上安装两块网卡,并修改相应的网络配置文件

vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
MASTER=bond0
vim /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
MASTER=bond0
vim /etc/sysconfig/network-scripts/ ifcfg-bond0
DEVICE=bond0
ONBOOT=yes
BOOTPROTO=static
IPADDR=IP地址
NETMASK=子网掩码
Modprobe bonding

二。vim /etc/modprobe.conf 加载相关的网卡驱动

 

开机脚本

三:vim /etc/rc.d/rc.local 增加一行

 

四:查看状态 cat /proc/net/bonding/bond0并进行测试

 

 

使用桥接模式
Ping bond0的ip地址
当中在虚拟机中eth0断开模拟网卡损坏是的情景,可以看到网卡的替换过程,过程十分的短暂

C:\Documents and Settings\Administrator>ping -t 192.168.10.111
Pinging 192.168.10.111 with 32 bytes of data:
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Request timed out.
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64
Reply from 192.168.10.111: bytes=32 time<1ms TTL=64

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值