首页 > 解决方案 > Odroidh2 Debian - 无法 ping 网络网关/没有网络连接

问题描述

我有一个带有 docker 设置的 OdroidH2。

它工作了几个月,突然间,它突然停止了任何互联网/内部网连接。

它的连接是通过以太网电缆,而不是 WiFi,并且应该具有连接的接口是 enp3s0,其 IP 地址为 192.168.1.100。

我已执行以下故障排除步骤:

在所有这些步骤之后,我仍然无法使网络连接正常进行。

您可以在下面找到有关我当前配置的信息:

dmesg 输出

Stackoverflow 不允许我将所有信息从我的 dmesg 输出中放入,所以我不得不把它放在谷歌驱动器上:dmesg_output

/etc/hosts

127.0.0.1   localhost
192.168.1.100   dc1 dc1.samdom.andrewoliverhome.local   samdom.andrewoliverhome.local

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

iptables -nvL输出(清除并重新加载网络服务后)

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

/etc/resolv.conf

#nameserver 127.0.0.1
#nameserver 8.8.8.8
#nameserver 8.8.4.4
search samdom.andrewoliverhome.local
#domain samdom.andrewoliverhome.local
nameserver 192.168.1.100
nameserver 8.8.8.8

route -n输出

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.254   0.0.0.0         UG    0      0        0 enp3s0
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
172.18.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker_gwbridge
172.19.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-debc10cb5b21
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 enp3s0

/etc/网络/接口

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo enp2s0 enp3s0
#auto lo br0
iface lo inet loopback

# The primary network interface
iface enp2s0 inet dhcp
allow-hotplug enp2s0 enp3s0

#iface enp2s0 inet manual
#   post-up iptables-restore < /etc/iptables.up.rules
# This is an autoconfigured IPv6 interface

#iface enp2s0 inet dhcp
iface enp3s0 inet static
    address 192.168.1.100
    netmask 255.255.255.0
#   broadcast 169.254.99.255
    network 192.168.1.0
    gateway 192.168.1.254


#iface enp2s0 inet manual
#iface enp3s0 inet manual

#iface br0 inet static
#   bridge_ports enp2s0 enp3s0
#       address 192.168.1.100
#       broadcast 192.168.1.255
#       netmask 255.255.255.0
#       gateway 192.168.1.254
#

在 /etc/resolv.conf 中,我拥有主名称服务器本身的原因是因为我正在运行一个用作 samba-ad-dc 的 docker 容器。为了让 OdroidH2 找到我在域中的所有设备,它需要对 samba dc 进行 dns 查询,如果 samba 无法找到 dns 记录,它将自动转发到 8.8.8.8。

任何帮助将不胜感激 (:

标签: linuxnetworkingroutingpingconnectivity

解决方案


完成所有故障排除后,问题不在于 OdroidH2 本身,而在于我的路由器。

我正在使用的 LAN 端口出现故障。我将以太网电缆切换到另一个 LAN 端口并且它工作正常。


推荐阅读