CISCO 路由器:无法设置最后网关

CISCO 路由器:无法设置最后网关

我正在尝试设置最后的网关:

BRANCH1#config t
Enter configuration commands, one per line.  End with CNTL/Z.
BRANCH1(config)#ip route 0.0.0.0 0.0.0.0 192.168.9.129
BRANCH1(config)#exit

%SYS-5-CONFIG_I: Configured from console by console
BRANCH1#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, 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

Gateway of last resort is not set

     192.168.9.0/27 is subnetted, 2 subnets
C       192.168.9.64 is directly connected, FastEthernet0/0
C       192.168.9.96 is directly connected, FastEthernet0/1

在第三行我发出:

BRANCH1(config)#ip route 0.0.0.0 0.0.0.0 192.168.9.129

我知道 IP 地址设置正确,也没有出现错误。为什么仍然显示最后网关未设置?

答案1

您的路由器不知道如何到达 192.168.9.129。如果最后一个子网是 192.168.9.96/27,则未达到 .129。您还可以确保已启用路由(全局配置中的“ip 路由”)

相关内容