I receive a default route via iBGP from R1. On both R2 and R3 I have default-information originate configured. On R4 I only see one default route in the OSPF database; either to R2 or R3. When I shutdown one of the links from R2 / R3 to R1, I see the other default route appear in the OSPF database.
My real topology is a bit more complex, so is it possible to have both default routes appear on R4 without default-information originate always? I want the default route being advertised on R2 / R3 to be reliant on the default route from R1 existing in the RIB.
Thanks
Edit: add configs and output
R1
set interfaces ge-0/0/0 unit 0 family inet address 10.0.1.1/30
set interfaces ge-0/0/1 unit 0 family inet address 10.0.1.5/30
set interfaces ge-0/0/2 unit 0 family inet address 10.1.1.1/30
set interfaces lo0 unit 0 family inet address 192.168.1.3/32
...
set routing-options static route 0.0.0.0/0 discard
set routing-options autonomous-system 65535
set protocols bgp group internal type internal
set protocols bgp group internal bfd-liveness-detection minimum-interval 300
set protocols bgp group internal bfd-liveness-detection multiplier 3
set protocols bgp group internal neighbor 10.0.1.2 export default-originate
set protocols bgp group internal neighbor 10.0.1.6 export default-originate
set protocols ospf export ospf-default
set protocols ospf area 0.0.0.0 interface ge-0/0/2.0
set protocols bfd traceoptions file bfd-trace
set protocols bfd traceoptions flag all
R2
redundancy
bfd-template single-hop BGP-BFD
interval min-tx 300 min-rx 300 multiplier 3
dampening 2 1000 3000 8
!
interface Loopback0
ip address 192.168.1.1 255.255.255.255
!
interface GigabitEthernet1
ip address 10.0.1.2 255.255.255.252
negotiation auto
bfd template BGP-BFD
!
interface GigabitEthernet2
ip address 10.0.1.9 255.255.255.252
negotiation auto
bfd template BGP-BFD
!
interface GigabitEthernet3
no ip address
negotiation auto
!
interface GigabitEthernet3.100
encapsulation dot1Q 100
ip address 10.0.1.13 255.255.255.252
!
interface GigabitEthernet3.300
encapsulation dot1Q 300
ip address 10.0.1.21 255.255.255.252
!
router ospf 110
network 10.0.1.9 0.0.0.0 area 0
network 10.0.1.13 0.0.0.0 area 0
network 10.0.1.21 0.0.0.0 area 0
network 192.168.1.1 0.0.0.0 area 0
default-information originate
!
router bgp 65535
bgp log-neighbor-changes
bgp redistribute-internal
redistribute ospf 110
neighbor 10.0.1.1 remote-as 65535
neighbor 10.0.1.1 fall-over bfd
neighbor 10.0.1.10 remote-as 65535
neighbor 10.0.1.10 fall-over bfd
!
R3
redundancy
bfd-template single-hop BGP-BFD
interval min-tx 300 min-rx 300 multiplier 3
dampening 2 1000 3000 8
!
interface Loopback0
ip address 192.168.1.2 255.255.255.255
!
interface GigabitEthernet1
ip address 10.0.1.6 255.255.255.252
negotiation auto
bfd template BGP-BFD
!
interface GigabitEthernet2
ip address 10.0.1.10 255.255.255.252
negotiation auto
bfd template BGP-BFD
!
interface GigabitEthernet3
no ip address
negotiation auto
!
interface GigabitEthernet3.200
encapsulation dot1Q 200
ip address 10.0.1.17 255.255.255.252
!
interface GigabitEthernet3.400
encapsulation dot1Q 400
ip address 10.0.1.25 255.255.255.252
!
router ospf 110
network 10.0.1.10 0.0.0.0 area 0
network 10.0.1.17 0.0.0.0 area 0
network 10.0.1.25 0.0.0.0 area 0
network 192.168.1.2 0.0.0.0 area 0
default-information originate
!
router bgp 65535
bgp log-neighbor-changes
bgp redistribute-internal
redistribute ospf 110
neighbor 10.0.1.5 remote-as 65535
neighbor 10.0.1.5 fall-over bfd
neighbor 10.0.1.9 remote-as 65535
neighbor 10.0.1.9 fall-over bfd
!
R4
interface Loopback0
ip address 192.168.1.4 255.255.255.255
!
interface GigabitEthernet1
no ip address
negotiation auto
!
interface GigabitEthernet1.100
encapsulation dot1Q 100
ip address 10.0.1.14 255.255.255.252
!
interface GigabitEthernet1.200
encapsulation dot1Q 200
ip address 10.0.1.18 255.255.255.252
!
interface GigabitEthernet2
no ip address
negotiation auto
!
interface GigabitEthernet3
ip address 172.16.0.1 255.255.0.0
negotiation auto
!
router ospf 110
network 10.0.1.14 0.0.0.0 area 0
network 10.0.1.18 0.0.0.0 area 0
network 172.16.0.1 0.0.0.0 area 0
network 192.168.1.4 0.0.0.0 area 0
!
R5
interface Loopback0
ip address 192.168.1.5 255.255.255.255
!
interface GigabitEthernet1
no ip address
negotiation auto
!
interface GigabitEthernet1.300
encapsulation dot1Q 300
ip address 10.0.1.22 255.255.255.252
!
interface GigabitEthernet1.400
encapsulation dot1Q 400
ip address 10.0.1.26 255.255.255.252
!
interface GigabitEthernet2
no ip address
shutdown
negotiation auto
!
interface GigabitEthernet3
no ip address
shutdown
negotiation auto
!
router ospf 110
network 10.0.1.22 0.0.0.0 area 0
network 10.0.1.26 0.0.0.0 area 0
network 192.168.1.5 0.0.0.0 area 0
!
R4 - Output
R4# sho ip ospf database
OSPF Router with ID (192.168.1.4) (Process ID 110)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
192.168.1.1 192.168.1.1 1219 0x80000005 0x007AA3 4
192.168.1.2 192.168.1.2 1218 0x80000005 0x008881 4
192.168.1.4 192.168.1.4 1223 0x80000003 0x00B0D9 4
192.168.1.5 192.168.1.5 1219 0x80000003 0x0071C3 3
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
10.0.1.10 192.168.1.2 1230 0x80000001 0x006F74
10.0.1.14 192.168.1.4 1223 0x80000001 0x004F8C
10.0.1.18 192.168.1.4 1223 0x80000001 0x0035A1
10.0.1.22 192.168.1.5 1219 0x80000001 0x0003CE
10.0.1.26 192.168.1.5 1219 0x80000001 0x00E8E3
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
0.0.0.0 192.168.1.2 1217 0x80000001 0x00CD0B 110
R5 - Output
R5#sho ip ospf database
OSPF Router with ID (192.168.1.5) (Process ID 110)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
192.168.1.1 192.168.1.1 473 0x80000006 0x0078A4 4
192.168.1.2 192.168.1.2 503 0x80000006 0x008682 4
192.168.1.4 192.168.1.4 451 0x80000004 0x00AEDA 4
192.168.1.5 192.168.1.5 471 0x80000004 0x006FC4 3
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
10.0.1.10 192.168.1.2 503 0x80000002 0x006D75
10.0.1.14 192.168.1.4 451 0x80000002 0x004D8D
10.0.1.18 192.168.1.4 451 0x80000002 0x0033A2
10.0.1.22 192.168.1.5 471 0x80000002 0x0001CF
10.0.1.26 192.168.1.5 471 0x80000002 0x00E6E4
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
0.0.0.0 192.168.1.2 503 0x80000002 0x00CB0C 110
R2 BGP / OSPF
BGP table version is 15, local router ID is 192.168.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
r>i 0.0.0.0 10.0.1.1 100 0 i
* i 10.0.1.8/30 10.0.1.10 0 100 0 ?
*> 0.0.0.0 0 32768 ?
* i 10.0.1.12/30 10.0.1.18 2 100 0 ?
*> 0.0.0.0 0 32768 ?
*> 10.0.1.16/30 10.0.1.14 2 32768 ?
* i 10.0.1.10 0 100 0 ?
* i 10.0.1.20/30 10.0.1.26 2 100 0 ?
*> 0.0.0.0 0 32768 ?
*> 10.0.1.24/30 10.0.1.22 2 32768 ?
* i 10.0.1.10 0 100 0 ?
* i 172.16.0.0 10.0.1.18 2 100 0 ?
*> 10.0.1.14 2 32768 ?
*> 192.168.1.1/32 0.0.0.0 0 32768 ?
Network Next Hop Metric LocPrf Weight Path
* i 192.168.1.2/32 10.0.1.10 0 100 0 ?
*> 10.0.1.10 2 32768 ?
* i 192.168.1.4/32 10.0.1.18 2 100 0 ?
*> 10.0.1.14 2 32768 ?
* i 192.168.1.5/32 10.0.1.26 2 100 0 ?
*> 10.0.1.22 2 32768 ?
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
192.168.1.1 192.168.1.1 736 0x8000002D 0x002ACB 4
192.168.1.2 192.168.1.2 923 0x8000002D 0x0038A9 4
192.168.1.4 192.168.1.4 1263 0x8000002B 0x006002 4
192.168.1.5 192.168.1.5 912 0x8000002B 0x0021EB 3
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
10.0.1.10 192.168.1.2 923 0x80000029 0x001F9C
10.0.1.14 192.168.1.4 1263 0x80000029 0x00FEB4
10.0.1.18 192.168.1.4 1263 0x80000029 0x00E4C9
10.0.1.22 192.168.1.5 912 0x80000029 0x00B2F6
10.0.1.26 192.168.1.5 912 0x80000029 0x00980C
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
0.0.0.0 192.168.1.2 178 0x80000001 0x00CD0B 110
R3 BGP / OSPF
BGP table version is 17, local router ID is 192.168.1.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*>i 0.0.0.0 10.0.1.5 100 0 i
* i 10.0.1.8/30 10.0.1.9 0 100 0 ?
*> 0.0.0.0 0 32768 ?
*> 10.0.1.12/30 10.0.1.18 2 32768 ?
* i 10.0.1.9 0 100 0 ?
* i 10.0.1.16/30 10.0.1.14 2 100 0 ?
*> 0.0.0.0 0 32768 ?
*> 10.0.1.20/30 10.0.1.26 2 32768 ?
* i 10.0.1.9 0 100 0 ?
* i 10.0.1.24/30 10.0.1.22 2 100 0 ?
*> 0.0.0.0 0 32768 ?
* i 172.16.0.0 10.0.1.14 2 100 0 ?
*> 10.0.1.18 2 32768 ?
* i 192.168.1.1/32 10.0.1.9 0 100 0 ?
Network Next Hop Metric LocPrf Weight Path
*> 10.0.1.9 2 32768 ?
* i 192.168.1.2/32 10.0.1.9 2 100 0 ?
*> 0.0.0.0 0 32768 ?
* i 192.168.1.4/32 10.0.1.14 2 100 0 ?
*> 10.0.1.18 2 32768 ?
* i 192.168.1.5/32 10.0.1.22 2 100 0 ?
*> 10.0.1.26 2 32768 ?
OSPF Router with ID (192.168.1.2) (Process ID 110)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
192.168.1.1 192.168.1.1 944 0x8000002D 0x002ACB 4
192.168.1.2 192.168.1.2 1129 0x8000002D 0x0038A9 4
192.168.1.4 192.168.1.4 1470 0x8000002B 0x006002 4
192.168.1.5 192.168.1.5 1119 0x8000002B 0x0021EB 3
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
10.0.1.10 192.168.1.2 1129 0x80000029 0x001F9C
10.0.1.14 192.168.1.4 1470 0x80000029 0x00FEB4
10.0.1.18 192.168.1.4 1470 0x80000029 0x00E4C9
10.0.1.22 192.168.1.5 1119 0x80000029 0x00B2F6
10.0.1.26 192.168.1.5 1119 0x80000029 0x00980C
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
0.0.0.0 192.168.1.2 384 0x80000001 0x00CD0B 110
It seems the first router (out of R2 / R3) to redistribute the default route from iBGP into OSPF will be the only default route that OSPF puts into the database. I noticed that whichever router is second to try to redistribute the default route into OSPF will encounter a BGP RIB failure because the default route from the other router is already installed into the RIB by OSPF and is pointing to the other router. I've read that routes from BGP will not be redistributed into another protocol if the route is not in the routing table.
User contributions licensed under CC BY-SA 3.0