Stub Router in OSPF

Stub Router in OSPF

Sharing is caring!

This is an interesting technology.  This will not push a Default route.  Instead, it merely changes the 16 bit metric to the max.  This could be used when a router needs to be removed from providing a path of routing traffic and you want to minimize the disruption.  If you merely turned off the router you would cause an outage while OSPF Dead Timer causes the convergence to occur.

 

It could also be used to provide time for BGP to converge before OSPF starts sending routes that could cause packets to be dropped until BGP is fully converged.  This is done with the “on-startup” option.  This allows for either a set amount of seconds or when signaled off BGP.

In the below Scenario these two routers are connected with a Serial Connection.  R5 is advertising its Loopback 0 into area 0.

 

This is outlined in RFC6987 which obsoleted RFC3137.

Documentation can be found here

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_ospf/configuration/15-s/iro-15-s-book/iro-stub-router.pdf

Although from experience these links change with time so just search for “Cisco OSFP Stub Router” if the above link does not work.

Here is another link to more information

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_ospf/configuration/xe-16/iro-xe-16-book/iro-stub-router.html

Another Blog by Packetlife here.

Here are some outputs that demonstrate the changes in the configuration.

R2 Router ID 0.0.0.2.   IP address 192.1.101.2

|

|

R5   Router ID 0.0.0.5.   IP address 192.1.101.5

Lo0 5.0.0.0/8

Before the command is used

R2#show ip route 5.0.0.0
Routing entry for 5.0.0.0/8
Known via “ospf 1”, distance 110, metric 65, type intra area
Last update from 192.1.101.5 on Serial2/0, 00:00:21 ago
Routing Descriptor Blocks:
* 192.1.101.5, from 0.0.0.5, 00:00:21 ago, via Serial2/0
Route metric is 65, traffic share count is 1
R5#show ip ospf
Routing Process “ospf 1” with ID 0.0.0.5
Start time: 00:00:12.585, Time elapsed: 00:10:10.330
****Output omitted*****
Event-log enabled, Maximum number of events: 1000, Mode: cyclic
Router is not originating router-LSAs with maximum metric
Unset reason: unconfigured
Unset time: 00:10:18.097, Time elapsed: 00:00:04.818
Initial SPF schedule delay 5000 msecs
****Output omitted*****
Number of DoNotAge LSA 0
Flood list length 0

R2#show ip ospf database router 0.0.0.5

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

Router Link States (Area 0)

LS age: 145
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 0.0.0.5
Advertising Router: 0.0.0.5
LS Seq Number: 80000003
Checksum: 0x31FB
Length: 60
Number of Links: 3

Link connected to: a Stub Network
(Link ID) Network/subnet number: 5.0.0.0
(Link Data) Network Mask: 255.0.0.0
Number of MTID metrics: 0
TOS 0 Metrics: 1

Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 0.0.0.2
(Link Data) Router Interface address: 192.1.101.5
Number of MTID metrics: 0
TOS 0 Metrics: 64

Link connected to: a Stub Network
(Link ID) Network/subnet number: 192.1.101.0
(Link Data) Network Mask: 255.255.255.0
Number of MTID metrics: 0
TOS 0 Metrics: 64

 

Next enter the command config t followed by

R5(config-router)#max-metric router-lsa

This results in the following output

R2#show ip route 5.0.0.0
Routing entry for 5.0.0.0/8
Known via “ospf 1”, distance 110, metric 65, type intra area
Last update from 192.1.101.5 on Serial2/0, 00:00:02 ago
Routing Descriptor Blocks:
* 192.1.101.5, from 0.0.0.5, 00:00:02 ago, via Serial2/0
Route metric is 65, traffic share count is 1

R5#show ip ospf
Routing Process “ospf 1” with ID 0.0.0.5
Start time: 00:00:12.585, Time elapsed: 00:11:51.259
****Output omitted*****
Event-log enabled, Maximum number of events: 1000, Mode: cyclic
Originating router-LSAs with maximum metric                                     *****CHANGED******
Condition: always, State: active                                                                     *****CHANGED******
Initial SPF schedule delay 5000 msecs
****Output omitted*****
Number of DoNotAge LSA 0
Flood list length 0

R2#
R2#show ip ospf database router 0.0.0.5

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

Router Link States (Area 0)

LS age: 84
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 0.0.0.5
Advertising Router: 0.0.0.5
LS Seq Number: 80000006
Checksum: 0xA3C6
Length: 60
Number of Links: 3

Link connected to: a Stub Network
(Link ID) Network/subnet number: 5.0.0.0
(Link Data) Network Mask: 255.0.0.0
Number of MTID metrics: 0
TOS 0 Metrics: 1

Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 0.0.0.2
(Link Data) Router Interface address: 192.1.101.5
Number of MTID metrics: 0
TOS 0 Metrics: 65535                                                                                                         *****CHANGED******

Link connected to: a Stub Network
(Link ID) Network/subnet number: 192.1.101.0
(Link Data) Network Mask: 255.255.255.0
Number of MTID metrics: 0
TOS 0 Metrics: 64

There are numerous options available for this including the following:

“external-lsa” Override external-lsa metric with max-metric value
“include-stub” Set maximum metric for stub links in router-LSAs
“on-startup” Set maximum metric temporarily after reboot
“summary-lsa” Override summary-lsa metric with max-metric value

If we use “include-stub” we get the following changes:

R2#show ip route 5.0.0.0
Routing entry for 5.0.0.0/8
Known via “ospf 1”, distance 110, metric 65599, type intra area
Last update from 192.1.101.5 on Serial2/0, 00:00:41 ago
Routing Descriptor Blocks:
* 192.1.101.5, from 0.0.0.5, 00:00:41 ago, via Serial2/0
Route metric is 65599, traffic share count is 1                                                                                *****CHANGED******
R2#

R5#show ip ospf
Routing Process “ospf 1” with ID 0.0.0.5
Start time: 00:00:12.585, Time elapsed: 00:15:23.213
****Output omitted*****
Event-log enabled, Maximum number of events: 1000, Mode: cyclic
Originating router-LSAs with maximum metric                                                                                *****CHANGED******
Condition: always, State: active                                                                                                            *****CHANGED******
Advertise stub links with maximum metric in router-LSAs                                                            *****CHANGED******
Initial SPF schedule delay 5000 msecs
****Output omitted*****
Number of DoNotAge LSA 0
Flood list length 0

R5#

R2#
R2#show ip ospf database router 0.0.0.5

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

Router Link States (Area 0)

LS age: 5
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 0.0.0.5
Advertising Router: 0.0.0.5
LS Seq Number: 80000007
Checksum: 0x5A5
Length: 60
Number of Links: 3

Link connected to: a Stub Network
(Link ID) Network/subnet number: 5.0.0.0
(Link Data) Network Mask: 255.0.0.0
Number of MTID metrics: 0
TOS 0 Metrics: 65535                                                                                               *****CHANGED******

Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 0.0.0.2
(Link Data) Router Interface address: 192.1.101.5
Number of MTID metrics: 0
TOS 0 Metrics: 65535                                                                                                 *****CHANGED******

Link connected to: a Stub Network
(Link ID) Network/subnet number: 192.1.101.0
(Link Data) Network Mask: 255.255.255.0
Number of MTID metrics: 0
TOS 0 Metrics: 65535                                                                                                    *****CHANGED******

 

Leave a Reply

Your email address will not be published.