时常丢失networking连接

我正在运行一个Ubuntu 11.10桌面,系统有两个网卡安装。

eth0由networkingpipe理员pipe理,eth1是网桥接口

/etc/network/interfaces # The loopback network interface auto lo iface lo inet loopback # The primary network interface (managed by networkmanager) # auto eth0 # iface eth0 inet manual # The secondary network interface auto eth1 iface eth1 inet manual auto br0 iface br0 inet static address 192.168.7.211 netmask 255.255.255.0 bridge_ports eth1 bridge_fd 0 bridge_stp no 

每个接口的arp-scan显示不同的输出

 arp-scan --interface=eth0 192.168.7.0/24 Interface: eth0, datalink type: EN10MB (Ethernet) Starting arp-scan 1.8.1 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/) 192.168.7.1 00:1b:c0:34:45:12 Juniper Networks 192.168.7.254 00:14:bf:a2:79:05 Cisco-Linksys LLC arp-scan --interface=br0 192.168.7.0/24 Interface: br0, datalink type: EN10MB (Ethernet) Starting arp-scan 1.8.1 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/) 192.168.7.1 00:1b:c0:34:45:12 Juniper Networks 192.168.7.254 00:14:bf:a2:79:05 Cisco-Linksys LL arp-scan --interface=eth1 192.168.7.0/24 ioctl: Cannot assign requested address WARNING: Could not obtain IP address for interface eth1. Using 0.0.0.0 for the source address, which is probably not what you want. Either configure eth1 with an IP address, or manually specify the address with the --arpspa option. Interface: eth1, datalink type: EN10MB (Ethernet) Starting arp-scan 1.8.1 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/) 192.168.7.1 00:1b:c0:34:45:12 Juniper Networks 192.168.7.210 f4:6d:04:af:01:d9 ASUSTek COMPUTER INC. 192.168.7.211 f4:6d:04:af:01:d9 ASUSTek COMPUTER INC. 192.168.7.254 00:14:bf:a2:79:05 Cisco-Linksys LLC 

只有当0.0.0.0被用作源地址时,IP地址210和211才显示,但是它们具有相同的MAC地址,但是它们在不同的NIC上。

 output ifconfig br0 Link encap:Ethernet Hardware Adresse f4:6d:04:ae:e8:d0 inet Adresse:192.168.7.211 Bcast:0.0.0.0 Maske:255.255.255.0 inet6-Adresse: fe80::f66d:4ff:feae:e8d0/64 Gültigkeitsbereich:Verbindung UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1 RX packets:5297 errors:0 dropped:0 overruns:0 frame:0 TX packets:1896 errors:0 dropped:0 overruns:0 carrier:0 Kollisionen:0 Sendewarteschlangenlänge:0 RX bytes:463074 (463.0 KB) TX bytes:115018 (115.0 KB) eth0 Link encap:Ethernet Hardware Adresse f4:6d:04:af:01:d9 inet Adresse:192.168.7.210 Bcast:192.168.7.255 Maske:255.255.255.0 inet6-Adresse: fe80::f66d:4ff:feaf:1d9/64 Gültigkeitsbereich:Verbindung UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1 RX packets:120669 errors:0 dropped:0 overruns:0 frame:0 TX packets:93541 errors:0 dropped:0 overruns:0 carrier:0 Kollisionen:0 Sendewarteschlangenlänge:1000 RX bytes:124115299 (124.1 MB) TX bytes:8299417 (8.2 MB) Interrupt:16 Basisadresse:0x8000 eth1 Link encap:Ethernet Hardware Adresse f4:6d:04:ae:e8:d0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1 RX packets:6769 errors:0 dropped:0 overruns:0 frame:0 TX packets:3373 errors:0 dropped:0 overruns:0 carrier:0 Kollisionen:0 Sendewarteschlangenlänge:1000 RX bytes:1006597 (1.0 MB) TX bytes:244116 (244.1 KB) Interrupt:18 Speicher:fa700000-fa720000 lo Link encap:Lokale Schleife inet Adresse:127.0.0.1 Maske:255.0.0.0 inet6-Adresse: ::1/128 Gültigkeitsbereich:Maschine UP LOOPBACK RUNNING MTU:16436 Metrik:1 RX packets:2288 errors:0 dropped:0 overruns:0 frame:0 TX packets:2288 errors:0 dropped:0 overruns:0 carrier:0 Kollisionen:0 Sendewarteschlangenlänge:0 RX bytes:288354 (288.3 KB) TX bytes:288354 (288.3 KB) 

结果我的networking连接不时地丢失。

更新:

 net.ipv4.conf.default.rp_filter=1 net.ipv4.conf.default.arp_filter=0 #net.ipv4.conf.all.rp_filter=1 # Disable netfilter on bridges. net.bridge.bridge-nf-call-ip6tables = 0 net.bridge.bridge-nf-call-iptables = 0 net.bridge.bridge-nf-call-arptables = 0 

如果在一个networking中有多个networking接口,则必须在/etc/sysctl.conf文件中设置此设置:

 net.ipv4.conf.default.rp_filter = 0 net.ipv4.conf.default.arp_filter = 1 

基本上,有问题,当一个接口传输数据包到MAC广播与ARP请求和计算机从另一个接口接收答案…