$24
Instructions: You have to upload the code along with the outputs for this assignment in a tar le using the lab submission website on or before 25.03.2019. The submission le name should be assign5.tgz.
Write a python code in Mininet to create a topology which comprises of two hosts (h1, h2)
connected to a single switch. The pair of hosts will transfer TCP packets among each other using sockets. The server host (h1) will have port number 5111 and monitor the results every 2 seconds (obtain the statistics after every 2 seconds). The client host (h2) will send packets for 20 seconds. Show the throughput for the transfer.
Write a python code to create a network topology that comprises of ve hosts namely, a, b, c, s and t, and two switches namely e and f and the links between them are as shown in the gure. Each host and switch should have an IP address and MAC address set. The topology must have the following characteristics:
Figure 1: A Topology
The bandwidth between the hosts and the switch is 5Mbps with transmission delay of 3ms and 2% packet drop. The queue in switch can accommodate a maximum of 300packets.
The bandwidth between the switches is 15Mbps and has a transmission delay of 2ms.
The program should show the detailed connectivity of the network and further check it by ping command.
Write a python code to incorporate NAT basic functionality. Create a network that comprises
of NAT server, NATs internal interface (eth1) is connected to a switch, namely s1 which is further connected to the hosts h1, h2, h3 and its external interface (eth2) is connected to a switch, namely s2 that is further connected to two servers(s,t).
When an internal host opens a TCP connection to an external host, NAT must rewrite the packet so that it appears as if it is coming from the NATs external address.
1