.. _example_protocols_vrf_rip_ripinterfaceroute-mapvrf: ########################### Rip Interface Route-Map Vrf ########################### Scenario to verify RIP **interface route-map** configuration within a VRF. The ``set protocols vrf rip interface route-map in `` command applies a route-map to filter incoming RIP route updates on a specific interface inside a VRF. The ``set protocols vrf rip interface route-map out `` command applies a route-map to filter outgoing RIP route updates on a specific interface inside a VRF. 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 inside a VRF. *********************************** Test RIP VRF Interface Route-Map In *********************************** Description =========== Test RIP **interface route-map in** filtering within a VRF (``RIP-VRF``). **DUT1** redistributes two connected dummy routes (``10.10.10.0/24`` and ``10.20.20.0/24``) into RIP inside ``RIP-VRF``. **DUT0** applies a route-map on its incoming VRF interface that only permits ``10.10.10.0/24``. **DUT0** learns only the permitted route; ``10.20.20.0/24`` is filtered out. Scenario ======== .. include:: ripinterfaceroute-mapvrf/testripvrfinterfaceroute-mapin .. raw:: html
************************************ Test RIP VRF Interface Route-Map Out ************************************ Description =========== Test RIP **interface route-map out** filtering within a VRF (``RIP-VRF``). **DUT0** redistributes two connected dummy routes (``10.10.10.0/24`` and ``10.20.20.0/24``) into RIP inside ``RIP-VRF`` and applies a route-map on its outgoing VRF interface that only permits ``10.10.10.0/24``. **DUT1** learns only the permitted route; ``10.20.20.0/24`` is not advertised. Scenario ======== .. include:: ripinterfaceroute-mapvrf/testripvrfinterfaceroute-mapout .. raw:: html
********************************************** Test RIP VRF Interface Route-Map In Set Metric ********************************************** Description =========== Test RIP **interface route-map in** with ``set metric 5`` within a VRF (``RIP-VRF``). **DUT1** redistributes a connected dummy route (``10.10.10.0/24``) into RIP inside ``RIP-VRF``. **DUT0** applies a route-map on its incoming VRF interface that sets the metric to 5. **DUT0** learns the route with metric **6** (5 + 1 hop). Scenario ======== .. include:: ripinterfaceroute-mapvrf/testripvrfinterfaceroute-mapinsetmetric .. raw:: html
*********************************************** Test RIP VRF Interface Route-Map Out Set Metric *********************************************** Description =========== Test RIP **interface route-map out** with ``set metric 5`` within a VRF (``RIP-VRF``). **DUT0** redistributes a connected dummy route (``10.10.10.0/24``) into RIP inside ``RIP-VRF`` and applies a route-map on its outgoing VRF interface that sets the metric to 5. **DUT1** learns the route with metric **6** (5 + 1 hop). Scenario ======== .. include:: ripinterfaceroute-mapvrf/testripvrfinterfaceroute-mapoutsetmetric .. raw:: html
****************************************** Test RIP VRF Interface Route-Map Overwrite ****************************************** Description =========== Test that each RIP VRF 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 inside ``RIP-VRF``. **DUT0** configures two route-maps in the **in** direction: ``VRF-FILTER-A`` (permits only ``10.10.10.0/24``) and ``VRF-FILTER-B`` (permits only ``10.20.20.0/24``). Only the last configured route-map (``VRF-FILTER-B``) takes effect. **DUT0** learns ``10.20.20.0/24`` and does not learn ``10.10.10.0/24``. Scenario ======== .. include:: ripinterfaceroute-mapvrf/testripvrfinterfaceroute-mapoverwrite .. raw:: html
******************************************************** Test RIP VRF 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 inside a VRF. **DUT0** configures a route-map ``INVALID-METRIC`` with ``set metric 20`` and applies it to a RIP interface in ``RIP-VRF``. The commit must fail with a validation error indicating that metric 20 is outside the RIP range. Scenario ======== .. include:: ripinterfaceroute-mapvrf/testripvrfinterfaceroute-mapinvalidmetricrejected .. raw:: html