BUILDIND THE INTERNET
Configuring a Router with Mininet
In this first group exercise you will build several LANs and make communication possible between them by configuring and using a router.
Resources
Here are a couple of important links:
- Links to download Mininet and the VM software are provided in Teams.
ipcofig
command: linkip
command: link- Mininet: Sample Workflow and Walkthrough
- Chapter 30 of one of our online books (Peter L. Dordal, An Introduction to Computer Networks, 2nd edition) has a whole chapter on Mininet.
Getting Familiar with Mininet
Once you have a configuration that works well (during class we will make sure you have a functional one) let's play around with Mininet.
You can follow the Sample Workflow or some parts of the Walkthrough provided by the Mininet creators.
Or we can keep it simple and just perform the following steps: the next code:
- Start your VM with Mininet in it. User is mininet and password is mininet.
- Type
sudo mn
in the console. This will create a network with two hosts (h1 and h2), one switch (s1), and one controller (the manage the switch). - You can do several things from here. You can ping h2 from h1 byt typing
h1 ping h2
, orh1 ping -c 3 h2
to only send 3 packets. - You can start a HTTP server in one host and visit it from another:
h1 python -m http.server 80 &
and then, to testh2 wget -O - h1
Creating a Custom Network
To start up, after everything is configured, let's start with a base example. Download the following python script router.py
. This script, when run on your VM, will create a network with 1 router (r1), two switches (s1, s2), and 4 hosts (h1, h2, h3, and h4). Hosts h1 and h3 are connected to switch s1 and belong to the same network 10.0.1.0/24
. Hosts h2 and h4 are connected to switch s2 and belong to the same network 10.0.2.0/24
. The switches (s1 and s2) are connected to the router. This network allows both sub-networks to communicate with each other.
The diagram for the network will look like this:
Make sure that you and your group understands the basis of this script
What to Submit
You will modify the router.py
script to be able to create a network that has four LANs (subnets) each with three hosts. Each LAN will have a switch (so four switches in total), and they (the switches) will be connected to a router. All the hosts should be able to ping each other. You can use the pingall
command to check this.
Prepare a 2 to 3 pages long report (one per group) addressing the group experience building this network and configuring the router, as well as performing pings to the different hosts in the networks. Make sure to include a diagram of your network with the respective IP addresses and MAC addresses of each device. Also include python script.
Evaluation
Your report will be graded on the following scale:
- Exceeds Expectations 5pts.
- Meets Expectations 4pts. (A)
- Near Expectations 3pts. (B)
- Below Expectations 2pts. (C)
- Poor Effort 1pt. (D)
- Not Done 0pts. (F)