Configuration Guide Vol. 3


30.2.2 RIPng learned route filtering

<Structure of this section>

(1) Learning routes for a specific destination network

Configure RIPng to learn RIPng routes destined for only 3ffe:501:811:ff01::/64, but disregard RIP routes destined for all other networks.

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. When this filter is referenced from the distribute-list in command, the switch filters learned RIPng routes according to their destination network.

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 rip

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

    Applies ONLY0811ff01 to routes learned by the RIPng protocol.

(2) For a specific interface, learn routes for a specific destination network.

Configure RIPng to learn only those RIPng routes from VLAN 10 that have 3ffe:501:811:ff01::/64 as their destination. Routes learned from interfaces other than VLAN 10 will not be filtered.

Points to note

To apply RIPng learned route filtering on a per-interface basis, specify the <Interface> in the parameter of the distribute-list in command. First, configure an ipv6 prefix-list filter to permit routes to the 3ffe:501:811:ff01::/64 address range. When this filter is referenced from the distribute-list in VLAN 10 command, the switch filters RIPng routes learned from VLAN 10 according to their destination network.

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 rip

    (config-rtr-rip)# distribute-list prefix-list ONLY0811ff01 in vlan 10

    Applies ONLY0811ff01 to routes learned from VLAN 10.

(3) Learned route filtering by both tag value and destination network

Configure RIPng not to learn routes that have a destination address in the 3ffe:501::/32 range and a tag value other than 15. All other RIPng routes will be 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 a prefix-list filter to permit prefixes within the 3ffe:501::/32 range. Next, configure route-map to deny any routes that are permitted by this prefix-list filter and also have a tag value other than 15.

Finally, by referencing this route-map from the distribute-list in command, you can configure RIPng learned route filtering based on a combination of tag value and destination network.

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 TAG permit 10

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

    (config-route-map)# match tag 15

    (config-route-map)# exit

    Configures route-map to permit routes in the 3ffe:501::/32 range that have a tag value of 15.

  3. (config)# route-map TAG deny 20

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

    (config-route-map)# exit

    Configures route-map to deny routes in the 3ffe:501::/32 range if they do not match the conditions associated with sequence number 10.

  4. (config)# route-map TAG permit 30

    (config-route-map)# exit

    Configures route-map to permit any route that does not match the conditions associated with sequence numbers 10 and 20.

  5. (config)# ipv6 router rip

    (config-rtr-rip)# distribute-list route-map TAG in

    Applies the above filter to RIPng learned route filtering. This means that RIPng does not learn routes that are in the 3ffe:501::/32 range and have a tag value other than 15.

(4) Changing Distance Values by Destination Network

Assign a distance value 50 to RIPng-learned routes whose destination network is in the 3ffe:501::/32 range to give such routes priority over OSPFv3 routes.

Points to note

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 50 to routes permitted by the prefix-list filter.

Finally, by referencing route-map from the distribute-list in command, configure RIPng learned route filtering to change a route's distance based on its destination network.

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 Distance50 permit 10

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

    (config-route-map)# set distance 50

    (config-route-map)# exit

    Sets the route included in 3ffe:501::/32 to permit by changing the distance to 50.

  3. (config)# route-map Distance50 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 rip

    (config-rtr-rip)# distribute-list route-map Distance50 in

    Applies the above filter to RIPng learned route filtering. This means that a distance value of 50 is assigned to RIPng-learned routes in the 3ffe:501::/32 range.