Failover to a different path

d
Failover to a different path


in the topology above, I would like R1 to always use the Path to R2. The only time it should use the path to R3 is when the link between R1 and R2 is down.
I am configuring OSP between all Routers, I also want to use BFD (Bidirectional Forwarding Detection), so that the link failure will be detected faster than OSPF , and once detected the path will switch automatically to R3.

I believe that there is HSRP ,VRRP,GLBP and other protocols that can do that. I just wonder if it can be done without those protocols. Unless if I am confused, probably BFD is used by the protocols I have previously indicated  (HSRP ,VRRP,GLBP )


Thank you
jskfanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JustInCaseCommented:
The issue with your task is:
in the topology above, I would like R1 to always use the Path to R2
Networks are routed to some destination (cost and administrative distance to some destination (or some other rules) make that routers prefers one path over other). If both routers do not advertise the same networks the quoted statement can't be achieved (traffic will always prefer longer prefix match).
But on the other hand, generally, depending on network design, it can be easily achieved. Longer match can make it to work in your favor, but it is network design dependable in OSPF (OSPF can't summarize anywhere). Also, if you would advertise just default route from R2 and R3 to R1 it is easy to achieve (for example simply by manipulating cost or network type).
0
jskfanAuthor Commented:
For instance I can advertise the Network between R1 and R3 in OSPF with Distance 255. that way the route will not be in OSPF routing table.

I will need it just once the Link between R1 and R2 is not functional

I could not find a way to do it..I used IP SLA in the previous LAB with Static Route..

Just trying to see if there is a different approach other than IP SLA and FHRP protocols
0
JustInCaseCommented:
AD 255 means unreachable, there is no any use of it (the same as 16 hops with RIP protocol - route is unreachable).

Make routers R2 and R3 ASBRs (redistribute some static routes or connected interfaces) and advertise default route as E1 - E2 type.
R2
router ospf 1
default-information originate metric-type 1 always
R3
router ospf 1
default-information originate metric-type 2 always 

Open in new window

E1 routes are always preferred compared to E2 routes. Only default route pointing to R2 will be placed in routing table of R1, if connection to R2 is lost default route from R3 will be inserted into R1's routing table.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

atlas_shudderedSr. Network EngineerCommented:
If you are using ospf then why not just set ECMP max to one and then set the interface AC bandwidth on the downstream routers

R1 -
conf t
router ospf X
max paths 1
neighbor R2 cost 1
neighbor R3 cost 100

Open in new window


R2
conf t
router ospf X
default-in orig

Open in new window


R3
conf t
router ospf X
default-in orig

Open in new window


HSRP, etc. isn't going to affect your routing.  Using the config above, your failover path will be on a route by route basis.

There are a couple of other ways that you can manipulate this if you like but based on what you are writing above, I think it may be your easiest path.
0
JustInCaseCommented:
As I stated before, changing cost can't help in any way if both routers don't advertise the same networks+prefixes. The first criteria for path selection is longest prefix length.
Changing max path is not relevant if paths will not have the same cost, but could also potentially influence ECMP in direction that we don't want to (in direction of R4, R5 etc that are not edge routers).
0
atlas_shudderedSr. Network EngineerCommented:
Predrag, by default OSPF will prefer the longer of the two prefixes, assumed  best path.  In this case, OSPF will travel through R3 instead of R2 if 3 has the longer prefix, which I would assume preferable, unless the circuit is charged on a per data-unit rate, in which case, the best route would be to pull OSPF out altogether, install HSRP between R2 and R3, default route to to the HSRP address and then set up an ipsla or route table monitoring of some type to trigger HSRP failover in the event of loss of path on R2.

If there were more than two edge routers involved, I may be inclined to agree on the point of mult-path but with only two available (not including our imagined R4/R5/etc.).  By placing max path to 1, this insures that only one of the routes is brought into the table.  To the point of additional routers, even then the max path could stay at 1 and then using differing path costs to manipulate between all additional routers.

Furthermore, by manipulating the metric types, this creates an equally valid future problem (ref. R4/R5) whereby routes may potentially be lost and dependency placed on default, static or some other less than desirable function to egress traffic, thus creating asymmetric pathing.  Additionally, and speaking directly to the question asymmetry, forcing traffic down one leg of the path over another fundamentally creates this issue for inbound traffic, an issue which needs be dealt with in the same exercise.

In short, I understand your point but I do still disagree.
0
JustInCaseCommented:
@atlas_shuddered
For the first part I will just say that on many locations networks that I am maintaining are connected to 2 PE routers via OSPF and one router is preferred router (second is just backup router).

For the second part - R4/R5/etc currently non existing routers are internal routers connected to R1. Why would you remove ECMP for internal network, especially, since you already changed route cost and for that reason, most likely, you will not have equal cost routes to both routers?
There are better ways to deal with traffic engineering that cost, general recommendation is do not change default cost values if you don't have to.

I am not sure how asymmetric routing  got into this topic, in my opinion it is outside scope of this topic (but I may be wrong).
0
jskfanAuthor Commented:
Sorry Guys, it took me a while to get back to this Thread.

Predrag,

I followed your suggestion below:
R2
router ospf 1
default-information originate metric-type 1 always
R3
router ospf 1
default-information originate metric-type 2 always 

Open in new window


I see the Default route prefers the Path through R2. But it is hard to tell if the traffic from R1 is not using the path to R3 until the path to R2 is down.
is there any trick to generate traffic that proves  traffic from R1 is using the path to R2 and not the path to R3 ?

Thank you



R1#sh ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is 192.168.12.2 to network 0.0.0.0

O*E1  0.0.0.0/0 [110/11] via 192.168.12.2, 00:01:56, Ethernet0/0
      2.0.0.0/32 is subnetted, 1 subnets
O        2.2.2.2 [110/11] via 192.168.12.2, 00:01:56, Ethernet0/0
      3.0.0.0/32 is subnetted, 1 subnets
O        3.3.3.3 [110/11] via 192.168.13.3, 00:02:21, Ethernet0/1
R1#

Open in new window

0
JustInCaseCommented:
it is easy to tell. Router R1 will forward traffic according to routing table. Currently only E1 default route is present in routing table of R1 so, traffic will not be forwarded to R2 except to traffic that should be forwarded to loopback 3.3.3.3/32 (present in routing table). Route type E1 is advertised by R2 router - all traffic will be forwarded to R2. If OSPF hellos from R2 will not be received on R1's interface, R1 will failover to  type E2 default route that is advertised by R3.
0
jskfanAuthor Commented:
I thought there should be kind of Debug command that will show OSPF Hellos are between R1 and R2 only  for now as long as their connection is UP.
and no Hello messages between R1 and R3 until the link between R1 and R2 is down.
0
JustInCaseCommented:
OSPF will keep both connections as UP.
If you want that scenario it must be provided differently IP SLA, EEM scripting etc (at least I don't remember that OSPF can do it by itself)...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jskfanAuthor Commented:
Thank you
0
JustInCaseCommented:
You're welcome.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Routers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.