.. _example_protocols_rip_interface_route-map_route-map: ######### Route-Map ######### Scenario to verify RIP **interface route-map** configuration for filtering route updates on a per-interface basis. The ``set protocols rip interface route-map in `` command applies a route-map to filter incoming RIP route updates on a specific interface. The ``set protocols rip interface route-map out `` command applies a route-map to filter outgoing RIP route updates on a specific interface. Each interface accepts at most one route-map in and one route-map out. Configuring a second route-map in the same direction will overwrite the previous one. Additionally, route-map rules that set metric values outside the valid RIP range (1-16) are rejected at commit time when applied to a RIP interface. ******************************* Test RIP Interface Route-Map In ******************************* Description =========== Test RIP **interface route-map in** filtering on incoming route updates. **DUT1** redistributes two connected dummy routes (``10.10.10.0/24`` and ``10.20.20.0/24``) into RIP. **DUT0** applies a route-map on its incoming interface that only permits ``10.10.10.0/24`` via a prefix-list. **DUT0** learns only the permitted route; ``10.20.20.0/24`` is filtered out. Scenario ======== .. include:: route-map/testripinterfaceroute-mapin .. raw:: html
******************************** Test RIP Interface Route-Map Out ******************************** Description =========== Test RIP **interface route-map out** filtering on outgoing route updates. **DUT0** redistributes two connected dummy routes (``10.10.10.0/24`` and ``10.20.20.0/24``) into RIP and applies a route-map on its outgoing interface that only permits ``10.10.10.0/24`` via a prefix-list. **DUT1** learns only the permitted route; ``10.20.20.0/24`` is not advertised. Scenario ======== .. include:: route-map/testripinterfaceroute-mapout .. raw:: html
****************************************** Test RIP Interface Route-Map In Set Metric ****************************************** Description =========== Test RIP **interface route-map in** with ``set metric 5``. **DUT1** redistributes a connected dummy route (``10.10.10.0/24``) into RIP. **DUT0** applies a route-map on its incoming interface that sets the metric to 5. **DUT0** learns the route with metric **6** (5 + 1 hop). Scenario ======== .. include:: route-map/testripinterfaceroute-mapinsetmetric .. raw:: html
******************************************* Test RIP Interface Route-Map Out Set Metric ******************************************* Description =========== Test RIP **interface route-map out** with ``set metric 5``. **DUT0** redistributes a connected dummy route (``10.10.10.0/24``) into RIP and applies a route-map on its outgoing interface that sets the metric to 5. **DUT1** learns the route with metric **6** (5 + 1 hop). Scenario ======== .. include:: route-map/testripinterfaceroute-mapoutsetmetric .. raw:: html
************************************** Test RIP Interface Route-Map Overwrite ************************************** Description =========== Test that each RIP interface accepts at most **one route-map per direction**. Configuring a second route-map in the same direction overwrites the previous one. **DUT1** redistributes two connected dummy routes (``10.10.10.0/24`` and ``10.20.20.0/24``) into RIP. **DUT0** configures two route-maps in the **in** direction: ``FILTER-A`` (permits only ``10.10.10.0/24``) and ``FILTER-B`` (permits only ``10.20.20.0/24``). Only the last configured route-map (``FILTER-B``) takes effect. **DUT0** learns ``10.20.20.0/24`` and does not learn ``10.10.10.0/24``. Scenario ======== .. include:: route-map/testripinterfaceroute-mapoverwrite .. raw:: html
**************************************************** Test RIP Interface Route-Map Invalid Metric Rejected **************************************************** Description =========== Test that a route-map with a **metric value outside the valid RIP range (1-16)** is rejected at commit time when applied to a RIP interface. **DUT0** configures a route-map ``INVALID-METRIC`` with ``set metric 20`` and applies it to a RIP interface. The commit must fail with a validation error indicating that metric 20 is outside the RIP range. Scenario ======== .. include:: route-map/testripinterfaceroute-mapinvalidmetricrejected .. raw:: html