How to configure static route on Cisco IOS Router

(Matt W) #10

Hi Rene,

Another website I was looking at suggested the following:

ip route serial0/2 - Local (outbound) interface can be used ONLY on point-to-point basis.

ip route - The next hop router’s IP address CAN be used on Point-to-point links but MUST be used on multiaccess links.

What is meant by this? Is there a hard and fast rule that must be used when deciding to use the router’s exiting interface name instead of the next hop address?

My home router has the gateway of last resort as:

ip route Dialer0

Could I instead use:

ip route x.x.x.x where x is the ISP’s gateway.

What are the advantages/disadvantages?



(Emmanuel U) #11

Please i need your help
i have a VSAT connection to the internet but am unable to to make it work with my cisco router 1900 series.
i have configure the LAN interface with ip address of 255.255.255 and the dhcp enable and it is working
but couldn’t configure it to connect to the internet through my WAN interface.
these are the configuration of the VSAT modem
modem ip address is
default gateway
subnet mask
Usable ip address to

If i connect my laptop directly to the modem i can browse because the modem automatically assign a public ip address to to the laptop.
please i need your help

(Andrew P) #12

Have you configured your Cisco router to do NAT?

(Rene Molenaar) #13


Both will work but there is an important (performance) difference between the two. Let’s say we are using Ethernet. Here’s the first static route:

ip route

When your router wants to forward a packet that has matched this default route then it has to put the packet in a L2 frame. It checks the next hop address, does an ARP request, gets a reply and is able to forward the packet. Life is good.

Here’s another static route:

ip route GigabitEthernet 0/1

This time we use an interface as the next hop. When your router wants to forward a packet with the interface as next hop then it has no idea what to use as the destination MAC address in the L2 frame. Ethernet is multi-access so that means there could be more than one device on the other end.

If you use a static route like this then the router will assume that the destination address in your packet is DIRECTLY CONNECTED to that Ethernet interface. This means that it will do an ARP request for each and every packet that it tries to deliver.

You can see it in action here:

R1(config)#ip route GigabitEthernet 0/1

R1#debug arp
ARP packet debugging is on
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to, timeout is 2 seconds:

*Mar 31 06:43:14.464: IP ARP: creating incomplete entry for IP address: interface GigabitEthernet0/1
*Mar 31 06:43:14.465: IP ARP: sent req src fa16.3ecf.35bc,
                 dst 0000.0000.0000 GigabitEthernet0/1.
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to, timeout is 2 seconds:

*Mar 31 06:44:33.295: IP ARP: creating incomplete entry for IP address: interface GigabitEthernet0/1
*Mar 31 06:44:33.296: IP ARP: sent req src fa16.3ecf.35bc,
                 dst 0000.0000.0000 GigabitEthernet0/1.

It will work but it’s a performance killer. Keep in mind this is only a problem on multi-access interfaces.

On serial interfaces (or other point-to-point interfaces) this doesn’t matter since there is only one device on the other end. Your dialer interface is also point-to-point. Configuring the IP address of the ISP will also work but it won’t matter.

Hope this helps!


(florian k) #14

Hi rene, when is it the right situation to use both, the outgoing interface and the next hope in a route?
I have read that if e.g. the outgoing interface fails but the next hop is still recursive the route still works and stays in the routing table.
But are there situations where one would use both??? Or is it a rule of thumb to use the Interface on p2p and next hope on broadcast interfaces?

Thanks florian

(Rene Molenaar) #15

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).


(florian k) #16

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?



(florian k) #17

Do you know what i mean?

(Andrew P) #18

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.

(Matt W) #19

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.

(Andrew P) #20


(sims) #21

ip route
Why there is no reverse route from branch ?

(Lazaros Agapides) #22

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!


(Networklessons Admin) split this topic #23

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

(Said A) #24

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)


(Lazaros Agapides) #25

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.


(Said A) #26

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

(Said A) #27

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


(Kevin K) #28

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!


(Lazaros Agapides) #29

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!