科麦艾卡 发表于 2017-8-18 20:46:13

做了一个单臂路由的实现,最后发现ping不通,求教怎么回事

sw1的配置
sw1#vlan dat
sw1(vlan)#vlan 10
VLAN 10 added:
    Name: VLAN0010
sw1(vlan)#vlan 20
VLAN 20 added:
    Name: VLAN0020
sw1(vlan)#ex
APPLY completed.
Exiting....
sw1#config t
sw1(config)#int f1/0
sw1(config-if)#sw mo ac
sw1(config-if)#sw ac vlan 10
sw1(config-if)#int f1/1
sw1(config-if)#sw mo ac   
sw1(config-if)#sw ac vlan 20
sw1(config-if)#int f1/15

sw1(config-if)#sw mo tr
*Mar1 00:07:23.307: %DTP-5-TRUNKPORTON: Port Fa1/15 has become dot1q trunk
sw1(config-if)#sw tr en d
sw1(config-if)#no sh
sw1(config-if)#int f1/2
sw1(config-if)#sw mo tr
*Mar1 00:08:06.491: %DTP-5-TRUNKPORTON: Port Fa1/2 has become dot1q trunk
sw1(config-if)#sw tr en d
sw1(config-if)#no sh


sw2的配置
sw2#vlan da
sw2(vlan)#vlan 30
VLAN 30 added:
    Name: VLAN0030
sw2(vlan)#ex
APPLY completed.
Exiting....
sw2#config t
sw2(config)#int f1/0
sw2(config-if)#sw mo ac
sw2(config-if)#sw ac vlan 30
sw2(config-if)#int f1/15
sw2(config-if)#sw mo tr
*Mar1 00:06:04.027: %DTP-5-TRUNKPORTON: Port Fa1/15 has become dot1q trunk
sw2(config-if)#sw tr en d
sw2(config-if)#no sh


R6的配置
R6#config t
R6(config)#int f0/0
R6(config-if)#no sh
*Mar1 00:05:53.311: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar1 00:05:54.311: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R6(config-if)#e
R6(config)#int f0/0.10
R6(config-subif)#en d 10
R6(config-subif)#ip add 192.168.10.254 255.255.255.0
R6(config-subif)#no sh
R6(config-subif)#e
R6(config)#int f0/0.20
R6(config-subif)#en d 20
R6(config-subif)#ip add 192.168.20.254 255.255.255.0
R6(config-subif)#no sh
R6(config-subif)#e
R6(config)#int f0/0.30
R6(config-subif)#en d 30
R6(config-subif)#ip add 192.168.30.254 255.255.255.0
R6(config-subif)#no sh


PC1的配置
pc1#config t
pc1(config)#no ip routing
pc1(config)#int f0/0
pc1(config-if)#ip add 192.168.10.1 255.255.255.0
pc1(config-if)#no sh
pc1(config-if)#e
*Mar1 00:01:25.159: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar1 00:01:26.159: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upe
pc1(config)#ip default-gateway 192.168.10.254
pc1(config)#^Z


PC2的配置
pc2#config t
pc2(config)#no ip routing
pc2(config)#int f0/0
pc2(config-if)#ip add 192.168.20.1 255.255.255.0
pc2(config-if)#no sh
pc2(config-if)#e
*Mar1 00:01:51.043: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar1 00:01:52.043: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
pc2(config)#ip default-g 192.168.20.254
pc2(config)#^Z


PC3的配置
pc3#config t
pc3(config)#no ip routing
pc3(config)#int f0/0
pc3(config-if)#ip add 192.168.30.1 255.255.255.0
pc3(config-if)#no sh
*Mar1 00:02:25.515: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar1 00:02:26.515: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
pc3(config-if)#e
pc3(config)#ip default-g 192.168.30.254


我不知道哪里发生了错误,最后测试连通性,发现PC1和PC2之间能互通,PC1/PC2和PC3无法互通
pc1#ping 192.168.20.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/32/56 ms


pc1#ping 192.168.30.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.30.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)


真心请教,做了一天这样的实验了,就是会存在这种问题,帮忙看看到底哪里出了问题

菜鸟jack 发表于 2017-8-21 09:08:41

在SW1上也创建一个VLAN30

bstym 发表于 2019-3-29 16:13:53

让人在公共厕所里不再乱涂乱化而是纷纷对它引经据典的好帖! 伸缩门 http://www.ssmdd.com

xuyingsheng 发表于 2019-3-29 18:46:27

2楼正解,3楼的挖坟。4楼的凑热闹
页: [1]
查看完整版本: 做了一个单臂路由的实现,最后发现ping不通,求教怎么回事