路由器重启后无法 ping 通主机名和 IPv6

路由器重启后无法 ping 通主机名和 IPv6

路由器重新启动后发生这种情况。 (不知道这是否相关,但我的 Windows PC 也将 DNS 设置恢复到我测试的旧本地服务器)

当我通过 ssh 连接到我的家庭实验室服务器时,我注意到了这个问题。

自定义欢迎脚本挂在:

`hostname -I | /usr/bin/cut -d " " -f 1` and `wget -q -O - http://icanhazip.com/ | tail`

它用于输出 ipv4 和 ipv6 地址。

/etc/resolv.conf 具有路由器重新启动的确切时间戳,因此我专注于此配置。我感觉第一行缺少路由器的 IP。

命令(我在 2 分钟后没有响应就杀死了命令):

kevin@raspberrypi:~ $ nslookup www.google.com
Server:         1.1.1.1
Address:        1.1.1.1#53

Non-authoritative answer:
Name:   www.google.com
Address: 172.253.120.106
Name:   www.google.com
Address: 172.253.120.105
Name:   www.google.com
Address: 172.253.120.104
Name:   www.google.com
Address: 172.253.120.147
Name:   www.google.com
Address: 172.253.120.103
Name:   www.google.com
Address: 172.253.120.99
Name:   www.google.com
Address: 2a00:1450:400c:c01::6a
Name:   www.google.com
Address: 2a00:1450:400c:c01::67
Name:   www.google.com
Address: 2a00:1450:400c:c01::69
Name:   www.google.com
Address: 2a00:1450:400c:c01::68

kevin@raspberrypi:~ $ ping www.google.com
PING www.google.com(wj-in-x67.1e100.net (2a00:1450:400c:c01::67)) 56 data bytes
^C
--- www.google.com ping statistics ---
367 packets transmitted, 0 received, 100% packet loss, time 374791ms

kevin@raspberrypi:~ $ ping 2a00:1450:400c:c01::67
PING 2a00:1450:400c:c01::67(2a00:1450:400c:c01::67) 56 data bytes
^C
--- 2a00:1450:400c:c01::67 ping statistics ---
13 packets transmitted, 0 received, 100% packet loss, time 12284ms

kevin@raspberrypi:~ $ ping 172.253.120.106
PING 172.253.120.106 (172.253.120.106) 56(84) bytes of data.
64 bytes from 172.253.120.106: icmp_seq=1 ttl=57 time=23.5 ms
64 bytes from 172.253.120.106: icmp_seq=2 ttl=57 time=18.8 ms
64 bytes from 172.253.120.106: icmp_seq=3 ttl=57 time=18.6 ms
64 bytes from 172.253.120.106: icmp_seq=4 ttl=57 time=18.6 ms
64 bytes from 172.253.120.106: icmp_seq=5 ttl=57 time=18.4 ms
64 bytes from 172.253.120.106: icmp_seq=6 ttl=57 time=18.6 ms
^C
--- 172.253.120.106 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5009ms
rtt min/avg/max/mdev = 18.357/19.426/23.534/1.841 ms

kevin@raspberrypi:~ $ cat /etc/hosts
127.0.0.1       localhost
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

127.0.1.1       raspberrypi

kevin@raspberrypi:~ $ cat /etc/resolv.conf
# Generated by resolvconf
search telenet.be
nameserver 1.1.1.1
nameserver 8.8.8.8
nameserver 2a02:1800:100::44:1
nameserver 2a02:1800:100::44:2

kevin@raspberrypi:~ $ cat /etc/dhcpcd.conf
# A sample configuration for dhcpcd.
# I removed all the comments for this post.
hostname
clientid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option interface_mtu
require dhcp_server_identifier
slaac private

# I edited this during setup but still does the job:
interface eth0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=1.1.1.1 8.8.8.8

kevin@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

编辑:

kevin@raspberrypi:~ $ traceroute www.google.com
traceroute to www.google.com (172.253.120.105), 30 hops max, 60 byte packets
 1  192.168.0.1 (192.168.0.1)  1.599 ms  1.696 ms  1.754 ms
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  108.170.241.225 (108.170.241.225)  30.000 ms 142.251.255.38 (142.251.255.38)  24.602 ms 142.250.224.130 (142.250.224.130)  24.438 ms
 9  108.170.241.141 (108.170.241.141)  29.613 ms 108.170.241.205 (108.170.241.205)  29.620 ms 108.170.241.237 (108.170.241.237)  29.355 ms
10  216.239.42.213 (216.239.42.213)  29.938 ms 216.239.41.49 (216.239.41.49)  29.745 ms  29.528 ms
11  142.250.227.197 (142.250.227.197)  30.911 ms  30.768 ms 216.239.43.129 (216.239.43.129)  24.435 ms
12  64.233.175.102 (64.233.175.102)  29.005 ms 142.251.69.115 (142.251.69.115)  30.636 ms *
13  172.253.67.149 (172.253.67.149)  24.060 ms * 172.253.67.145 (172.253.67.145)  86.527 ms
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  wd-in-f105.1e100.net (172.253.120.105)  22.514 ms  29.539 ms  27.640 ms

相关内容