ODDITY - OSPF E2 preferred above E1

From: bitje <lj_at_cli.nu>
Date: Thu, 11 Apr 2013 23:03:29 +0200

Hi,

I have a situation where a E1 route is being overriden by a E2 route.
The E1 route is entering the area from a mpls superbackbone and the
E2 from an ASBR in the same area. According to what I know an E1
route should always win from a E2 route.. I feel that I am going
to learn something here.

R5 is connected to SW2 and R4.

On SW2 the following is done:
!
ip route 12.12.12.12 255.255.255.255 Null0
!
router ospf 100
 router-id 0.0.0.8
 log-adjacency-changes
 redistribute static subnets
 network 155.1.58.8 0.0.0.0 area 0
!

On R4 the following is done:
!
router ospf 100 vrf TEST
 router-id 0.0.0.4
 log-adjacency-changes
 redistribute bgp 100 subnets
 network 155.1.45.4 0.0.0.0 area 0
!
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 neighbor 6.6.6.6 remote-as 100
 neighbor 6.6.6.6 update-source Loopback10
 neighbor 204.12.1.254 remote-as 54
 no auto-summary
 !
 address-family vpnv4
  neighbor 6.6.6.6 activate
  neighbor 6.6.6.6 send-community extended
 exit-address-family
 !
 address-family ipv4 vrf TEST
  no synchronization
 exit-address-family
!

On R5 the following is done:
!
router ospf 100
 router-id 0.0.0.5
 log-adjacency-changes
 network 155.1.45.5 0.0.0.0 area 0
 network 155.1.58.5 0.0.0.0 area 0
Rack1R5#

Some relevant show commands:

Rack1R5#show ip route ospf 100
     12.0.0.0/32 is subnetted, 1 subnets
O E2 12.12.12.12 [110/20] via 155.1.58.8, 05:41:13, FastEthernet0/0
Rack1R5#

Rack1R5#show ip ospf database external 12.12.12.12

            OSPF Router with ID (0.0.0.5) (Process ID 100)

                Type-5 AS External Link States

  Routing Bit Set on this LSA
  LS age: 1494
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 12.12.12.12 (External Network Number )
  Advertising Router: 0.0.0.8
  LS Seq Number: 8000000B
  Checksum: 0x79E4
  Length: 36
  Network Mask: /32
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address: 0.0.0.0
        External Route Tag: 0

Rack1R5#

Rack1R5#show ip ospf database router 0.0.0.8

            OSPF Router with ID (0.0.0.5) (Process ID 100)

                Router Link States (Area 0)

  Routing Bit Set on this LSA
  LS age: 1533
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 0.0.0.8
  Advertising Router: 0.0.0.8
  LS Seq Number: 80000024
  Checksum: 0xDF9B
  Length: 36
  AS Boundary Router
  Number of Links: 1

    Link connected to: a Transit Network
     (Link ID) Designated Router address: 155.1.58.5
     (Link Data) Router Interface address: 155.1.58.8
      Number of TOS metrics: 0
       TOS 0 Metrics: 200

          
Rack1R5#

Now if I remove the static route on SW2:
Rack1SW2(config)#no ip route 12.12.12.12 255.255.255.255 Null0

And ask R5 what external route it has we see that only after
the static from SW2 has been removed R5 will accept the E1
route since the E2 route is no longer available:

Rack1R5#show ip ospf database external

            OSPF Router with ID (0.0.0.5) (Process ID 100)

                Type-5 AS External Link States

  Routing Bit Set on this LSA
  LS age: 55
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 12.12.12.12 (External Network Number )
  Advertising Router: 0.0.0.4
  LS Seq Number: 80000001
  Checksum: 0xF046
  Length: 36
  Network Mask: /32
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address: 0.0.0.0
        External Route Tag: 3489661028

Rack1R5#

Rack1R5#show ip ospf database router 0.0.0.4

            OSPF Router with ID (0.0.0.5) (Process ID 100)

                Router Link States (Area 0)

  Routing Bit Set on this LSA
  LS age: 820
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 0.0.0.4
  Advertising Router: 0.0.0.4
  LS Seq Number: 80000016
  Checksum: 0xAB3C
  Length: 48
  Area Border Router
  AS Boundary Router
  Number of Links: 2

    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 0.0.0.5
     (Link Data) Router Interface address: 155.1.45.4
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
          
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 155.1.45.0
     (Link Data) Network Mask: 255.255.255.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 64

Rack1R5#

Your analysis/help is appreciated.

Regards

Blogs and organic groups at http://www.ccie.net
Received on Thu Apr 11 2013 - 23:03:29 ART

This archive was generated by hypermail 2.2.0 : Wed May 01 2013 - 06:47:40 ART