ISP - Sending default route
to sw1/2 via eBGP
sw1 - config
router ospf 100
network 0.0.0.0 255.255.255.255 area 0
default-information originate always
!
router bgp 100
bgp log-neighbor-changes
network 70.70.70.0 mask 255.255.255.0
timers bgp 10 30
redistribute ospf 100
neighbor 74.74.74.1 remote-as 200
neighbor 192.168.1.19 remote-as 100
neighbor 192.168.1.19 update-source Loopback0
neighbor 192.168.1.19 next-hop-self
sw2 - config
router ospf 100
network 0.0.0.0 255.255.255.255 area 0
default-information originate always
!
router bgp 100
bgp log-neighbor-changes
network 70.70.70.0 mask 255.255.255.0
timers bgp 10 30
redistribute ospf 100
neighbor 64.64.64.1 remote-as 200
neighbor 192.168.1.20 remote-as 100
neighbor 192.168.1.20 update-source Loopback0
neighbor 192.168.1.20 next-hop-self
!
sw3 - config
router ospf 100
network 0.0.0.0 255.255.255.255 area 0
Question:
Everything is working fine at this point and my route tables look like following on sw3
sw1 - 10.0.0.5
sw2 - 10.0.0.10
You can see its load-balancing traffic.
Gateway of last resort is 10.0.0.10 to network 0.0.0.0
O*E2 0.0.0.0/0 [110/1] via 10.0.0.10, 00:35:37, GigabitEthernet0/3
[110/1] via 10.0.0.5, 00:35:47, GigabitEthernet0/1
Now i go ahead and shutdown sw1 interface A
(ISP side interface)
and then i am seeing following routing table on sw3
if you notice my default gateway is now 10.0.0.5
and 10.0.0.10
disappeared so now my traffic flowing like this
sw3
-->sw1
-->sw2
-->ISP
Gateway of last resort is 10.0.0.5 to network 0.0.0.0
O*E2 0.0.0.0/0 [110/1] via 10.0.0.5, 00:39:04, GigabitEthernet0/1
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
Can someone explain why OSPF picking long path here instead of sending traffic to 10.0.0.10
(sw2) it is sending to (sw1)?
EDIT
OSPF database output:
sw1#sh ip ospf database
OSPF Router with ID (200.200.200.1) (Process ID 100)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
70.70.70.1 70.70.70.1 219 0x80000004 0x00756F 3
192.168.1.19 192.168.1.19 1320 0x80000005 0x007C09 4
200.200.200.1 200.200.200.1 22 0x80000007 0x006B44 5
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
10.0.0.1 200.200.200.1 240 0x80000002 0x004BB1
10.0.0.5 200.200.200.1 240 0x80000002 0x00EE3B
10.0.0.10 192.168.1.19 198 0x80000002 0x00855B
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
0.0.0.0 192.168.1.19 1317 0x80000001 0x00C946 100
0.0.0.0 200.200.200.1 13 0x80000001 0x001369 100
BGP command output: 192.168.1.19
& 192.168.1.20
are loopback interface for iBGP
sw1 - BGP
sw1#sh ip bgp
BGP table version is 43, local router ID is 200.200.200.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
*> 0.0.0.0 74.201.98.1 0 0 200 ?
* i 192.168.1.19 0 100 0 200 ?
* i 10.0.0.0/30 192.168.1.19 0 100 0 ?
*> 0.0.0.0 0 32768 ?
* i 10.0.0.4/30 192.168.1.19 2 100 0 ?
*> 0.0.0.0 0 32768 ?
*> 10.0.0.8/30 10.0.0.6 2 32768 ?
* i 192.168.1.19 0 100 0 ?
*> 64.64.64.0/30 10.0.0.2 2 32768 ?
* i 192.168.1.19 0 100 0 ?
* i 70.64.196.0/24 192.168.1.19 2 100 0 ?
*> 10.0.0.6 2 32768 ?
* i 74.74.74.0/30 192.168.1.19 2 100 0 ?
*> 0.0.0.0 0 32768 ?
Network Next Hop Metric LocPrf Weight Path
r>i 192.168.1.19/32 192.168.1.19 0 100 0 ?
*> 192.168.1.20/32 0.0.0.0 0 32768 ?
*> 200.200.200.0 0.0.0.0 0 32768 ?
r>i 200.200.200.1/32 192.168.1.19 2 100 0 ?
*> 202.1.1.0 74.74.74.1 0 0 200 i
* i 192.168.1.19 0 100 0 200 i
*> 202.202.202.0 74.74.74.1 0 0 200 i
* i 192.168.1.19 0 100 0 200 i
sw2 - BGP
sw2#sh ip bgp
BGP table version is 37, local router ID is 192.168.1.19
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 192.168.1.20 0 100 0 200 ?
*> 64.64.64.1 0 0 200 ?
* i 10.0.0.0/30 192.168.1.20 0 100 0 ?
*> 0.0.0.0 0 32768 ?
*> 10.0.0.4/30 10.0.0.9 2 32768 ?
* i 192.168.1.20 0 100 0 ?
* i 10.0.0.8/30 192.168.1.20 2 100 0 ?
*> 0.0.0.0 0 32768 ?
* i 64.64.64.0/30 192.168.1.20 2 100 0 ?
*> 0.0.0.0 0 32768 ?
* i 70.70.70.0/24 192.168.1.20 2 100 0 ?
*> 10.0.0.9 2 32768 ?
*> 74.74.74.0/30 10.0.0.1 2 32768 ?
* i 192.168.1.20 0 100 0 ?
Network Next Hop Metric LocPrf Weight Path
*> 192.168.1.19/32 0.0.0.0 0 32768 ?
r>i 192.168.1.20/32 192.168.1.20 0 100 0 ?
*>i 200.200.200.0 192.168.1.20 0 100 0 ?
*> 200.200.200.1/32 10.0.0.1 2 32768 ?
* i 202.1.1.0 192.168.1.20 0 100 0 200 i
*> 64.64.64.1 0 0 200 i
* i 202.202.202.0 192.168.1.20 0 100 0 200 i
*> 64.64.64.1 0 0 200 i