OSPFv3 Max-Metric Router LSA

Feature History for OSPFv3 Max-Metric Router LSA

This table provides release and platform support information for the features explained in this module.

These features are available in all the releases subsequent to the one they were introduced in, unless noted otherwise.

Release

Feature Name and Description

Supported Platform

Cisco IOS XE 17.18.1

OSPFv3 Max-Metric Router LSA: OSPFv3 Max-Metric Router LSA is a network optimization feature that enables OSPFv3 to advertise its locally generated LSAs with a maximum metric.

Cisco C9610 Series Smart Switches

OSPFv3 Max-Metric Router LSA

OSPFv3 Max-Metric Router LSA is a network optimization feature that enables OSPFv3 to advertise its locally generated router link-state advertisements (LSAs) with a maximum metric. The enables the OSPFv3 process on the device to converge with the network and discourages other devices from sending traffic through it if more optimal paths exist.

How OSPFv3 Max-Metric Router LSA works

By using the max-metric LSA control, an OSPFv3 device effectively places itself into a "stub router" role. A stub router's primary function is to forward packets only to its directly connected links.

In OSPFv3 networks, a device can achieve the stub router status by advertising a very large metric for its connected links. This makes the cost of routing traffic through this device significantly higher than through alternative paths. Specifically, the OSPFv3 stub router advertisement allows a device to advertise an "infinity metric" (0xFFFF) for its connected links in router LSAs. The device advertises the normal interface cost if the link is a stub network.

Configure OSPFv3 Max-Metric Router LSA

Perform this task on a device to configure OSPFv3 max-metric router LSA.

Procedure


Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

router ospfv3 process-id

Example:

Device(config)# router ospf 15

Enables OSPFv3 routing and enters router configuration mode.

process-id : The process ID is an internally used, identification parameter that is locally assigned. Each OSPF has a unique process ID.

Process ID can be a positive integer from 1 to 65535.

Step 4

address-family ipv6 unicast [vrf vrf-name]

Example:

Device(config-router)# address-family ipv6

Enters IPv6 address family configuration mode for OSPFv3.

Step 5

max-metric router-lsa [external-lsa [max-metric-value]] [include-stub] [inter-area-lsas max-metric-value]] [on-startup {seconds | wait-for-bgp}] [prefix-lsa] [stub-prefix-lsa [max-metric-value]] [summary-lsa [max-metric-value]]

Example:

Device(config-router-af)# max-metric router-lsa on-startup wait-for-bgp

Configures a device that is running the OSPFv3 protocol to advertise a maximum metric so that other devices do not prefer the device as an intermediate hop in their SPF calculations.

  • external-lsamax-metric-value : Specifies that the ASBR (Autonomous System Boundary Router) should advertise external routes (Type 5 LSAs) with a maximized metric.

    This configuration is useful if you want routes learned from other routing protocols (and redistributed into OSPF to appear less favorable.

  • include-stub : Specifies that even stub links (links to networks directly connected to the device that are considered stub networks) are advertised with the max-metric. This command is used along with max-metric router-lsa command.

    By default, the max-metric router-lsa command might only apply to transit links. The include-stub ensures all connected links are affected.

  • inter-area-lsas max-metric-value : Specifies that the the ABR to advertise inter-area routes (Type 3 LSAs) with a maximized metric.

    This configuration is useful to control traffic flow between OSPF areas, making the ABR less desirable for inter-area transit.

  • on-startup {seconds | wait-for-bgp : Controls the behavior of the max-metric feature when the router starts up.

    • seconds : The device will advertise max-metric LSAs for a specified number of seconds after startup. After this timer expires, it will revert to advertising normal metrics. This configuration is useful to allow the device to fully converge and establish all adjacencies and routes before it starts attracting transit traffic.

    • wait-for-bgp : The device will advertise max-metric LSAs until BGP (Border Gateway Protocol) has fully converged and all BGP prefixes have been received. This configuration is particularly useful in environments where OSPF and BGP are interdependent, ensuring that the device doesn't attract traffic until it has a complete view of external routes.

  • prefix-lsa : Specifies the device to advertise its connected prefixes with a maximized metric.

    In OSPFv3, prefix information is carried in separate LSAs (Type 8 and Type 9) from the router LSA (Type 1). This option ensures that the prefix advertisements also reflect the max-metric state.

  • stub-prefix-lsa max-metric-value : Specifies the device to advertise its stub prefixes with a maximized metric.

  • summary-lsa max-metric-value : Specifies the ABR to advertise summarized routes to other areas with a maximized metric.

Step 6

end

Example:

Device(config-router-af)# end

Exits address family configuration mode and returns to privileged EXEC mode.

Step 7

show ospfv3 [process-id] max-metric

Example:

Device(config)# show ospfv3 1 max-metric

Displays OSPFv3 maximum metric origination information.

process-id : The process ID is an internally used, identification parameter that is locally assigned. Each OSPF has a unique process ID.

Process ID can be a positive integer from 1 to 65535.


Configuration example to verify the OSPFv3 Max-Metric Router LSA

The following example is a sample output of the show ipv6 ospf max-metric command.

Device# show ipv6 ospf max-metric 

OSPFv3 Router with ID (192.1.1.1) (Process ID 1)

Start time: 00:00:05.886, Time elapsed: 3d02h
Originating router-LSAs with maximum metric
Condition: always, State: active