Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Group Programming Assignment 4: Subnet Addressing in Mininet

CST 311: Intro to Computer Networks

Team 2: Oak Valley Otters

Ti any Andersen, Deniz Erisgen, Andrew Kassis, Laurand Osmeni

Due: October 22, 2022

Steps to run:
1. “sudo ./generate_cert.sh cst311.test”
2. “sudo python3 legacy_network.py”
1
Network Diagram

ff
2
Screen capture demonstrating legacy_network.py
starting up with no errors

3
Screen capture of successful pingall at the mininet> prompt
(Routing tables added)

4
List of changes made to legacy_network.py script

• The ipBase variable in line 45 was changed from 10.0.0.8/8 to 10.0.0.0/24 to align
with our network addressing design and allow addresses for 254 hosts within each
of the west coast and east coast networks.

• An IP address of 10.0.1.1/24 was added to r5. This address will link the r5-eth1
interface to s2.

• An IP address of 192.168.0.2/30 was added to r4. This will be the IP address of the
interface r4-eth0 on the link connecting r4 to r3. Designating the subnet mask as /30
will allow 4 IP addresses: two for each end of the r3-r4 link, one for the address of
the network number, and one for the broadcast address.

• An IP address of 10.0.0.3/24 was added to r3. This will be the address of interface
r3-eth1 that links to s1. A subnet mask of /24 will allow for 254 hosts.

• IP addresses and default routes were added to each of the four hosts. Host h2 needs
to be 10.0.0.2 in order to run the simple web server created in lab 6. The default
route for each host is the interface of the router that is on that host’s network. The
purpose of the default route is to send any packets that are not on the sending host’s
subnet to the router so they can be forwarded to their destination.

• Interfaces and IP addresses were speci ed at both ends of the links between routers
in order to connect them correctly.

• Interfaces and IP addresses were speci ed for routers and hosts connected to each
switch.

• Two ifcon g commands were added, one for r3 and one for r5, to correctly associate
the proper interfaces with their IP addresses. Before these lines were added, the
network was showing both interfaces on each router connected to their respective
networks, with neither interface going to r4.

• Two static routes were added for each router, for a total of six. If a router is not
connected to the subnet in which a packet is addressed to it must look for a static
route, which tells the router which interface it should be sent to based on the
packet’s subnet address. For example, if r5 receives a packet from h4 with a
10.0.0.0/24 address, the static route will tell r5 to send that packet on to 192.168.1.1
(r4), where it will be forwarded from there.

• Lastly, four xterm windows are created using makeTerm when the modi ed
legacy_network.py script is run. The host h2 runs a TLS-enabled simple web server,
and it is displayed on startup in its own window to demonstrate that it is working. A
TLS-enabled chat server is run on h4, and 2 chat clients will be run from h1 and h3.
This program is from the extra credit portion of assignment 3, so if either client types
in “bye”, the chat server and both chat clients will close.

fi
fi
fi
fi
5
Answers to Questions

a. What were any interesting ndings and lessons learned?


There were many lessons learned on this assignment. We got a lot of practice with
subnet addressing and assigning speci c IP addresses and interfaces to links. We had
to do a lot of troubleshooting when links didn’t work properly or when both interfaces
of a router were connected to the same IP address, even though they were assigned
something di erent earlier in the script. Implementing static routes and default routes
was an excellent learning experience, as was creating xterm windows on startup from
within the script.

b. Why didn’t the original program forward packets between the hosts?

Although basic links were created in the original program, there were no routing tables
because no static or default routes had been con gured. No IP addresses had been
designated for any speci c interfaces. A host could communicate with another host in
its own network because a router is unnecessary when the packet is destined for the
same subnet address.

c. Is the line ‘r3.cmd(‘syscstl -w net.ipv4.ip_forward=1’) required?

This line is de nitely required, as it allows r3 to forward


packets. Without this line, no packets will get through
r3, which means the “west coast” network is
unreachable. Router r3 is able to ping every other
node without this line, but no packets will come in one
interface of r3 and go out another. Displayed here is
the pingall result when this line is omitted.

d. Intentionally break your working program, e.g.: change a subnet length, IP


address, or default route for a host. Explain why your change caused the network
to break.

The program has been intentionally broken by changing the


default route on h4 to 10.0.0.1, when the subnet address/
mask for the east coast network is 10.0.1.0/24. With this
change, if any outgoing packet from h4 has a destination IP
address that does not match its own subnet, it will not
know where to send it. Host h4 is now only able to send
packets within its own subnet to h3 and r5, but any other
packet will be dropped.

ff
fi
fi
fi
fi
fi
6
Screen capture of a successful chat session

Wireshark Trace of communication between chat client/server


7
Screen capture of successful wget

8
Screenshot of both decrypted server certi cates
(Simple web server: left, Chat server: right)

fi

You might also like