02-04-2023 10:36 PM - edited 02-04-2023 10:36 PM
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!
Solved! Go to Solution.
02-06-2023 11:04 AM
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.
02-05-2023 01:49 AM
Not sure what your environment and config look like.
check below examples to clarify what may be possibilities for your needs :
02-05-2023 06:40 PM - edited 02-05-2023 11:45 PM
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,
02-05-2023 03:00 AM
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
02-05-2023 06:43 PM
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!
02-06-2023 08:51 AM
Sure I will lab and share why you must use both.
02-05-2023 04:10 AM
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.
.
02-05-2023 06:44 PM - edited 02-05-2023 11:47 PM
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.
Thanks again,
02-06-2023 08:38 AM
"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.
02-06-2023 11:04 AM
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.
02-06-2023 11:48 AM
sorry can you confirm if you want anymore lab or not ?
02-06-2023 12:23 PM
Thank you MHM, really sorry. I appreciate your help a lot and thanks again.
I did get the answer and I appreciate your help!
02-06-2023 12:40 PM
You are so welcome, any time
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide