cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1761
Views
35
Helpful
12
Replies

Static route with outgoing interface as next hop

MikeNY85
Level 1
Level 1

Hello professionals,

Doing some testing regarding static routes and whether to use the next hop IP address or the outgoing interface as the next hop. My question is: Can I use the outgoing interface as the next hop when configuring a static route to reach networks in a different subnet (remote networks)?. Note that the outgoing interface here is a FastEthernet. Tried both (next hop address and outgoing interface and they worked just fine when testing on packet tracer. I did read that configuring a static route with the outgoing interface as the next hop is preferred when having a serial interface and the connection is just point to point. My question in other words, If the interface is FastEthernet, and the route should reach a remote network, is it ok to configure a static route with an outgoing interface like FastEthernet to reach a remote network or this is not preferred?

Thanks in advance!

1 Accepted Solution

Accepted Solutions

umeshpathak
Level 1
Level 1

So there are three option you can use to configure static router

1. ip route n.n.n.n m.m.m.m next hop address

2. ip route n.n.n.n m.m.m.m exit interface

3.ip route n.n.n.n m.m.m.m  exit interface next hop address

The issue with  route with exit interface on broadcast network like ethernet.

1.The route will appear as directly connected router in routing table.

2.As per standard there will be arp requested if the entry is not already in arp cache of router,so this will cause excessive unwanted traffic on that network segment, as well as eat up your router memory.

3.If the exit interface is down ,the route will be removed from routing table,even though somehow if there is option to reach the destination via other network/interface no more routing lookup will be done.

So always prefer using the exit interface will next hop ,second with next hop address.

Hope this will clear your doubt.

View solution in original post

12 Replies 12

balaji.bandi
Hall of Fame
Hall of Fame

Not sure what your environment and config look like.

check below examples to clarify what may be possibilities for your needs :

https://community.cisco.com/t5/networking-knowledge-base/static-routes-with-next-hop-as-an-exit-interface-or-an-ip/ta-p/3146984

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Thank you, balaji.bandi

I checked the document that you sent recently. I am attaching a photo of my topology, and I am going to give some examples of the routes that I configured. Again, I did that with packet tracer and all worked just fine. Not sure how it's in real world. 

For example, on R1:

R1# ip route 192.168.2.0    255.255.255.0    192.168.1.1               (next hop address)

then I reconfigured the static route as follows:

R1# ip route 192.168.2.0    255.255.255.0    FastEthernet 0/1      (outgoing interface)

and ofcourse similarly on R2 and R3. I just want to make sure that these examples are ok and whether it could be done in real life or not. 

Thanks again,

 

 topology.png

is it ok to configure a static route with an outgoing interface like FastEthernet to reach a remote network or this is not preferred?

Nop that not right, this meaning that router send ARP for each destination.
the best is use both 
next-hop + egress interface  

You said the best is to use both, do you mean to configure a route that would contain both (the next hop address and the outgoing interface)?. Can you give and example?

Thanks very much!

Sure I will lab and share why you must use both.

Joseph W. Doherty
Hall of Fame
Hall of Fame

Can you?  Yes.

Should you? Usually, no.

Ethernet vs. serial?  Generally doesn't matter.

However, why not to do it use serial links as examples, because those examples often also include using a default route to the Internet which often deals with many, many more destinations.

You can find "real world" examples of issues caused by doing default route to Internet (now a days using an Ethernet hand-off) on/within these forums.

.

Thank you, Joseph W. Doherty

I am attaching a photo of my topology, and I am going to give some examples of the routes that I configured. Again, I did that with packet tracer and all worked just fine. Not sure how it's in real life. 

For example, on R1:

R1# ip route 192.168.2.0    255.255.255.0    192.168.1.1               (next hop address)

then I reconfigured the static route as follows:

R1# ip route 192.168.2.0    255.255.255.0    FastEthernet 0/1      (outgoing interface)

and ofcourse similarly on R2 and R3. I just want to make sure that these examples are ok and whether it could be done in real world or not. 

topology.png

Thanks again,

"I just want to make sure that these examples are ok and whether it could be done in real world or not."

Again:

Can you?  Yes.

Should you? Usually, no.

In real-world, also again, you can do it either way.  But just using an egress interface often lead to real-world problems (not seen in a lab or PT).

@balaji.bandi reference also describes, why not to use egress interface.

BTW, as @MHM Cisco World suggested earlier, you can to both, i.e. egress interface and next-hop IP on/for the same static route statement.  This will also work, and avoids possible issues using egress interface alone.

umeshpathak
Level 1
Level 1

So there are three option you can use to configure static router

1. ip route n.n.n.n m.m.m.m next hop address

2. ip route n.n.n.n m.m.m.m exit interface

3.ip route n.n.n.n m.m.m.m  exit interface next hop address

The issue with  route with exit interface on broadcast network like ethernet.

1.The route will appear as directly connected router in routing table.

2.As per standard there will be arp requested if the entry is not already in arp cache of router,so this will cause excessive unwanted traffic on that network segment, as well as eat up your router memory.

3.If the exit interface is down ,the route will be removed from routing table,even though somehow if there is option to reach the destination via other network/interface no more routing lookup will be done.

So always prefer using the exit interface will next hop ,second with next hop address.

Hope this will clear your doubt.

sorry can you confirm if you want anymore lab or not ?

Thank you MHM, really sorry. I appreciate your help a lot and thanks again.

I did get the answer and I appreciate your help! 

You are so welcome, any time 

Review Cisco Networking for a $25 gift card