雏鹰部落

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 1451|回复: 3

[讨论/求助] 做了一个单臂路由的实验,但是ping不通,请指教

[复制链接]
发表于 2017-8-18 20:41:54 | 显示全部楼层 |阅读模式
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
*Mar  1 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
*Mar  1 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
*Mar  1 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
*Mar  1 00:05:53.311: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar  1 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
*Mar  1 00:01:25.159: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar  1 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
*Mar  1 00:01:51.043: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar  1 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
*Mar  1 00:02:25.515: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar  1 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)


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




本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
发表于 2017-8-22 21:40:37 | 显示全部楼层
你的子端口有问题,你查一下
发表于 2018-4-3 17:04:53 | 显示全部楼层
本帖最后由 snjjwcw 于 2018-4-3 17:06 编辑

在sw1 建 vlan 30 ,在sw2 建上valn 10 valn 20
发表于 2018-7-1 14:08:10 | 显示全部楼层
sw1 少个VLAN30 做这种直接在PT上做简单明了
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|熊猫同学技术论坛|小黑屋| 网络工程师论坛 ( 沪ICP备09076391 )

GMT+8, 2024-12-22 17:05 , Processed in 0.091198 second(s), 20 queries , Gzip On.

快速回复 返回顶部 返回列表