Friday, February 16, 2018

Default route race condition?!? (BGP <-> OSPF) Help!

Happy Friday Everyone,

I'm currently facing a problem that I can't find an answer for anywhere online, but perhaps I'm searching for the wrong things.

R1--------------R2 | | | | | | |______R3_______| 

I have three routers, R1 and R2 are Juniper MX104 routers that are peering with our upstream ISP over BGP.

R1 and R2 have been instructed to inject a default route into OSPF on the condition that they have a default route from one of the peers. The conditional injection works properly on both routers, except that it seems whichever router announces it's default route first wins, regardless of metric or external type. I'm able to toggle the selected default route by running a "clear ospf database all" on either R1 or R2. I can also see both external routes for 0.0.0.0 on the R3 OSPF database for a short period of time, before a route is selected. Relevant config info for R1 and R2 are below. Any help or direction would be greatly appreciated.

The current method I'm trying is shown below, but I've also tried generating routes using a policy and also tried using static routes with the no-install option. I've tried every option I could find online, so I'm hoping there's something obvious that I've missed.

Thanks for reading, and have a great weekend!

***** R1 ***** set protocols ospf area 0.0.0.0 interface ge-0/0/0 set protocols ospf area 0.0.0.0 interface ge-0/0/0 priority 200 set protocols ospf export ospf-default set policy-options policy-statement ospf-default from route-filter 0.0.0.0/0 exact set policy-options policy-statement ospf-default then metric 100 set policy-options policy-statement ospf-default then accept ***** R2 ***** set protocols ospf area 0.0.0.0 interface ge-0/0/0 set protocols ospf area 0.0.0.0 interface ge-0/0/0 priority 100 set protocols ospf export ospf-default set policy-options policy-statement ospf-default from route-filter 0.0.0.0/0 exact set policy-options policy-statement ospf-default then metric 200 set policy-options policy-statement ospf-default then accept 

edit: I'm bad at ascii art.

edit: **** OSPF DATABASE AS PER REQUEST from /u/spann0r ****

*** Before "clear ospf database all" on R1 ************************************************** ******* R1 ** R1> show ospf database external OSPF AS SCOPE link state database Type ID Adv Rtr Seq Age Opt Cksum Len Extern *0.0.0.0 70.70.70.100 0x80000003 2823 0x22 0xe3cc 36 ******* R2 ** R2> show ospf database external OSPF AS SCOPE link state database Type ID Adv Rtr Seq Age Opt Cksum Len Extern 0.0.0.0 70.70.70.100 0x80000003 2884 0x22 0xe3cc 36 ******* R3 ** R3#show ip ospf database external OSPF Router with ID (80.80.80.100) (Process ID 100) Type-5 AS External Link States Routing Bit Set on this LSA LS age: 2937 Options: (No TOS-capability, DC) LS Type: AS External Link Link State ID: 0.0.0.0 (External Network Number ) Advertising Router: 70.70.70.100 LS Seq Number: 80000003 Checksum: 0xE3CC Length: 36 Network Mask: /0 Metric Type: 2 (Larger than any link state path) TOS: 0 Metric: 200 Forward Address: 0.0.0.0 External Route Tag: 0 *** After "clear ospf database all" on R1 ************************************************** ******* R1 ** R1> show ospf database external OSPF AS SCOPE link state database Type ID Adv Rtr Seq Age Opt Cksum Len Extern 0.0.0.0 71.71.71.100 0x80000001 521 0x22 0xba90 36 ******* R2 ** 2> show ospf database external OSPF AS SCOPE link state database Type ID Adv Rtr Seq Age Opt Cksum Len Extern *0.0.0.0 71.71.71.100 0x80000001 561 0x22 0xba90 36 ******* R3 ** R3#show ip ospf database external OSPF Router with ID (80.80.80.100) (Process ID 100) Type-5 AS External Link States Delete flag is set for this LSA LS age: MAXAGE(3608) Options: (No TOS-capability, DC) LS Type: AS External Link Link State ID: 0.0.0.0 (External Network Number ) Advertising Router: 70.70.70.100 LS Seq Number: 80000005 Checksum: 0xDFCE Length: 36 Network Mask: /0 Metric Type: 2 (Larger than any link state path) TOS: 0 Metric: 200 Forward Address: 0.0.0.0 External Route Tag: 0 Routing Bit Set on this LSA LS age: 17 Options: (No TOS-capability, DC) LS Type: AS External Link Link State ID: 0.0.0.0 (External Network Number ) Advertising Router: 71.71.71.100 LS Seq Number: 80000001 Checksum: 0xBA90 Length: 36 Network Mask: /0 Metric Type: 2 (Larger than any link state path) TOS: 0 Metric: 300 Forward Address: 0.0.0.0 External Route Tag: 0 ******* R3 after a few moments *************************** R3#show ip ospf database external OSPF Router with ID (80.80.80.100) (Process ID 100) Type-5 AS External Link States Routing Bit Set on this LSA LS age: 22 Options: (No TOS-capability, DC) LS Type: AS External Link Link State ID: 0.0.0.0 (External Network Number ) Advertising Router: 71.71.71.100 LS Seq Number: 80000001 Checksum: 0xBA90 Length: 36 Network Mask: /0 Metric Type: 2 (Larger than any link state path) TOS: 0 Metric: 300 Forward Address: 0.0.0.0 External Route Tag: 0 ***** END ************************************************** 


No comments:

Post a Comment