没有到主机的路由,无法 ping 通

没有到主机的路由,无法 ping 通

我正在尝试访问通过以太网电缆直接连接到我的笔记本电脑的路由器的管理网页。路由器(TP-Link WR700N)是全新的,刚从盒子里拿出来。插入电源,LED状态灯指示正常运行。管理页面的默认IP地址是192.168.0.254。

我的笔记本电脑运行的是 Linux,接口名称是 eth0。打开路由器并通过以太网跳线直接连接到笔记本电脑后,我运行了以下命令来设置地址:

 ip addr add 192.168.0.10/24 dev eth0

我将接口显示为 UP,预期地址为 192.168.0.10。

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 0a:b9:5b:9a:de:16 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.10/24 scope global eth0
    valid_lft forever preferred_lft forever

但是,当我尝试访问路由器的管理页面时http://192.168.0.254Firefox 显示“无法连接”。当我尝试 ping 该地址时,我收到“目标主机无法访问”的消息。

该命令curl -I http://192.168.0.254返回错误“无法连接到 192.168.0.254 端口 80:没有到主机的路由”。

为了排除故障,我更换了电缆,并对路由器进行了“出厂重置”(尽管它是全新的)。重置期间,路由器 LED 经历了预期阶段。

我还尝试使用 KDE 中的 NetworkManager 设置连接(手动 IP 地址)。在这种情况下,ip a输出如下:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 0a:b9:5b:9a:de:16 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.10/24 brd 192.168.0.255 scope global noprefixroute eth0
    valid_lft forever preferred_lft forever

但是错误信息还是一样。最后,我尝试使用 NetworkManager 在自动/DHCP 模式下设置连接,但 eth0 没有获取地址。

我在连接时是否忽略了某些东西?我是否错过了任何故障排除步骤?或者我可以断定这个设备有缺陷吗?

更新:我添加了tcpdumpip route以及以下附加信息:

# connect cable:

root@host1 [/home/joe1]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 23:ba:53:24:82:38 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 34:d2:10:2c:2f:12 brd ff:ff:ff:ff:ff:ff

# network manager cannot obtain an IP address, set it manually:

root@host1 [/home/joe1]# ip a add 192.168.0.10/24 brd 192.168.0.255 dev eth0

root@host1 [/home/joe1]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 23:ba:53:24:82:38 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.10/24 brd 192.168.0.255 scope global eth0
    valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 34:d2:10:2c:2f:12 brd ff:ff:ff:ff:ff:ff

# device's manual states that 192.168.0.254 is the admin page IP address

root@host1 [/home/joe1]# ping 192.168.0.254
PING 192.168.0.254 (192.168.0.254) 56(84) bytes of data.
From 192.168.0.10 icmp_seq=1 Destination Host Unreachable
From 192.168.0.10 icmp_seq=2 Destination Host Unreachable
From 192.168.0.10 icmp_seq=3 Destination Host Unreachable
^C
--- 192.168.0.254 ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 67ms
pipe 4

root@host1 [/home/joe1]# ip route
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.10

root@host1 [/home/joe1]# tcpdump -vvv
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
17:42:45.941767 IP (tos 0x0, ttl 32, id 14813, offset 0, flags [DF], proto UDP (17), length 316)
    0.0.0.0.bootpc > 255.255.255.255.bootps: [udp sum ok] BOOTP/DHCP, Request from c4:e9:84:64:a7:b2 (oui Unknown), length 288, xid 0xed64d8be, Flags [Broadcast] (0x8000)
        Client-Ethernet-Address c4:e9:84:64:a7:b2 (oui Unknown)
        Vendor-rfc1048 Extensions
            Magic Cookie 0x63825363
            DHCP-Message Option 53, length 1: Discover
            MSZ Option 57, length 2: 1024
            Parameter-Request Option 55, length 10:
            Subnet-Mask, Default-Gateway, Vendor-Option, Netbios-Name-Server
            Netbios-Node, Netbios-Scope, Domain-Name-Server, Static-Route
            Classless-Static-Route, Classless-Static-Route-Microsoft
            Hostname Option 12, length 6: "WR700N"
            Vendor-Class Option 60, length 9: "MSFT 98^@_"
            Client-ID Option 61, length 7: ether c4:e9:84:64:a7:b2
            END Option 255, length 0
17:42:49.941806 IP (tos 0x0, ttl 32, id 14813, offset 0, flags [DF], proto UDP (17), length 316)
    0.0.0.0.bootpc > 255.255.255.255.bootps: [udp sum ok] BOOTP/DHCP, Request from c4:e9:84:64:a7:b2 (oui Unknown), length 288, xid 0xed64d8be, secs 4, Flags [Broadcast] (0x8000)
        Client-Ethernet-Address c4:e9:84:64:a7:b2 (oui Unknown)
        Vendor-rfc1048 Extensions
            Magic Cookie 0x63825363
            DHCP-Message Option 53, length 1: Discover
            MSZ Option 57, length 2: 1024
            Parameter-Request Option 55, length 10:
            Subnet-Mask, Default-Gateway, Vendor-Option, Netbios-Name-Server
            Netbios-Node, Netbios-Scope, Domain-Name-Server, Static-Route
            Classless-Static-Route, Classless-Static-Route-Microsoft
            Hostname Option 12, length 6: "WR700N"
            Vendor-Class Option 60, length 9: "MSFT 98^@_"
            Client-ID Option 61, length 7: ether c4:e9:84:64:a7:b2
            END Option 255, length 0
17:42:56.941934 IP (tos 0x0, ttl 32, id 14813, offset 0, flags [DF], proto UDP (17), length 316)
    0.0.0.0.bootpc > 255.255.255.255.bootps: [udp sum ok] BOOTP/DHCP, Request from c4:e9:84:64:a7:b2 (oui Unknown), length 288, xid 0xed64d8be, secs 11, Flags [Broadcast] (0x8000)
        Client-Ethernet-Address c4:e9:84:64:a7:b2 (oui Unknown)
        Vendor-rfc1048 Extensions
            Magic Cookie 0x63825363
            DHCP-Message Option 53, length 1: Discover
            MSZ Option 57, length 2: 1024
            Parameter-Request Option 55, length 10:
            Subnet-Mask, Default-Gateway, Vendor-Option, Netbios-Name-Server
            Netbios-Node, Netbios-Scope, Domain-Name-Server, Static-Route
            Classless-Static-Route, Classless-Static-Route-Microsoft
            Hostname Option 12, length 6: "WR700N"
            Vendor-Class Option 60, length 9: "MSFT 98^@_"
            Client-ID Option 61, length 7: ether c4:e9:84:64:a7:b2
            END Option 255, length 0
17:42:57.480505 IP (tos 0x0, ttl 255, id 59726, offset 0, flags [DF], proto UDP (17), length 73)
    host1.mdns > 224.0.0.251.mdns: [bad udp cksum 0xa1f4 -> 0x3289!] 0 [2q] PTR (QM)? _ipps._tcp.local. PTR (QM)? _ipp._tcp.local. (45)
17:43:12.942038 IP (tos 0x0, ttl 32, id 14813, offset 0, flags [DF], proto UDP (17), length 316)
    0.0.0.0.bootpc > 255.255.255.255.bootps: [udp sum ok] BOOTP/DHCP, Request from c4:e9:84:64:a7:b2 (oui Unknown), length 288, xid 0xed64d8be, secs 27, Flags [none] (0x0000)
        Client-Ethernet-Address c4:e9:84:64:a7:b2 (oui Unknown)
        Vendor-rfc1048 Extensions
            Magic Cookie 0x63825363
            DHCP-Message Option 53, length 1: Discover
            MSZ Option 57, length 2: 1024
            Parameter-Request Option 55, length 10:
            Subnet-Mask, Default-Gateway, Vendor-Option, Netbios-Name-Server
            Netbios-Node, Netbios-Scope, Domain-Name-Server, Static-Route
            Classless-Static-Route, Classless-Static-Route-Microsoft
            Hostname Option 12, length 6: "WR700N"
            Vendor-Class Option 60, length 9: "MSFT 98^@_"
            Client-ID Option 61, length 7: ether c4:e9:84:64:a7:b2
            END Option 255, length 0
^C
5 packets captured
5 packets received by filter
0 packets dropped by kernel

更新 2:tcpdump显示该设备正在作为 DHCP 客户端请求 IP 地址。因此,我将以太网电缆插入我的 DHCP 服务器,它获得了一个地址,但我无法使用该地址连接到管理页面。显然,该设备的手册是错误的或具有误导性的。我有两个这样的设备,都是新的,现在都已“恢复出厂设置”,我无法让其中任何一个工作。

Firefox http://192.168.1.203/
The connection has timed out
The server at 192.168.1.203 is taking too long to respond.

# ping 192.168.1.203
PING 192.168.1.203 (192.168.1.203) 56(84) bytes of data.
64 bytes from 192.168.1.203: icmp_seq=1 ttl=64 time=0.226 ms
64 bytes from 192.168.1.203: icmp_seq=2 ttl=64 time=0.200 ms

相关内容