Two equal cost default routes are not in the routing table together within OSPF

CodeBloxCodeBlox Posts: 1,363Member
I have a scenario which has two "internet gateways" which are participating in both iBGP and OSPF. iBGP is advertising a default route to the gateways and they both redistribute that into OSPF as type 5 LSAs. Problem I'm running into is that I expect my other OSPF routers to learn both routes and put both into the routing table. The AD/Metric are equal for both advertisements on all routers (It's 110/1) but the routers are keeping the older one and not putting the second in their for load balancing. What gives? I can post more info and configs if need be but when I learned the fundamentals, I thought equal cost routes would be put into the routing table together. If I remove one that is present the other one is learned.See the attachment for the topology. INET_CLOUD is BGP advertising the 0.0.0.0 route.diqh.pngUploaded with ImageShack.us
Currently reading: Network Warrior, Unix Network Programming by Richard Stevens

Comments

  • EdTheLadEdTheLad Posts: 2,112Member ■■■■□□□□□□
    Default routes are tricky, you cant redistribute a default route into ospf, look at the lsa database on the gateways and you wont se the default. Why don't you try the same thing with a non default.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • JackaceJackace Posts: 335Member
    http://blog.ine.com/2011/04/04/understanding-ospf-external-route-path-selection/

    Without seeing your configs, routing tables, or lsd it's hard to tell exactly what's going on. My first guess would be forwarding cost of the 2 routes is not the same. The link above is a great resource for just this topic.
  • deth1kdeth1k Posts: 312Member
    Which router are you expecting to have equal cost paths? RTR3 should in theory have both defaults installed in it's RIB.
  • fiftyofiftyo Posts: 71Member ■■□□□□□□□□
    Did you configure maximum-paths n under router ospf x?
  • CodeBloxCodeBlox Posts: 1,363Member
    Here is INET_GWAY1s config
    !
    !
    version 12.4
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname INET_GWAY1
    !
    boot-start-marker
    boot-end-marker
    !
    !
    no aaa new-model
    !
    resource policy
    !
    memory-size iomem 5
    ip cef
    !
    !
    !
    !
    no ip domain lookup
    ip domain name lab.local
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    ! 
    !
    !
    !
    !
    !
    interface FastEthernet0/0
     no ip address
     shutdown
     duplex auto
     speed auto
    !
    interface Serial0/0
     ip address 10.200.55.2 255.255.255.252
     no fair-queue
     clock rate 2000000
    !
    interface FastEthernet0/1
     no ip address
     shutdown
     duplex auto
     speed auto
    !
    interface Serial0/1
     ip address 20.24.51.54 255.255.255.252
     clock rate 2000000
    !
    !
    router ospf 1
     log-adjacency-changes
     network 10.200.55.0 0.0.0.3 area 55
     default-information originate
    !
    router bgp 65009
     no synchronization
     bgp log-neighbor-changes
     bgp redistribute-internal
     neighbor 20.24.51.53 remote-as 65009
     no auto-summary
    !
    !
    !
    ip http server
    no ip http secure-server
    !
    !
    !
    !
    !
    !
    !
    control-plane
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    line con 0
     exec-timeout 0 0
     privilege level 15
     logging synchronous
    line aux 0
     exec-timeout 0 0
     privilege level 15
     logging synchronous
    line vty 0 4
     login
    !
    !
    webvpn context Default_context
     ssl authenticate verify all
     !
     no inservice
    !
    !
    end
    

    Here is INET_GWAY2s config
    
    !
    !
    version 12.4
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname INET_GWAY2
    !
    boot-start-marker
    boot-end-marker
    !
    !
    no aaa new-model
    !
    resource policy
    !
    memory-size iomem 5
    ip cef
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    ! 
    !
    !
    !
    !
    !
    interface FastEthernet0/0
     no ip address
     shutdown
     duplex auto
     speed auto
    !
    interface Serial0/0
     ip address 10.200.20.2 255.255.255.252
     no fair-queue
     clock rate 2000000
    !
    interface FastEthernet0/1
     no ip address
     shutdown
     duplex auto
     speed auto
    !
    interface Serial0/1
     ip address 51.55.20.26 255.255.255.252
     clock rate 2000000
    !
    interface FastEthernet1/0
    !
    interface FastEthernet1/1
    !
    interface FastEthernet1/2
    !
    interface FastEthernet1/3
    !
    interface FastEthernet1/4
    !
    interface FastEthernet1/5
    !
    interface FastEthernet1/6
    !
    interface FastEthernet1/7
    !
    interface FastEthernet1/8
    !
    interface FastEthernet1/9
    !
    interface FastEthernet1/10
    !
    interface FastEthernet1/11
    !
    interface FastEthernet1/12
    !
    interface FastEthernet1/13
    !
    interface FastEthernet1/14
    !
    interface FastEthernet1/15
    !
    interface Vlan1
     no ip address
    !
    !
    router ospf 1
     log-adjacency-changes
     network 10.200.20.0 0.0.0.3 area 20
     default-information originate
    !
    router bgp 65009
     no synchronization
     bgp log-neighbor-changes
     bgp redistribute-internal
     neighbor 51.55.20.25 remote-as 65009
     no auto-summary
    !
    !
    !
    ip http server
    no ip http secure-server
    !
    !
    !
    !
    !
    !
    !
    control-plane
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    line con 0
    line aux 0
    line vty 0 4
     login
    !
    !
    webvpn context Default_context
     ssl authenticate verify all
     !
     no inservice
    !
    !
    end
    
    

    Here is INET_CLOUDs config
    
    !
    !
    version 12.4
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname INET_CLOUD
    !
    boot-start-marker
    boot-end-marker
    !
    !
    no aaa new-model
    !
    resource policy
    !
    memory-size iomem 5
    ip cef
    !
    !
    !
    !
    no ip domain lookup
    ip domain name lab.local
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    ! 
    !
    !
    !
    !
    !
    interface Loopback0
     ip address 51.51.51.51 255.255.255.255
    !
    interface FastEthernet0/0
     no ip address
     shutdown
     duplex auto
     speed auto
    !
    interface Serial0/0
     ip address 20.24.51.53 255.255.255.252
     clock rate 125000
    !
    interface FastEthernet0/1
     no ip address
     shutdown
     duplex auto
     speed auto
    !
    interface Serial0/1
     ip address 51.55.20.25 255.255.255.252
     clock rate 125000
    !
    interface FastEthernet1/0
    !
    interface FastEthernet1/1
    !
    interface FastEthernet1/2
    !
    interface FastEthernet1/3
    !
    interface FastEthernet1/4
    !
    interface FastEthernet1/5
    !
    interface FastEthernet1/6
    !
    interface FastEthernet1/7
    !
    interface FastEthernet1/8
    !
    interface FastEthernet1/9
    !
    interface FastEthernet1/10
    !
    interface FastEthernet1/11
    !
    interface FastEthernet1/12
    !
    interface FastEthernet1/13
    !
    interface FastEthernet1/14
    !
    interface FastEthernet1/15
    !
    interface Vlan1
     no ip address
    !
    !
    router bgp 65009
     no synchronization
     bgp log-neighbor-changes
     network 0.0.0.0
     neighbor 20.24.51.54 remote-as 65009
     neighbor 51.55.20.26 remote-as 65009
     no auto-summary
    !
    ip route 0.0.0.0 0.0.0.0 Loopback0
    !
    !
    no ip http server
    no ip http secure-server
    !
    !
    !
    !
    !
    !
    !
    control-plane
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    line con 0
     exec-timeout 0 0
     privilege level 15
     logging synchronous
    line aux 0
     exec-timeout 0 0
     privilege level 15
     logging synchronous
    line vty 0 4
     login
    !
    !
    webvpn context Default_context
     ssl authenticate verify all
     !
     no inservice
    !
    !
    end
    
    

    Here is the ospf database on RTR3. This router has only 1 of the default routes in the routing table at any time.
    
    RTR3#show ip ospf data
    
    
                OSPF Router with ID (172.16.0.252) (Process ID 1)
    
    
                    Router Link States (Area 0)
    
    
    Link ID         ADV Router      Age         Seq#       Checksum Link count
    172.16.0.252    172.16.0.252    1342        0x80000051 0x0060F4 1
    172.16.0.253    172.16.0.253    1390        0x80000053 0x00A1C1 2
    172.16.0.254    172.16.0.254    245         0x80000057 0x002B0C 3
    
    
                    Net Link States (Area 0)
    
    
    Link ID         ADV Router      Age         Seq#       Checksum
    10.1.0.1        172.16.0.254    245         0x80000052 0x0009A2
    
    
                    Summary Net Link States (Area 0)
    
    
    Link ID         ADV Router      Age         Seq#       Checksum
    10.1.51.0       172.16.0.253    1390        0x80000053 0x008324
    10.1.51.0       172.16.0.254    1739        0x80000050 0x008326
    10.200.0.0      172.16.0.254    1739        0x80000050 0x009A93
    
    
                    Summary ASB Link States (Area 0)
    
    
    Link ID         ADV Router      Age         Seq#       Checksum
    10.200.20.2     172.16.0.254    245         0x8000004D 0x00FB0F
    10.200.55.2     172.16.0.253    637         0x80000015 0x00EF31
    
    
                    Type-5 AS External Link States
    
    
    Link ID         ADV Router      Age         Seq#       Checksum Tag
    0.0.0.0         10.200.20.2     646         0x80000015 0x00D9DB 1
    RTR3#
    
    

    If I stop advertising the default route from one gateway rtr3 learns it from the other source.
    Currently reading: Network Warrior, Unix Network Programming by Richard Stevens
  • networker050184networker050184 Posts: 11,962Mod Mod
    Jackace wrote: »
    http://blog.ine.com/2011/04/04/understanding-ospf-external-route-path-selection/

    Without seeing your configs, routing tables, or lsd it's hard to tell exactly what's going on. My first guess would be forwarding cost of the 2 routes is not the same. The link above is a great resource for just this topic.

    My thoughts as well. When you generate a default route (to be clear yo are not redistributing a default route, you are gernerating one form this router with the command) it will have a default route type of E2 with metric of 1. Since these tie you will have a forward metric to look at. Assuming you leave all the links to default cost you will end up with different forwarding metrics here.
    An expert is a man who has made all the mistakes which can be made.
  • CodeBloxCodeBlox Posts: 1,363Member
    Thanks, I'll give the article a reading through. I also just noticed that even INET_GWAY1 (A router that is directly connected to the INET_CLOUD via BGP) is even using the default route advertised from INET_GWAY2 O_o
    Currently reading: Network Warrior, Unix Network Programming by Richard Stevens
  • deth1kdeth1k Posts: 312Member
    lets see your ABR configs and also "sh ip route" / "sh ip ospf data ext" from ARB2. ABR2 is preferring an Intra Area route via ARB1 to reach the default network (which is default OSPF operation).
  • ZartanasaurusZartanasaurus Posts: 2,008Member
    So you're learning an iBGP default route (AD 200) and both routers are advertising an OSPF default route (AD 110) to each other... So assume GWAY_1 gets its OSPF default LSA advertised first. What does GWAY_2 do with its iBGP default route when it gets that other default?

    Also RTR3, is gonna be the only one with two default routes in the routing table based on that picture, but all routers will have both defaults in their ospf db once you fix this.
    Currently reading:
    IPSec VPN Design 44%
    Mastering VMWare vSphere 5​ 42.8%
  • networker050184networker050184 Posts: 11,962Mod Mod
    Nice catch! Always something to watch with mutual distribution.
    An expert is a man who has made all the mistakes which can be made.
  • CodeBloxCodeBlox Posts: 1,363Member
    I believe Zartanasaurus has hit the nail on the head. Going back to the basics, iBGP does have a higher AD so that's why the second gateway is preferring the external OSPF route. What do people typically do in the real world to remediate this? I can simply change the AD, is this sufficient for what I was expecting to happen?
    Currently reading: Network Warrior, Unix Network Programming by Richard Stevens
  • networker050184networker050184 Posts: 11,962Mod Mod
    I'd assume failover is still sufficeint in this scenario, but you can test this. You could possibly filter the route on the router if not.
    An expert is a man who has made all the mistakes which can be made.
  • CodeBloxCodeBlox Posts: 1,363Member
    I got both routes to show up in the OSPF database by modifying AD but on rtr3 it's only putting one in the routing table. I suspect this is due to another issue I discovered. For one reason or another it has not formed a neighborship with both routers, only one of them. I'm investigating that to figure out why that is but I think once I do, both routes will show up.
    Currently reading: Network Warrior, Unix Network Programming by Richard Stevens
  • CodeBloxCodeBlox Posts: 1,363Member
    Got the issues sorted out! Thanks for the help guys! See the routing table below on router 3:
    Gateway of last resort is 10.1.0.2 to network 0.0.0.0
    
    
         172.16.0.0/32 is subnetted, 1 subnets
    C       172.16.0.252 is directly connected, Loopback0
         10.0.0.0/8 is variably subnetted, 7 subnets, 2 masks
    C       10.1.0.0/24 is directly connected, FastEthernet0/0
    O IA    10.1.51.0/24 [110/75] via 10.1.0.2, 00:00:05, FastEthernet0/0
                         [110/75] via 10.1.0.1, 00:00:05, FastEthernet0/0
    O IA    10.200.0.0/30 [110/1627] via 10.1.0.2, 00:00:05, FastEthernet0/0
    O IA    10.200.0.4/30 [110/1637] via 10.1.0.2, 00:00:05, FastEthernet0/0
    O IA    10.200.0.8/30 [110/65] via 10.1.0.2, 00:00:06, FastEthernet0/0
    O       10.200.0.12/30 [110/65] via 10.1.0.2, 00:00:06, FastEthernet0/0
                           [110/65] via 10.1.0.1, 00:00:06, FastEthernet0/0
    O IA    10.200.55.0/30 [110/65] via 10.1.0.2, 00:00:06, FastEthernet0/0
    [COLOR=#ff0000][B]O*E2 0.0.0.0/0 [110/1] via 10.1.0.2, 00:00:06, FastEthernet0/0
                   [110/1] via 10.1.0.1, 00:00:06, FastEthernet0/0[/B][/COLOR]
    RTR3#
    
    
    
    Currently reading: Network Warrior, Unix Network Programming by Richard Stevens
Sign In or Register to comment.