我似乎无法在路由器上设置最后的网关。我希望它通过执行以下操作将任何 IP 地址不在路由表中的内容通过接口 s0/0/0 转发到路由器总部:
Branch1#config t
Branch1(config)#ip route 0.0.0.0 0.0.0.0 s0/0/0
当我检查路由表时,它没有出现在那里...
Branch1#sh 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, 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.7.0/24 is variably subnetted, 8 subnets, 4 masks
C 192.168.7.64/27 is directly connected, GigabitEthernet0/0.107
L 192.168.7.94/32 is directly connected, GigabitEthernet0/0.107
C 192.168.7.144/28 is directly connected, GigabitEthernet0/0.37
L 192.168.7.158/32 is directly connected, GigabitEthernet0/0.37
C 192.168.7.160/28 is directly connected, GigabitEthernet0/0.157
L 192.168.7.174/32 is directly connected, GigabitEthernet0/0.157
C 192.168.7.244/30 is directly connected, Serial0/0/1
L 192.168.7.245/32 is directly connected, Serial0/0/1
虽然它确实出现在运行配置中
ip classless
ip route 0.0.0.0 0.0.0.0 Serial0/0/0
ip接口简介:
Branch1#sh ip interface br
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 unassigned YES unset up up
GigabitEthernet0/0.37 192.168.7.158 YES manual up up
GigabitEthernet0/0.107 192.168.7.94 YES manual up up
GigabitEthernet0/0.157 192.168.7.174 YES manual up up
GigabitEthernet0/1 unassigned YES unset administratively down down
Serial0/0/0 unassigned YES unset up up
Serial0/0/1 192.168.7.245 YES manual up up
Serial0/1/0 unassigned YES unset administratively down down
Serial0/1/1 unassigned YES unset administratively down down
Vlan1 unassigned YES unset administratively down down