【问题标题】:Odroidh2 Debian - Unable to ping network gateway / no network connectivityOdroidh2 Debian - 无法 ping 网络网关/没有网络连接
【发布时间】:2020-07-28 13:34:33
【问题描述】:

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

几个月来一直运行良好,但突然间,它突然停止了任何 Internet/Intranet 连接。

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

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

  • 重启(当然,永远是第一步)
  • 通过ifconfig 和 /etc/network/interfaces 检查接口设置
  • 通过route -n检查路由
  • 已检查 iptables(iptables 已使用 docker 配置填充,我已刷新 iptables,包括 nat 和 mangle,并将输入、转发和输出的默认策略设置为 ACCEPT。之后重新启动了网络服务)
  • 检查它是否能够 ping 自己和默认网关(它能够 ping 自己但不能 ping 网关或任何其他设备)
  • 检查其他设备是否能够 ping OdroidH2(主机无法访问)
  • 检查了dmesg,由于某种原因,我有2个无法加载的固件(已经安装并在安装后重新启动):
    • rtl_nic/rtl8168g-2.fw(检查后,这是网络接口的固件)
    • i915/glk_dmc_ver1_04.bin(没怎么研究这个,跟运行时电源管理有关吗??)

完成所有这些步骤后,我仍然无法连接网络。

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

dmesg 输出

Stackoverflow 不允许我将我的 dmesg 输出中的所有信息都放入其中,因此我必须将其放入 Google 驱动器: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/network/interfaces

# 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。

任何帮助将不胜感激(:

【问题讨论】:

    标签: linux networking routing ping connectivity


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-11
      • 2012-09-13
      • 2012-10-13
      • 1970-01-01
      • 2012-02-17
      相关资源
      最近更新 更多