cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1320
Views
0
Helpful
4
Replies

If 2 routers have 2 subnets common to them and ospf is configured on both, how does ospf priorities/balance traffic over the 2 subnets?

LondonCisco
Level 1
Level 1

Hi All

We have 3 routers in our infrastructure (say R1, R2 & R3). All 3 are connected using OSPF, plus all 3 have external bgp connections. The OSPF is used as iBGP (if this is the correct terminology) i.e. R1 has some routes in the routing table to R2 and R3.

Our routers are all connected together using 2 ospf connections i.e. R1 and R3 have 2 subnets common to each other over which ospf is configured.

R1 and R3 are in different data centres, therefore the 2 subnets over which the ospf connects are vlans provided by 2 different 3rd parties. One of the 3rd parties has more problems with disruptions on its vlan, the other being pretty problem free. Therefore, I would like to know the following. Could anybody help?

a) I'm not sure how ospf works with 2 connections. For example, say R1 has a entry in its routing table for R3. Which of the 2 ospf subnets will the traffic be sent down? Will it (for want of a better phrase) be active-active or active-passive?

I show the output from the routing table that hopefully shows an entry via ospf from R1 to R3, the "sho ip cef" command showing the 2 vlans (M & N) which the ospf connects from R1 to R3. I have customised the output to protect parties!!! and put in <R?> to show to which device the ip address belongs to.

R1#sho ip cef X.X.X.X

X.0.0.0/11

  nexthop <R3>Y.Y.Y.58 GigabitEthernet0/0.M

  nexthop <R3>Y.Y.Y.62 GigabitEthernet0/1.N

R1#sho ip route X.X.X.X

Routing entry for X.0.0.0/11

  Known via "bgp PPPPP", distance 200, metric 0

  Tag RRRRR, type internal

  Last update from <R3>Y.Y.Y.40 4w0d ago

  Routing Descriptor Blocks:

  * Y.Y.Y.40, from Y.Y.Y.40, 4w0d ago

      Route metric is 0, traffic share count is 1

      AS Hops 2

      Route tag 2 RRRR

b) I ask as sometimes we have a disruption on one of the 2 connections which causes disruption on some of our traffic - I don't know if this is caused by a change in the routing table or whether it is just the switch having to update its mac table to send the traffic down the other vlan. Does anybody know if you would expect to see a disruption and why?

c) Is there a way to prioritise ospf traffic over vlan M (the one without problems) rather than vlan N, but to failover to vlan N if vlan M were to have problems?

Thanks in advance for all responses. I apologise if this isn't too clear and I will attempt to clarify things if anybody needs it.

Also, thanks to others who have responded to my previous posts, who may see that I'm using the information from them to inform my further queries!

John

1 Accepted Solution

Accepted Solutions

cadet alain
VIP Alumni
VIP Alumni

Hi,

1)

The OSPF is used as iBGP (if this is the correct terminology)

OSPF is an IGP( Interior Gateway Protocol).

2)

R1#sho ip cef X.X.X.X

X.0.0.0/11

  nexthop Y.Y.Y.58 GigabitEthernet0/0.M

  nexthop Y.Y.Y.62 GigabitEthernet0/1.N

You have 2 equal cost path to go to X.X.X.X and CEF will load-balance per src-dst IP pair.

3)

R1#sho ip route X.X.X.X

Routing entry for X.0.0.0/11

  Known via "bgp PPPPP", distance 200, metric 0

  Tag RRRRR, type internal

  Last update from Y.Y.Y.40 4w0d ago

  Routing Descriptor Blocks:

  * Y.Y.Y.40, from Y.Y.Y.40, 4w0d ago

      Route metric is 0, traffic share count is 1

      AS Hops 2

      Route tag 2 RRRR

This route is installed in the routing table as an iBGP route( AD of 200)

So this is an iBGP learned route and OSPF has 2 equal cost path to go to the next-hop because it can't be an OSPF route if it is an iBGP route.So I presumed OSPF is used to go to the next-hop and so the 2 routes are not  the same ?

for question b) I think the running-config and some show commands would be useful as well as explain what disruptions you have and when.

for question c)  just modify the cost of one link to make it a preferred one and if it goes down the traffic will follow the remaining link.

Regards.

Alain


Don't forget to rate helpful posts.

View solution in original post

4 Replies 4

cadet alain
VIP Alumni
VIP Alumni

Hi,

1)

The OSPF is used as iBGP (if this is the correct terminology)

OSPF is an IGP( Interior Gateway Protocol).

2)

R1#sho ip cef X.X.X.X

X.0.0.0/11

  nexthop Y.Y.Y.58 GigabitEthernet0/0.M

  nexthop Y.Y.Y.62 GigabitEthernet0/1.N

You have 2 equal cost path to go to X.X.X.X and CEF will load-balance per src-dst IP pair.

3)

R1#sho ip route X.X.X.X

Routing entry for X.0.0.0/11

  Known via "bgp PPPPP", distance 200, metric 0

  Tag RRRRR, type internal

  Last update from Y.Y.Y.40 4w0d ago

  Routing Descriptor Blocks:

  * Y.Y.Y.40, from Y.Y.Y.40, 4w0d ago

      Route metric is 0, traffic share count is 1

      AS Hops 2

      Route tag 2 RRRR

This route is installed in the routing table as an iBGP route( AD of 200)

So this is an iBGP learned route and OSPF has 2 equal cost path to go to the next-hop because it can't be an OSPF route if it is an iBGP route.So I presumed OSPF is used to go to the next-hop and so the 2 routes are not  the same ?

for question b) I think the running-config and some show commands would be useful as well as explain what disruptions you have and when.

for question c)  just modify the cost of one link to make it a preferred one and if it goes down the traffic will follow the remaining link.

Regards.

Alain


Don't forget to rate helpful posts.

Hi Alain

Below is an extract from our running configuration of R1. I have only included the vlans/networks in the ospf section between R1 and R3 (which the original show ip route outputs referred to) and the ibgp and one external bgp within the bgp section.

The original output was taken from R1 and showed that the traffic was routed to R3 (via vlans M & N)

  • Y.Y.Y.0 are our ip addresses
  • Y.Y.Y.42 is the loopback for R1.
  • Y.Y.Y.41 is the loopback for R2.
  • Y.Y.Y.40 is the loopback for R3.
  • vlans M and N are the vlans over which ospf runs between R1 and R3.
  • You can see that R2 (Y.Y.Y.41) and R3 (Y.Y.Y.40) are configured within the R1 bgp as "peer-group ibgp".

I think I am confused as to the relationship between ospf and ibgp (if any!).

When I saw this output:

R1#sho ip cef X.X.X.X

X.0.0.0/11

  nexthop Y.Y.Y.58 GigabitEthernet0/0.M

  nexthop Y.Y.Y.62 GigabitEthernet0/1.N

I assumed that as it was running over vlans M & N, that there was a relationship between the BGP and the OSPF. In fact, I assumed that (this could be total rubbish!):

R1 would build its routing table from its external bgp peers (there are 3) and then, via ospf, pick up any "better" routes from R2 and R3 - therefore R1 would have 5 possible "next hops" in its routing table, its 3 bgp peers and its 2 ospf peers.

Could you help with my understanding?

Finally, the issue is that vlan M is suffering some disruptions, whereas vlan N is not. Therefore I would like traffic to use vlan M rather than N, but be able to fail over to N if possible. I'm now very confused as to how both bgp and ospf traffic use these vlans!

If you could help, I would be very grateful. Also, if this is too time consuming, I understand and if you just have some links for reading -please let me know. Your help up to now is much appreciated as you are exposing holes in my understanding!

John

interface Loopback0

ip address Y.Y.Y.42 255.255.255.255

router ospf 1

router-id Y.Y.Y.42

log-adjacency-changes

redistribute connected subnets

redistribute static

passive-interface default

no passive-interface GigabitEthernet0/0.M

no passive-interface GigabitEthernet0/1.N

network Y.Y.Y.56 0.0.0.3 area 0

network Y.Y.Y.60 0.0.0.3 area 0

router bgp PPPPP

no synchronization

bgp always-compare-med

bgp log-neighbor-changes

bgp deterministic-med

network Y.Y.Y.0 mask 255.255.248.0

...

neighbor ibgp peer-group

neighbor ibgp remote-as PPPPP

neighbor ibgp update-source Loopback0

neighbor ibgp next-hop-self

neighbor ibgp soft-reconfiguration inbound

....

neighbor Z.Z.Z.Z remote-as RRRRR

....

neighbor Y.Y.Y.40 peer-group ibgp

neighbor Y.Y.Y.41 peer-group ibgp

...

no auto-summary

Hi Alain

Your comments put me to reading and I'm getting alot  better idea of ibgp, peergroups and ospf. Therefore, may I come back to  you in a few days when I have cleared up the issues I'm reading about.  I  will put this as answered as I think my original query had enough  mis-understandings to just confuse people.

Thanks

John

Hi,

no problem take your time to revise but please  don't put Xs or Ys everywhere in your IPs because we can't see which is which and so we can't answer you correctly, just change the values and stick it to it and be consistent.

Regards.

Alain

Don't forget to rate helpful posts.
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card