49202: Communication Protocols
Laboratory Notes: Laboratory 5
Dr. Daniel R. Franklin
March 22, 2021
March 22, 2021 Laboratory Notes - 49202- Communication Protocols 1
CONTENTS CONTENTS
Contents
1 Introduction 2
2 Setup 2
3 Laboratory Tasks 2
3.1 Dynamic routing - RIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3.2 Dynamic routing - RIP with link failure . . . . . . . . . . . . . . . . . . . . . . . . 4
3.3 Dynamic routing - OSPF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.4 Dynamic routing - OSPF with link failure . . . . . . . . . . . . . . . . . . . . . . . 5
March 22, 2021 Laboratory Notes - 49202- Communication Protocols 1
3 LABORATORY TASKS
1 Introduction
This laboratory primarily covers the content in Module 5, but also includes some material from other
Modules. The main aims of this laboratory are to:
1. To understand how different routing strategies work;
2. To see various routing strategies and various protocols in action in the laboratory; and
3. To gain insight into the relative advantages and disadvantages of different routing strategies and
routing protocols, including their performance and their behaviour in response to failures in the
network.
2 Setup
Prior to starting the lab, start your virtual machine (refer to Lab 0 notes) and make sure you have the
latest version of the lab scripts:
cd ˜/comm-protocols-labs
git pull
Start your VM (as described in Lab 1), open a terminal window (note: you may always open more
than one terminal window if desired). For this lab, the virtual routers will be configured as shown in
Figure 1.
3 Laboratory Tasks
3.1 Dynamic routing - RIP
Start Mininet from the rip ring folder:
cd ˜/comm-protocols-labs/rip_ring
sudo ../[Link]
This starts Mininet with RIP enabled on all core router interfaces.
1. Start Wireshark on any of the core routers, listening on one of the router-to-router interfaces.
Identify what sort of routing protocol packets you can see. Have a look inside them and explain
the payload.
2. What is the average frequency of exchanges (how many packets per minute over an interval of
(say) 3 minutes do you observe)?
3. What is the average size of the RIP packets?
March 22, 2021 Laboratory Notes - 49202- Communication Protocols 2
3.1 Dynamic routing - RIP 3 LABORATORY TASKS
Internet
h1 h2
h1-eth0 h2-eth0
enp0s3 [Link]
r9-eth1 [Link]
[Link]
r9 (NAT) r1-eth3
r1- r2-eth3
e
10. th5 [Link] r2 [Link]
1.9 r1-eth1 r2-eth1
.1
[Link] [Link]
r2
th .1r1 10 -eth
2 r3
r1- 1.5.1
2
th .8 -e .2 2 10 -eth
10
r1 .1.8 .3
eth
-e .2 .2 1
r8 .8.1
.
10 .3
4
0 .3
h8-eth0 1 h3-eth0
h8 [Link] r8 r3 h3
r8-eth3 r3-eth3 [Link]
[Link] r8-eth1 r3-eth2 [Link]
[Link] [Link]
r7-eth2 r4-eth1
r7-eth3 [Link] [Link] r4-eth3
[Link]
[Link] r7 r4
h7-eth0 r7 h4-eth0
r5- 5.1.5
2
10 -eth r6 th .4 [Link]
10
eth
[Link] .6 1 10 -eth 1
th .5 -e
r4 .4.5
.
.7 -e
4
.6 2
.7 .7
.6 r5 .4.5 10
10
r6-eth1 r5-eth2
h7 [Link] [Link] h4
r6 r6-eth3 r5 r5-eth3
[Link]
[Link]
h6-eth0 h5-eth0
[Link] [Link]
h6 h5
Figure 1: Network topology for Lab 5.
March 22, 2021 Laboratory Notes - 49202- Communication Protocols 3
3.2 Dynamic routing - RIP with link failure 3 LABORATORY TASKS
4. Using ping -R and traceroute, examine the path taken through the network from host
h1 to each of the other hosts in the network. How does this compare to the result you obtained
in Laboratory 4? Are these paths optimal?
Do NOT shutdown Mininet after this step; the next step will also use RIP.
3.2 Dynamic routing - RIP with link failure
Do NOT restart Mininet.
In this exercise, we will simulate the failure of one of the links and observe the behaviour of RIP in
response to this failure.
1. From h1, start a ping -R session to h4, with NO terminal count. Make a note of the path taken
through the network by the ICMP ping request and response packets; also make a note of the
average round-trip time (you might want to run it once with a small terminal count to record
this information).
2. Open an xterm on r5 and run the interface-killing script:
../bin/kill_interfaces.sh
This will disable the interfaces r5-eth1 and r5-eth2. What happens to the ping ses-
sion? Monitor the ping until the packets start getting through again. How many packets
were dropped? If you send packets once per second, you can simply calculate the gap in the
icmp seq to tell you the recovery time in seconds. What is the new route? You can use
traceroute to verify this. Use ctrl-C to terminate the ping session if you haven’t already
done so.
3. Restart the ping from h1 to h4. On r5, run the interface-restoring script:
../bin/restore_interfaces.sh
This will re-enable the interfaces r5-eth1 and r5-eth2 after a 5 second delay. What hap-
pens to the ping session? Does the path revert to the original path? How long does this take
from the expiry of the 5 second timer? Are any packets dropped this time?
Shut down Mininet after completing this step.
3.3 Dynamic routing - OSPF
Start Mininet from the ospf ring folder:
cd ˜/comm-protocols-labs/ospf_ring
sudo ../[Link]
This starts Mininet with OSPF enabled on all core router interfaces. You may need to wait a minute
or two for the network to converge.
March 22, 2021 Laboratory Notes - 49202- Communication Protocols 4
3.4 Dynamic routing - OSPF with link failure 3 LABORATORY TASKS
1. Start Wireshark on any of the core routers, listening on one of the router-to-router interfaces.
Identify what sort of routing protocol packets you can see. Have a look inside them and explain
the payload. How does the payload compare with what you observed for RIP?
2. What is the average frequency of exchanges (how many packets per minute over an interval of
(say) 3 minutes do you observe)?
3. What is the average size of the OSPF packets?
4. Using ping -R and traceroute, examine the path taken through the network from host
h1 to each of the other hosts in the network. How does this compare to the result you obtained
in Laboratory 4 and Section 3.1?
Do NOT shutdown Mininet after this step; the next step will also use OSPF.
3.4 Dynamic routing - OSPF with link failure
In this exercise, we will simulate the failure of one of the links and observe the behaviour of OSPF in
response to this failure.
1. From h1, start a ping -R session to h4, with NO terminal count. Make a note of the path taken
through the network by the ICMP ping request and response packets; also make a note of the
average round-trip time (you might want to run it once with a small terminal count to record
this information).
2. Open an xterm on r5 and run the interface-killing script:
../bin/kill_interfaces.sh
What happens to the ping session? Monitor the ping until the packets start getting through
again. How many packets were dropped? Again, calculate the gap in the icmp seq to tell you
the recovery time in seconds. What is the new route? You can use traceroute to verify this.
Use ctrl-C to terminate the ping session if you haven’t already done so.
3. Restart the ping from h1 to h4. On r5, run the interface-restoring script:
../bin/restore_interfaces.sh
This will re-enable the interfaces r5-eth1 and r5-eth2 after a 5 second delay. What hap-
pens to the ping session? Does the path revert to the original path? How long does this take
from the expiry of the 5 second timer? Are any packets dropped this time?
4. How do your observations compare to the case where a link failed in the RIP network (in
particular, recovery time after link failure)? Why is this the case?
March 22, 2021 Laboratory Notes - 49202- Communication Protocols 5
REFERENCES REFERENCES
References
[1] James F. Kurose and Keith W. Ross. Computer Networking A Top-Down Approach. 8th edition,
2020.
[2] Behrouz A. Forouzan. TCP/IP Protocol Suite. 4th edition, 2017.
March 22, 2021 Laboratory Notes - 49202- Communication Protocols 6