Configuration Guide Vol. 3


14.1.3 RIP

<Structure of this section>

(1) RIP learned route filtering

In RIP, you can filter every route that the protocol has learned. Routes denied by the filter are not added to the routing table.

(a) How and in which order filters are applied

Learned routes are filtered according to conditions specified by the distribute-list in command. You can solely filter routes that the protocol learns from a specific interface or router by specifying the interface or router in the command parameters. The table below describes the configuration commands used to filter learned routes in RIP.

When the switch learns a route, it applies the specified filters in the order shown in the table below. If there are no applicable filters or every filter gives a permit result, the route is entered into the routing table as a valid route. The learned route does not enter the routing table if it is denied by even one filter.

Table 14-6 RIP learned route filtering configuration command

Command name

Parameter

Filtered routes

distribute-list in (RIP)

gateway <IPv4>

Filters RIP routes learned from the specified neighboring router.

<Interface>

Filters RIP routes learned from the specified IPv4 interface.

No

Filters all learned RIP routes.

(b) Route attributes changeable by learned route filtering

The table below describes the attributes that can be changed by RIP learned route filtering.

The modified metric is used to define route priority in RIP. The modified distance value is used to define the relative priority of routing protocols.

Table 14-7 Routes that can be changed by RIP learned route filtering

Attribute

Default

Distance

The value specified by the distance command (RIP).

If no value is specified, 120 is used.

Metric

The attribute of the received route

Tag value

The attribute of the received route

Notes
  • We recommend that you do not use methods other than addition to modify the metric. Replacing or subtracting from the metric might cause routing loops and prevent packets from routing correctly.

  • You can configure a route filter to change the metric of a route to 16 or greater. However, a RIP route with a metric of 16 or greater will be deemed invalid.

  • Changes to metrics made using the metric-offset configuration command take effect after learned route filtering has taken place. You can use the metric-offset command to further modify a metric that was changed by a route filter. The route will be deemed invalid if its metric is 16 or greater after modification by the metric-offset command.

  • You can change tag values regardless of the version of RIP that learned the route. However, when advertising the modified route, only RIP version 2 advertises it with its tag information intact.

    The tag can have a maximum value of 4294967295. However, when RIP version 2 advertises the modified route, it uses the lowest 16 bits of the binary expression and discards the rest.

(2) RIP advertised route filtering

The RIP only advertises the prioritized routes in the routing table. However, it does not advertise routes that are subject to a split horizon, or routes that do not meet the conditions for route advertisement in RIP version 1.

If you do not configure advertised route filtering, the protocol will advertise RIP routes and direct routes to RIP interfaces.

Notes

When advertising OSPF or BGP4 routes, configure the switch to change the metric in the course of advertised route filtering, or assign an advertised metric. These routes have a default metric of 16 and would otherwise not be advertised.

(a) Route attributes changeable by advertised route filtering

The following table describes the attributes that can be changed by RIP advertised route filtering.

Table 14-8 Routes that can be changed by RIP advertised route filtering

Attribute

Learning source protocol

Default

Metric

Directly connected route

Summarized route

1

Static route

Uses the value specified by default-metric.

If no value is specified, 1 is used.

RIP Route

Inherits the metric of the routing information.

OSPF route

BGP4 route

Route imported from another VRF or the global network

Inherits the metric of the routing information if the inherit-metric command is configured. 16 is used if the routing information has no metric.

If inherit-metric is not configured, the value specified by default-metric is used.

If neither inherit-metric nor default-metric are configured, 16 is used as the metric.

Tag value

Common to all protocols

Inherits the tag value of the routing information.

Notes
  • When using RIP to advertise a RIP route, we recommend that you do not use methods other than addition to modify the metric. Replacing or subtracting from the metric might cause routing loops and prevent packets from routing correctly.

  • You can configure a route filter to change the metric to a value of 16 or greater. However, the protocol will not advertise routes with a metric of 16 or greater.

  • Metric changes made using the metric-offset configuration command take effect after advertised route filtering has taken place. You can use the metric-offset command to further modify a metric that was changed by a route filter. A route will not be advertised if its metric is 16 or greater after modification by the metric-offset command.

  • Only version 2 of RIP can advertises tag values. If you change a tag to a value greater than 65535, the protocol advertises the lowest 16 bits of the binary expression and discards the rest.

(b) How and in which order filters are applied

The application of advertised route filtering involves the following steps:

  1. First, select the routes to be advertised by RIP. Specify the learning source protocol of the routes you want to advertise. By specifying a route type in the redistribute command, you can limit advertised routes to those of a certain type. By specifying a route type in the redistribute command, you can limit advertised routes to those of a certain type. By specifying route-map, you can advertise only those routes that the associated filters permit. The redistribute command compares the route attributes in the routing table against the conditions in route-map.

    RIP routes and directly connected routes of a RIP interface are advertised regardless of whether they are specified in the redistribute command.

    You can also change the attributes of advertised routes by specifying the new values directly in the redistribute command, or by specifying route-map in the redistribute command that changes the route attributes.

  2. The advertised route takes on the default metric of the protocol. If the redistribute command changes the metric, the route uses the metric assigned by the command.

    For details about the default values for RIP metric values, see Route attributes changeable by 14-8 RIP advertised route filtering.

  3. Use the parameters of the distribute-list out command to filter the routes selected by the redistribute command. If you specify an interface or router in the command parameters, the filter applies only when advertising routes to the designated destination. If you specify a protocol, the filters apply only to routes learned by the specified protocol. The table below describes the configuration command and its parameters.

    When advertising routes to a RIP interface or a specific neighboring router, applicable filters are selected according to the destination and learning source protocol, and applied in the order shown in the table. If there are no applicable filters or every filter gives a permit result, the route is advertised to the specified destination. The route is not advertised to the destination if it is denied by even one filter.

    If you specify route-map in the distribute-list out command, routes are filtered according to the default advertising attributes and the attributes after modification by the redistribute command.

    You can also change an attribute of an advertised route by specifying route-map in the distribute-list out command that performs the desired change.

    Table 14-9 RIP advertised route filtering configuration command

    Command name

    Parameter

    Filtered routes

    distribute-list out (RIP)

    gateway <IPv4><Protocol>

    Filters routes advertised to a specific neighboring router using a specific protocol.

    gateway <IPv4>

    Filters routes advertised to a specific neighboring router.

    <Interface>

    Filters routes advertised from a specific IPv4 interface.

    <Protocol>

    Filters routes matching a specific protocol regardless of their advertising destination.

    No

    Filters all routes regardless of their advertising destination.