Within Mininet, create the following topology. Here h1 is a remote server (ie…
- User
Within Mininet, create the following topology. Here h1 is a remote server (ie google.com) on the Internet that has a fast connection (1Gb/s) to your home router with a slow downlink connection (10Mb/s). The round-trip propagation delay, or the minimum RTT between h1 and h2 is 6ms. The router buffer size can hold 100 full sized ethernet frames (about 150kB with an MTU of 1500 bytes). Then do the following: Start a long lived TCP flow sending data from h1 to h2. Use iperf. Send pings from h1 to h2 10 times a second and record the RTTs. Plot the time series of the following: o The long lived TCP flow’s cwnd o The RTT reported by ping o Queue size at the bottleneck Spawn a webserver on h1. Periodically download the index.html web page (three times every five seconds) from h1 and measure how long it takes to fetch it (on average). The starter code has some hints on how to do this. Make sure that the webpage download data is going in the same direction as the long-lived flow. The long lived flow, ping train, and web server downloads should all be happening simultaneously. Repeat the above experiment and replot all three graphs with a smaller router buffer size (Q=20 packets). write this code in ubuntu in python3.
- Assistant
Creating the Mininet topology and implementing the required experiments can be done using the Mininet-WiFi Python API. Here's a code example to help you get started:
from mininet.net import Mininet from mininet.node import CPULimitedHost, Host, OVSController from mininet.link import TCLink from mininet.cli import CLI def create_topology(): net = Mininet(controller=OVSController, link=TCLink) h1 = net.addHost('h1', cls=Host, ip='192.168.0.1/24', defaultRoute='via 192.168.0.254') h2 = net.addHost('h2', cls=Host, ip='192.168.0.2/24', defaultRoute='via 192.168.0.254') router = net.addHost('router', cls=CPULimitedHost) net.addLink(h1, router, bw=1000, delay='6ms', max_queue_size=100) # Connection between h1 and router net.addLink(router, h2, bw=10, max_queue_size=100) # Connection between router and h2 net.start() net.pingAll() CLI(net) net.stop() create_topology()