OcNOS-DC 6.4.2 : Layer 3 Guide : VRF Lite Command Reference : RIP Configuration
RIP Configuration
The Routing Information Protocol (RIP) is a distance-vector routing protocol which uses the hop count as a routing metric. RIP prevents routing loops by limiting the number of hops allowed — (15) in a path from the source to a destination. This hop limit, however, also limits the size of networks that RIP can support. A hop count of 16 is considered an infinite distance and used to indicate inaccessible, inoperable, or otherwise undesirable routes in the selection process.
Note: This chapter covers RIP configuration in non-default VR and non-default VRF.
Topology
RIP topology for VR/VRF
Configuration IPv4 VRF
R1
 
#configure terminal
Enter configure mode.
(config)#virtual-router VR1
Create virtual router VR1.
(config-vr)#load rip
Load the RIP module in VR1.
(config)#exit
Exit VR mode.
(config)#interface eth1
Enter interface mode.
(config-if)#virtual-router forwarding VR1
Associate eth1 to VR1.
(config-if)#exit
Exit interface mode.
(config)#exit
Exit configure mode.
#login virtual-router VR1
Log in to virtual-router VR1.
>en
Enter privileged exec mode.
#con t
Enter configuration mode.
(config)#ip vrf vrf1
Create vrf1
((config-vrf)#exit
Exit VRF mode
(config)#router rip
Enter router mode.
(config-router)#version 2
Specify RIP version 2.
(config-router)#address-family ipv4 vrf vrf1
Enter address family mode for vrf1
(config-router-af)#network 2.2.2.0/24
Advertise the connected network under rip.
(config-router-af)#exit
Exit address-family mode.
(config-router)#ex
Exit router mode
(config)#interface eth1
Enter interface mode
(config-if)#ip vrf forwarding vrf1
Associate the interface to vrf1
(config-if)#ip address 2.2.2.1/24
Configure the IP address 2.2.2.1 to eth1
R2
 
#configure terminal
Enter configure mode.
(config)#virtual-router VR1
Create virtual router VR1.
(config-vr)#load rip
Load the rip module in VR1.
(config)#exit
Exit VR mode.
(config)#interface eth1
Enter interface mode.
(config-if)#virtual-router forwarding VR1
Associate eth1 to VR1.
(config-if)#exit
Exit interface mode.
(config)#exit
Exit configure mode.
#login virtual-router VR1
Log in to virtual router VR1.
>en
Enter privileged exec mode.
#con t
Enter configuration mode.
(config)#ip vrf vrf1
Create vrf1
((config-vrf)#exit
Exit VRF mode
(config)#router rip
Enter router mode.
(config-router)#version 2
Specify RIP version 2.
(config-router)#address-family ipv4 vrf vrf1
Enter address family mode for vrf1
(config-router-af)#network 2.2.2.0/24
Advertise the connected network under RIP.
(config-router-af)#exit
Exit address family mode.
(config-router)#ex
Exit router mode
(config)#interface eth1
Enter interface mode
(config-if)#ip vrf forwarding vrf1
Associate the interface to vrf1
(config-if)#ip address 2.2.2.2/24
Configure the IP address 2.2.2.1 to eth1
Validation
Verify the routing table in R1:
#show ip route vrf vrf1
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter
area
* - candidate default
IP Route Table for VRF "vrf1"
C 2.2.2.0/24 is directly connected, eth1
Gateway of last resort is not set
Verify RIP database in R1:
#show ip rip database vrf vrf1
Codes: R - RIP, Rc - RIP connected, Rs - RIP static, K - Kernel,
C - Connected, S - Static, O - OSPF, I - IS-IS, B - BGP
Network Next Hop Metric From If Time
Rc 2.2.2.0/24 1 eth1
Verify the routing table in R2:
#show ip route vrf vrf1
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter
area
* - candidate default
IP Route Table for VRF "vrf1"
C 2.2.2.0/24 is directly connected, eth1
Gateway of last resort is not set
Verify RIP database in R2:
#show ip rip database vrf vrf1
Codes: R - RIP, Rc - RIP connected, Rs - RIP static, K - Kernel,
C - Connected, S - Static, O - OSPF, I - IS-IS, B - BGP
Network Next Hop Metric From If Time
Rc 2.2.2.0/24 1 eth1
 
Configuration IPv6 VRF
R1
 
#configure terminal
Enter the Configure mode.
(config)#virtual-router VR1
Create a virtual router VR1.
(config-vr)#load ipv6 rip
Load the RIPng module to be used in VR1.
(config)#exit
Exit the VR mode.
(config)#interface eth1
Switch to interface eth1.
(config-if)#virtual-router forwarding VR1
Associate eth1 to VR1.
(config-if)#exit
Exit interface mode.
(config)#exit
Exit the router config mode.
#login virtual-router VR1
Login in to virtual-router VR1.
>en
Enable the config mode.
#con t
Enter the router configuration mode.
(config)#ip vrf vrf1
Create the vrf1
(config-vrf)#exit
Exit the vrf
(config)#router ipv6 rip
Enable ipv6 rip
(config-router)#address-family ipv6 vrf vrf1
Switch to ipv6 rip address family
(config-router-af)#aggregate-address 2222::/48
Configure the ipv6 aggregate-address
(config-router-af)#exit
Exit the router rip mode.
(config-router)#ex
exit.
(config)#interface eth1
Switch to interface eth1
(config-if)#ip vrf forwarding vrf1
Associate eth1 to the vrf1
(config-if)#ip address 2.2.2.1/24
Configure the ip address 2.2.2.2 to interface eth1
(config-if)#ipv6 address 2222::1/48
Configure the ipv6 address.
(config-if)#ipv6 address fe80::1/48
Configure the link local address
(config-if)#ipv6 router rip
Associate interface eth1 to ipv6 rip
R2
 
#configure terminal
Enter the Configure mode.
(config)#virtual-router VR1
Create a virtual router VR1.
(config-vr)#load ipv6 rip
Load the Ripng module to be used in VR1
(config)#exit
Exit the VR mode.
(config)#interface eth1
Switch to interface eth1.
(config-if)#virtual-router forwarding VR1
Associate eth1 to VR1.
(config-if)#exit
Exit interface mode.
(config)#exit
Exit the router config mode.
#login virtual-router VR1
Login in to virtual-router VR1.
>en
Enable the config mode.
#con t
Enter the router configuration mode.
(config)#ip vrf vrf1
Create the vrf1
(config-vrf)#exit
Exit the vrf
(config)#router ipv6 rip
Switch to the rip ipv6 address family
(config-router)#address-family ipv6 vrf vrf1
Switch to the rip ipv6 address family
(config-router-af)#aggregate-address 2222::/48
Configure the ipv6 aggregate address
(config-router-af)#exit
Exit the address ipv6 rip address family
(config-router)#ex
Exit the router IPV6 rip mode.
(config)#interface eth1
Exit to the router config mode
(config-if)#ip vrf forwarding vrf
Associate eth1 to the vrf1
(config-if)#ip address 2.2.2.2/24
Configure the ip address 2.2.2.1 to eth eth1
(config-if)#ipv6 address 2222::2/48
Configure the ipv6 address.
(config-if)#ipv6 address fe80::2/48
Configure the link local address
(config-if)#ipv6 router rip
Associate interface eth1 to ipv6 rip
Validation
rtr1#show ipv6 route vrf vrf1
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, I - IS-IS, B - BGP
Timers: Uptime
IP Route Table for VRF "vrf1"
C 2222::/48 via ::, eth1, 00:06:19
C fe80::/48 via ::, eth1, 00:02:33
rtr18#show ipv6 rip database vrf vrf1
Codes: R - RIP, Rc - RIP connected, Rs - RIP static, Ra - RIP aggregated,
Rcx - RIP connect suppressed, Rsx - RIP static suppressed,
K - Kernel, C - Connected, S - Static, O - OSPF, I - IS-IS, B - BGP
Network Next Hop If Met Tag Time
Rcx 2222::/48 :: eth1 1 0
 
rtr2#show ipv6 rip interface
eth1 is up, line protocol is up
Routing Protocol: RIPng
VPN Routing/Forwarding: vrf1
Passive interface: Disabled
Split horizon: Enabled with Poisoned Reversed
IPv6 interface address:
2222::1/48
fe80::1/48
eth2 is up, line protocol is up
RIPng is not enabled on this interface