linux 网卡绑定updelay,Linux网卡绑定发现的问题

今天在练习Linux网卡绑定的时候,发现了一个问题(环境RHEL6.5)

只开了两个网卡:eth0和eth2,在mode=1的时候,断掉eth2是可以连接的:

Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)

Bonding Mode: fault-tolerance (active-backup)

Primary Slave: None

Currently Active Slave: eth0

MII Status: up

MII Polling Interval (ms): 100

Up Delay (ms): 0

Down Delay (ms): 0

Slave Interface: eth0

MII Status: up

Speed: 1000 Mbps

Duplex: full

Link Failure Count: 0

Permanent HW addr: 08:00:27:7a:b1:b7

Slave queue ID: 0

Slave Interface: eth2

MII Status: down

Speed: Unknown

Duplex: Unknown

Link Failure Count: 1

Permanent HW addr: 08:00:27:eb:55:bb

Slave queue ID: 0

C:\Users\Administrator>ping 186.168.100.135 -t

正在 Ping 186.168.100.135 具有 32 字节的数据:

来自 186.168.100.135 的回复: 字节=32 时间=1ms TTL=64

来自 186.168.100.135 的回复: 字节=32 时间<1ms TTL=64

断掉eth0却不行了

C:\Users\Administrator>ping 186.168.100.135 -t

正在 Ping 186.168.100.135 具有 32 字节的数据:

请求超时。

而且加入eth3和eth4,分配了IP,断掉eth0之后,3和4也是连接不上的。

连上eth0之后,只有重启网络服务才能继续连上。为了确认不是绑定的问题,相同配置,绑定3和4.

发现3和4只要有一个连上,就可以。

0和2的绑定不知道为什么,但是保险起见,暂时不要对第一个网卡进行绑定了吧。

有没有人知道,是否有这方面的约束呢??

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Linux网卡绑定通常使用的是网络接口绑定技术,也称为网卡绑定网卡聚合、链路聚合等。这种技术可以将多个物理网卡绑定成一个虚拟网卡,从而实现带宽叠加和冗余备份,提高网络的可用性和可靠性。 在Linux系统中,常用的网络接口绑定技术有两种:bonding和team。下面分别介绍它们的实现方法。 一、bonding技术 1. 安装bonding模块 在Linux系统中,bonding模块通常已经包含在内核中。如果需要手动加载或者更新,可以使用以下命令: ``` modprobe bonding ``` 2. 配置bonding模块 在/etc/modprobe.d/目录下创建一个新的配置文件,例如bonding.conf,添加以下内容: ``` alias bond0 bonding options bonding mode=0 miimon=100 ``` 其中,mode=0表示使用负载均衡模式,miimon=100表示每隔100毫秒检查一次链路状态。 3. 配置网络接口 编辑/etc/network/interfaces文件,添加以下内容: ``` iface eth0 inet manual iface eth1 inet manual auto bond0 iface bond0 inet static address 192.168.1.10 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 8.8.8.8 bond-slaves eth0 eth1 bond-mode balance-rr bond-miimon 100 bond-downdelay 200 bond-updelay 200 ``` 其中,bond-slaves eth0 eth1表示将eth0和eth1绑定到bond0虚拟网卡上,bond-mode balance-rr表示使用负载均衡模式,bond-miimon 100表示每隔100毫秒检查一次链路状态,bond-downdelay 200和bond-updelay 200分别表示链路断开和恢复的延迟时间。 4. 重启网络服务 使用以下命令重启网络服务: ``` service networking restart ``` 二、team技术 1. 安装team模块 team模块通常也已经包含在Linux内核中,如果需要手动加载或者更新,可以使用以下命令: ``` modprobe team ``` 2. 配置team模块 在/etc/modprobe.d/目录下创建一个新的配置文件,例如team.conf,添加以下内容: ``` alias team0 team_mode_loadbalance ``` 其中,team_mode_loadbalance表示使用负载均衡模式。 3. 配置网络接口 编辑/etc/network/interfaces文件,添加以下内容: ``` iface eth0 inet manual iface eth1 inet manual auto team0 iface team0 inet static address 192.168.1.10 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 8.8.8.8 team-mode loadbalance team-port eth0 team-port eth1 ``` 其中,team-port eth0和team-port eth1表示将eth0和eth1绑定到team0虚拟网卡上,team-mode loadbalance表示使用负载均衡模式。 4. 重启网络服务 使用以下命令重启网络服务: ``` service networking restart ``` 以上就是Linux网卡绑定的实现方法,使用这种技术可以提高网络的可用性和可靠性,同时也可以实现带宽叠加。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值