Configuring Route Map – RIP

iS5Com URM (Unified Route Map) is a portable implementation of the route map capability for IPv4 and IPv6 unicast routing software. The URM provides a single interface for the administrator to set up and manage route maps. It also provides a common unified method for routing protocols and static route management software to use route maps for different purposes. The independent nature of the implementation helps to avoid the duplication of the route maps in the different routing modules in a router.

Configuring Route Map

This section lists the CLI configuration steps to define a route map with a specified name and the related parameters such as permission and sequence number.

Execute the following commands in the switch ISS 1 to configure RIP summary-address.

Type the following:

  • Enter the Global Configuration Mode.
iS5comm# configure terminal
  • Configure the route map name, permission and sequence number.
iS5comm(config)# route-map aa permit 1
  • View the configured route map.
iS5comm# show route-map
  • Execute the no form of the command to delete the route map.
iS5comm(config)# no route-map aa 1

Configuring Route Match Criteria

This section lists the CLI configuration steps for defining the filtering criteria for the route map and its related parameters.

Execute the following commands in the switch ISS 1 to configure Route Match Criteria.

Type the following:

  • Enter the Global Configuration Mode.
iS5comm# configure terminal
  • Configure the route map name, permission and sequence number.
iS5comm(config)# route-map aa permit 1
  • Configure the route map match source IP address and the subnet mask.
iS5comm(config-rmap-aa)# match source ip 34.0.0.3 255.0.0.0
  • Configure the route map match source IPv6 address and the prefix length
iS5comm(config-rmap-aa)# match source ipv6 2120::3 64
  • Configure the route map match destination IP address and the subnet mask.
iS5comm(config-rmap-aa)# match destination ip 91.0.0.1 255.0.0.0
  • Configure the route map match destination IPv6 address and the prefix length.
iS5comm(config-rmap-aa)# match destination ipv6 2150::2 64
  • Configure the route map match route-type as remote. (Route-type can be configured either as local or remote.)
iS5comm(config-rmap-aa)# match route-type remote
  • Configure the route map match metric-type as inter-area. (Metric type can be inter-area / intra-area / type-1-external / type-2-external.)
iS5comm(config-rmap-aa)# match metric-type inter-area
  • Configure the route map match metric value.
iS5comm(config-rmap-aa)# match metric 44
  • Configure the route map match next-hop IP address.
iS5comm(config-rmap-aa)# match next-hop ip 91.0.0.1
  • Configure the route map match next-hop IPv6 address.
iS5comm(config-rmap-aa)# match next-hop ipv6 3000::3
  • Configure the route map match tag.
iS5comm(config-rmap-aa)# match tag 10
  • View the configured parameters
iS5comm# show running-config route-map
Building configuration...route-map aa permit 1
match destination ip 91.0.0.1  255.0.0.0
match destination ipv6 2150::2  64
match source ip 34.0.0.3  255.0.0.0
match source ipv6 2120::3  64
match next-hop ip 91.0.0.1
match next-hop ipv6 3000::3
match metric 44
match tag 10
match metric-type inter-area
match route-type remote 
end
  • Execute the no form of the commands to delete the corresponding configurations.

Configuring RIP Distance

This section lists the CLI configuration steps to set the administrative distance for the RIP router.

Execute the following commands in the switch ISS 1 to configure RIP distance.

Type the following:

  • Enter the Global Configuration Mode.
iS5comm# configure terminal
  • Enter the RIP Router Configuration mode.
iS5comm(config)# router rip
  • Configure the distance for the RIP routes.
iS5comm(config-router)# distance 100
  • View the configured distance.
iS5comm# show running-config rip
Building configuration...
router rip
distance  100
!
end
  • Execute the no form of the command to re-configure the distance to its default value.
iS5comm(config-router)# no distance
  • View the configured distance.
iS5comm# show running-config rip
Building configuration...
router rip
!
end

Configuring Redistribution with Route Map

This section lists the CLI configuration steps to configure the protocol from which the routes have to be redistributed into RIP by applying the Route Map.

Execute the following commands in the switch ISS 1 to configure RIP distance.

Type the following:

  • Enter the Global Configuration Mode.
iS5comm# configure terminal
  • Enter the RIP Router Configuration mode.
iS5comm(config)# router rip
  • Configure the network.
iS5comm(config-router)# network 12.0.0.1
  • Configure the redistribution of all routes with route-map aa.
iS5comm(config-router)# redistribute all route-map aa
  • View the configured parameters.
iS5comm# show running-config rip
Building configuration...
router rip
redistribute all route-map aa 
network 12.0.0.1
! 
interface vlan 1
!
end
  • Execute the no form of the command to disable the redistribution of all routes with route-map.
iS5comm(config-router)# no redistribute all route-map aa
  • View the configured distance.
iS5comm# show running-config rip
Building configuration...
router rip
network 12.0.0.1
! 
interface vlan 1
!
end
Building configuration...
router rip
!
end

Topology Configuration for RIP Testing

This section provides the sample configuration for testing route map with RIP.

Some prerequisite configuration must be done in the switches R1, R2, R3 and R4 before configuring RIP.

Figure 1. Topology for Testing Route Map with RIP


Table 1. IPv4 and IPv6 Addresses of Interfaces in the Routers
Router No Interface Port IPv4 Address / Mask Prefix Length / Mask
R1 Vlan 12 Tagged ports E1 12.0.0.1/8 2120::1/24
Vlan 13 Tagged ports E2 13.0.0.1/8 2130::1/24
Vlan 110 Tagged ports E3 70.0.0.1/8 2070::1/24
R2 Vlan 12 Tagged ports E1 12.0.0.2/8 2120::2/24
Vlan 24 Tagged ports E2 24.0.0.2/8 2240::2/24
R3 Vlan 13 Tagged ports E1 13.0.0.3/8 2130::3/24
Vlan 34 Tagged ports E2 34.0.0.3/8 2340::3/24
R4 Vlan 24 Tagged ports E1 24.0.0.4/8 2240::4/24
Vlan 34 Tagged ports E2 34.0.0.4/8 2340::4/24

R1 – ASBR router.

All OSPF routers have router-ID 0.0.0.N, where N - number of router.

All OSPF routers use area 0.0.0.0.

  1. To test the behavior of route selection, when distance command is applied to the RIP router, execute the following commands in R1, R2, R3 and R4.

    Type the following:

    • R1:
    iS5comm# configure terminal
    iS5comm(config)# router rip
    iS5comm(config-router)# network 12.0.0.1
    iS5comm(config-router)# exit
    iS5comm(config)# router ospf
    iS5comm(config-router)# router-id 0.0.0.1
    iS5comm(config-router)# ASBR Router
    iS5comm(config-router)# network 13.0.0.1 area 0.0.0.0
    iS5comm(config-router)# end
    • R2:
    iS5comm# configure terminal
    iS5comm(config)# router rip
    iS5comm(config-router)# network 12.0.0.2
    iS5comm(config-router)# network 24.0.0.2
    iS5comm(config-router)# exit
    • R3:
    iS5comm# configure terminal
    iS5comm(config)# router ospf
    iS5comm(config-router)# router-id 0.0.0.2
    iS5comm(config-router)# network 13.0.0.3 area 0.0.0.0
    iS5comm(config-router)# network 34.0.0.3 area 0.0.0.0
    iS5comm(config-router)# end
    • R4:
    iS5comm# configure terminal
    iS5comm(config)# router rip
    iS5comm(config-router)# network 24.0.0.4
    iS5comm(config-router)# network 24.0.0.2
    iS5comm(config-router)# exit
    iS5comm(config)# router ospf
    iS5comm(config-router)# router-id 0.0.0.3
    iS5comm(config-router)# network 34.0.0.4 area 0.0.0.0
    iS5comm(config-router)# end
  2. Configure the route-map aa with match criteria at R4.

    Type the following:

    iS5comm# configure terminal
    iS5comm(config)# route-map aa permit 1
    iS5comm(config-rmap-aa)# match source ip 24.0.0.2 255.0.0.0
    iS5comm(config-rmap-aa)# end
  3. Apply redistribute all to RIP and OSPF routers at R4.

    Type the following:

    iS5comm# configure terminal
    iS5comm(config)# router ospf
    iS5comm(config-router)# redistribute all
    iS5comm(config-router)#exit
    iS5comm(config)# router rip
    iS5comm(config-router)# redistribute all
    iS5comm(config-router)#end
  4. View the routes at R4.

    Type the following:

    iS5comm# show ip route
    Vrf Name:          default
    C 12.0.0.0/8  is directly connected, vlan1
    O 13.0.0.0/8  [2] via 34.0.0.3
    O 15.0.0.0/8  [10] via 34.0.0.3
    C 24.0.0.0/8  is directly connected, vlan24
    C 34.0.0.0/8  is directly connected, vlan34
    O 70.0.0.0/8  [10] via 34.0.0.3
  5. Set the administrative distance 100 to the RIP router in R4.

    Type the following:

    iS5comm# configure terminal
    iS5comm(config)# router rip
    iS5comm(config-router)# distance 100 route-map aa
    iS5comm(config-router)# exit
  6. Force routes updates in R1.

    Type the following:

    iS5comm# configure terminal
    iS5comm(config)# router ospf
    iS5comm(config-router)# no redistribute all
    iS5comm(config-router)# redistribute all
    iS5comm(config-router)# exit
    iS5comm(config)# router rip
    iS5comm(config-router)# no redistribute all
    iS5comm(config-router)# redistribute all
    iS5comm(config-router)# exit
  7. View the routes at R4.

    Type the following:

    iS5comm# configure terminal
    C 12.0.0.0/8  is directly connected, vlan1
    O 13.0.0.0/8  [2] via 34.0.0.3
    R 15.0.0.0/8  [2] via 24.0.0.2
    C 24.0.0.0/8  is directly connected, vlan24
    C 34.0.0.0/8  is directly connected, vlan34
    R 70.0.0.0/8  [5] via 24.0.0.2
  8. Reset the administrative distance to the RIP router in R4.

    Type the following:

    iS5comm# configure terminal
    iS5comm(config)# router rip
    iS5comm(config-router)# no distance 100 route-map aa
    iS5comm(config-router)# exit
  9. Force routes updates in R1.

    Type the following:

    iS5comm# configure terminal
    iS5comm(config)# router ospf
    iS5comm(config-router)# no redistribute all
    iS5comm(config-router)# redistribute all
    iS5comm(config-router)# exit
    iS5comm(config)# router rip
    iS5comm(config-router)# no redistribute all
    iS5comm(config-router)# redistribute all
    iS5comm(config-router)# exit
  10. View the routes at R4.

    Type the following:

    iS5comm# configure terminal
    C 12.0.0.0/8  is directly connected, vlan1
    O 13.0.0.0/8  [2] via 34.0.0.3
    O 15.0.0.0/8  [10] via 34.0.0.3
    C 24.0.0.0/8  is directly connected, vlan24
    C 34.0.0.0/8  is directly connected, vlan34
    O 70.0.0.0/8  [10] via 34.0.0.3

Redistribution of Routes into RIP Topology

This section provides the sample configuration for testing redistribution of routes into RIP with route map.

Some prerequisite configuration must be done in the switches R1, R2, R3 and R4 before configuring RIP.

Figure 2. Redistribution Topology Configuration


Redistribution Interface Configuration

Table 2. IPv4 and IPv6 Addresses of Interfaces in the Routers
Router No Interface Port IPv4 Address / Mask Prefix Length / Mask
R1 Vlan 12 Tagged ports E1 140.0.0.1/16 2140::1/24
Vlan 110 Tagged ports E3 70.0.0.1/8 2070::1/24
R2 Vlan 12 Tagged ports E1 140.0.0.2/16 2140::1/24
Vlan 23 Tagged ports E3 20.0.0.2/8 2020::2/24
Vlan 24 Tagged ports E2 60.0.0.2/8 2040::2/24
Vlan 25 Tagged ports E4 40.0.0.2/8 2060::2/24
Vlan 125 Tagged ports E5 50.0.0.2/8 2050::2/24
R3 Vlan 23 Tagged ports E1 20.0.0.3/8 2020::2/24
Vlan 130 Tagged ports E2 11.0.0.3/8 2011::3/24
R4 Vlan 25 Tagged ports E1 40.0.0.5/8 2060::5/24
Vlan 150 Tagged ports E2 14.1.0.5/16 2014::5/24

Redistribution Protocol Configuration

Table 3. Redistribution Protocol Configuration
Configuration: Protocol configuration

Configure the protocols in the given interfaces in each of the routers as follows:

At R1

At R2

  • Interface VLAN 12
  • Enable RIPv2. Enable RIPng.Interface Vlan 23
  • Enable OSPFv2 with Area 0. Configure this as the ASBR router.
  • Enable OSPFv3 with Area 0. Configure this as the ASBR router.
  • Interface VLAN 25
  • Enable BGP with peer VLAN 25 interface on R5 with remote AS 30

At R3

  • Interface VLAN 23
  • Enable OSPFv2 with Area 0.
  • Enable OSPFv3 with Area 0.

At R2

  • Interface VLAN 25
  • Enable BGP with peer as VLAN 25 interface on R2 with remote AS 100.
  1. To test the following behaviors, execute the following commands:
      • redistribution of static routes into RIP with the route map with <match destination ip> clause.

      • redistribution of static routes into RIP, when the route map is modified or deleted.

      • redistribution of static routes into RIP, when static routes for redistribution are added or deleted.

    Type the following:

    Configurations at R1:

    iS5comm# configure terminal
    iS5comm(config-router)# network 140.0.0.1
    iS5comm(config-router)# exit

    Configurations at R2:

    iS5comm# configure terminal
    iS5comm(config)# router rip
    iS5comm(config-router)# network 140.0.0.2
    iS5comm(config-router)# exit
    iS5comm(config)# router ospf
    iS5comm(config-router)# router-id 0.0.0.1
    iS5comm(config-router)# ASBR Router
    iS5comm(config-router)# network 20.0.0.2 area 0.0.0.0
    iS5comm(config-router)# exit
    iS5comm(config)# as-num 100
    iS5comm(config)# router-id 40.0.0.2
    iS5comm(config)# router bgp 100
    iS5comm(config-router)# neighbor 40.0.0.5 remote-as 300
    iS5comm(config-router)# exit

    Configurations at R3:

    iS5comm# configure terminal
    iS5comm(config-router)# router-id 0.0.0.2
    iS5comm(config-router)# network 20.0.0.3 area 0.0.0.0
    iS5comm(config-router)# exit

    Configurations at R5

    iS5comm# configure terminal
    iS5comm(config)# as-num 300
    iS5comm(config)# router-id 40.0.0.5
    iS5comm(config)# router bgp 300
    iS5comm(config-router)# neighbor 40.0.0.2 remote-as 100
    iS5comm(config-router)# exit
  2. In R2, create static routes and create a route-map aa.

    Type the following:

    iS5comm# configure terminal
    iS5comm(config)# ip route 91.0.0.0 255.0.0.0 vlan 24
    iS5comm(config)# ip route 92.0.0.0 255.0.0.0 vlan 24
    iS5comm(config)# route-map aa permit 1
    iS5comm(config-rmap-aa)# match destination ip 91.0.0.0 255.0.0.0
    iS5comm(config-rmap-aa)# end
    iS5comm#configure terminal
    iS5comm(config)# route-map aa deny 2
    iS5comm(config-rmap-aa)# match destination ip 93.0.0.0 255.0.0.0
    iS5comm(config-rmap-aa)# end
  3. Enable redistribution of static routes into with route map aa.

    Type the following:

    iS5comm# configure terminal
    iS5comm(config)# router rip
    iS5comm(config-router)# redistribute static route-map aa
  4. Verify the route in R1; verify that 91.0.0.0/8 is present in the general routing table.

    Type the following:

    iS5comm# show ip route
    Vrf Name:          default
    C 12.0.0.0/8  is directly connected, vlan1
    C 70.0.0.0/8  is directly connected, vlan110
    R 91.0.0.0/8  [4] via 140.0.0.2
    C 140.0.0.0/8  is directly connected, vlan12
  5. In R2, modify the route map aa.

    Type the following:

    iS5comm# configure terminal
    iS5comm(config)# route-map aa permit 1
    iS5comm(config-rmap-aa)# no match destination ip 91.0.0.0 255.0.0.0
    iS5comm(config-rmap-aa)# match destination ip 92.0.0.0 255.0.0.0
    iS5comm(config-rmap-aa)# exit
  6. In R1, verify that 91.0.0.0/8 is removed from the general routing table and 92.0.0.0/8 is present in the general routing table

    Type the following:

    iS5comm# show ip route
    Vrf Name:          default
    C 12.0.0.0/8  is directly connected, vlan1
    C 70.0.0.0/8  is directly connected, vlan110
    R 92.0.0.0/8  [4] via 140.0.0.2
    C 140.0.0.0/8  is directly connected, vlan12
  7. In R2, add/remove static routes.

    Type the following:

    iS5comm# configure terminal
    iS5comm(config)# ip route 93.0.0.0 255.0.0.0 vlan 24
    iS5comm(config)# no ip route 92.0.0.0 255.0.0.0 vlan 24
    iS5comm(config)# end
  8. In R1, verify 92.0.0.0/8 is removed from the general routing table and verify 93.0.0.0/8 is present in the general routing table

    Type the following:

    iS5comm# show ip route
    Vrf Name:          default
    C 12.0.0.0/8  is directly connected, vlan1
    C 70.0.0.0/8  is directly connected, vlan110
    R 93.0.0.0/8  [4] via 140.0.0.2
    C 140.0.0.0/8  is directly connected, vlan12
  9. Delete the route map aa.

    Type the following:

    iS5comm# configure terminal
    iS5comm(config)# no route-map aa 1
    iS5comm(config)# no route-map aa 2
    iS5comm(config)# end
  10. In R1, verify that all connected routes and static routes are present in the general routing table.

    Type the following:

    iS5comm# show ip route
    Vrf Name:          default
    C 12.0.0.0/8  is directly connected, vlan1
    C 70.0.0.0/8  is directly connected, vlan110
    R 91.0.0.0/8  [4] via 140.0.0.2
    R 93.0.0.0/8  [4] via 140.0.0.2C 140.0.0.0/8  is directly connected, vlan12