1. The purpose of the experiment
- Familiar with the experimental environment
- Familiar with basic Linux operations
2. Experimental requirements
2.1. Tasks
Please complete the installation of specific open source software according to the experimental environment installation documentation
2.2. Experiment report
- Please use Markdown for typesetting and submit it in the class work area of the blog garden. Students who are not familiar with Markdown can refer to the Markdown example
- Just submit a screenshot containing the following information:
- Installation directory information: /home/username/student number
- Installed software in the above directory
- Folders included after a full installation of Mininet
- Postman
- OpenDaylight (Carbon or Beryllium)
- Ryu
- The result of running the java -version command
3. Experiment submission
1. The purpose of the experiment
- Ability to install Mininet using source code;
- Ability to generate topology using Mininet's visualization tools;
- Ability to generate specific topologies using Mininet's command line;
- Ability to manage SDN topology using Mininet interface;
- Ability to build SDN topologies using Python scripts.
2. Experimental environment
Ubuntu 20.04 Desktop amd64
3. Experimental requirements
(1) Basic requirements
-
Use the Mininet visualization tool to generate the topology shown in the figure below, and save the topology file as student ID.py1. Use the Mininet visualization tool to generate the topology shown in the figure below, and save the topology file as student ID.p2. Use Mininet The command line generates the following topology
2. Use the command line of Mininet to generate the following topology: a) 3 switches, each switch is connected to a host, and the 3 switches are connected into a line.

3. Use the command line of Mininet to generate the following topology: a) 3 switches, each switch is connected to a host, and the 3 switches are connected into a line.
4. On the basis of 2b), add a new host on the Mininet interactive interface and connect it to the switch, and then test the connectivity of the new topology.
5. Edit the Python script saved in step 1 of the basic requirements, add the following network performance constraints, and generate the topology:
a) The maximum cpu of h1 does not exceed 50%;
b) The link bandwidth between h1 and s1 is 10, the delay is 5ms, the maximum queue size is 1000, and the loss rate is 50.
#!/usr/bin/env python from mininet.net import Mininet from mininet.node import Controller, RemoteController, OVSController from mininet.node import CPULimitedHost, Host, Node from mininet.node import OVSKernelSwitch, UserSwitch from mininet.node import IVSSwitch from mininet.cli import CLI from mininet.log import setLogLevel, info from mininet.link import TCLink, Intf from subprocess import call def myNetwork(): net = Mininet( topo=None, build=False, ipBase='10.0.0.0/8') info( '*** Adding controller\n' ) c0=net.addController(name='c0', controller=Controller, protocol='tcp', port=6633) info( '*** Add switches\n') s2 = net.addSwitch('s2', cls=OVSKernelSwitch) s1 = net.addSwitch('s1', cls=OVSKernelSwitch) info( '*** Add hosts\n') h4 = net.addHost('h4', cls=Host, ip='10.0.0.4', defaultRoute=None) h3 = net.addHost('h3', cls=Host, ip='10.0.0.3', defaultRoute=None) h1 = net.addHost('h1', cls=Host, ip='10.0.0.1', defaultRoute=None,cpu=0.5) h2 = net.addHost('h2', cls=Host, ip='10.0.0.2', defaultRoute=None) info( '*** Add links\n') net.addLink(h1, s1,bw=10,delay='5ms',max_queue_size=1000,loss=50,use_htb=True) net.addLink(h2, s1) net.addLink(s1, s2) net.addLink(s2, h3) net.addLink(s2, h4) info( '*** Starting network\n') net.build() info( '*** Starting controllers\n') for controller in net.controllers: controller.start() info( '*** Starting switches\n') net.get('s2').start([]) net.get('s1').start([c0]) info( '*** Post configure switches and hosts\n') CLI(net) net.stop() if __name__ == '__main__': setLogLevel( 'info' ) myNetwork()
(2) Advanced requirements
Write a Python script to generate the following data center network topology, which requires:
-
Write a .py topology file and name it "student number_fattree.py";
-
The above file must be loaded through the custom parameter of Mininet, and the .py file generated by miniedit.py cannot be used directly;
-
The device name must be consistent with the following figure;
-
It is implemented using Python's loop function, and devices and links must not be added directly in the code.
4. Personal summary:
- In this experiment, I feel that I still have a lot of inexperience in the operation of mininet. I often type wrong commands, and my understanding of the experiment is not thorough enough. I need to strengthen my study.