无法在“Fritz Box”家用路由器后面的家庭服务器上配置网络

无法在“Fritz Box”家用路由器后面的家庭服务器上配置网络

描述:

我的家庭服务器设置遇到了令人费解的网络问题,正在寻求解决该问题的指导。

问题:

我的家庭服务器位于“Fritz Box”家庭路由器后面,连接出现问题。虽然我的笔记本电脑和家庭服务器之间的 IPv4 ping 工作正常,但使用 IPv4 ping 家庭路由器 (192.168.8.1) 失败(IPv6 可以)。然而,有趣的是,当通过路由器的 DHCP 获取 IP 时,ping 路由器会成功。

网络详细信息:

家庭路由器信息:地址:192.168.8.1 子网掩码:255.255.248.0 DHCP 范围:192.168.9.1 至 192.168.15.254 本地 DNS 服务器:192.168.8.1(与家庭路由器相同)

配置尝试:

家庭服务器上的 DHCP 设置:

System Information:
------------------

Ubuntu Version:
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:    22.04
Codename:   jammy


Netplan Configuration:
----------------------
network:
  version: 2
  renderer: networkd
  ethernets:
    enp6s0:
      dhcp4: true


Network Information:
-------------------
IP Address info for enp6s0:
2: enp6s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 8c:89:a5:64:90:91 brd ff:ff:ff:ff:ff:ff
    inet 192.168.9.23/21 metric 100 brd 192.168.15.255 scope global dynamic enp6s0
       valid_lft 863949sec preferred_lft 863949sec
    inet6 fe80::8e89:a5ff:fe64:9091/64 scope link
       valid_lft forever preferred_lft forever

Route info for enp6s0:
default via 192.168.8.1 proto dhcp src 192.168.9.23 metric 100
192.168.8.0/21 proto kernel scope link src 192.168.9.23 metric 100
192.168.8.1 proto dhcp scope link src 192.168.9.23 metric 100

Resolv.conf:
nameserver 127.0.0.53
options edns0 trust-ad
search fritz.box

Link info for enp6s0:
2: enp6s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 8c:89:a5:64:90:91 brd ff:ff:ff:ff:ff:ff

Ping info for 192.168.8.1:
PING 192.168.8.1 (192.168.8.1) 56(84) bytes of data.
64 bytes from 192.168.8.1: icmp_seq=1 ttl=64 time=0.645 ms
64 bytes from 192.168.8.1: icmp_seq=2 ttl=64 time=0.448 ms
64 bytes from 192.168.8.1: icmp_seq=3 ttl=64 time=0.456 ms
64 bytes from 192.168.8.1: icmp_seq=4 ttl=64 time=0.431 ms

--- 192.168.8.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3055ms
rtt min/avg/max/mdev = 0.431/0.495/0.645/0.087 ms

Ping info for 8.8.8.8:
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=119 time=14.1 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=119 time=13.3 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=119 time=13.6 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=119 time=12.9 ms

--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 12.941/13.489/14.074/0.411 ms

NSLookup info for fritz.box:
Server:     127.0.0.53
Address:    127.0.0.53#53

Non-authoritative answer:
Name:   fritz.box
Address: 192.168.8.1
Name:   fritz.box
Address: fd00::52e6:36ff:fe75:f8a0


NSLookup info for google.com:
Server:     127.0.0.53
Address:    127.0.0.53#53

Non-authoritative answer:
Name:   google.com
Address: 142.250.185.110
Name:   google.com
Address: 2a00:1450:4001:827::200e

家庭服务器上的静态设置:

System Information:
------------------

Ubuntu Version:
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:    22.04
Codename:   jammy


Netplan Configuration:
----------------------
network:
  version: 2
  renderer: networkd
  ethernets:
    enp6s0:
      addresses:
      - "192.168.8.2/21"
      nameservers:
        addresses:
        - 192.168.8.1
        search:
        - fritz.box
      routes:
      - scope: "link"
        from: "192.168.8.2/21"
        to: "default"
        via: "192.168.8.1/21"


Network Information:
-------------------
IP Address info for enp6s0:
2: enp6s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 8c:89:a5:64:90:91 brd ff:ff:ff:ff:ff:ff
    inet 192.168.8.2/21 brd 192.168.15.255 scope global enp6s0
       valid_lft forever preferred_lft forever
    inet6 fe80::8e89:a5ff:fe64:9091/64 scope link
       valid_lft forever preferred_lft forever

Route info for enp6s0:
192.168.8.0/21 proto kernel scope link src 192.168.8.2

Resolv.conf:
nameserver 127.0.0.53
options edns0 trust-ad
search fritz.box

Link info for enp6s0:
2: enp6s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 8c:89:a5:64:90:91 brd ff:ff:ff:ff:ff:ff

Ping info for 192.168.8.1:
PING 192.168.8.1 (192.168.8.1) 56(84) bytes of data.
From 192.168.8.2 icmp_seq=1 Destination Host Unreachable
From 192.168.8.2 icmp_seq=2 Destination Host Unreachable
From 192.168.8.2 icmp_seq=3 Destination Host Unreachable
From 192.168.8.2 icmp_seq=4 Destination Host Unreachable

--- 192.168.8.1 ping statistics ---
4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 3059ms
pipe 4

Ping info for 8.8.8.8:
ping: connect: Network is unreachable

NSLookup info for fritz.box:
Server:     127.0.0.53
Address:    127.0.0.53#53

** server can't find fritz.box: SERVFAIL


NSLookup info for google.com:
Server:     127.0.0.53
Address:    127.0.0.53#53

** server can't find google.com: SERVFAIL

采取的故障排除步骤:

我已经详细记录了配置并尝试了各种故障排除步骤,但都没有成功。

有趣的是,与静态设置相比,DHCP 设置似乎产生了更多的路由。

请求协助:

希望有任何见解或建议能够解决使用静态配置的家庭服务器和家庭路由器之间的连接问题。

感谢您的时间和帮助!

相关内容