Use mininet's visual interface miniedit for topology construction

Mininet 2.2.0 and later versions have a built-in visualization tool miniedit for constructing network topology. Using the miniedit visualization interface facilitates the creation of user-defined network topology, and creates a simpler environment for users who are not familiar with python scripts. The interface is intuitive. Strong operability. Therefore, this article introduces how to use miniedit.

All operations of miniedit are performed by the root user. First of all, we enter the root user.

So where is the location of miniedit? To find miniedit, we need to enter the directory of mininet. The directory of miniedit is shown in the following figure. You can see a file named miniedit.py.

Next, you need to start miniedit. Before starting, you need to ensure that the system and the python environment are installed. Enter the command: ./miniedit.py, the miniedit interface will appear after a while, as shown in the figure below. You can see the tools in the toolbar on the left, the first is simplified, the second represents the host, the third represents the sdn switch, the fourth represents the ordinary switch, the fifth represents the router, the sixth is the line, the Seven represent controllers.

Next, we try to build a simple network topology on miniedit. I build a network topology that includes a switch, a controller, and two hosts. If you need anything, click on the left column, and then click on the blank space on the right. The network topology is shown in the figure below.

Then, I configure the controller, switch, and host.

(1) Controller configuration: Place the mouse on the controller, right-click to display properties, and click to enter the setting interface. Name can define the name of the controller. The port default is usually 6633. Generally, there is no need to change it. The controller type I set is to support the openflow protocol. If the controller uses a remote controller, then the IP address needs to be set to the remote host ip address, for example, the IP address of the remote controller I use is 192.168.56.105.

(2) SDN switch configuration: place the mouse on the switch, right-click the property, and click to enter the setting interface. The hostname can define the name of the switch. The DPID is generally 16 bits, so I set it to 0000000000000001. The switch type refers to the type of the switch. Here I use an ovs switch, and I set the IP address to 10.0.0.101.

(3) Host configuration: place the mouse on the host, right-click the properties, and click to enter the setting interface. There are various settings in it, which can be set according to your needs. Here I only set the IP address of the host, h1 is 10.0.0.1, h2 is 10.0.0.2.

The next step is to set up the global and run the topology. After clicking edit in the upper left corner of the interface, properties appear. Click to enter the design interface. At this time, you need to check the start CLI. Only after checking this, you can operate in the Linux terminal. You can also select the supported openflow protocol according to your needs. . After the setting is complete, we can also save the topology. The python script is saved. Click on the file in the upper left corner and you will find the save option. Click to enter to save, and you can run the script directly in the terminal next time.

Next, run the topology, click run in the lower left corner to start running, and stop to stop running.

Since my remote controller is turned on, I will directly demonstrate how to use this topology. Please make sure that the controller is turned on before using it. For details on how to open it, please refer to my first two blogs.

After the network topology is running, there are two ways to operate.

(1) Operate directly in miniedit, right-click the host to open the terminal, and then you can perform normal operations. For example, enter ping 10.0.0.2 to ping h2.

(2) It can also be operated on the Linux terminal, the specific operation will not be repeated, you can refer to my first two blogs.

The above is the operation steps of miniedit, I hope it can help you, thank you for reading.

 

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin blog.csdn.net/weixin_40042248/article/details/109274982