How to inject a default route to address the OSPF area border router (ABR) not generating a default link-state advertisement (LSA) to stub area when area 0 has only one router.
When area 0 has only one router, OSPF ABR will not generate default LSA to stub area. We need to inject default route to stub area.
Topology:
SRX240A(ge-0/0/2)---|---(ge-0/0/2)SRX240B | area0 | area1(stub) Configuration: SRX240A: interfaces { ge-0/0/2 { unit 0 { family inet { address 10.10.10.1/30; } } } lo0 { unit 0 { family inet { address 10.1.1.1/32; } } } } protocols { ospf { area 0.0.0.1 { stub default-metric 10; interface ge-0/0/2.0; } area 0.0.0.0 { interface lo0.0; } } } SRX240B: interfaces { ge-0/0/2 { unit 0 { family inet { address 10.10.10.2/30; } } } lo0 { unit 0 { family inet { address 10.2.2.2/32; } } } } protocols { ospf { area 0.0.0.1 { stub; interface ge-0/0/2.0; } } stp; } root@SRX240A# run show ospf database OSPF database, Area 0.0.0.0 Type ID Adv Rtr Seq Age Opt Cksum Len Router *10.1.1.1 10.1.1.1 0x80000002 2059 0x22 0x38d1 36 Summary *10.10.10.0 10.1.1.1 0x80000004 1418 0x22 0xa26e 28 OSPF database, Area 0.0.0.1 Type ID Adv Rtr Seq Age Opt Cksum Len Router *10.1.1.1 10.1.1.1 0x80000003 1418 0x20 0x7266 36 Router 10.2.2.2 10.2.2.2 0x800001b3 1419 0x20 0xe23e 36 Network 10.10.10.2 10.2.2.2 0x80000001 1419 0x20 0xbb36 32 Summary *10.1.1.1 10.1.1.1 0x80000002 343 0x20 0x9291 28 root@SRX240B# run show ospf database OSPF database, Area 0.0.0.1 Type ID Adv Rtr Seq Age Opt Cksum Len Router 10.1.1.1 10.1.1.1 0x80000003 1437 0x20 0x7266 36 Router *10.2.2.2 10.2.2.2 0x800001b3 1436 0x20 0xe23e 36 Network *10.10.10.2 10.2.2.2 0x80000001 1436 0x20 0xbb36 32 Summary 10.1.1.1 10.1.1.1 0x80000002 362 0x20 0x9291 28 [edit] root@SRX240B# run show route protocol ospf inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.1.1.1/32 *[OSPF/10] 00:24:04, metric 1 > to 10.10.10.1 via ge-0/0/2.0 224.0.0.5/32 *[OSPF/10] 2w0d 18:01:23, metric 1 MultiRecv
Junos OS supports active backbone detection. Active backbone detection is implemented to verify that ABRs are connected to the backbone. If the connection to the backbone area is lost, then the routing device’s default metric is not advertised, effectively rerouting traffic through another ABR with a valid connection to the backbone.
Junos OS does not generate the default LSA if ABR does not have any active backbone connection (any adjacency in area 0). If only one router exist in area 0, there is a hidden command which will change this behavior. You can configure following command on ABR.
root@SRX240A#set protocols ospf no-active-backbone ####Hidden Command #### [edit] root@SRX240A# run show ospf database OSPF database, Area 0.0.0.0 Type ID Adv Rtr Seq Age Opt Cksum Len Router *10.1.1.1 10.1.1.1 0x80000002 2133 0x22 0x38d1 36 Summary *10.10.10.0 10.1.1.1 0x80000004 1492 0x22 0xa26e 28 OSPF database, Area 0.0.0.1 Type ID Adv Rtr Seq Age Opt Cksum Len Router *10.1.1.1 10.1.1.1 0x80000003 1492 0x20 0x7266 36 Router 10.2.2.2 10.2.2.2 0x800001b3 1493 0x20 0xe23e 36 Network 10.10.10.2 10.2.2.2 0x80000001 1493 0x20 0xbb36 32 Summary *0.0.0.0 10.1.1.1 0x80000001 9 0x20 0x9c8b 28 <---HERE Summary *10.1.1.1 10.1.1.1 0x80000002 417 0x20 0x9291 28 root@SRX240B# run show ospf database OSPF database, Area 0.0.0.1 Type ID Adv Rtr Seq Age Opt Cksum Len Router 10.1.1.1 10.1.1.1 0x80000003 1516 0x20 0x7266 36 Router *10.2.2.2 10.2.2.2 0x800001b3 1515 0x20 0xe23e 36 Network *10.10.10.2 10.2.2.2 0x80000001 1515 0x20 0xbb36 32 Summary 0.0.0.0 10.1.1.1 0x80000001 34 0x20 0x9c8b 28 <---HERE Summary 10.1.1.1 10.1.1.1 0x80000002 441 0x20 0x9291 28 [edit] root@SRX240B# run show route protocol ospf inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 0.0.0.0/0 *[OSPF/10] 00:00:38, metric 11 <---HERE > to 10.10.10.1 via ge-0/0/2.0 10.1.1.1/32 *[OSPF/10] 00:25:20, metric 1 > to 10.10.10.1 via ge-0/0/2.0 224.0.0.5/32 *[OSPF/10] 2w0d 18:02:39, metric 1 MultiRecv