在我的具有双网卡的 Ubuntu 14.04 服务器上,网卡连接到路由器,eth1,刚开机就会随机处于可以监听但不能发送的状态。我使用Wireshark监控接口。路由器正在运行。
该卡是PCI Express、Intel PRO/1000 网络连接。我没有注意到 DMESG 输出有任何差异 - 它总是报告eth1已启动。 ifconfig eth1除了传输包数量始终较低之外,输出看起来也很正常。
另一个异常是,DMESG 报告称两个接口都涉及 IPv6,但我不会使用 IPv6。
eth0 工作正常 - 它是与设备的直接连接。
我看到 ACPI 有资源“冲突”的警告,但没有其他启动警告。该计算机本质上是一台(定制)台式机,而不是笔记本电脑。
我该如何排除故障?我是否应该检查其他日志或排除故障命令?以某种方式安装其他驱动程序?
我只是一个 LINUX 用户,想学习足够的知识以使机器正常运行。
编辑
两者的输出没有区别“路线-n“也不”路由“除了 route-n 输出的最后两行的顺序可能被颠倒过来。我没有足够的数据来知道它们是否总是被颠倒过来。169.254.19.63 是直接连接的设备,192.168.11.0 是路由器。
SUCCESS
ip route
default via 192.168.11.1 dev eth1
169.254.19.63 dev eth0 scope link
192.168.11.0/24 dev eth1 proto kernel scope link src 192.168.11.219
192.168.11.0/24 dev eth0 proto kernel scope link src 192.168.11.211
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.11.1 0.0.0.0 UG 0 0 0 eth1
169.254.19.63 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
192.168.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
FAILURE
ip route
default via 192.168.11.1 dev eth1
169.254.19.63 dev eth0 scope link
192.168.11.0/24 dev eth0 proto kernel scope link src 192.168.11.211
192.168.11.0/24 dev eth1 proto kernel scope link src 192.168.11.219
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.11.1 0.0.0.0 UG 0 0 0 eth1
169.254.19.63 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
192.168.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
编辑
将 eth0 的 IP 地址更改为 169.254.19.211,与设备相同的域。eth1 仍然经常失败。以下是路线-n 和路由。在“失败”状态下,我尝试从笔记本电脑到计算机建立 ssh 和 http 连接,这次成功了!Wireshark 显示,如果我尝试 ping 或在 eth1 上加载网页,eth1 不会发出任何内容,但会显示来自入站 ssh 和网页的流量。
对于 eth1 来说,工作和不工作都是相同的。
ip route
default via 192.168.11.1 dev eth1
169.254.0.0/16 dev eth0 proto kernel scope link src 169.254.19.211
169.254.19.63 dev eth0 scope link
192.168.11.0/24 dev eth1 proto kernel scope link src 192.168.11.219
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.11.1 0.0.0.0 UG 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
169.254.19.63 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
192.168.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
编辑 .../interfaces 和 .../70-persistent-net.rules 如下。您是否建议我最好将 eth0 换成 eth1 或将 eth1 换成 eth0?
我不知道如何手动设置路线。
/etc/network/interfaces(1 月 26 日更新)
# The loopback network interface
auto lo
iface lo inet loopback
# primary network interface left port
auto eth0
iface eth0 inet static
address 192.168.11.219
netmask 255.255.255.0
gateway 192.168.11.1
dns-nameservers 99.99.99.53 8.8.8.8 8.8.4.4
# The camera interface right port
auto eth1
iface eth0 inet static
address 169.254.19.211
pointtopoint 169.254.19.63
############# assign camera to eth0 #############
post-up route add 169.254.19.63 eth0
post-up route add default gw 192.168.11.1 eth1
/etc/udev/rules.d/70-persistent-net.rules(1 月 26 日更新)
# PCI device 0x8086:0x1533 (igb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:01:05:19:7d:59", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# PCI device 0x8086:0x153a (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:01:05:19:7d:58", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
编辑
uname -a
Linux fireimager 3.13.0-44-generic #73-Ubuntu SMP Tue Dec 16 00:22:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
sudo lspci -v | awk '/Eth/' rs=
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-LM (rev 04)
02:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)
iptables
~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:4960
ACCEPT tcp -- anywhere anywhere tcp dpts:4955:4956
ACCEPT udp -- anywhere anywhere udp dpt:4958
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT icmp -- anywhere anywhere icmp fragmentation-needed
ACCEPT icmp -- anywhere anywhere limit: avg 10/sec burst 5
DROP all -- anywhere anywhere
Chain FORWARD (policy DROP)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain LOGNDROP (0 references)
target prot opt source destination
LOG tcp -- anywhere anywhere limit: avg 5/min burst 5 LOG level debug prefix "Denied TCP: "
LOG udp -- anywhere anywhere limit: avg 5/min burst 5 LOG level debug prefix "Denied UDP: "
LOG icmp -- anywhere anywhere limit: avg 5/min burst 5 LOG level debug prefix "Denied ICMP: "
DROP all -- anywhere anywhere
编辑 - 带有驱动程序 igb 的 eth0 行为异常。
~$ sudo lspci -v | awk'/Eth/' RS=
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I218-LM (rev 04)
Subsystem: Intel Corporation Device 0000
Flags: bus master, fast devsel, latency 0, IRQ 44
Memory at f7c00000 (32-bit, non-prefetchable) [size=128K]
Memory at f7c3d000 (32-bit, non-prefetchable) [size=4K]
I/O ports at f080 [size=32]
Capabilities: [c8] Power Management version 2
Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [e0] PCI Advanced Features
Kernel driver in use: e1000e
02:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)
Subsystem: Intel Corporation Device 0000
Flags: bus master, fast devsel, latency 0, IRQ 19
Memory at f7b00000 (32-bit, non-prefetchable) [size=128K]
I/O ports at e000 [size=32]
Memory at f7b20000 (32-bit, non-prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+
Capabilities: [70] MSI-X: Enable+ Count=5 Masked-
Capabilities: [a0] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Device Serial Number 00-01-05-ff-ff-19-7d-59
Capabilities: [1a0] Transaction Processing Hints
Kernel driver in use: igb
~$ ifconfig | awk'/eth/' RS=
eth0 Link encap:Ethernet HWaddr 00:01:05:19:7d:59
inet addr:192.168.11.219 Bcast:192.168.11.255 Mask:255.255.255.0
inet6 addr: fe80::201:5ff:fe19:7d59/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:73 errors:0 dropped:0 overruns:0 frame:0
TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15740 (15.7 KB) TX bytes:7496 (7.4 KB)
Memory:f7b00000-f7b20000
eth1 Link encap:Ethernet HWaddr 00:01:05:19:7d:58
inet addr:169.254.19.211 Bcast:169.254.255.255 Mask:255.255.0.0
inet6 addr: fe80::201:5ff:fe19:7d58/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:37 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:6505 (6.5 KB)
Interrupt:20 Memory:f7c00000-f7c20000
答案1
太想发表评论了,文字太长了,抱歉 =)
再次查看了您的 ifconfig,发现 eth1 或 mac 结尾为 58 的 nic 没有收到任何包。我读到 ifconfig 将是防火墙之前的接口级统计信息。pointtopoint
在接口配置中使用该选项有什么特别的原因吗?尝试将其删除,改用网络掩码 255.255.255.0 或 255.255.0.0。如果这也失败了。我猜 rc 内核不是驱动程序问题。我会回过头来怀疑硬件故障,电缆。对于电缆,您是否使用“以太网交叉电缆”进行直接连接?可能只有一个 nic 能够自动检测和切换 rx\tx。没什么可说的,但您也可以尝试刷新防火墙;sudo iptables -F
旧的,请尝试以下操作;
下载并安装:
使用sudo dpkg -i filename.deb
来安装。