Configuration Guide Vol. 3


30.2.4 OSPFv3 learned route filtering [SL-L3A]

<Structure of this section>

(1) Learning routes for a specific destination network

Configure OSPFv3 to only learn routes to addresses in the 3ffe:501:811:ff01::/64 range.

Points to note

To apply learned route filtering, configure the distribute-list in command. To filter routes by their destination networks, use an ipv6 prefix-list filter.

First, configure an ipv6 prefix-list filter to permit routes to the 3ffe:501:811:ff01::/64 address range. By referencing this filter from the distribute-list in command, you can configure OSPFv3 to filter learned routes based on the destination networks.

Command examples

  1. (config)# ipv6 prefix-list ONLY0811ff01 seq 10 permit 3ffe:501:811:ff01::/64

    Configures prefix-list to permit only routes in the 3ffe:501:811:ff01::/64 range. Because ONLY0811ff01 has no other conditions, the filter denies routes with any other destination address or mask length.

  2. (config)# ipv6 router ospf 1

    (config-rtr)# distribute-list prefix-list ONLY0811ff01 in

    Configures OSPFv3 to apply the ONLY0811ff01 filter to the OSPFv3 external AS routes it learns.

(2) Learned route filtering by tag value

Configure the switch not to learn routes with a tag value of 15. Other routes are learned.

Points to note

The example below shows how to use route-map to filter a route by an attribute other than its destination network, or to modify some of its attributes. You can reference this route-map from the distribute-list in command.

First, configure route-map to deny routes with a tag value of 15. Next, configure OSPFv3 learned route filtering by tag value by referencing this route-map from the distribute-list in command.

Command examples

  1. (config)# route-map TAG15DENY deny 10

    (config-route-map)# match tag 15

    (config-route-map)# exit

    Configures route-map to deny routes with a tag value of 15.

  2. (config)# route-map TAG15DENY permit 20

    (config-route-map)# exit

    Configures route-map to permit routes that do not match the conditions associated with sequence number 10.

  3. (config)# ipv6 router ospf 1

    (config-rtr)# distribute-list route-map TAG15DENY in

    Applies the filter to OSPFv3 learned route filtering. This configures OSPFv3 to not learn external AS routes that have a tag value of 15.

(3) Changing Distance Values by Destination Network

Configure OSPFv3 to assign a distance value of 150 to external AS routes whose destination network is in the 3ffe:501::/32 range, thereby giving priority to RIPng routes.

Points to note

The example below shows how to use route-map to filter a route by an attribute other than its destination network, or to modify some of its attributes. You can reference this route-map from the distribute-list in command.

First, configure a prefix-list filter to permit routes in the 3ffe:501::/32 range. Next, configure route-map to assign a distance value of 150 to routes permitted by this prefix-list filter.

Finally, by referencing this route-map from the distribute-list in command, configure the switch to change distances based on destination networks when performing OSPFv3 learned route filtering.

Command examples

  1. (config)# ipv6 prefix-list LONGER3ffe0501 seq 10 permit 3ffe:501::/32 ge 32 le 128

    Configures prefix-list to permit only routes in the 3ffe:501::/32 range.

  2. (config)# route-map Distance150 permit 10

    (config-route-map)# match ipv6 address prefix-list LONGER3ffe0501

    (config-route-map)# set distance 150

    (config-route-map)# exit

    Configures route-map to assign a distance value of 150 to routes in the 3ffe:501::/32 range, and permits those routes.

  3. (config)# route-map Distance150 permit 20

    (config-route-map)# exit

    Configures the route-map to permit routes that do not match the conditions associated with sequence number 10, without changing any of their attributes.

  4. (config)# ipv6 router ospf 1

    (config-rtr)# distribute-list route-map Distance150 in

    Applies the above filter to OSPFv3 learned route filtering. This configures OSPFv3 to assign a distance of 150 to external AS routes in the 3ffe:501::/32 range.