已知道路由如下
Destinations : 21 Routes : 21
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 Static 60 0 192.168.100.254 GE0/0/1
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.1.0/24 Direct 0 0 192.168.1.254 Vlan1
192.168.1.0/32 Direct 0 0 192.168.1.254 Vlan1
192.168.1.254/32 Direct 0 0 127.0.0.1 InLoop0
192.168.1.255/32 Direct 0 0 192.168.1.254 Vlan1
192.168.12.0/24 Direct 0 0 192.168.12.254 Vlan12
192.168.12.0/32 Direct 0 0 192.168.12.254 Vlan12
192.168.12.254/32 Direct 0 0 127.0.0.1 InLoop0
192.168.12.255/32 Direct 0 0 192.168.12.254 Vlan12
192.168.100.0/24 Direct 0 0 192.168.100.1 GE0/0/1
192.168.100.0/32 Direct 0 0 192.168.100.1 GE0/0/1
192.168.100.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.100.255/32 Direct 0 0 192.168.100.1 GE0/0/1
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
vlan配置如下
vlan 12
interface G1/0/12
port link-type access
port access vlan 12
quit
interface Vlan-interface12
ip address 192.168.12.254 255.255.255.0
quit
dhcp enable
dhcp server ip-pool vlan12
network 192.168.12.0 mask 255.255.255.0
gateway-list 192.168.12.254
dns-list 112.4.0.55
quit
现在执行命令 ping -a 192.168.12.1 192.168.12.254无法ping网关是为什么
下面是执行的日志
[H3C]ping -a 192.168.12.1 192.168.12.254
Ping 192.168.12.254 (192.168.12.254) from 192.168.12.1: 56 data bytes, press CTRL+C to break
Request time out
Request time out
Request time out
Request time out
Request time out
--- Ping statistics for 192.168.12.254 ---
5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss
[H3C]%Aug 24 14:50:37:924 2025 H3C PING/6/PING_STATISTICS: Ping statistics for 192.168.12.254: 5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss.
但是ping -a 192.168.12.254 192.168.12.1却可以执行 我去电脑192.168.12.1上的CMD窗口进行ping 192.168.12.254是可以成功的 是不是交换机坏了 ??? 交换机的型号是S7003X
H3C]ping -a 192.168.12.254 192.168.12.1
Ping 192.168.12.1 (192.168.12.1) from 192.168.12.254: 56 data bytes, press CTRL+C to break
56 bytes from 192.168.12.1: icmp_seq=0 ttl=128 time=2.161 ms
56 bytes from 192.168.12.1: icmp_seq=1 ttl=128 time=2.152 ms
56 bytes from 192.168.12.1: icmp_seq=2 ttl=128 time=2.093 ms
56 bytes from 192.168.12.1: icmp_seq=3 ttl=128 time=2.234 ms
56 bytes from 192.168.12.1: icmp_seq=4 ttl=128 time=2.121 ms
--- Ping statistics for 192.168.12.1 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 2.093/2.152/2.234/0.047 ms
[H3C]%Aug 24 14:54:12:448 2025 H3C PING/6/PING_STATISTICS: Ping statistics for 192.168.12.1: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 2.093/2.152/2.234/0.047 ms.
(0)
最佳答案
[H3C]ping -a 192.168.12.1 192.168.12.254
ping -a [源地址] [目的地址]
192.168.12.1不是交换机上面的地址,当然无法ping通,也无法发包出去。
192.168.12.254是交换机上面的地址,当然ping通。
可以用交换机上面其他的地址来测试,可是为什么要这么测试呢?
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论