07-08-2011 05:01 AM - edited 03-04-2019 12:55 PM
Hi everyone!
Question is: how to change administrative distance for the static route,
witch uses as the next hop directly connected interface?
Why I need this?
I have primary WAN interface, with ip route 0.0.0.0 0.0.0.0 10.2.2.2 track 1
and Secondary 3G GSM BACKUP interface with ip route 0.0.0.0 0.0.0.0 cellular 0/0/0.
I'm tracking WAN for reachability using ping. And when ping cant reach the destination through primary
interface then cellular 0/0/0 goes up and takes his role.
Problem is that when WAN link goes back online cellular interface has better adm. distance,
than primary and it cant take over his primary role back.
Any help is welcome!
Help
07-08-2011 05:17 AM
Hi,
Look at
http://www.cisco.com/en/US/docs/ios/12_2/iproute/command/reference/1rfindp1.html#wp1054112
Best regards.
Massimiliano Serafino.
07-08-2011 05:35 AM
Thank you Massimiliano,
But I can't still find the answer on my question.
Regards,
Aleksei
07-08-2011 05:50 AM
Hi Aleksei,
You need to add an administrative distance to the backup default static route. For example:
ip route 0.0.0.0 0.0.0.0 10.2.2.2 track 1
ip route 0.0.0.0 0.0.0.0 cellular 0/0/0 254
When the primary link is up, IOS will choose the first static route, because the administrative distance is better.
When IP SLA notifies that the link is down IOS will remove the route from the routing table. Hence the static route via cellular interface will be used (it will be the only one available).
When the primary link comes back, the static route will be add again to the routing table, and it will have a better distance than the other, hence it will take over.
Let me know if this answers your question.
Cheers
Marco
07-08-2011 06:12 AM
Hi Marco,
I have tried it a lot of times at the begining.
With command ip route 0.0.0.0 0.0.0.0 cellular 0/0/0 254 in routing table appears output shown below:
S* 0.0.0.0/0 is directly connected, Cellular0/0/0
Administrative distance is remained the same - zero.
When users traffic dont pass this interface within the dialer idle-timeout value, then Cellular interface changes it's link state to down and this line will appear in the routing table.
S* 0.0.0.0/0 [1/0] via 10.153.15.1
Note, that when WAN link is back online IP SLA tries to ping the specified IP through this port.
In case when Cellular interface is used by users and WAN interface is back online IP SLA returns me Timeout message and tracking primary route is remained to be down.
Please help, i'm getting sick of this backup
07-08-2011 06:43 AM
Cellular 0/0/0 254 have higher priority than 10.x.x.x 1, because it is directly connected.
07-09-2011 05:43 AM
Can you try backup interface command
Create a tunnel , track the tunnel instead of sla make cellular interface as backup interface .
Sent from Cisco Technical Support iPhone App
07-09-2011 05:34 PM
once you define interface in your static route it will be treat like a connected interface
if you can not use a next hope IP
then this will be an issue
one trick you could do is creat another track IP sla and associted with the secondary static route
this one check if the track 1 is up then it goes down if track 1 is down then it goes up
in this case case when the the primary interface come back online track one wil lbecome up and then track 2 will go down !!
config example ( please check the comifg based on your ios version as they sometimes slightly diffrent !! )
ip sla 1
icmp-echo 10.2.2.2 source interface {ur primary interface]
timeout 500
frequency 3
ip sla schedule 1 life forever start-time now
track 1 rtr 1 reachability
!
#######################
track 2 list boolean and
object 1 not
ip route 0.0.0.0 0.0.0.0 10.2.2.2 track 1
ip route 0.0.0.0 0.0.0.0 cellular 0/0/0 track 2
please confirm it and let us know
good luck
if helpful rate
07-10-2011 02:59 PM
" I have tried it a lot of times at the begining.
With command ip route 0.0.0.0 0.0.0.0 cellular 0/0/0 254 in routing table appears output shown below:
S* 0.0.0.0/0 is directly connected, Cellular0/0/0
Administrative distance is remained the same - zero."
Specify the exit interface plus the next hop address, this will not only stop this route being advertised as directly connected it will also only minimizies table lookups on the next hop interface and reduce the arp cache entries.
res
Paul
07-11-2011 12:18 AM
Thank you all for replies.
To marwanshawi.
This wont work, because IP SLA cant ping through WAN interface while Cellular interface is UP. Why? I have no idea.
It just sends to track 1 timeout message.
When Cellular interface idle-timeout expires (which is impossible if users are active and use 3g as a backup), then IP SLA can finnaly ping through WAN interface fa 0/0 and track shows state is up.
To pdriver.
Unfortunatelly I can't specify next hop address, because my 3G provider provides me with a new IP and new Gateway each time I connect to 3G network, also IP is from different subnet, than gateway (IP 46.x.x.x GW 217.x.x.x)..
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