OSPF capability transit

capability transit

If we want to get from router on the left to the router on the far right, the cost is only 100 through area 1; however, OSPF says we need to go through area 0 to go to another area UNLESS capability transit flag is ON.

On cisco routers it is ON by default, so we actually pick the lower cost path even though it is in area 1.

Step 1: create a virtual link to the first router in area 1 (see further below)

Step 2: issue show ip ospf topology-info

 

R4#show ip ospf topology-info

OSPF Router with ID (10.1.4.4) (Process ID 1)
Base Topology (MTID 0)

Topology priority is 64
Router is not originating router-LSAs with maximum metric
Number of areas transit capable is 2
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Area BACKBONE(0)
SPF algorithm last executed 00:00:26.936 ago
SPF algorithm executed 113 times
Area ranges are
Area 14
This area has transit capability: Virtual Link Endpoint
SPF algorithm last executed 00:09:24.535 ago
SPF algorithm executed 5 times
Area ranges are
Area 45
This area has transit capability: Virtual Link Endpoint
SPF algorithm last executed 00:09:24.535 ago
SPF algorithm executed 7 times
Area ranges are
Area 47
SPF algorithm last executed 00:09:24.535 ago
SPF algorithm executed 4 times
Area ranges are

Important: you can only route in this way if there is a shorter Inter-Area pathvia a non-area 0 router. So if the router in area 1 at the bottom suddenly gained an additional link in area 0, it would no longer be possible to route through area 1. ***Unless we create a virtual link from the router on the left to the bottom router.

Just having capability transit ON does NOT mean that if, for example, we will simply go through the path of lower cost (e.g. the path through area 0 = 50000 and path through a different area is 1000).

If we look at RFC, it says that we need to enable a virtual link to a router in this area! see https://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/212607-ospf-virtual-links-transit-capability.html for details.

TransitCapability is set to TRUE
        if and only if there are one or more fully adjacent virtual
        links using the area as Transit area), and is used as an input
        to a subsequent step of the routing table build process (see
        Section 16.3). When an area's TransitCapability is set to TRUE,
        the area is said to be a "transit area"

OSPF stub router (not area!) and database filtering per neighbor

  1. OSPF stub router

Sometimes you don’t want one of your OSPF routers to be a transit point for traffic (temporary ISP failure?). This configuration makes one of your routers a less-desired path.

router ospf 1

max-metric router-lsa

2. OSPF database filtering

in some cases you want to filter LSAs per neighbor, e.g you have two redundant paths but you want to disable one path.

 

R1

router ospf 1

neighbor 192.168.0.1 database-filter all-out

 

Now R2 (192.168.0.1) cannot learn anything from R1

conditionally originating default routes in OSPF

hello

let’s say you have a static route to your ISP:

ip route 80.0.0.1 255.255.255.255 192.168.0.1

and now you want to send down a default route based on the availability of the connection to this ISP.

here’s the config

ip route 80.0.0.1 255.255.255.255 192.168.0.1 track 1

ip sla 1

icmp-echo 192.168.0.1

freq 5

track 1 ip sla 1 reachability

ip prefix-list myispprefix permit 80.0.0.1/32

route-map isp1prefix permit 10

match ip address prefix-list myispprefix

router ospf 1

default-information-originate route-map isp1prefix

 

If you don’t have an ISP and you want to ”fake it”, you can use a fake route. e.g. 169.254.0.1 255.255.255.255 null0 track 1