Injecting Default Routes

ccnp-routing
Inject a default route into OSPF with default-information originate, compare the always keyword, and inspect the resulting Type 5 external LSAs.
Published

Dec 11, 2017

  1. Using default-information originate
  1. Using Stub Areas

default-information originate

The OSPF subcommand default-information originate tells OSPF to create a Type 5 LSA (used for external routes) for a default route (0.0.0.0/0) and flood it like any other Type 5 LSA. In other words, it tells the router to create and flood information about a default route throughout the OSPF domain.

Configuration

image
B1’s routing table before applying default-information originate:
B1#show ip route ospf
Gateway of last resort is not set

      10.0.0.0/16 is subnetted, 1 subnets
O IA     10.10.0.0 [110/2] via 172.16.1.3, 00:12:52, GigabitEthernet0/0
                   [110/2] via 172.16.1.2, 00:13:08, GigabitEthernet0/0
Let us turn LSA generation debugging on.
B1#debug ip ospf lsa-generation
OSPF LSA generation debugging is on
Now, I am going to inject the default route to the network on ASBR1
ASBR1(config)#ip route 0.0.0.0 0.0.0.0 209.165.202.130
ASBR1(config-router)#default-information originate
Now let us see what happens on B1
B1#show ip route ospf
Gateway of last resort is 172.16.1.3 to network 0.0.0.0

O*E2  0.0.0.0/0 [110/1] via 172.16.1.3, 00:00:03, GigabitEthernet0/0
                [110/1] via 172.16.1.2, 00:00:03, GigabitEthernet0/0
      10.0.0.0/16 is subnetted, 1 subnets
O IA     10.10.0.0 [110/2] via 172.16.1.3, 00:01:48, GigabitEthernet0/0
                   [110/2] via 172.16.1.2, 00:01:48, GigabitEthernet0/0
B1#show ip ospf database external 0.0.0.0

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

        Type-5 AS External Link States

  LS age: 104
  Options: (No TOS-capability, DC, Upward)
  LS Type: AS External Link
  Link State ID: 0.0.0.0 (External Network Number )
  Advertising Router: 99.99.99.99
  LS Seq Number: 80000001
  Checksum: 0x958F
  Length: 36
  Network Mask: /0
    Metric Type: 2 (Larger than any link state path)
    MTID: 0
    Metric: 1
    Forward Address: 0.0.0.0
    External Route Tag: 1
Now I am going to configure ASBR2 as well
ASBR2(config-router)#default-information originate always
Let us see the result on B1
B1#show ip ospf database external 0.0.0.0

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

        Type-5 AS External Link States

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

  LS age: 160
  Options: (No TOS-capability, DC, Upward)
  LS Type: AS External Link
  Link State ID: 0.0.0.0 (External Network Number )
  Advertising Router: 99.99.99.99
  LS Seq Number: 80000001
  Checksum: 0x958F
  Length: 36
  Network Mask: /0
    Metric Type: 2 (Larger than any link state path)
    MTID: 0
    Metric: 1
    Forward Address: 0.0.0.0
    External Route Tag: 1
Back to top