linux - Odroidh2 Debian - 无法 ping 网络网关/没有网络连接
问题描述
我有一个带有 docker 设置的 OdroidH2。
它工作了几个月,突然间,它突然停止了任何互联网/内部网连接。
它的连接是通过以太网电缆,而不是 WiFi,并且应该具有连接的接口是 enp3s0,其 IP 地址为 192.168.1.100。
我已执行以下故障排除步骤:
- 重启(当然,永远是第一步)
ifconfig
通过/etc/network/interfaces检查接口设置- 检查路由通过
route -n
- 检查 iptables(iptables 填充了 docker 配置,我已经刷新了包括 nat 和 mangle 在内的 iptables,并将默认策略设置为 ACCEPT 以进行输入、转发和输出。之后重新启动了网络服务)
- 检查它是否能够 ping 自己和默认网关(它能够 ping 自己但不能 ping 网关或任何其他设备)
- 检查其他设备是否能够 ping OdroidH2(主机无法访问)
- 经过检查
dmesg
,由于某种原因,我有 2 个无法加载的固件(已安装并在安装后重新启动):- rtl_nic/rtl8168g-2.fw(检查后,这是网络接口的固件)
- i915/glk_dmc_ver1_04.bin (没怎么研究这个,跟运行时电源管理有关吗??)
在所有这些步骤之后,我仍然无法使网络连接正常进行。
您可以在下面找到有关我当前配置的信息:
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。
任何帮助将不胜感激 (:
解决方案
完成所有故障排除后,问题不在于 OdroidH2 本身,而在于我的路由器。
我正在使用的 LAN 端口出现故障。我将以太网电缆切换到另一个 LAN 端口并且它工作正常。
推荐阅读
- html - 如何使用闪亮的应用程序将 pdf 文件嵌入到数据表中?
- mysql - 插入 Base64Encoded 字符串返回不正确的字符串值(MySQL)
- java - Spring Boot: spring.profiles.active=dev/test/prod
- java - java.lang.IllegalArgumentException:用户名不能为空或空,AbstractXMPPConnection.java:484
- docker - 如何通过 docker RUN 运行复制命令
- c++ - 将浮点数转换为字符串时如何加速此代码?
- android - 如何在运行时直接(无动画)设置 FAB 图标旋转和颜色以及 FAB 背景?
- php - 带有 laravel 项目的 Css 不起作用(布局使用)
- javascript - Lodash 从选定的键创建新数组
- html - HTML:将表格中的两列设置为比其他列宽固定像素数