我正在尝试添加一个静态的默认路由,使用当前处于下行/向下的接口上的permanent关键字。我的理解是永久关键字应该绕过这个检查,对吗?
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尽管显示ip路由说它没有设置。
我保存了运行到启动、重新加载和足够确定:
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发布于 2017-08-18 02:31:07
经过进一步检查,我发现它正在运行配置中配置静态路由。虽然显示ip路由没有显示该路由。我不得不保存运行以启动和重新加载路由器的显示ip路由EXEC命令,以显示一个工作的默认网关。
!
!
ip route 0.0.0.0 0.0.0.0 X.X.X.X permanent
Router# copy running-config startup-config
!
Router# reload
!
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注**这适用于下一跳IP和整数
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发布于 2017-08-17 16:15:24
你没有使用"ip路由“的权利。你不能做"ip路由接口“,如果这个接口是以太网(完全,千兆,十-任何东西),因为以太网是广播接口,所以路由器不能创建路由并安装到肋骨。
您可以使用"ip路由某些接口“,而不需要为p2p接口定义目标ip -串行(具有p2p类型)、PPPoE等.
“永久”也只有在"ip路由某事gw_ip“中才有意义。
对“永久”路线正确使用的最佳描述-- https://supportforums.cisco.com/discussion/10003171/static-route-permanent
https://networkengineering.stackexchange.com/questions/43345
复制相似问题