Configuration Guide Vol. 3


30.2.5 OSPFv3 advertised route filtering [SL-L3A]

<Structure of this section>

(1) Advertisement of specific protocol routes

Configure OSPFv3 to advertise static routes and RIPng routes to OSPFv3 domain 1,

Points to note

The example below shows how to use the redistribute command to advertise routes that would not be advertised by default. In the redistribute command, specify the protocols that you want advertised.

Command examples

  1. (config)# ipv6 router ospf 1

    (config-rtr)# redistribute static

    Configures OSPFv3 to advertise static routes.

  2. (config-rtr)# redistribute rip

    Configures OSPFv3 to advertise RIPng routes.

(2) Advertising Specific Destination Network Routes for Specific Protocols

You can configure the switch to advertise static routes, and RIPng routes whose destination network is 3ffe:501:811:ff01::/64, into OSPFv3 domain 1.

Points to note

To filter advertised routes based on their learning source protocol, specify route-map in the redistribute command. Configure an ipv6 prefix-list filter to supply the destination network conditions for the route-map, and then call the list from the match ipv6 address command.

First, configure an ipv6 prefix-list filter to permit only routes in the 3ffe:501:811:ff01::/64 range. Next, configure route-map to use this filter as filter conditions. Finally, use the redistribute command to configure the switch to advertise static routes and RIPng routes. In the redistribute command for the RIPng routes, specify the route-map that you configured.

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)# route-map ONLY0811ff01 permit 10

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

    (config-route-map)# exit

    Configures route-map to permit routes whose destination network is in the 3ffe:501:811:ff01::/64 range.

  3. (config)# ipv6 router ospf 1

    (config-rtr)# redistribute static

    Configures OSPFv3 to advertise static routes into OSPFv3 domain 1.

  4. (config-rtr)# redistribute rip route-map ONLY0811ff01

    Configures OSPFv3 to apply the ONLY0811ff01 filter to RIPng routes and only advertise those routes permitted by the filter.

(3) Suppressing advertisement of specific destination network routes

Configure OSPFv3 to advertise static routes and RIPng routes to OSPFv3 domain 1, except for routes destined for the 3ffe:501:811:ff01::/64 address range.

Points to note

The example below shows how to use the distribute-list out command to filter advertised routes regardless of their learning source protocol.

First, configure an ipv6 prefix-list filter to deny routes to the 3ffe:501:811:ff01::/64 address range. By referencing this filter from the distribute-list out command, you can configure the switch to perform advertised route filtering by destination network.

Finally, use the redistribute command to configure the switch to advertise static routes and RIPng routes.

Command examples

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

    Configures prefix-list to deny routes in the 3ffe:501:811:ff01::/64 range.

  2. (config)# ipv6 prefix-list OMIT0811ff01 seq 100 permit ::/0 ge 0 le 128

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

  3. (config)# ipv6 router ospf 1

    (config-rtr)# distribute-list prefix-list OMIT0811ff01 out

    Configures OSPFv3 to apply the OMIT0811ff01 filter to advertised routes.

  4. (config-rtr)# redistribute static

    (config-rtr)# redistribute rip

    Configures OSPFv3 to advertise static routes and RIPng routes.

(4) Route advertisement between OSPFv3 domains

The procedure below configures the reciprocal exchange of routes between OSPFv3 domain 1 and OSPFv3 domain 2.

Routes associated with OSPFv3 domain 1 are tagged with a value of 1001 and advertised to OSPFv3 domain 2. In turn, the domain 2 does not advertise routes that have a tag value of 1001 to the domain 1. This process prevents routing loops by stopping OSPFv3 domain 2 from advertising OSPFv3 domain 1 routes back to OSPFv3 domain 1.

Similarly, routes associated with OSPFv3 domain 2 are tagged with a value of 1002 and advertised to OSPFv3 domain 1. If OSPFv3 domain 1 routes are tagged with a value of 1002, they are not advertised to OSPFv3 domain 2.

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 you wish to change a route attribute other than the metric. You can reference this route-map from redistribute and distribute-list out among other commands.

Configure advertisement to OSPFv3 domain 1 by specifying route-map to deny routes with a tag value of 1001 and permits the advertisement of all other routes after assigning them a tag value of 1002. Then, specify this filter in the redistribute command that configures the advertisement of the domain 1 routes to the domain 2.

Similarly, configure advertisement to OSPFv3 domain 2 by specifying route-map to deny routes with a tag value of 1002 but to permit the advertisement of all other routes after assigning them a tag value of 1001. Then, specify this filter in the redistribute command that configures the advertisement of the domain 2 routes to the domain 1.

Command examples

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

    (config-route-map)# match tag 1001

    (config-route-map)# exit

    Configures the route-map filter OSPF2to1 to deny routes with a tag value of 1001.

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

    (config-route-map)# set tag 1002

    (config-route-map)# exit

    Configures route-map to assign a tag value of 1002 to routes that do not satisfy the above conditions.

  3. (config)# ipv6 router ospf 1

    (config-rtr)# redistribute ospf 2 route-map OSPF2to1

    (config-rtr)# exit

    OSPFv3 domain 2 routes are advertised to OSPFv3 domain 1. Specify OSPF2to1 as a filter.

  4. (config)# route-map OSPF1to2 deny 10

    (config-route-map)# match tag 1002

    (config-route-map)# exit

    (config)# route-map OSPF1to2 permit 20

    (config-route-map)# set tag 1001

    (config-route-map)# exit

    Configures the route-map filter OSPF1to2 to deny routes with a tag value of 1002, and assign a tag value of 1001 to all other routes.

  5. (config)# ipv6 router ospf 2

    (config-rtr)# redistribute ospf 1 route-map OSPF1to2

    (config-rtr)# exit

    Configures OSPFv3 to advertise routes in OSPFv3 domain 1 to OSPFv3 domain 2. Specify OSPF1to2 as a filter.