Category Archives: RIP

RIPng for IPv6 Routing

RIPng (Routing Information Protocol Next Generation) defined in RFC 2080 is an extension of RIPv2 for support of IPv6. RIP is a distance vector routing protocol.

We will not talk much about how RIP and distance vector algorithm works. We will demonstrate how it can be configured for IPv6 routing.

RIPng Messaging

There are two basic RIPng message types, RIP Request and RIP Response, which are exchanged using the User Datagram Protocol (UDP) port number 521.

RIP Request messages are sent to UDP destination port 521. They may have a source port of 521 or may use an ephemeral port number.

RIP Response messages sent in reply to an RIP Request are sent with a source port of 521, and a destination port equal to whatever source port the RIP Request used.

Unsolicited RIP Response messages (sent on a routine basis and not in response to a request) are sent with both the source and destination ports set to 521.

Here is the network topology for our discussion:

ripng

We will discuss following topics:

  1. RIPng configuration
  2. RIPng Route Metric Manipulation
  3. RIPng Route Aggregation/Summarization
  4. RIPng Default Route
  5. RIPng Route Filter
RIPng Configuration
R1

!! Enable IPv6 Routing globally !!
ipv6 unicast-routing
!
!! Enable RIPng at interface level !!
!! ipv6 rip [pid] enable, RIPV6 is a process ID used here !!
!
interface Loopback0
 ipv6 address 2001::1/128
 ipv6 rip RIPV6 enable
!
interface GigabitEthernet0/0
 ipv6 address 2001:1:2:14::1/64
 ipv6 rip RIPV6 enable
!
interface FastEthernet1/0
 ipv6 address 2001:1:2:13::1/64
 ipv6 rip RIPV6 enable

R4

ipv6 unicast-routing
!
interface Loopback0
 ipv6 address 2001::4/128
 ipv6 rip RIPV6 enable
!
interface GigabitEthernet0/0
 ipv6 address 2001:1:2:14::4/64
 ipv6 rip RIPV6 enable
!
interface GigabitEthernet1/0
 ipv6 address 2001:1:2:34::4/64
 ipv6 rip RIPV6 enable


R3

ipv6 unicast-routing
!
interface Loopback0
 ipv6 address 2001::3/128
 ipv6 rip RIPV6 enable
!
interface GigabitEthernet0/0
 ipv6 address 2001:1:2:34::3/64
 ipv6 rip RIPV6 enable
!
interface FastEthernet1/0
 ipv6 address 2001:1:2:13::3/64
 ipv6 rip RIPV6 enable
!
interface FastEthernet1/1
 ipv6 address 2001:1:2:23::3/64
 ipv6 rip RIPV6 enable
!
 
R2

ipv6 unicast-routing
!
interface Loopback0
 ipv6 address 2001::2/128
 ipv6 rip RIPV6 enable
!
interface FastEthernet0/0
 ipv6 address 2001:1:2:23::2/64
 ipv6 rip RIPV6 enable
Verification & Testing:
R1#sh ipv6 protocols
IPv6 Routing Protocol is "connected"
IPv6 Routing Protocol is "ND"
IPv6 Routing Protocol is "rip RIPV6"
  Interfaces:
    FastEthernet1/0
    GigabitEthernet0/0
    Loopback0
  Redistribution:
    None

R1#show ipv6 rip
RIP process "RIPV6", port 521, multicast-group FF02::9, pid 276
     Administrative distance is 120. Maximum paths is 16
     Updates every 30 seconds, expire after 180
     Holddown lasts 0 seconds, garbage collect after 120
     Split horizon is on; poison reverse is off
     Default routes are not generated
     Periodic updates 45, trigger updates 3
     Full Advertisement 1, Delayed Events 0
  Interfaces:
    FastEthernet1/0
    GigabitEthernet0/0
    Loopback0
  Redistribution:
    None

R1#show ipv6 route rip
IPv6 Routing Table - default - 11 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
       B - BGP, R - RIP, H - NHRP, I1 - ISIS L1
       I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
       EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination
       NDr - Redirect, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1
       OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2, l - LISP
R   2001::2/128 [120/3]
     via FE80::C803:21FF:FE78:1C, FastEthernet1/0
R   2001::3/128 [120/2]
     via FE80::C803:21FF:FE78:1C, FastEthernet1/0
R   2001::4/128 [120/2]
     via FE80::C802:21FF:FE78:8, GigabitEthernet0/0
R   2001:1:2:23::/64 [120/2]
     via FE80::C803:21FF:FE78:1C, FastEthernet1/0
R   2001:1:2:34::/64 [120/2]
     via FE80::C802:21FF:FE78:8, GigabitEthernet0/0
     via FE80::C803:21FF:FE78:1C, FastEthernet1/0

!! Routing for Loopback interface of R2 !!
R1#show ipv6 route 2001::2
Routing entry for 2001::2/128
  Known via "rip RIPV6", distance 120, metric 3
  Route count is 1/1, share count 0
  Routing paths:
    FE80::C803:21FF:FE78:1C, FastEthernet1/0
      Last updated 00:23:15 ago
!! Routing entry is known via RIP process RIPV6, administrative distance is 120 and metric(hop count) is 3. Next-Hop is link-local IP (FE80::C803:21FF:FE78:1C) of neighbor router interface which is connected via FastEthernet1/0. !!
R3#sh ipv6 int f1/0
FastEthernet1/0 is up, line protocol is up
  IPv6 is enabled, link-local address is FE80::C803:21FF:FE78:1C

R1#ping 2001::2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/82/136 ms

R1#traceroute 2001::2
Type escape sequence to abort.
Tracing the route to 2001::2

  1 2001:1:2:13::3 32 msec 56 msec 24 msec
  2 2001:1:2:23::2 60 msec 64 msec 84 msec

Similar test can be done on other routers to verify IPv6 routing.

R4#sh ipv6 route rip
IPv6 Routing Table - default - 11 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
       B - BGP, R - RIP, H - NHRP, I1 - ISIS L1
       I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
       EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination
       NDr - Redirect, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1
       OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2, l - LISP
R   2001::1/128 [120/2]
     via FE80::C800:27FF:FE54:8, GigabitEthernet0/0
R   2001::2/128 [120/3]
     via FE80::C803:21FF:FE78:8, GigabitEthernet1/0
R   2001::3/128 [120/2]
     via FE80::C803:21FF:FE78:8, GigabitEthernet1/0
R   2001:1:2:13::/64 [120/2]
     via FE80::C803:21FF:FE78:8, GigabitEthernet1/0
     via FE80::C800:27FF:FE54:8, GigabitEthernet0/0
R   2001:1:2:23::/64 [120/2]
     via FE80::C803:21FF:FE78:8, GigabitEthernet1/0

R3#show ipv6 route rip
IPv6 Routing Table - default - 12 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
       B - BGP, R - RIP, H - NHRP, I1 - ISIS L1
       I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
       EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination
       NDr - Redirect, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1
       OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2, l - LISP
R   2001::1/128 [120/2]
     via FE80::C800:27FF:FE54:1C, FastEthernet1/0
R   2001::2/128 [120/2]
     via FE80::C801:27FF:FE54:8, FastEthernet1/1
R   2001::4/128 [120/2]
     via FE80::C802:21FF:FE78:1C, GigabitEthernet0/0
R   2001:1:2:14::/64 [120/2]
     via FE80::C802:21FF:FE78:1C, GigabitEthernet0/0
     via FE80::C800:27FF:FE54:1C, FastEthernet1/0


R2#show ipv6 route rip
IPv6 Routing Table - default - 10 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
       B - BGP, R - RIP, H - NHRP, I1 - ISIS L1
       I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
       EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination
       NDr - Redirect, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1
       OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2, l - LISP
R   2001::1/128 [120/3]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0
R   2001::3/128 [120/2]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0
R   2001::4/128 [120/3]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0
R   2001:1:2:13::/64 [120/2]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0
R   2001:1:2:14::/64 [120/3]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0
R   2001:1:2:34::/64 [120/2]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0

R2#ping 2001::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/80/120 ms
R2#ping 2001::3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001::3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/41/56 ms
R2#ping 2001::4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001::4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/58/80 ms
RIPng Route Metric Manipulation

As we see in above output the traffic from R1 to R3/R2 is going via R3 based on the lowest metric(hop-count). We want to go it via R4 (i.e, R1 -> R4 -> R3 -> R2). We can do it by increment the metric on link between R1 and R3. This feature is called metric-offset.

Routing before metric-offset

R1#show ipv6 route rip
<snip>
R   2001::2/128 [120/3]
     via FE80::C803:21FF:FE78:1C, FastEthernet1/0
R   2001::3/128 [120/2]
     via FE80::C803:21FF:FE78:1C, FastEthernet1/0
R   2001::4/128 [120/2]
     via FE80::C802:21FF:FE78:8, GigabitEthernet0/0
R   2001:1:2:23::/64 [120/2]
     via FE80::C803:21FF:FE78:1C, FastEthernet1/0
R   2001:1:2:34::/64 [120/2]
     via FE80::C802:21FF:FE78:8, GigabitEthernet0/0
     via FE80::C803:21FF:FE78:1C, FastEthernet1/0

R3#show ipv6 route rip
<snip>
R   2001::1/128 [120/2]
     via FE80::C800:27FF:FE54:1C, FastEthernet1/0
R   2001::2/128 [120/2]
     via FE80::C801:27FF:FE54:8, FastEthernet1/1
R   2001::4/128 [120/2]
     via FE80::C802:21FF:FE78:1C, GigabitEthernet0/0
R   2001:1:2:14::/64 [120/2]
     via FE80::C802:21FF:FE78:1C, GigabitEthernet0/0
     via FE80::C800:27FF:FE54:1C, FastEthernet1/0

Metric-offset configuration

R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#interface FastEthernet1/0
R1(config-if)# ipv6 rip RIPV6 metric-offset 3
R1(config-if)#end

R3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#interface FastEthernet1/0
R3(config-if)#ipv6 rip RIPV6 metric-offset 3
R3(config-if)#end

Routing after metric-offset

!! Metric for all routes learned via Fa1/0 has been incremented by 3 and routes via Gig0/0 has lowest metric and best path in routing table.!!

R1#show ipv6 route rip
<snip>
R   2001::2/128 [120/4]
     via FE80::C802:21FF:FE78:8, GigabitEthernet0/0
R   2001::3/128 [120/3]
     via FE80::C802:21FF:FE78:8, GigabitEthernet0/0
R   2001::4/128 [120/2]
     via FE80::C802:21FF:FE78:8, GigabitEthernet0/0
R   2001:1:2:23::/64 [120/3]
     via FE80::C802:21FF:FE78:8, GigabitEthernet0/0
R   2001:1:2:34::/64 [120/2]
     via FE80::C802:21FF:FE78:8, GigabitEthernet0/0

R1#ping 2001::2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/60/80 ms

R1#traceroute 2001::2
Type escape sequence to abort.
Tracing the route to 2001::2

  1 2001:1:2:14::4 28 msec 36 msec 28 msec  <<<< R4
  2 2001:1:2:34::3 16 msec 76 msec 32 msec  <<<< R3
  3 2001:1:2:23::2 76 msec 68 msec 60 msec  <<<< R2


R3#show ipv6 route rip
<snip>
R   2001::1/128 [120/3]
     via FE80::C802:21FF:FE78:1C, GigabitEthernet0/0
R   2001::2/128 [120/2]
     via FE80::C801:27FF:FE54:8, FastEthernet1/1
R   2001::4/128 [120/2]
     via FE80::C802:21FF:FE78:1C, GigabitEthernet0/0
R   2001:1:2:14::/64 [120/2]
     via FE80::C802:21FF:FE78:1C, GigabitEthernet0/0

R3#ping 2001::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/25/32 ms

R3#traceroute 2001::1
Type escape sequence to abort.
Tracing the route to 2001::1

  1 2001:1:2:34::4 24 msec 36 msec 16 msec  <<<< R4
  2 2001:1:2:14::1 60 msec 16 msec 28 msec  <<<< R1

RIPng Route Aggregation/Summarization

We want to aggregate following routes on R3 which are received from R4 and R1 and advertise summary route  to R2.

2001:1:2:34::/64
2001:1:2:14::/64
2001:1:2:13::/64

Summary route – These 3 routes has first 48 bits common (2001:1:2), so we can aggregate as follows

2001:1:2::/48

R2 routing table before route aggregation on R3

R2#show ipv6 route rip
<snip>
R   2001::1/128 [120/4]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0
R   2001::3/128 [120/2]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0
R   2001::4/128 [120/3]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0
R   2001:1:2:13::/64 [120/2]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0
R   2001:1:2:14::/64 [120/3]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0
R   2001:1:2:34::/64 [120/2]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0

Route aggregation configuration on R3

R3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#interface FastEthernet1/1
R3(config-if)#ipv6 rip RIPV6 summary-address 2001:1:2::/48
R3(config-if)#end


R2 routing table after route aggregation on R3

R2#show ipv6 route rip
<snip>
R   2001::1/128 [120/4]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0
R   2001::3/128 [120/2]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0
R   2001::4/128 [120/3]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0
R   2001:1:2::/48 [120/2]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0

RIPng Default Route

We want to advertise a default route to R2 from R3 so that R2 can send traffic for any unknown prefix to R3.

R2 Before default route configuration

R2#show ipv6 route ::/0
% Route not found

Default-route configuration on R3

R3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#interface FastEthernet1/1
R3(config-if)#ipv6 rip RIPV6 default-information originate
R3(config-if)#end

R2 after default route configuration

R2#show ipv6 route ::/0
Routing entry for ::/0
  Known via "rip RIPV6", distance 120, metric 2
  Route count is 1/1, share count 0
  Routing paths:
    FE80::C803:21FF:FE78:1D, FastEthernet0/0
      Last updated 00:02:11 ago
RIPng Route Filter

RIPng uses IPv6 prefix-lists to filter routing updates. You apply prefix-lists either inbound or outbound under the RIPng process configuration mode. You may choose to associate an interface with the distribute-list, or apply it to all interfaces simultaneously by not specifying an interface.

Let’s say we want R2 to filter R4’s Loopback0 IPv6 prefix from entering the local routing table.

R2 routing table before applying route filter

R2#show ipv6 route rip
<snip>
R   ::/0 [120/2]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0
R   2001::1/128 [120/4]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0
R   2001::3/128 [120/2]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0
R   2001::4/128 [120/3]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0
R   2001:1:2::/48 [120/2]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0

Configuration

!! Configured ipv6 prefix-list to deny 2001::4/128(R4's Loopback IP) and permit everything else. This prefix list is applied under RIPng process ID in inbound direction !!

R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#ipv6 prefix-list FILTER deny  2001::4/128
R2(config)#ipv6 prefix-list FILTER permit ::/0 le 128
R2(config)#ipv6 router rip RIPV6
R2(config-rtr)# distribute-list prefix-list FILTER in
R2(config-rtr)#end

R2#show ipv6 route rip
<snip>
R   ::/0 [120/2]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0
R   2001::1/128 [120/4]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0
R   2001::3/128 [120/2]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0
R   2001:1:2::/48 [120/2]
     via FE80::C803:21FF:FE78:1D, FastEthernet0/0

After applying the route filter, routing entry for R4's Loopback IP is gone but all other routes are still present int the routing table.

R2#ping 2001::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 52/65/84 ms