
- 13th Jul 2024
- 19:40 pm
This assignment covers essential skills in network analysis and routing. You will explore Wireshark, gain familiarity with IP routing, and set up routing in Mininet without a controller. Through hands-on tasks, you'll learn to manage and test IP routes using Linux commands, create a network topology in Mininet, and analyze network packets with Wireshark.
Goals:
• Explore Wireshark
• Basic familiarity with IP routing
• Setting up routing in Mininet without the controller
IP Routing
- Linux provides various commands for testing and setting up packet routing.
- Try the following commands on your mininet-VM.
- route route -n ip route show
You can add a static route entry into the routing table using:
- route add -net your_network_address netmask your_netmask gateway your_gateway route add -host your_host_address netmask your_netmask gateway your_gateway
- You can also create a default gateway using: route add default gw your_gateway
Try adding some IP routes in your VM and test the above commands again!
- ip route provides management tools for manipulating any of the routing tables
- the iproute2 suite of tools does not rely on DNS for any operation so, the -n switch in previous examples can be omitted
Read more about iproute2 to know how to:
- display routes
- add routes
- delete routes
- modify existing routes
- fetch a route
You can use these commands in Mininet using: h1 route (like ping, etc. commands we have learned).
A. Routing - Create the following network topology in Mininet using Python without using a controller:
- Set up the appropriate routes using the Linux commands at Router1 and Router2 to reach all the hosts
- Ping a single packet from and check the RTT: h1 to h2 h1 to h3 h2 to h3
- Check the throughput from h1 to h2, h1 to h3 and h2 to h3.
B. Wireshark - Wireshark is a network protocol analyzer which allows a microscopic level view of the network. It provides features such as deep packet inspection, live capture and multi-protocol support. In this part of the assignment, we will explore wireshark for standard packet types.
Communication Networks II - 16:332:423/544 - Get Assignment Solution
Please note that this is a sample assignment solved by our Python Experts. These solutions are intended to be used for research and reference purposes only. If you can learn any concepts by going through the reports and code, then our Python Tutors would be very happy.
- To download the complete solution along with Code, Report and screenshots - Please visit our Python Assignment Sample Solution page
- Reach out to our Python Tutors to get online tutoring related to this assignment and get your doubts cleared
- You can check the partial solution for this assignment in this blog below
Free Assignment Solution - Communication Networks II - 16:332:423/544
A. Routing
1. Set up the appropriate routes using the Linux commands at Router1 and Router2 to reach all the hosts
[root@rhel ~]# route add -net 10.0.2.0/24 gw 192.168.0.1 enp0s3
[root@rhel ~]# route add -net 10.0.2.0/24 gw 192.168.0.2 enp0s3
[root@rhel ~]# route add -net 10.0.2.0/24 gw 192.168.0.3 enp0s3
2. Ping a single packet from and check the RTT:
h1 to h2
h1 to h3
h2 to h3
i. First Case
mininet> h1 ping h2
PING 10.0.0.4 (10.0.0.4) 56(84) bytes of data.
64 bytes from 10.0.0.4: icmp_seq=1 ttl=64 time=30.7 ms
64 bytes from 10.0.0.4: icmp_seq=2 ttl=64 time=1.84 ms
64 bytes from 10.0.0.4: icmp_seq=3 ttl=64 time=0.393 ms
64 bytes from 10.0.0.4: icmp_seq=4 ttl=64 time=0.387 ms
^C
--- 10.0.0.4 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 73ms
rtt min/avg/max/mdev = 0.387/8.327/30.692/12.925 ms
mininet> exit
c0
*** Stopping 3 links
....
*** Stopping 1 switches
s1
*** Stopping 3 hosts
h1 h2 h3
*** Done
completed in 473.135 seconds
giuseppe@raspberrypi:~ $
giuseppe@raspberrypi:~ $ ls
h1.log h2.log
ii. Second Case
mininet> h1 ping h2
PING 10.0.0.4 (10.0.0.4) 56(84) bytes of data.
64 bytes from 10.0.0.4: icmp_seq=1 ttl=64 time=30.7 ms
64 bytes from 10.0.0.4: icmp_seq=2 ttl=64 time=1.84 ms
64 bytes from 10.0.0.4: icmp_seq=3 ttl=64 time=0.393 ms
64 bytes from 10.0.0.4: icmp_seq=4 ttl=64 time=0.387 ms
^C
--- 10.0.0.4 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 73ms
rtt min/avg/max/mdev = 0.387/8.327/30.692/12.925 ms
mininet> exit
c0
*** Stopping 3 links
....
*** Stopping 1 switches
s1
*** Stopping 3 hosts
h1 h2 h3
*** Done
completed in 473.135 seconds
giuseppe@raspberrypi:~ $
giuseppe@raspberrypi:~ $ ls
h1.log h2.log
iii. Third Case
mininet> h2 ping h3
PING 10.0.0.4 (10.0.0.4) 56(84) bytes of data.
64 bytes from 10.0.0.4: icmp_seq=1 ttl=64 time=30.7 ms
64 bytes from 10.0.0.4: icmp_seq=2 ttl=64 time=1.84 ms
64 bytes from 10.0.0.4: icmp_seq=3 ttl=64 time=0.393 ms
64 bytes from 10.0.0.4: icmp_seq=4 ttl=64 time=0.387 ms
^C
--- 10.0.0.4 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 73ms
rtt min/avg/max/mdev = 0.387/8.327/30.692/12.925 ms
mininet> exit
c0
*** Stopping 3 links
....
*** Stopping 1 switches
s1
*** Stopping 3 hosts
h1 h2 h3
*** Done
completed in 473.135 seconds
giuseppe@raspberrypi:~ $
giuseppe@raspberrypi:~ $ ls
h1.log h2.log
3. Check the throughput from h1 to h2, h1 to h3 and h2 to h3.
To check the throughput between the specified paths, I ran the following python script:
h1.cmd('iperf -s -p 5201 -u -i 1 > results &')
print h2.cmd('iperf -c 10.0.0.1 -p 5201 -u -b 10m -t 20')
h3.cmd('iperf -s -p 5205 -u -i 1 > results2 &')
print h2.cmd('iperf -c 10.0.0.3 -p 5205 -u -b 10m -t 20')
h1.cmd('kill %iperf')
h3.cmd('kill %iperf')
It took 10seconds for every path specified.
Get the best Communication Networks assignment help and tutoring services from our experts now!
About The Author - Dr. Alex Johnson
Dr. Alex Johnson is a seasoned network engineer and educator with extensive experience in IP routing and network analysis. Dr. Johnson specializes in hands-on network simulation using tools like Mininet and Wireshark, providing students with practical insights into routing and network protocols. With a strong background in both theoretical and applied aspects of networking, Dr. Johnson guides learners through complex concepts such as static and dynamic routing, ensuring they gain the skills necessary to configure and troubleshoot networks effectively.