0

I am trying to add a static default route using the permanent keyword on an interface which is currently down/down. My understanding is that permanent keyword is supposed to bypass this check is that correct?

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

Why does it not set the gateway of last resort?

EDIT

So I just noticed towards the end of my configuration it says:

!
!
ip route 0.0.0.0 0.0.0.0 X.X.X.X permanent

Even though show ip route says it's not set.

I saved running to startup, reloaded and sure enough:

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

This also works for interfaces

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
  • You need to edit the question to give us the full router configuration. For example, we cannot see the configuration of the interface in question. There are other parts of your configuration that may impact this, and we need to see them. – Ron Maupin Aug 17 '17 at 15:05
  • I will post the config as soon as I get back to the router later today. – allegory Aug 17 '17 at 16:07
  • You should post an answer and accept it so that the question doesn't keep popping up forever, looking for an answer. – Ron Maupin Aug 18 '17 at 2:20
  • Will do have to wait 2 days to accept it apparently. @Ron Maupin If you hadn't have asked for the config I wouldn't have noticed it, thank you. – allegory Aug 18 '17 at 2:32
  • You're welcome. You should always include as much information as possible. Too much (other than passwords and public addresses, which you should obfuscate) information can be ignored, but not enough will prevent you from getting the help you want. – Ron Maupin Aug 18 '17 at 2:37
0

You did not use "ip route" right. You cannot do "ip route something interface", if this interface is ethernet (Full, Giga, Ten - whatever), because ethernet is broadcast interface, so router cannot create route and install it to RIB.

You can use "ip route something interface" without definition of destination ip only for p2p interfaces - Serial (with p2p type), PPPoE, etc...

Also "permanent" has sense only in "ip route something gw_ip"

The best description of right usage of "permanent" route you can find there - https://supportforums.cisco.com/discussion/10003171/static-route-permanent

| improve this answer | |
  • So what you're saying is I should try - ip route 0.0.0.0 0.0.0 10.1.1.1 permanent (assuming 10.1.1.1 is my gateway of last resort) – allegory Aug 17 '17 at 17:11
  • and this time you have something in "show ip route" or not? – Konstantin Goncharenko Aug 17 '17 at 19:32
  • Router(config)#ip route 0.0.0.0 0.0.0.0 x.x.x.x permanent Router(config)#do show ip route Gateway of last resort is not set Router(config)# – allegory Aug 18 '17 at 1:50
0

After further inspection I found it was configuring the static route in the running config. Though the show ip route was not showing the route. I had to save running to startup and reload the router for the show ip route EXEC command to display a working default gateway.

!
!
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

Note** this works for next hop IPs and intefaces

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
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.