Routing & Switching

RIPv2 Configuration | Cisco Router

RIP (Routing Information Protocol) is a distance vector protocol which uses Hop Counts (Max 15 hops) as a routing Metric.

Default RIPv2 Timers

  • Update – 30 Sec
  • Invalid – 180 Sec
  • Hold Down – 180 Sec
  • Flush – 240 Sec
  • Admin Distance – 120
  • UDP Port – 520
  • Authentication – MD5 & Plain
  • Multicast Address – 224.0.0.9

Topology

ripv2
ripv2

IPv4 Addressing

Interface Configuration

Reference:
Configure IPv4 on interface

R1#show ip int brief 
Interface                  IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0         172.16.0.1      YES manual up                    up      
GigabitEthernet0/1         172.16.0.5      YES manual up                    up      
GigabitEthernet0/2         192.168.10.1    YES manual up                    up   
!
R2#show ip int brief 
Interface                  IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0         172.16.0.9      YES manual up                    up      
GigabitEthernet0/1         172.16.0.6      YES manual up                    up      
GigabitEthernet0/2         192.168.20.1    YES manual up                    up      
!
R3#show ip int brief         
Interface                  IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0         172.16.0.2      YES manual up                    up      
GigabitEthernet0/1         172.16.0.10     YES manual up                    up      
GigabitEthernet0/2         192.168.30.1    YES manual up                    up      

Router RIP Configuration

R1(config)#router ?
rip       Routing Information Protocol (RIP)
!
R1(config)#router rip
!
R1(config-router)#?
Router configuration commands:
  address-family          Enter Address Family command mode
  auto-summary            Enable automatic network number summarization
  bfd                     BFD configuration commands
  default                 Set a command to its defaults
  default-information     Control distribution of default information
  default-metric          Set metric of redistributed routes
  distance                Define an administrative distance
  distribute-list         Filter networks in routing updates
  exit                    Exit from routing protocol configuration mode
  flash-update-threshold  Specify flash update threshold in second
  help                    Description of the interactive help system
  input-queue             Specify input queue depth
  maximum-paths           Forward packets over multiple paths
  neighbor                Specify a neighbor router
  network                 Enable routing on an IP network
  no                      Negate a command or set its defaults
  offset-list             Add or subtract offset from RIP metrics
  output-delay            Interpacket delay for RIP updates
  passive-interface       Suppress routing updates on an interface
  redistribute            Redistribute information from another routing
                          protocol
  timers                  Adjust routing timers
  traffic-share           How to compute traffic share over alternate paths
  validate-update-source  Perform sanity checks against source address of
                          routing updates
  version                 Set routing protocol version
!
R1(config-router)#version 2
R1(config-router)#network 172.16.0.0
R1(config-router)#network 192.168.10.0 
!
!
R2(config)#router rip
R2(config-router)# version 2
R2(config-router)# network 172.16.0.0
R2(config-router)# network 192.168.20.0
!
!
R3(config)#router rip
R3(config-router)# version 2
R3(config-router)# network 172.16.0.0
R3(config-router)# network 192.168.30.0

Verification

R1#show ip route rip 
      172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks
R        172.16.0.8/30 [120/1] via 172.16.0.6, 00:00:06, GigabitEthernet0/1
                       [120/1] via 172.16.0.2, 00:00:28, GigabitEthernet0/0
R     192.168.20.0/24 [120/1] via 172.16.0.6, 00:00:06, GigabitEthernet0/1
R     192.168.30.0/24 [120/1] via 172.16.0.2, 00:00:28, GigabitEthernet0/0
!
R2#show ip route rip 
   172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks
R        172.16.0.0/30 [120/1] via 172.16.0.10, 00:00:25, GigabitEthernet0/0
                       [120/1] via 172.16.0.5, 00:00:16, GigabitEthernet0/1
R     192.168.10.0/24 [120/1] via 172.16.0.5, 00:00:16, GigabitEthernet0/1
R     192.168.30.0/24 [120/1] via 172.16.0.10, 00:00:25, GigabitEthernet0/0
!
R3#show ip route rip 
      172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks
R        172.16.0.4/30 [120/1] via 172.16.0.9, 00:00:03, GigabitEthernet0/1
                       [120/1] via 172.16.0.1, 00:00:08, GigabitEthernet0/0
R     192.168.10.0/24 [120/1] via 172.16.0.1, 00:00:08, GigabitEthernet0/0
R     192.168.20.0/24 [120/1] via 172.16.0.9, 00:00:03, GigabitEthernet0/1
!
PC-1> ping 192.168.20.1
84 bytes from 192.168.20.1 icmp_seq=1 ttl=254 time=6.674 ms
84 bytes from 192.168.20.1 icmp_seq=2 ttl=254 time=4.743 ms
!
PC-1> ping 192.168.30.1
84 bytes from 192.168.30.1 icmp_seq=1 ttl=254 time=6.996 ms
84 bytes from 192.168.30.1 icmp_seq=2 ttl=254 time=5.070 ms

Debugs

R1#debug ip rip events
*Oct 14 20:58:30.700: RIP: sending v2 flash update to 224.0.0.9 via GigabitEthernet0/0 (172.16.0.1)
*Oct 14 20:58:30.700: RIP: Update contains 3 routes
*Oct 14 20:58:30.701: RIP: Update queued
*Oct 14 20:58:30.701: RIP: sending v2 flash update to 224.0.0.9 via GigabitEthernet0/1 (172.16.0.5)
*Oct 14 20:58:30.701: RIP: Update contains 3 routes
*Oct 14 20:58:30.701: RIP: Update queued
*Oct 14 20:58:30.702: RIP: sending v2 flash update to 224.0.0.9 via GigabitEthernet0/2 (192.168.10.1)
*Oct 14 20:58:30.702: RIP: Update contains 3 routes
*Oct 14 20:58:30.702: RIP: Update queued
!
*Oct 14 20:56:43.485: RIP: received v2 update from 172.16.0.6 on GigabitEthernet0/1
*Oct 14 20:56:43.485: RIP: Update contains 3 routes
R1#
*Oct 14 20:56:45.062: RIP: sending v2 update to 224.0.0.9 via GigabitEthernet0/2 (192.168.10.1)
*Oct 14 20:56:45.062: RIP: Update contains 3 routes
*Oct 14 20:56:45.063: RIP: Update queued
*Oct 14 20:56:45.063: RIP: Update sent via GigabitEthernet0/2
R1#
*Oct 14 20:56:49.900: RIP: received v2 update from 172.16.0.2 on GigabitEthernet0/0
*Oct 14 20:56:49.900: RIP: Update contains 3 routes
R1#
*Oct 14 20:56:53.854: RIP: sending v2 update to 224.0.0.9 via GigabitEthernet0/1 (172.16.0.5)
*Oct 14 20:56:53.855: RIP: Update contains 3 routes
*Oct 14 20:56:53.855: RIP: Update queued
*Oct 14 20:56:53.855: RIP: Update sent via GigabitEthernet0/1
R1#
*Oct 14 20:57:01.079: RIP: sending v2 update to 224.0.0.9 via GigabitEthernet0/0 (172.16.0.1)
*Oct 14 20:57:01.080: RIP: Update contains 3 routes
*Oct 14 20:57:01.080: RIP: Update queued
*Oct 14 20:57:01.081: RIP: Update sent via GigabitEthernet0/0

Wireshark Packet Capture from R1