cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3624
Views
0
Helpful
12
Replies

Redistribution of BGP into OSPF

alain-bhend
Level 1
Level 1

Dear all,

I have a little issue with asymmetric routing after a line outage.
Please have a look on the attached layout.

This is the routing description:

R5 redistribute Subnet A to BGP neighbors R2 and R4 with set origin igp
R2 redistribute Subnet A into OSPF with E1 and metric 100
R2 redistribute subnet B into BGP
R3 redistribute Subnet A into OSPF with E2 and metric 150
R3 redistribute subnet B into BGP
BGP between R2 and R3 is only for the redistribution of the Subnet A, but I would remove this BGP neighborship, because OSPF is already in place.
In normal situation R1 receives the subnet A as E1 from R6 with AD [110/111] and R5 receives the subnet B with the better path from R2 and with one more AS from R4.
When the WAN-line between R2 and R5 is down, then R1 receives the subnet A as E2 from R6 with AD [110/150] --> this is the first strange thing (but I think it has nothing to do with the problem), because in my opinion it should be [110/171]

Here is the problem description:
When I lose the WAN line between R2 and R5 then on R1 I see this in the routing table. Routing for Subnet A changes from E1 via R6 [110/111] to E2 via R6 [110/150]
But now, when the WAN line between R2 and R5 comes back, then the Routing for subnet A don't change back to E1 via R6 [110/111].
On R5 the routing for subnet B changes back to the better path via R2.
So now I have asymmetric routing. To resolve this, on R3 I have to do a neighbor R4 shutdown / no neighbor R4 shutdown. This is unlike...

Do I have to use a static backdoor routing entry for subnet A on R2?
Any idea that helps to resolve this asymmetric routing issue is much appreciated.

Kind regards,
Alain

12 Replies 12

Hi Alain ,

The main difference between E1 and E2 is that E2 does not add the cost from the ASBR to the receiving router. This means that you will have the cost of the redistribution on any router on the OSPF domain - in your case 150.

You have to check after link between R2-R5 has recoved the following :

         - R2 does it have the prefix A in routing table via BGP next-hop R5

         - R2 does redistribute the route into OSPF

Regards

Dan

Hi Dan,

Thanks for the explication of the reason for the metric 150.

The two checks you asked I can do only out of our office hours.

But here you can see, which routing information I have actually in the normal situation, when both WAN links are up:

Router R2

R2#sho ip ospf database topology

             OSPF Router with ID (R2) (Process ID 20)


                Base Topology (MTID 0)


                Router Link States (Area 1.1.1.1)

Link ID         ADV Router      Age       Seq#             Checksum  Link count
R2               R2                  782         0x80000009   0x0060CD  5
R3               R3                  716         0x80001F45   0x00855C  5


                Net Link States (Area 1.1.1.1)

                Type-5 AS External Link States

Link ID         ADV Router      Age        Seq#              Checksum   Tag
Subnet A     R2                   1541        0x80000005    0x00EE77   3489726228
Subnet A     R3                   1718        0x8000010A   0x00F188    3489726247

R2#sho ip bgp neighbors R5 routes
BGP table version is 6068, local router ID is
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external, f RT-Filter
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network            Next Hop            Metric LocPrf Weight Path
*> Subnet A         R5                            0                    0  65402 i


Total number of prefixes 1

Router R3

R3#sho ip ospf database topology


            OSPF Router with ID (R3) (Process ID 20)


                Base Topology (MTID 0)


                Router Link States (Area 1.1.1.1)

Link ID         ADV Router      Age         Seq#             Checksum  Link count
R2               R2                   1533        0x80000009   0x0060CD  5
R3               R3                   1465        0x80001F45   0x00855C  5


                Net Link States (Area 1.1.1.1)

Link ID         ADV Router      Age         Seq#       Checksum

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#            Checksum   Tag
Subnet A      R2                  250          0x80000006   0x00EC78   3489726228
Subnet A      R3                  447          0x8000010B   0x00EF89   3489726247

R3#sho ip bgp neighbors R4 routes
BGP table version is 6883, local router ID is
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external, f RT-Filter
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight  Path
*  Subnet A        R4                                                  0  65403 65403 65403 65403 65402 ?

Total number of prefixes 1

In the OSPF database usually the Tag is 0 or another BGP AS, but only for this subnet I have this enormous Tag (34897262xy).

Regards,

Alain

Hi Alain ,

As per RFC1364 which describes the BGP OSPF interaction, describes in chapter 4 "Setting OSPF tags, BGP ORIGIN and AS_PATH attributes"

The OSPF external route tag is a "32-bit field attached to each

   external route . . . It may be used to communicate information
   between AS boundary routers;

Furthermore you will find at 4.4 "Automatically generated tag" the exact description of the generated tag.

Could you paste " show ip ospf data external "

Regards

Dan

Hi Dan,

Here is the requested output:

R2#show ip ospf data external

            OSPF Router with ID (R2) (Process ID 20)

                Type-5 AS External Link States

  LS age: 1171
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: (External Network Number )
  Advertising Router: R2
  LS Seq Number: 80000001
  Checksum: 0xF673
  Length: 36
  Network Mask: /16
        Metric Type: 1 (Comparable directly to link state metric)
        MTID: 0
        Metric: 100
        Forward Address: 0.0.0.0
        External Route Tag: 3489726228

  Routing Bit Set on this LSA in topology Base with MTID 0
  LS age: 1167
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: (External Network Number )
  Advertising Router: R3
  LS Seq Number: 8000010E
  Checksum: 0xE98C
  Length: 36
  Network Mask: /16
        Metric Type: 2 (Larger than any link state path)
        MTID: 0
        Metric: 150
        Forward Address: 0.0.0.0
        External Route Tag: 3489726247


R3#sho ip ospf data external

            OSPF Router with ID (R3) (Process ID 20)

                Type-5 AS External Link States

  Routing Bit Set on this LSA in topology Base with MTID 0
  LS age: 1132
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: (External Network Number )
  Advertising Router: R2
  LS Seq Number: 80000001
  Checksum: 0xF673
  Length: 36
  Network Mask: /16
        Metric Type: 1 (Comparable directly to link state metric)
        MTID: 0
        Metric: 100
        Forward Address: 0.0.0.0
        External Route Tag: 3489726228

  LS age: 1126
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: (External Network Number )
  Advertising Router: R3
  LS Seq Number: 8000010E
  Checksum: 0xE98C
  Length: 36
  Network Mask: /16
        Metric Type: 2 (Larger than any link state path)
        MTID: 0
        Metric: 150
        Forward Address: 0.0.0.0
        External Route Tag: 3489726247

For the rest of the day I will not be able to answer.

But I will have a look this evening (UTC/GMT) to the docs you mentioned.

Regards,

Alain

Hi Alain ,

Please the output should be from R6 and R1.

show ip ospf data external

show ip ospf data router

show ip ospf data router

From R3 and R2 :

show ip bgp

show ip route 

Regards

Dan

a-shimazaki
Level 1
Level 1

Hi Alain,

Already resolved? I have just been facing similar issue.

If so, please post your solution to resolve this.

Regards,

AS

HI,

I am also facing the same issue...

first of all my doubt is how Etype changes from E2 to E1, while one WAN link goes down ? Since i haven't configured any type value while redistributing BGP into OSPF?? by default it should be Type 2 always...

Is there any BGP attribute which can sause OSPF Ext LSA E type can cange from E2 to E1??

Hi Shibu,

How are you forming EBGP neighborship with peer? Is it on any virtual interface like loopback or on Physical interface? I meant, if you configure EBGP session on loopback and peer ip address will reach each other even your physical link goes down you will have neighbor relation with them .It’s strange but interesting issue .Let us know if you have same scenario like mention in above post

Regards,

Ashish

HI Ashish,

Thankss

Please find my n/w disgram.

BGP neighbpourship is through physical interface

Issue description

Normal scenario, R1 and R2 learns route for Node-B via BGP from R3 and R4 respectively, and its redistributed to OSPF as type 2 (area 1 used, there is no area 0 in this process)

2 entries shows in OSPF LSDB for nodeB IP shows in R1, (1) advertised by R1 and (2) advertised by R2, both E type = 2. Similarly in R2 also

Whenever media between R3 and R5 fluctuates, R1 LASDB shows 2 entries (1) advertised by R1 (2) adverised by R2 and E type of 2nd LSDB enty changes as type 1( Dont know how it changes )

Since E1 is preferd over E2 NodeA routing table has only 1 path for NodeB IP and load sharing fails.

Manual interruption required in BGP by resting ip prifix or reconfiguring redistribute command to make it normal..

I am not getting any clue...how it happens and how can be solved..pls help

Thanks in advance

Shibunetwork.JPG

Sure Shibu,

Let me go through this,Can you please provide me following information

1)  CLI config on redistributed devices (R1,R2,R5 and R6)

sh run | in router | redis

Regards,

Ashish

Hi Shibu,

In future, if this problem arise ,before removing redistribution command try "clear ip ospf redistribution" and check whethere it resolve or not.

Regards,

Ashish

HI Ashish,

'

Sorry right now i don't have accesss to nodes for getting CLI. I will share as soon as I can. Meanwhile I can update you simple redistribution has done, without specifying ant type value, tag and cost

In future, if this problem arise ,before removing redistribution command try "clear ip ospf redistribution" and check whethere it resolve or not.

I lready tried this and it works...

Thanks

Shibu

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: