|

楼主 |
发表于 2019-1-10 08:07:40
|
显示全部楼层
pc可以访问外网要具备两个前提条件:
1.内部地址可以被nat转换成公网地址。
可以使用show ip nat translation来查看。
2.网关有到边界路由器的默认路由,
R3配了默认路由,但是R0和R2配了OSPF来传递的,可以用show ip route来查看
R0是否有O*e2 via 192.168.3.2 f0/0
R2是否有O*e2 via 192.168.23.2 f0/1
如果没有这两条默认路由,说明默认路由传递是不成功的。有时PT模拟器bug会造成这个问题。
需要no router ospf 1然后重新配。
C:\>ping 200.1.1.2
Pinging 200.1.1.2 with 32 bytes of data:
Reply from 200.1.1.2: bytes=32 time=2ms TTL=253
Reply from 200.1.1.2: bytes=32 time=2ms TTL=253
Reply from 200.1.1.2: bytes=32 time=2ms TTL=253
Reply from 200.1.1.2: bytes=32 time=3ms TTL=253
大功告成!!!
1.R3和R4的S0/2/0 protocol down是因为云端的S0和S1端口frame-relay 协议没有由默认的cisco改成ANSI。
2.R0和R2没有对应的默认路由条目是因为R3没有配置静态默认路由
R3(config)#ip route 0.0.0.0 0.0.0.0 s0/2/0
R0#show ip route
ip route on R0:O*E2 0.0.0.0/0 [110/1] via 192.168.3.2, 00:00:32, FastEthernet0/0
R2#show ip route
ip route on R2: O*E2 0.0.0.0/0 [110/1] via 192.168.23.2, 00:06:24, FastEthernet0/1
R3#show ip nat translations
Pro Inside global Inside local Outside local Outside global
icmp 200.1.1.1:10 192.168.20.1:10 200.1.1.2:10 200.1.1.2:10
icmp 200.1.1.1:11 192.168.20.1:11 200.1.1.2:11 200.1.1.2:11
icmp 200.1.1.1:12 192.168.20.1:12 200.1.1.2:12 200.1.1.2:12
icmp 200.1.1.1:9 192.168.20.1:9 200.1.1.2:9 200.1.1.2:9 |
5#
2019-1-10 08:07:40
回复(0)
收起回复
|