cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2396
Views
0
Helpful
13
Replies

HSRP and OSPF

frsisqo14344
Level 1
Level 1

Hi Everyone,

Got 4 3550s running ospf

R1 fa01 is connected to R2 fa01

R1 fa02 is connected to R3 fa01

R2 fa02 is connected to R4 fa01

R3 fa01 is connected to R4 fa01and configured as trunk also running HSRP

when i disconnect R1 to R2, traffic does not go via R3/R4, it seems the routes are not being learn by R1. my understanding is traffic should flow via R3/R4 if connection between R1 and R2 is lost.

Any idea?

Hope Im making sense.

2 Accepted Solutions

Accepted Solutions

Hifrsisqo14344

Sorry but still I am not able to understand the network setup and the traffic requirement..My Bad

R1 and R2 have host behind them and R3/R4 are running HSRP..Are R1/R2 doing L2 functionality and running OSPF same time..R1 and R2 are catering to different set of users and R3/R4 are catering to different set of users ?

Still If R3/R4 are the GW and there are remote -LAN users behind R1/R2 and we are running OSPF between R1/R2 and R3/R4 any link failure should be handled by alternate routing path. Did you check for the routing table to be populated with correct routes during R1-R2 failure...

Reagrds

Varma

View solution in original post

Hi,

. What is the reason why R1 does not have a route to R2 via R3? what is the best way of finding this out? When I do a show ip route on R1 it only shows the route via the direct link "R1 --> R2" but it does not show route via R1 --> R3 --> R4 --> R2, is it a missing route on R3?

You would see that in the ospf topology database. If you type "sh ip ospf database" you will see the different paths R1 learns of R2. However, it will only install the best route in the routing table. Ospf uses a metric called "cost".

The cost of  gig interface is 1 ,fast eth is 10 etc.

Imagine that you are using all gig interfaces in your network. So the cost for R1 to reach R2 is 1. But via  R3--R4-R2. its .3

because ospf adds its cost for every link. OSPF route selection gets complex when you have multiple areas and routing between diff protocols .

Hope that anwers your question.

Regards,

Kishore

View solution in original post

13 Replies 13

Vaibhava Varma
Level 4
Level 4

Hi frsisqo14344

Where are the source and destination atttached in this setup and HSRP is being run for source or destination.

The setup from your description seems to be as below:

                                          GWRTR1                                                         GWRTR2

                                               !                                                                        !   

                                         R1 (F0/1)--------------------------------L3-----------------------(F0/1) R2

                                          (F0/2)                                                                 (F0/2)

                                               !                               OSPF Area 0                                                  !

                                               !                                                                        !

                                          (F0/1)                                                                 (F0/1)

                                       R3 (F0/2)---------------------------L2_Trunk----------------------(F0/2) R4

Are the users connecting to R3/R4 in HSRP Mode and then R1,R2,R3,R4 participate in OSPF for WAN routing...

R3/R4 are the Gateway for LAN Users ? Please explain bit more on the failover requirement as its not fully clear the required traffic flow and the current traffic flow.

Regards

Varma

Hi VV,

thanks for the reply. Indeed the diagram is correct. Users are connecting via R3/R4 behind a firewall. HSRP is configured R3/R4 in "load balance". What I wanted to achieve is a failover connection to R2 via R3 if R1 to R2 is lost.

Thanks

Hi frsisqo14344

Sorry but I am still not able to comprehend the failover scenario fully yet.

Still I will put my understanding to you.

Under Normal Conditions LAN users use R3/R4 as GW using HSRP Load-Balancing. R3 has Uplink path to R1 for outbound traffic and R4 has uplink path to R2 for outbound traffic.

Now lets take a case where either R3/R4 sends uplink traffic to R1/R2 and at the same time the R1/R2 uplink connection to GWRTR1/2 fails. Then to avoid blackholing of traffic OSPF comes into picture and routes traffic from R1/R2 to R2/R1 via the inter-router link between them and the traffic still flows uninterruptedly.

Now if R1-R2 Link is also down at the Moment when R1/R2 uplink is down then this defiitely blackholing of traffic and to avoid this we are planning to change the outbound traffic path on R3/R4..Is that correct ? Means if R3 is sending upstream traffic to R1 and that moment the R1-R2 Link breaks R3 should be able to detect the same and the traffic for LAN users should start flowing via R2 now. This can be achieved  usning IP SLA and Track Object in HSRP on R3 ( need to track the R1-R2 Interfcae IP) to make R4 the HSRP Master for both the groups when R1-R2 link breaks .

Hope I have understood the requirement correct and able to answer your query.

Regards

Varma

Hi Varma,

Thanks for the reply.

You are correct. I have all the track interface configured with priority for R3/R4. Actually from the users perspective there should be no issue going to R1 or R2. If link between R3-->R1 is down, path to R1 will be via R2. If link between R4-->R2 is down path to R2 will be via R1. What is actually is happening is when R1-->>R2 link is down, traffic does not seem to go via R3. so if R1-->r2 link is down. Traffic should go R1-->R3---R2. Not sure if this is an OSPF misconfiguraiton or HSRP

Hi frsisqo14344

Why is there a need for R1-R2 Direct Traffic when the GW for the LAN_Users is R3/R4 ?. From R3 and R4 perspective they should be tracking their upstream interfaces and shift the HSRP Master accordingly.

R1-R2 Link would come into picture only when the upstream interface of R1-GWRTR1 or R2-GWRTR2 is down as explained above. Why we need a traffic flow as R1-->R3---R2. Where exactly is the HSRP configured here on R1/R2 or R3/R4 ?

Also for the comment

If link between R3-->R1 is down, path to R1 will be via R2. If link between R4-->R2 is down path to R2 will be via R1.

If a LAN user is hitting R3 as the GW and R3's uplink Interface to R1 is down and we have tracked the same in HSRP and shifting Master to R4 and R4 has its upstream link connected to GWRTR2 then it would be still able to send traffic out fine and there is no need to go to R1 and same case vice-versa for R4 being the GW and LAN USer hitting it.

Here R1 and R2 both have connectivity to external world traffic. Is that correct ?

Regards

Varma

apologies as I am not clear about the objective. R1 and R2 have host behind them and we use services replication between the host behind R1 and R2, thus if link R1 and R2 is down, it should go via the backup links. Hope this make sense. HSRP is configured on R3 and R4

Hifrsisqo14344

Sorry but still I am not able to understand the network setup and the traffic requirement..My Bad

R1 and R2 have host behind them and R3/R4 are running HSRP..Are R1/R2 doing L2 functionality and running OSPF same time..R1 and R2 are catering to different set of users and R3/R4 are catering to different set of users ?

Still If R3/R4 are the GW and there are remote -LAN users behind R1/R2 and we are running OSPF between R1/R2 and R3/R4 any link failure should be handled by alternate routing path. Did you check for the routing table to be populated with correct routes during R1-R2 failure...

Reagrds

Varma

Hi Varma,

Again, thanks for your reply.

yes it is my understanding that if R1-> R2 Link is down, it should go via the alternate routing path. But it does not seem to be the case. Doing an ip show route. I am not seeing routes via the alternate links. Will the routes only populate when the link is down?

Hi,

1. lets assume that R3 is the HSRP Active router. and a user wants to ping a host behind R1 . The traffic would take the path R3--->R1--->Host

2.Now user  wants to ping  a host behind R2 . The traffic would take the path  R3--->R1--->R2----Host

3 Now the link between R1 and R2 is lost and user wants to ping a host behind R2. .The traffic would go R3--R4---R2--Host. because R3 will learn the host behind R2 via R4. So techincally you dont need any HSRP tracking etc. OSPF  should do everything for you.

4. Now. Lets say HOST behind R1 wants to send its config to R2 for replication and the link between R1 and R2 dies.

     Then traffic will go via R1-->R3---R4--->R2--Host.

So in either case if you are advertising the correct networks into OSPF everything should work seamlessly

Traffic should go R1-->R3---R2. Not sure if this is an OSPF misconfiguraiton or HSRP

Traffic will not go R1---R3---R2 because there is no direct link between R3 and R2.

Hope this helps,

Regards

Kishore

Hi Kishore,

"R1-->R3--->R2 because there is no direct link between R3 and R2." Yup this is right. Should be R1 - R3 - R4 - R2 apologies for that. For the users/host behind R3/R4 i have split routes to configure to use R3 if they want to ping host behind R1 and use R4 to ping to hosts behind R2 using HSRP "load balancing". What is the reason why R1 does not have a route to R2 via R3? what is the best way of finding this out? When I do a show ip route on R1 it only shows the route via the direct link "R1 --> R2" but it does not show route via R1 --> R3 --> R4 --> R2, is it a missing route on R3?

Thanks

Hi,

. What is the reason why R1 does not have a route to R2 via R3? what is the best way of finding this out? When I do a show ip route on R1 it only shows the route via the direct link "R1 --> R2" but it does not show route via R1 --> R3 --> R4 --> R2, is it a missing route on R3?

You would see that in the ospf topology database. If you type "sh ip ospf database" you will see the different paths R1 learns of R2. However, it will only install the best route in the routing table. Ospf uses a metric called "cost".

The cost of  gig interface is 1 ,fast eth is 10 etc.

Imagine that you are using all gig interfaces in your network. So the cost for R1 to reach R2 is 1. But via  R3--R4-R2. its .3

because ospf adds its cost for every link. OSPF route selection gets complex when you have multiple areas and routing between diff protocols .

Hope that anwers your question.

Regards,

Kishore

Thanks for the reply Kishore. I did ip ospf database router ID on R1 and below are the results. the router links are set to 2 which seems right.

R1#sh ip ospf database router R3

            OSPF Router with ID (R1) (Process ID 1)

                Router Link States (Area 0)

  Routing Bit Set on this LSA

  LS age: 1356

  Options: (No TOS-capability, DC)

  LS Type: Router Links

  Link State ID: R3

  Advertising Router: R3

  LS Seq Number: 80001096

  Checksum: 0x7931

  Length: 48

  AS Boundary Router

  Number of Links: 2

    Link connected to: a Transit Network

     (Link ID) Designated Router address: R4

     (Link Data) Router Interface address: R3

      Number of TOS metrics: 0

       TOS 0 Metrics: 10

    Link connected to: a Transit Network

     (Link ID) Designated Router address: R4

     (Link Data) Router Interface address: R3

      Number of TOS metrics: 0

       TOS 0 Metrics: 10

***

R1#sh ip ospf database router R4

            OSPF Router with ID (R1) (Process ID 1)

                Router Link States (Area 0)

  Routing Bit Set on this LSA

  LS age: 606

  Options: (No TOS-capability, DC)

  LS Type: Router Links

  Link State ID: R4

  Advertising Router: R4

  LS Seq Number: 80001094

  Checksum: 0x9513

  Length: 48

  AS Boundary Router

  Number of Links: 2

    Link connected to: a Transit Network

     (Link ID) Designated Router address: R4

     (Link Data) Router Interface address: R4

      Number of TOS metrics: 0

       TOS 0 Metrics: 10

    Link connected to: a Transit Network

     (Link ID) Designated Router address: R4

     (Link Data) Router Interface address: R4

      Number of TOS metrics: 0

       TOS 0 Metrics: 10

Hi if you are happy with the answer can you please mark this question as answered so that someone else can benefit from it and learn as well

Thanks

Kishore

Review Cisco Networking products for a $25 gift card