How to configure static route on Cisco IOS Router

Hi Florian,

In my reply above yours, you can see the example why it’s a bad idea to use an interface as the next hop for multi-access interfaces (like Ethernet). It’s best to stick to IP addresses as the next hop.

For point-to-point interfaces, it doesn’t matter much. Sometimes it can be useful to use the interface as the next hop since you don’t always have the next hop IP address right away (for example with PPP connections).


hi rene,

thanks for your reply!

in your post above you mention that it would work if you specify only the interface for a multi-access network but obviously it is a performance killer.
but it would only work if the other router connected to that interface has proxy-arp configured, right? as otherwise there would not be any arp response packet coming back!?

and do you know of any use case to specify both, the interface and the next-hop in a static route?



Do you know what i mean?

In the case of a point-to-point link, it is always sufficient to specify the outgoing interface. In the case of a broadcast/multi-access interface (like Ethernet), Cisco’s best practice is to specify BOTH the interface AND the next hop IP address. While in most cases, you can get away with using only the next-hop IP, there are a few circumstances where this can result in unexpected behavior. Cisco has a pretty good article explaining how you can get into trouble without specifying both here:

The take away from the article is this:


Cisco highly recommends that you specify the outbound interface and the next hop IP address when you configure static routes. When the outbound interface is a point-to-point type of link (for example, a serial link), the specification of the next hop address is not needed.

Hi Andrew. So what you’re trying to say is that with P2P links since there is only destination, it is satisfactory to only define the exit inerface for any packets. With a broadcast/multi-point interface there is more than one destination option so both the interface and the next hop IP address should be defined.


ip route
Why there is no reverse route from branch ?

Hello sims.

In order to answer your question, it is important to understand the difference between a remote route and a directly connected route.

From the perspective of the HQ router, the network is a remote route. If no static route is configured or if no routing protocol is configured on the HQ router, there is no way for HQ to “know” about this network. This is why a static route was configured in the example.

From the perspective of the Branch router, both the AND the networks are directly connected, so the Branch router knows how to reach hosts on both networks. Since we are pinging which is the Fa 1/0 interface of the Branch router, no reverse route is necessary because the Branch router already knows how to reach which is the IP of the host who initiated the ping.

I hope this has been helpful!


19 posts were merged into an existing topic: How to configure static route on Cisco IOS Router

Hi Rene,

I got a bit stuck in my static routing lab, now im doing a static route between 3x Cisco routers, they are connected to each other via serial links, I have added all connected networks to all 3 routers but it seems that I can’t ping the interfaces of the edge routers (when I do show ip route x.x.x.x the network is there) so im wondering in static route, do we need to have some other configurations (other than adding static routes) to make all interfaces pingable( they all are up and with a valid IP address)


Hello Said

As long as you have connectivity between directly connected routers and you’ve installed the remote networks on each router, you should be OK. No additional configuration should be necessary.

However, keep in mind that if your three routers are connected to each other in a loop, and you have created static routes to all possible networks, you may have created a routing loop.

I suggest you try to simplify your topology further and try configuring two routers only and have them share their networks. Once you get that working, you can expand to three and further configure routing to see where the problem occurs.

Keep us posted with your progress!

I hope this was helpful.


Hello Lazaros,
Thank you for your valuable reply.
My lab setup is as follows, I got R1 connected to R2 (in middle) and R2 is connected to R3, no connection is made between R1 and 3 (no loops here) now lets say R1 has networks on fa interface and on S0 —>R2
R2 has 2 networks and which connects to both R1 and R3
R3 has similar setup as R1, network on its Fa interface and on S0 -->R2
R2 have both directly connected networks plus and configured as static routes.
R1 has a static route to reach R3 via R2 and the same for R3
Interestingly, from R2, I can ping both Fa interfaces on R1 and R3, but can’t ping R3 Fa from R1 and vice verse, it just work fine if I configure a dynamic routing protocol, a bit weird to be as its a very simple concept but It just doest work :slight_smile:
Appreciate your help here

Thanks a lot

1 Like

Got it working! my bad, just added a default route on both edge routers and it worked
Thanks for the help guys.


1 Like

Good day,

I understand what the default route of does…it says push all networks (outside the routing table) to the next hop router. I don’t understand when to use this or why we would want to use this. Anyway to break down this idea a bit more for me ? Thank you in advance!


Hello Kevin

When a router makes routing decisions, it looks at the destination IP address in the packet and compares it with all of the routes in the routing table looking for a match. Specifically, it looks to see if the IP address is contained within the subnets in the routing table. So for example, if you have a routing table like this: route to next hop IP route to next hop IP route to next hop IP route to next hop IP

Let’s say a packet comes in to the router with a destination IP of It will look through the routing table to see if there is a route to a subnet within which this destination IP address exists. Now the subnets expressed in the routing table essentially define ranges of IP addresses. Specifically, the subnet has a range of IP addresses from to (including network and broadcast addresses). The destination IP address falls into this range, so the next hop IP that is used is as indicated in the routing table.

Now if a packet comes into the router with a destination IP address of for example, you can easily see that this is not in the ranges of IP addresses defined by the first three subnets which are: to to to

However, the subnet also defines a range of IP addresses. This range is to, in other words, all of them! Why? Because a subnet mask of or a designation of /0 essentially says that the whole address is a host portion of the network. Therefore this is a subnet that contains all possible IP addresses.

Naturally, if the destination IP address doesn’t match any of the first three subnets or IP address ranges, it will definitely match the range. This is like a catch-all last resort bucket that matches everything that is not matched by a more specific routing table entry. So this is why this is the default route.

Now in your post you indicated This actually defines an IP address subnet with a range from to I believe you meant to write which is indeed the definition of a default route. Is that right?

I hope this has been helpful!


is there an issue configuring two default route like below

ip route
ip route


Hello Sims

No there is no issue. You can configure two default routes on a router, the router will simply do equal cost load balancing since both routes have an equal cost of 1 (static routes). Just keep in mind that packets routed to the default route will be distributed evenly across both links.

I hope this has been helpful!



If I want to avoid the possibility of recursive row what is the best solution? Use “ip route” command to specify a next hop IP address only or both the next hop IP address and a connected interface.


If you want to disable recursivity to shorter prefix using different interface for next hop, simply configure static route with connected interface and next-hop ip address. Which means that static route is staying in RIB only if you can get to its next-hop using specified interface.

ip route gigabitethernet0/1

When you configure only next-hop, you are allowing recursivity to shorter prefix that can use whatever interface as next-hop (because you are not specifying it).

ip route

In case you want to completly ignore recursivity you can use tracking object and bind this object to static route. But definitelly specifying interface and next-hop in static route is better solution.

Specifying interface in static route may be important, because static route is staying in RIB all the time next-hop is in range of any other route in RIB.

1 Like

Hello Michal,

Thank a lot for clear explanation!