05-20-2015 06:38 AM - edited 03-08-2019 12:05 AM
Hello,
If I have two paths in my routing table with the same cost to a network.
How can I prefer one over another?
R 10.55.130.0/24
[120/1] via 10.254.3.3, 00:00:12, GigabitEthernet0/0.301
[120/1] via 10.254.3.1, 00:00:19, GigabitEthernet0/0.301
I want the traffic to always go through 10.254.3.1 when it is available.
Thanks for any input
Solved! Go to Solution.
05-20-2015 04:17 PM
Hi Johan,
The offset-list will not help you in this case, as you have correctly mentioned yourself that both paths go through the same interface. What you need is to differentiate between these two paths based on the IP address of the next hop.
In this case, you can use the distance command to selective influence the administrative distance of specific networks learned from a specific next hop. Assuming your ACL number is 1 and the less preferred next hop is 10.254.3.3, the configuration would be:
router rip
distance 121 10.254.3.3 0.0.0.0 1
Here, you are telling RIP to set the administrative distance of all routes learned from 10.254.3.3 with the wildcard mask of 0.0.0.0 that match the ACL 1 to 121. Because routes from 10.254.3.1 will keep their administrative distance of 120, they will be preferred.
Note that the difference to modifying metric is that in this case, no matter how good metric 10.254.3.3 advertises, you will always prefer 10.254.3.1 to the network permitted by ACL 1 because that one will always have lower administrative distance and will thus be preferred. Only if 10.254.3.1 stops advertising the network permitted by ACL 1 altogether, the path via 10.254.3.3 will take over. You have to decide yourself whether this is what you want.
Best regards,
Peter
05-20-2015 06:49 AM
RIP uses hop count as its metric so if you have equal paths to the same destination you can use an offset list to artificially increase the hop count as per the article below:
http://itknowledgeexchange.techtarget.com/network-engineering-journey/how-to-change-metrics-in-rip/
05-20-2015 12:53 PM
Thanks,
But I don't get it how to configure it.
I create my access-list: access-list 1 permit 10.55.130.0 0.0.0.255
How do I set the offset-list command to configure it for one specifik path when both are leaving the same interface?
Or do I need to configure this on one of the routers in the middle of this path. Now I'm on the router on one end of this setup.
Any idea, thanks.
05-20-2015 04:17 PM
Hi Johan,
The offset-list will not help you in this case, as you have correctly mentioned yourself that both paths go through the same interface. What you need is to differentiate between these two paths based on the IP address of the next hop.
In this case, you can use the distance command to selective influence the administrative distance of specific networks learned from a specific next hop. Assuming your ACL number is 1 and the less preferred next hop is 10.254.3.3, the configuration would be:
router rip
distance 121 10.254.3.3 0.0.0.0 1
Here, you are telling RIP to set the administrative distance of all routes learned from 10.254.3.3 with the wildcard mask of 0.0.0.0 that match the ACL 1 to 121. Because routes from 10.254.3.1 will keep their administrative distance of 120, they will be preferred.
Note that the difference to modifying metric is that in this case, no matter how good metric 10.254.3.3 advertises, you will always prefer 10.254.3.1 to the network permitted by ACL 1 because that one will always have lower administrative distance and will thus be preferred. Only if 10.254.3.1 stops advertising the network permitted by ACL 1 altogether, the path via 10.254.3.3 will take over. You have to decide yourself whether this is what you want.
Best regards,
Peter
05-21-2015 02:24 AM
Thank you, it worked.
How about traffic going reverse? Should I do the same type of setup on the router on the other end? I want the traffic to go the same path both directions.
Or are the routers smart enough to know to send back the traffic on the same direction if it has two possible routes?
Thanks
05-21-2015 02:28 AM
Hi Johan,
I am glad it worked.
Regarding the reverse traffic direction: Forward and reverse paths are totally independent. Routers do not make any assumptions about the symmetry of these paths. You will need to do a similar kind of setup on the other end to make sure your forward and reverse paths are symmetrical.
Best regards,
Peter
05-21-2015 01:36 PM
Ok, thanks again :)
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