为了让我的公司networking有第二个“备份”网关,我试图实现这个拓扑结构:
这很简单,调制解调器和路由器之间的networking是192.168.1.0/24,路由器和站点之间的networking是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地址configuration为最后的网关,这样数据包就可以通过互联网。
我也configuration了我的testing计算机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。 在testingPC上,我只能ping通192.168.1.69和192.168.10.69。 当试图从testingPC ping 192.168.1.1失败。
当然,我没有从testing电脑的互联网连接。
现在,有什么我可以忽略的? 为什么我无法连接到互联网?
更新:
经过更多的检查,我的路由表看起来非常可疑。 为什么直接连接的networking被打破了? 我以前从未见过路由表中提到的接口IP地址是单独的“/ 32”直接连接的子网。
有谁知道为什么会发生这种情况? 我有一种强烈的感觉,这可能与我的连接问题有关。
作为@cpt_fink已经worte,问题是相反的路线:
在路由器上configurationNAT。 我发现了一个关于这个话题的好消息: http : //www.firewall.cx/cisco-technical-knowledgebase/cisco-routers/260-cisco-router-nat-overload.html
以相反的顺序
你的路由表实际上是正确的。 L标志表示该链路上路由器本地的IP地址,而C标志表示networking连接到该链路上的路由器。
问题是您的调制解调器不知道192.168.10.0/24networking可以通过192.16.1.69访问,或者没有.10.x子网的NAT策略。