我正在尝试在当前关闭/关闭的接口上使用永久关键字添加静态默认路由。我的理解是,永久关键字应该绕过此检查,对吗?
Router(config)#ip route 0.0.0.0 0.0.0.0 gigabitEthernet 0 permanent
%Default route without gateway, if not a point-to-point interface, may impact performance
Router(config)#do 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
a - application route
+ - replicated route, % - next hop override
Gateway of last resort is not set
为什么它不设置最后的网关?
编辑
所以我只是注意到在我的配置结束时它说:
!
!
ip route 0.0.0.0 0.0.0.0 X.X.X.X permanent
即使 show ip route 说它没有设置。
我将运行保存到启动,重新加载并果然:
Router#show ip route
Gateway of last resort is X.X.X.X to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via X.X.X.X
这也适用于接口
Gateway of last resort is 0.0.0.0 to network 0.0.0.0
S* 0.0.0.0/0 is directly connected, GigabitEthernet0