captured packet dump for network1 RIP1
captured packet dump for network1 RIP2
captured packet dump for network2 RIP1
captured packet dump for network2 RIP2

Install Quagga in your UML filesystem using the debian package for your host system.

Please see the work log

Now set up your UML system so that the zebra and ripd daemons can be easily started when booting into a UML instance.

Please see the work log

Try and start quagga in a UML instance and connect to both daemons using their VTY interfaces.

Please see the work log for detail.

/ # telnet 0 2602
 
Entering character mode
Escape character is '^]'.
 
 
Hello, this is Quagga (version 0.99.15).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
 
 
User Access Verification
 
Password: 
ripd> en
Password: 
ripd# sh ru
 
Current configuration:
!
hostname ripd
password zebra
enable password zebra
log file /var/log/ripd1.log
log stdout
!
router rip
 version 1
 redistribute connected
 network eth0
 network eth1
 network eth2
!
line vty
!
end

Investigate what commands are available and what they do.

This is the general commands we have after enter the enable mode

ripd# 
  clear      Reset functions
  configure  Configuration from vty interface
  copy       Copy configuration
  debug      Debugging functions (see also 'undebug')
  disable    Turn off privileged mode command
  echo       Echo a message back to the vty
  end        End current mode and change to enable mode.
  exit       Exit current mode and down to previous mode
  help       Description of the interactive help system
  list       Print command list
  logmsg     Send a message to enabled logging destinations
  no         Negate a command or set its defaults
  quit       Exit current mode and down to previous mode
  show       Show running system information
  terminal   Set terminal line parameters
  who        Display who is on vty
  write      Write running configuration to memory, network, or terminal

For the assignment the most important commands are:

  • show run
  • show ip <protocol>
  • show ip <protocol> status

The first will show the current configuration. And second one will show the specific routing information for the specified protocol. And last one will show the summary information of the specific protocol.

Besides, there are two important modes:

  • conf in - this will enter the config interface mode
  • conf t - this will enter the config terminal mode, which let us change the general setting of the router

And under different mode we may get different show command, like show inter, show in summary and so on.

netowrk 1

Investigate and document how RIP version 1 operates on the network. What behaviour would you expect, and what behaviour are your witnessing?

+ configuration file to start network 1
  + <code bash>

#!/bin/sh

#start switches in hub mode first ./netstart start hub swa ./netstart start hub swb ./netstart start hub swc ./netstart start hub coreab ./netstart start hub coreac ./netstart start hub corebc

#start sniffers ./netstart start sniffer sniffera swa ./netstart start sniffer snifferb swb ./netstart start sniffer snifferc swc ./netstart start sniffer snifferab coreab ./netstart start sniffer snifferac coreac ./netstart start sniffer snifferbc corebc

sleep 10

#start hosts ./netstart start host hosta swa 20.0.0.2 255.0.0.0 20.255.255.255 20.0.0.1 ./netstart start host hostb swb 30.0.0.2 255.0.0.0 30.255.255.255 30.0.0.1 ./netstart start host hostc swc 40.0.0.2 255.0.0.0 40.255.255.255 40.0.0.1

#start routers

./netstart start router routera swa 20.0.0.1 255.0.0.0 20.255.255.255 coreab 10.0.0.1 255.0.0.0 10.255.255.255 coreac 192.168.1.17 255.255.255.240 192.168.1.31 rip 1 ./netstart start router routerb swb 30.0.0.1 255.0.0.0 30.255.255.255 coreab 10.0.0.2 255.0.0.0 10.255.255.255 corebc 192.168.1.33 255.255.255.240 192.168.1.47 rip 1 ./netstart start router routerc swc 40.0.0.1 255.0.0.0 40.255.255.255 coreac 192.168.1.18 255.255.255.240 192.168.1.31 corebc 192.168.1.34 255.255.255.240 192.168.1.47 rip 1 </code>

+ routing table of router a
  + <code bash>

ripd# sh ip rip Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP Sub-codes:

    (n) - normal, (s) - static, (d) - default, (r) - redistribute,
    (i) - interface
   Network            Next Hop         Metric From            Tag Time

C(i) 10.0.0.0/8 0.0.0.0 1 self 0 C(i) 20.0.0.0/8 0.0.0.0 1 self 0 R(n) 30.0.0.0/8 10.0.0.2 2 10.0.0.2 0 02:57 R(n) 40.0.0.0/8 192.168.1.18 2 192.168.1.18 0 02:58 C(i) 192.168.1.16/28 0.0.0.0 1 self 0 R(n) 192.168.1.32/28 192.168.1.18 2 192.168.1.18 0 02:58 </code>

+ routing table of router b
  + <code bash>

ripd# show ip rip Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP Sub-codes:

    (n) - normal, (s) - static, (d) - default, (r) - redistribute,
    (i) - interface
   Network            Next Hop         Metric From            Tag Time

C(i) 10.0.0.0/8 0.0.0.0 1 self 0 R(n) 20.0.0.0/8 10.0.0.1 2 10.0.0.1 0 02:52 C(i) 30.0.0.0/8 0.0.0.0 1 self 0 R(n) 40.0.0.0/8 192.168.1.34 2 192.168.1.34 0 02:45 R(n) 192.168.1.16/28 192.168.1.34 2 192.168.1.34 0 02:45 C(i) 192.168.1.32/28 0.0.0.0 1 self 0 </code>

+ routing table of router c
  + <code bash>

ripd# sh ip rip Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP Sub-codes:

    (n) - normal, (s) - static, (d) - default, (r) - redistribute,
    (i) - interface
   Network            Next Hop         Metric From            Tag Time

R(n) 10.0.0.0/8 192.168.1.17 2 192.168.1.17 0 02:36 R(n) 20.0.0.0/8 192.168.1.17 2 192.168.1.17 0 02:36 R(n) 30.0.0.0/8 192.168.1.33 2 192.168.1.33 0 02:29 C(i) 40.0.0.0/8 0.0.0.0 1 self 0 C(i) 192.168.1.16/28 0.0.0.0 1 self 0 C(i) 192.168.1.32/28 0.0.0.0 1 self 0 </code>

The surprise is that the whole network works. I can ping any host from any host. As RIP does not support CIDR nor VLSM, I was kind of expecting that the network should be separated. But no. After a bit checking and reading, I found that RIP 1 does not support CIDR nor VLSM, but it does support subnetting. It can learn the subnets from its interfaces. We can also see this factor from the routing table. The i indicates that the subnet is learned from the interface. The only dynamic routings are labeled with R, and they are all classful address.

To start with, RIP 1 will flood the whole network segment by using network broadcast address.

#request sent by router a
1	0.000000	10.0.0.1	10.255.255.255	RIPv1	Request
#request sent by router b
5	0.032778	10.0.0.2	10.255.255.255	RIPv1	Request
#response sent by router a unicast to b
10	0.044698	10.0.0.1	10.0.0.2	RIPv1	Response

router a broadcast request to 10.0.0.0/8. The directly connected party is router b. b send also a flood to the network. And router a sees the request, it will send a unicast to router b to inform its routing table to router b.

We'll see the detail of the packets here.
packet 1

1	0.000000	10.0.0.1	10.255.255.255	RIPv1	Request
 
User Datagram Protocol, Src Port: router (520), Dst Port: router (520)

Through port 520 the packet is sent, by using UDP. So it is not reliable.

packet 5 , is similar to parket 1. only the source address should be router b's address.

packet 10

10	0.044698	10.0.0.1	10.0.0.2	RIPv1	Response
 
Routing Information Protocol
Command: Response (2)
Version: RIPv1 (1)
IP Address: 20.0.0.0, Metric: 1
Address Family: IP (2)
IP Address: 20.0.0.0 (20.0.0.0)
Metric: 1

This is the unicast response sent by router a to router b on 10.0.0.0/8 network. It tell router b that it knows 20.0.0.0/8 network and the metric (hop) is 1.

In this way the routers exchange and expand there routing table. After the routing table is constructed, the routers start sending periodically the updates with their full database. We can also see from the total database information that indeed there is no dynamic routing information exchanged for the VLSM networks. Only the classful addresses get regularly updated.

284	1273.294150	192.168.1.34	192.168.1.47	RIPv1	Response
Routing Information Protocol
Command: Response (2)
Version: RIPv1 (1)
IP Address: 10.0.0.0, Metric: 2
IP Address: 20.0.0.0, Metric: 2
IP Address: 40.0.0.0, Metric: 1

Another strange thing is

2	0.021336	10.0.0.1	224.0.0.22	IGMP	V3 Membership Report / Join group 224.0.0.9 for any sources

RIP1 is not making use of multicast address, but it is joining 224.0.0.9. This group is used by RIP2. There is no further use of it anymore we can see from the dump file. It might be a implementation error/simplification.

network 1 rip version 2

It is now running RIP2

ripd# sh ru
 
Current configuration:
!
hostname ripd
password zebra
enable password zebra
log file /var/log/ripd1.log
log stdout
!
router rip
 version 2
 redistribute connected
 network eth0
 network eth1
 network eth2
!
line vty
!
end

The routing table and RIP status of each router below:

+ router a
  + <code bash>

ripd# sh ip rip Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP Sub-codes:

    (n) - normal, (s) - static, (d) - default, (r) - redistribute,
    (i) - interface
   Network            Next Hop         Metric From            Tag Time

C(i) 10.0.0.0/8 0.0.0.0 1 self 0 C(i) 20.0.0.0/8 0.0.0.0 1 self 0 R(n) 30.0.0.0/8 10.0.0.2 2 10.0.0.2 0 02:53 R(n) 40.0.0.0/8 192.168.1.18 2 192.168.1.18 0 02:27 C(i) 192.168.1.16/28 0.0.0.0 1 self 0 R(n) 192.168.1.32/28 192.168.1.18 2 192.168.1.18 0 02:27 ripd# sh ip rip st Routing Protocol is “rip”

Sending updates every 30 seconds with +/-50%, next due in 12 seconds
Timeout after 180 seconds, garbage collect after 120 seconds
Outgoing update filter list for all interface is not set
Incoming update filter list for all interface is not set
Default redistribution metric is 1
Redistributing: connected
Default version control: send version 2, receive version 2 
  Interface        Send  Recv   Key-chain
  eth0             2     2      
  eth1             2     2      
  eth2             2     2      
Routing for Networks:
  eth0
  eth1
  eth2
Routing Information Sources:
  Gateway          BadPackets BadRoutes  Distance Last Update
  192.168.1.18             0         0       120   00:00:05
  10.0.0.2                 0         0       120   00:00:13
Distance: (default is 120)

</code>

+ router b
  + <code bash>

ripd# sh ip rip Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP Sub-codes:

    (n) - normal, (s) - static, (d) - default, (r) - redistribute,
    (i) - interface
   Network            Next Hop         Metric From            Tag Time

C(i) 10.0.0.0/8 0.0.0.0 1 self 0 R(n) 20.0.0.0/8 10.0.0.1 2 10.0.0.1 0 02:37 C(i) 30.0.0.0/8 0.0.0.0 1 self 0 R(n) 40.0.0.0/8 192.168.1.34 2 192.168.1.34 0 02:37 R(n) 192.168.1.16/28 10.0.0.1 2 10.0.0.1 0 02:37 C(i) 192.168.1.32/28 0.0.0.0 1 self 0 ripd# sh ip rip st Routing Protocol is “rip”

Sending updates every 30 seconds with +/-50%, next due in 1 seconds
Timeout after 180 seconds, garbage collect after 120 seconds
Outgoing update filter list for all interface is not set
Incoming update filter list for all interface is not set
Default redistribution metric is 1
Redistributing: connected
Default version control: send version 2, receive version 2 
  Interface        Send  Recv   Key-chain
  eth0             2     2      
  eth1             2     2      
  eth2             2     2      
Routing for Networks:
  eth0
  eth1
  eth2
Routing Information Sources:
  Gateway          BadPackets BadRoutes  Distance Last Update
  10.0.0.1                 0         0       120   00:00:26
  192.168.1.34             0         0       120   00:00:26
Distance: (default is 120)

</code>

+ router c
  + <code bash>

ripd# sh ip rip Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP Sub-codes:

    (n) - normal, (s) - static, (d) - default, (r) - redistribute,
    (i) - interface
   Network            Next Hop         Metric From            Tag Time

R(n) 10.0.0.0/8 192.168.1.17 2 192.168.1.17 0 02:36 R(n) 20.0.0.0/8 192.168.1.17 2 192.168.1.17 0 02:36 R(n) 30.0.0.0/8 192.168.1.33 2 192.168.1.33 0 02:27 C(i) 40.0.0.0/8 0.0.0.0 1 self 0 C(i) 192.168.1.16/28 0.0.0.0 1 self 0 C(i) 192.168.1.32/28 0.0.0.0 1 self 0 ripd# sh ip rip st Routing Protocol is “rip”

Sending updates every 30 seconds with +/-50%, next due in 8 seconds
Timeout after 180 seconds, garbage collect after 120 seconds
Outgoing update filter list for all interface is not set
Incoming update filter list for all interface is not set
Default redistribution metric is 1
Redistributing: connected
Default version control: send version 2, receive version 2 
  Interface        Send  Recv   Key-chain
  eth0             2     2      
  eth1             2     2      
  eth2             2     2      
Routing for Networks:
  eth0
  eth1
  eth2
Routing Information Sources:
  Gateway          BadPackets BadRoutes  Distance Last Update
  192.168.1.17             0         0       120   00:00:27
  192.168.1.33             0         0       120   00:00:03
Distance: (default is 120)

</code>

Here are the packes

1	0.000000	192.168.1.17	224.0.0.9	RIPv2	Request
2	0.011695	10.0.0.1	224.0.0.9	RIPv2	Request
3	0.020946	192.168.1.17	224.0.0.22	IGMP	V3 Membership Report / Join group 224.0.0.9 for any sources
4	0.023129	192.168.1.34	224.0.0.9	RIPv2	Request
5	0.033022	10.0.0.1	224.0.0.22	IGMP	V3 Membership Report / Join group 224.0.0.9 for any sources
6	0.048309	192.168.1.34	224.0.0.22	IGMP	V3 Membership Report / Join group 224.0.0.9 for any sources
7	0.052260	192.168.1.18	224.0.0.9	RIPv2	Request
8	0.060458	192.168.1.33	224.0.0.9	RIPv2	Request
11	0.066541	192.168.1.17	192.168.1.18	RIPv2	Response
14	0.071235	192.168.1.34	192.168.1.33	RIPv2	Response
 
23	0.951329	192.168.1.17	224.0.0.9	RIPv2	Response
24	0.963090	10.0.0.1	224.0.0.9	RIPv2	Response

In RIP2 requests and response are sent mostly in multicase group 224.0.0.9. And neighbors get unicasts during the adjacency. The the database is roughly multicasted every 30 seconds. According to the implementation the 30 seconds can vary +/-50%.

There are more fields carried in RIP2 packets. Next we have a look at one packet in more detail, for example, packet 11 in the above table

Routing Information Protocol
Command: Response (2)
Version: RIPv2 (2)
Routing Domain: 0
 
IP Address: 10.0.0.0, Metric: 1
Address Family: IP (2)
Route Tag: 0
IP Address: 10.0.0.0 (10.0.0.0)
Netmask: 255.0.0.0 (255.0.0.0)
Next Hop: 0.0.0.0 (0.0.0.0)
Metric: 1
.
.

The whole routing idea/algorithm is the same, but RIP has the netmask filed built in to be able to support VLSM. The routing domain makes it possible to run multiple instances of RIP on the same network. The route tag is used to differentiate external routes injected by other routing protocol and locally learned routes. The next hop filed make it possible to give different next hop rather than use the sender of the packet. In RIP 1 this is assumed, however in RIP2 it is not the case. In this packet, since it is all 0.0.0.0/0, it means that the next hop should be the sender.

Network 2

This is the general diagram

What happens if you run RIP version 1 in this network?

+ Script to run this network with RIP version 1
  + <code bash>

#!/bin/sh

#start switches in hub mode first ./netstart start hub swa ./netstart start hub swb ./netstart start hub swc ./netstart start hub swd ./netstart start hub swcore

#start sniffers ./netstart start sniffer sniffera swa ./netstart start sniffer snifferb swb ./netstart start sniffer snifferc swc ./netstart start sniffer snifferd swd ./netstart start sniffer sniffercore swcore

sleep 10

#start hosts ./netstart start host hosta swa 172.19.16.2 255.255.240.0 172.19.31.255 172.19.16.1 ./netstart start host hostb swb 172.19.47.2 255.255.248.0 172.19.47.255 172.19.47.1 ./netstart start host hostc swc 172.19.52.2 255.255.252.0 172.19.55.255 172.19.52.1 ./netstart start host hostd swd 172.19.70.2 255.255.255.0 172.19.70.255 172.19.70.1

#start routers

./netstart start router routera swa 172.19.16.1 255.255.240.0 172.19.31.255 swcore 192.168.0.1 255.255.255.0 192.168.0.255 rip 1 ./netstart start router routerb swb 172.19.47.1 255.255.248.0 172.19.47.255 swcore 192.168.0.2 255.255.255.0 192.168.0.255 rip 1 ./netstart start router routerc swc 172.19.52.1 255.255.252.0 172.19.55.255 swcore 192.168.0.3 255.255.255.0 192.168.0.255 rip 1 ./netstart start router routerd swd 172.19.70.1 255.255.255.0 172.19.70.255 swcore 192.168.0.4 255.255.255.0 192.168.0.255 rip 1

</code>

Make sure it runs version 1. As I messed up a lot of times with the mix of version number.

ripd# sh run
 
Current configuration:
!
hostname ripd
password zebra
enable password zebra
log file /var/log/ripd1.log
log stdout
!
router rip
 version 1
 redistribute connected
 network eth0
 network eth1
 network eth2
!
line vty
!
end

Routing information from each router

+ router a
  + <code bash>

ripd# sh ip rip Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP Sub-codes:

    (n) - normal, (s) - static, (d) - default, (r) - redistribute,
    (i) - interface
   Network            Next Hop         Metric From            Tag Time

C(i) 172.19.16.0/20 0.0.0.0 1 self 0 C(i) 192.168.0.0/24 0.0.0.0 1 self 0 ripd# sh ip rip st Routing Protocol is “rip”

Sending updates every 30 seconds with +/-50%, next due in 25 seconds
Timeout after 180 seconds, garbage collect after 120 seconds
Outgoing update filter list for all interface is not set
Incoming update filter list for all interface is not set
Default redistribution metric is 1
Redistributing: connected
Default version control: send version 1, receive version 1 
  Interface        Send  Recv   Key-chain
  eth0             1     1      
  eth1             1     1      
Routing for Networks:
  eth0
  eth1
  eth2
Routing Information Sources:
  Gateway          BadPackets BadRoutes  Distance Last Update
Distance: (default is 120)

</code>

+ router b
  + <code bash>

ripd# sh ip rip Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP Sub-codes:

    (n) - normal, (s) - static, (d) - default, (r) - redistribute,
    (i) - interface
   Network            Next Hop         Metric From            Tag Time

C(i) 172.19.40.0/21 0.0.0.0 1 self 0 C(i) 192.168.0.0/24 0.0.0.0 1 self 0 ripd# sh ip rip st Routing Protocol is “rip”

Sending updates every 30 seconds with +/-50%, next due in 18 seconds
Timeout after 180 seconds, garbage collect after 120 seconds
Outgoing update filter list for all interface is not set
Incoming update filter list for all interface is not set
Default redistribution metric is 1
Redistributing: connected
Default version control: send version 1, receive version 1 
  Interface        Send  Recv   Key-chain
  eth0             1     1      
  eth1             1     1      
Routing for Networks:
  eth0
  eth1
  eth2
Routing Information Sources:
  Gateway          BadPackets BadRoutes  Distance Last Update
Distance: (default is 120)

</code>

+ router c
  + <code bash>

ripd# sh ip rip Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP Sub-codes:

    (n) - normal, (s) - static, (d) - default, (r) - redistribute,
    (i) - interface
   Network            Next Hop         Metric From            Tag Time

C(i) 172.19.52.0/22 0.0.0.0 1 self 0 C(i) 192.168.0.0/24 0.0.0.0 1 self 0 ripd# sh ip rip st Routing Protocol is “rip”

Sending updates every 30 seconds with +/-50%, next due in 7 seconds
Timeout after 180 seconds, garbage collect after 120 seconds
Outgoing update filter list for all interface is not set
Incoming update filter list for all interface is not set
Default redistribution metric is 1
Redistributing: connected
Default version control: send version 1, receive version 1 
  Interface        Send  Recv   Key-chain
  eth0             1     1      
  eth1             1     1      
Routing for Networks:
  eth0
  eth1
  eth2
Routing Information Sources:
  Gateway          BadPackets BadRoutes  Distance Last Update
Distance: (default is 120)

</code>

+ router d
  + <code bash>

ripd# sh ip r Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP Sub-codes:

    (n) - normal, (s) - static, (d) - default, (r) - redistribute,
    (i) - interface
   Network            Next Hop         Metric From            Tag Time

C(i) 172.19.70.0/24 0.0.0.0 1 self 0 C(i) 192.168.0.0/24 0.0.0.0 1 self 0 ripd# sh ip r st Routing Protocol is “rip”

Sending updates every 30 seconds with +/-50%, next due in 25 seconds
Timeout after 180 seconds, garbage collect after 120 seconds
Outgoing update filter list for all interface is not set
Incoming update filter list for all interface is not set
Default redistribution metric is 1
Redistributing: connected
Default version control: send version 1, receive version 1 
  Interface        Send  Recv   Key-chain
  eth0             1     1      
  eth1             1     1      
Routing for Networks:
  eth0
  eth1
  eth2
Routing Information Sources:
  Gateway          BadPackets BadRoutes  Distance Last Update
Distance: (default is 120)

</code>

There is no dynamically learned routing from any one of the router. This is the expected situation which should happen as this is running RIP1. The hosts can not go any further than the directly connected gateway.

The subnets are now on the other side of the routers, they are not directly in between routers, like the situation in network1. So RIP 1 cannot learn it from the interface anymore, that is why the “learning from interface” does not work either.

On the core switch in the middle I got only the IGMP to for the routers to join the 224.0.0.9, and 4 requests packets for 192.168.0.0/24. Nothing else.

What happens if you run RIP version 2 in this network?

+ script to start network2 in RIPv2
  + <code bash>

#!/bin/sh

#start switches in hub mode first ./netstart start hub swa ./netstart start hub swb ./netstart start hub swc ./netstart start hub swd ./netstart start hub swcore

#start sniffers ./netstart start sniffer sniffera swa ./netstart start sniffer snifferb swb ./netstart start sniffer snifferc swc ./netstart start sniffer snifferd swd ./netstart start sniffer sniffercore swcore

sleep 10

#start hosts ./netstart start host hosta swa 172.19.16.2 255.255.240.0 172.19.31.255 172.19.16.1 ./netstart start host hostb swb 172.19.47.2 255.255.248.0 172.19.47.255 172.19.47.1 ./netstart start host hostc swc 172.19.52.2 255.255.252.0 172.19.55.255 172.19.52.1 ./netstart start host hostd swd 172.19.70.2 255.255.255.0 172.19.70.255 172.19.70.1

#start routers

./netstart start router routera swa 172.19.16.1 255.255.240.0 172.19.31.255 swcore 192.168.0.1 255.255.255.0 192.168.0.255 rip 2 ./netstart start router routerb swb 172.19.47.1 255.255.248.0 172.19.47.255 swcore 192.168.0.2 255.255.255.0 192.168.0.255 rip 2 ./netstart start router routerc swc 172.19.52.1 255.255.252.0 172.19.55.255 swcore 192.168.0.3 255.255.255.0 192.168.0.255 rip 2 ./netstart start router routerd swd 172.19.70.1 255.255.255.0 172.19.70.255 swcore 192.168.0.4 255.255.255.0 192.168.0.255 rip 2 </code>

routing information from each router

+ router a
  + <code bash>

ripd# sh ip r Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP Sub-codes:

    (n) - normal, (s) - static, (d) - default, (r) - redistribute,
    (i) - interface
   Network            Next Hop         Metric From            Tag Time

C(i) 172.19.16.0/20 0.0.0.0 1 self 0 R(n) 172.19.40.0/21 192.168.0.2 2 192.168.0.2 0 02:40 R(n) 172.19.52.0/22 192.168.0.3 2 192.168.0.3 0 02:53 R(n) 172.19.70.0/24 192.168.0.4 2 192.168.0.4 0 02:29 C(i) 192.168.0.0/24 0.0.0.0 1 self 0 ripd# sh ip r st Routing Protocol is “rip”

Sending updates every 30 seconds with +/-50%, next due in 4 seconds
Timeout after 180 seconds, garbage collect after 120 seconds
Outgoing update filter list for all interface is not set
Incoming update filter list for all interface is not set
Default redistribution metric is 1
Redistributing: connected
Default version control: send version 2, receive version 2 
  Interface        Send  Recv   Key-chain
  eth0             2     2      
  eth1             2     2      
Routing for Networks:
  eth0
  eth1
  eth2
Routing Information Sources:
  Gateway          BadPackets BadRoutes  Distance Last Update
  192.168.0.4              0         0       120   00:00:34
  192.168.0.2              0         0       120   00:00:23
  192.168.0.3              0         0       120   00:00:11
Distance: (default is 120)

</code>

+ router b
  + <code bash>

ripd# sh ip r Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP Sub-codes:

    (n) - normal, (s) - static, (d) - default, (r) - redistribute,
    (i) - interface
   Network            Next Hop         Metric From            Tag Time

R(n) 172.19.16.0/20 192.168.0.1 2 192.168.0.1 0 02:56 C(i) 172.19.40.0/21 0.0.0.0 1 self 0 R(n) 172.19.52.0/22 192.168.0.3 2 192.168.0.3 0 02:49 R(n) 172.19.70.0/24 192.168.0.4 2 192.168.0.4 0 02:56 C(i) 192.168.0.0/24 0.0.0.0 1 self 0 ripd# sh ip r st Routing Protocol is “rip”

Sending updates every 30 seconds with +/-50%, next due in 22 seconds
Timeout after 180 seconds, garbage collect after 120 seconds
Outgoing update filter list for all interface is not set
Incoming update filter list for all interface is not set
Default redistribution metric is 1
Redistributing: connected
Default version control: send version 2, receive version 2 
  Interface        Send  Recv   Key-chain
  eth0             2     2      
  eth1             2     2      
Routing for Networks:
  eth0
  eth1
  eth2
Routing Information Sources:
  Gateway          BadPackets BadRoutes  Distance Last Update
  192.168.0.1              0         0       120   00:00:07
  192.168.0.4              0         0       120   00:00:07
  192.168.0.3              0         0       120   00:00:14
Distance: (default is 120)

</code>

+ router c
  + <code bash>

ripd# sh ip r Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP Sub-codes:

    (n) - normal, (s) - static, (d) - default, (r) - redistribute,
    (i) - interface
   Network            Next Hop         Metric From            Tag Time

R(n) 172.19.16.0/20 192.168.0.1 2 192.168.0.1 0 02:43 R(n) 172.19.40.0/21 192.168.0.2 2 192.168.0.2 0 02:46 C(i) 172.19.52.0/22 0.0.0.0 1 self 0 R(n) 172.19.70.0/24 192.168.0.4 2 192.168.0.4 0 02:42 C(i) 192.168.0.0/24 0.0.0.0 1 self 0 ripd# sh ip r st Routing Protocol is “rip”

Sending updates every 30 seconds with +/-50%, next due in 3 seconds
Timeout after 180 seconds, garbage collect after 120 seconds
Outgoing update filter list for all interface is not set
Incoming update filter list for all interface is not set
Default redistribution metric is 1
Redistributing: connected
Default version control: send version 2, receive version 2 
  Interface        Send  Recv   Key-chain
  eth0             2     2      
  eth1             2     2      
Routing for Networks:
  eth0
  eth1
  eth2
Routing Information Sources:
  Gateway          BadPackets BadRoutes  Distance Last Update
  192.168.0.2              0         0       120   00:00:17
  192.168.0.1              0         0       120   00:00:21
  192.168.0.4              0         0       120   00:00:21
Distance: (default is 120)

</code>

+ router d
  + <code bash>

ripd# sh ip r Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP Sub-codes:

    (n) - normal, (s) - static, (d) - default, (r) - redistribute,
    (i) - interface
   Network            Next Hop         Metric From            Tag Time

R(n) 172.19.16.0/20 192.168.0.1 2 192.168.0.1 0 02:33 R(n) 172.19.40.0/21 192.168.0.2 2 192.168.0.2 0 02:42 R(n) 172.19.52.0/22 192.168.0.3 2 192.168.0.3 0 02:56 C(i) 172.19.70.0/24 0.0.0.0 1 self 0 C(i) 192.168.0.0/24 0.0.0.0 1 self 0 ripd# sh ip r st Routing Protocol is “rip”

Sending updates every 30 seconds with +/-50%, next due in 6 seconds
Timeout after 180 seconds, garbage collect after 120 seconds
Outgoing update filter list for all interface is not set
Incoming update filter list for all interface is not set
Default redistribution metric is 1
Redistributing: connected
Default version control: send version 2, receive version 2 
  Interface        Send  Recv   Key-chain
  eth0             2     2      
  eth1             2     2      
Routing for Networks:
  eth0
  eth1
  eth2
Routing Information Sources:
  Gateway          BadPackets BadRoutes  Distance Last Update
  192.168.0.2              0         0       120   00:00:20
  192.168.0.1              0         0       120   00:00:30
  192.168.0.3              0         0       120   00:00:07
Distance: (default is 120)

</code>

The behavior of RIP2 here is also as expected, full working. All the routes should be learned and installed properly.

Only thing worth mentioning is that RIP is using split horizon to avoid storm and loop. As can be seen in the following packets, router b is only responding with the directly connected 172.19.40.0 network and router d is only responding with 172.19.70.0. All the other routes are learned from each other, therefor should not be multi casted back.

#router b
7	0.144773	192.168.0.2	192.168.0.1	RIPv2	Response
IP Address: 172.19.40.0, Metric: 1
 
#router b
27	0.965577	192.168.0.2	224.0.0.9	RIPv2	Response
IP Address: 172.19.40.0, Metric: 1
 
#router d
28	1.087579	192.168.0.4	224.0.0.9	RIPv2	Response
IP Address: 172.19.70.0, Metric: 1

Make a full analysis of the packet trace in both cases. Document your findings.

Please see the log above