Route-Map

Scenario to verify RIP interface route-map configuration for filtering route updates on a per-interface basis.

The set protocols rip interface <ifc> route-map in <name> command applies a route-map to filter incoming RIP route updates on a specific interface. The set protocols rip interface <ifc> route-map out <name> 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

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.1.1.100/24
set protocols ip prefix-list ALLOW-DUM0 rule 1 action permit
set protocols ip prefix-list ALLOW-DUM0 rule 1 prefix 10.10.10.0/24
set protocols rip interface eth0 route-map in FILTER-IN
set protocols rip timers update 5
set protocols route-map FILTER-IN rule 1 action permit
set protocols route-map FILTER-IN rule 1 match ip address prefix-list ALLOW-DUM0
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1 :

set interfaces dummy dum0 address 10.10.10.1/24
set interfaces dummy dum1 address 10.20.20.1/24
set interfaces ethernet eth0 address 10.1.1.50/24
set protocols rip interface eth0
set protocols rip redistribute connected
set protocols rip timers update 5
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Attention

Verify that DUT0 learns route 10.10.10.0/24 (permitted by route-map in)

Step 3: Run the command protocols rip show on DUT0 and check whether the output matches the following regular expressions:

R\(n\)\s+10.10.10.0/24
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric, t - Table-Direct
Sub-codes:
      (n) - normal, (s) - static, (d) - default, (r) - redistribute,
      (i) - interface

     Network            Next Hop         Metric From            Tag Time
C(i) 10.1.1.0/24        0.0.0.0               1 self              0
R(n) 10.10.10.0/24      10.1.1.50             2 10.1.1.50         0 02:59

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

Step 1: Set the following configuration in DUT0 :

set interfaces dummy dum0 address 10.10.10.1/24
set interfaces dummy dum1 address 10.20.20.1/24
set interfaces ethernet eth0 address 10.1.1.100/24
set protocols ip prefix-list ALLOW-DUM0 rule 1 action permit
set protocols ip prefix-list ALLOW-DUM0 rule 1 prefix 10.10.10.0/24
set protocols rip interface eth0 route-map out FILTER-OUT
set protocols rip redistribute connected
set protocols rip timers update 5
set protocols route-map FILTER-OUT rule 1 action permit
set protocols route-map FILTER-OUT rule 1 match ip address prefix-list ALLOW-DUM0
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 address 10.1.1.50/24
set protocols rip interface eth0
set protocols rip timers update 5
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Attention

Verify that DUT1 learns route 10.10.10.0/24 (permitted by route-map out)

Step 3: Run the command protocols rip show on DUT1 and check whether the output matches the following regular expressions:

R\(n\)\s+10.10.10.0/24
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric, t - Table-Direct
Sub-codes:
      (n) - normal, (s) - static, (d) - default, (r) - redistribute,
      (i) - interface

     Network            Next Hop         Metric From            Tag Time
C(i) 10.1.1.0/24        0.0.0.0               1 self              0
R(n) 10.10.10.0/24      10.1.1.100            2 10.1.1.100        0 02:58

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

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.1.1.100/24
set protocols rip interface eth0 route-map in SET-METRIC-IN
set protocols rip timers update 5
set protocols route-map SET-METRIC-IN rule 1 action permit
set protocols route-map SET-METRIC-IN rule 1 set metric 5
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1 :

set interfaces dummy dum0 address 10.10.10.1/24
set interfaces ethernet eth0 address 10.1.1.50/24
set protocols rip interface eth0
set protocols rip redistribute connected
set protocols rip timers update 5
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Attention

Verify that DUT0 learns route 10.10.10.0/24 with metric 6 (5 set by route-map in + 1 hop)

Step 3: Run the command protocols rip show on DUT0 and check whether the output matches the following regular expressions:

R\(n\)\s+10.10.10.0/24\s+10.1.1.50\s+6\s+10.1.1.50
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric, t - Table-Direct
Sub-codes:
      (n) - normal, (s) - static, (d) - default, (r) - redistribute,
      (i) - interface

     Network            Next Hop         Metric From            Tag Time
C(i) 10.1.1.0/24        0.0.0.0               1 self              0
R(n) 10.10.10.0/24      10.1.1.50             6 10.1.1.50         0 02:58

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

Step 1: Set the following configuration in DUT0 :

set interfaces dummy dum0 address 10.10.10.1/24
set interfaces ethernet eth0 address 10.1.1.100/24
set protocols rip interface eth0 route-map out SET-METRIC-OUT
set protocols rip redistribute connected
set protocols rip timers update 5
set protocols route-map SET-METRIC-OUT rule 1 action permit
set protocols route-map SET-METRIC-OUT rule 1 set metric 5
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 address 10.1.1.50/24
set protocols rip interface eth0
set protocols rip timers update 5
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Attention

Verify that DUT1 learns route 10.10.10.0/24 with metric 6 (5 set by route-map out + 1 hop)

Step 3: Run the command protocols rip show on DUT1 and check whether the output matches the following regular expressions:

R\(n\)\s+10.10.10.0/24\s+10.1.1.100\s+6\s+10.1.1.100
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric, t - Table-Direct
Sub-codes:
      (n) - normal, (s) - static, (d) - default, (r) - redistribute,
      (i) - interface

     Network            Next Hop         Metric From            Tag Time
C(i) 10.1.1.0/24        0.0.0.0               1 self              0
R(n) 10.10.10.0/24      10.1.1.100            6 10.1.1.100        0 02:58

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

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.1.1.100/24
set protocols ip prefix-list ALLOW-DUM0 rule 1 action permit
set protocols ip prefix-list ALLOW-DUM0 rule 1 prefix 10.10.10.0/24
set protocols ip prefix-list ALLOW-DUM1 rule 1 action permit
set protocols ip prefix-list ALLOW-DUM1 rule 1 prefix 10.20.20.0/24
set protocols rip interface eth0 route-map in FILTER-B
set protocols rip timers update 5
set protocols route-map FILTER-A rule 1 action permit
set protocols route-map FILTER-A rule 1 match ip address prefix-list ALLOW-DUM0
set protocols route-map FILTER-B rule 1 action permit
set protocols route-map FILTER-B rule 1 match ip address prefix-list ALLOW-DUM1
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1 :

set interfaces dummy dum0 address 10.10.10.1/24
set interfaces dummy dum1 address 10.20.20.1/24
set interfaces ethernet eth0 address 10.1.1.50/24
set protocols rip interface eth0
set protocols rip redistribute connected
set protocols rip timers update 5
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Attention

Verify that DUT0 running configuration shows only the last route-map (FILTER-B)

Step 3: Run the command show running on DUT0 and check whether the output contains the following tokens:

rip interface eth0 route-map in FILTER-B
Show output
# Teldat OSDx VM version v4.2.10.0
# Tue 19 May 2026 13:13:02 +00:00
# Warning: Configuration has not been saved
set interfaces ethernet eth0 address 10.1.1.100/24
set protocols ip prefix-list ALLOW-DUM0 rule 1 action permit
set protocols ip prefix-list ALLOW-DUM0 rule 1 prefix 10.10.10.0/24
set protocols ip prefix-list ALLOW-DUM1 rule 1 action permit
set protocols ip prefix-list ALLOW-DUM1 rule 1 prefix 10.20.20.0/24
set protocols rip interface eth0 route-map in FILTER-B
set protocols rip timers update 5
set protocols route-map FILTER-A rule 1 action permit
set protocols route-map FILTER-A rule 1 match ip address prefix-list ALLOW-DUM0
set protocols route-map FILTER-B rule 1 action permit
set protocols route-map FILTER-B rule 1 match ip address prefix-list ALLOW-DUM1
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Attention

Verify that DUT0 learns route 10.20.20.0/24 (permitted by last route-map FILTER-B)

Step 4: Run the command protocols rip show on DUT0 and check whether the output matches the following regular expressions:

R\(n\)\s+10.20.20.0/24
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric, t - Table-Direct
Sub-codes:
      (n) - normal, (s) - static, (d) - default, (r) - redistribute,
      (i) - interface

     Network            Next Hop         Metric From            Tag Time
C(i) 10.1.1.0/24        0.0.0.0               1 self              0
R(n) 10.20.20.0/24      10.1.1.50             2 10.1.1.50         0 02:59

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

Step 1: Set the following configuration in DUT0 and expect this output:

set interfaces ethernet eth0 address 10.1.1.100/24
set protocols rip interface eth0 route-map in INVALID-METRIC
set protocols route-map INVALID-METRIC rule 1 action permit
set protocols route-map INVALID-METRIC rule 1 set metric 20
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Show output
[ protocols rip interface eth0 route-map in INVALID-METRIC ]
Route-map INVALID-METRIC rule 1 has set metric 20 outside RIP range (1-16)
Commit validation failed
CLI Error: Command error