为了为我的公司网络提供第二个“备份”网关,我尝试实现以下拓扑:
它非常简单,调制解调器和路由器之间的网络是 192.168.1.0/24,路由器和工作站之间的网络是 192.168.10.0/24。实际的 IP 地址是草图上的 IP 地址。
路由器接口状态如下:
cisco1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.1.69 YES NVRAM up up
FastEthernet0/1 192.168.10.69 YES NVRAM up up
Serial0/0/0
路由表是这样的:
cisco1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is 192.168.1.1 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 192.168.1.1
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, FastEthernet0/0
L 192.168.1.69/32 is directly connected, FastEthernet0/0
192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.10.0/24 is directly connected, FastEthernet0/1
L 192.168.10.69/32 is directly connected, FastEthernet0/1
如您所见,我已将调制解调器的 IP 地址配置为最后的网关,以便数据包通过这种方式到达 Internet。
我还为我的测试 PC 配置了 IP 192.168.10.13、掩码 255.255.255.0 和默认网关 192.168.10.69。
现在这就是奇怪的地方:从路由器的 CLI 我可以成功 ping 192.168.1.1、192.168.1.69、192.168.10.69 和 192.168.10.13。在测试 PC 上,我只能成功 ping 192.168.1.69 和 192.168.10.69。尝试从测试 PC ping 192.168.1.1 时失败。
当然,我的测试 PC 没有 Internet 连接。
现在,有什么我忽略的吗?为什么我无法连接到互联网?
更新:
经过更多检查,我的路由表看起来很可疑。为什么直连的网络会这样断掉?我以前从未见过路由表中提到的接口IP地址作为单独的“/32”直接连接的子网。
有谁知道为什么会这样?我有一种强烈的感觉,这可能与我的连接问题有关。