四核 Nic 每次只能工作一个

四核 Nic 每次只能工作一个

四网卡无法完全工作。但是系统日志中没有错误来追踪发生了什么。

linux - linux系统grep 以太网

05:04.0 Ethernet controller: Digital Equipment Corporation DECchip 21142/43 (rev 41)
05:05.0 Ethernet controller: Digital Equipment Corporation DECchip 21142/43 (rev 41)
05:06.0 Ethernet controller: Digital Equipment Corporation DECchip 21142/43 (rev 41)
05:07.0 Ethernet controller: Digital Equipment Corporation DECchip 21142/43 (rev 41)
06:04.0 Ethernet controller: Digital Equipment Corporation DECchip 21142/43 (rev 41)
06:05.0 Ethernet controller: Digital Equipment Corporation DECchip 21142/43 (rev 41)
06:06.0 Ethernet controller: Digital Equipment Corporation DECchip 21142/43 (rev 41)
06:07.0 Ethernet controller: Digital Equipment Corporation DECchip 21142/43 (rev 41)
07:04.0 Ethernet controller: Digital Equipment Corporation DECchip 21142/43 (rev 41)
07:05.0 Ethernet controller: Digital Equipment Corporation DECchip 21142/43 (rev 41)
07:06.0 Ethernet controller: Digital Equipment Corporation DECchip 21142/43 (rev 41)
07:07.0 Ethernet controller: Digital Equipment Corporation DECchip 21142/43 (rev 41)

仅连接 4 个端口进行测试

运行结果lshw -C network | egrep 'logical|irq'

PCI (sysfs)  

   logical name: eth3
   resources: irq:20 ioport:b080(size=128) memory:f7601000-f76013ff memory:f7540000-f757ffff
   logical name: eth6
   resources: irq:20 ioport:a100(size=128) memory:f7402000-f74023ff memory:f7380000-f73bffff
   logical name: eth10
   resources: irq:19 ioport:9100(size=128) memory:f7202000-f72023ff memory:f7180000-f71bffff
   logical name: eth12
   resources: irq:16 ioport:9000(size=128) memory:f7200000-f72003ff memory:f7100000-f713ffff

运行结果ifconfig | egrep 'eth|inet'如下:

eth3      Link encap:Ethernet  HWaddr 00:80:c8:b9:86:f7  
          inet addr:192.168.99.101  Bcast:192.168.99.255  Mask:255.255.255.0

eth6      Link encap:Ethernet  HWaddr 00:80:c8:ca:73:36  
          inet addr:192.168.99.102  Bcast:192.168.99.255  Mask:255.255.255.0

eth10     Link encap:Ethernet  HWaddr 00:80:c8:b9:90:be  
          inet addr:192.168.99.104  Bcast:192.168.99.255  Mask:255.255.255.0

eth12     Link encap:Ethernet  HWaddr 00:80:c8:b9:90:c0  
          inet addr:192.168.99.103  Bcast:192.168.99.255  Mask:255.255.255.0

eth3它工作时,其余部分就停止工作,如果我拔下/插入该端口,它就会再次工作。

请对此作出解释。

答案1

也许你需要安装 arptables

sudo su
apt-get install arptables

Arptables 用于设置、维护和检查 Linux 内核中的 ARP 规则表。

它类似于 iptables,但是运行在 ARP 层而不是 IP 层。

例子:

sudo su
arptables -F INPUT
arptables -A INPUT -i eth3 --destination-ip ! 192.168.99.101 -j DROP
arptables -A INPUT -i eth6 --destination-ip ! 192.168.99.102 -j DROP
arptables -A INPUT -i eth10 --destination-ip ! 192.168.99.104 -j DROP
arptables -A INPUT -i eth12 --destination-ip ! 1192.1168.99.103 -j DROP

这将防止广播进入错误的接口。

相关内容