Saturday, July 2, 2011

LAB: OSPF Conditional Routing

- Remove the previous default route advertisement on R6.
- Configure R6 to originate a default route into OSPF, but only if the local Serial interface connecting to BB1 is up.

conditional default-information origination in OSPF can use route-map to check the existence of a specific prefix in the routing table before the default route is originated.

int this scenario R6 is tracking the s0/0 interface which leads to the upstream network.


Rack1R6(config)#ip prefix-list LINK_TO_BB1 SEq 5 PERmit 54.1.1.0/24

Rack1R6(config)#route-map TRACK_LINK_TO_BB1 permit 10
Rack1R6(config-route-map)#match ip address prefix-list LINK_TO_BB1

Rack1R6(config)#router ospf 1
Rack1R6(config-router)#default-information originate always route-map TRACK_LINK_TO_BB1



@ R1 before shutting down R6's s0/0 interface

Rack1R1#show ip ospf database external 0.0.0.0

            OSPF Router with ID (150.1.1.1) (Process ID 1)

                Type-5 AS External Link States

  Routing Bit Set on this LSA
  LS age: 298
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 0.0.0.0 (External Network Number )
  Advertising Router: 150.1.4.4
  LS Seq Number: 80000002
  Checksum: 0xB5B5
  Length: 36
  Network Mask: /0
        Metric Type: 1 (Comparable directly to link state metric)
        TOS: 0
        Metric: 40
        Forward Address: 0.0.0.0
        External Route Tag: 1

  LS age: 50
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 0.0.0.0 (External Network Number )
  Advertising Router: 150.1.6.6
  LS Seq Number: 80000003
  Checksum: 0x9577
  Length: 36
  Network Mask: /0
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 1
        Forward Address: 0.0.0.0
        External Route Tag: 1

after shutting down R6's s0/0 interface, R6 type-5 external 0.0.0.0 route is not in the database.

Rack1R1#show ip ospf database external 0.0.0.0

            OSPF Router with ID (150.1.1.1) (Process ID 1)

                Type-5 AS External Link States

  Routing Bit Set on this LSA
  LS age: 349
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 0.0.0.0 (External Network Number )
  Advertising Router: 150.1.4.4
  LS Seq Number: 80000002
  Checksum: 0xB5B5
  Length: 36
  Network Mask: /0
        Metric Type: 1 (Comparable directly to link state metric)
        TOS: 0
        Metric: 40
        Forward Address: 0.0.0.0
        External Route Tag: 1

No comments:

Post a Comment