2015年9月7日 星期一

Mininet 範例程式介紹

Mininet 範例程式介紹


Mininet中的example中有許多範例程式
在此先筆記一下各程式的功能
之後研究 在一一探討箇中含義



baresshd.py:

This example uses Mininet's medium-level API to create an sshd process running in a namespace. Doesn't use OpenFlow.
使用 Mininet 的中層 API 來在一個 namespace 中創建Host、Link,並在Host上執行sshd ,讓使用者可以登錄。並未使用 OpenFlow。


bind.py:

This example shows how you can create private directories for each node in a Mininet topology.
顯示如何在Mininet拓樸中創建每個Node的private directories。

cluster.py:

This example contains all of the code for experimental cluster edition. Remote classes and Mininet Cluster can be imported from here to create a topology with nodes on remote machines.
包含所有實驗版本的叢集程式碼。遠端控制類別和Mininet叢集可以匯入此範例以建立可在遠端機器上操控的拓墣。

clusterSanity.py:

This example runs cluster edition locally as a sanity check to test basic functionality.
此範例在本機端執行叢集全面性檢查,以測試基本的功能。

clustercli.py:

This example contains a CLI for experimental cluster edition.
此範例包含一個有CLI的實驗性叢集。


clusterdemo.py:

This example is a basic demo of cluster edition on 3 servers with a tree topology of depth 3 and fanout 3.
此範例包含一個基本的叢集演示,含有3台伺服器以及一個深度與廣度為3的樹狀拓樸。

consoles.py:

This example creates a grid of console windows, one for each node, and allows interaction with and monitoring of each console, including graphical monitoring.
此範例為每一個Nodes都創建 console 視窗,並允許使用者對這些Nodes進行操作和觀測,支援圖形介面。


controllers.py:

This example creates a network with multiple controllers, by using a custom Switch() subclass.
使用一個自訂的Switch() 子類別,創建一個帶有多個Controller的網路。

controllers2.py:

This example creates a network with multiple controllers by creating an empty network, adding nodes to it, and manually starting the switches.
創建一個擁有多個Controller的
空白網路,可自行添加Nodes和手動啟動交換機。


controlnet.py:

This examples shows how you can model the control network as well as the data network, by actually creating two Mininet objects.
此範例顯示如何透過創建兩個mininet物件來模擬一個控制網路和資料網路。


cpu.py:

This example tests iperf bandwidth for varying CPU limits.
在不同的 CPU 限制下測試 iperf 的頻寬性能。

emptynet.py:

This example demonstrates creating an empty network (i.e. with no topology object) and adding nodes to it.
此範例演示如何創建空白網路(沒有任何拓墣物件)之後再添加nodes。


hwintf.py:

This example shows how to add an interface (for example a real hardware interface) to a network after the network is created.
此範例顯示如何已建立的網路中增加一個介面(如真實的硬體介面)到該網路。

intfoptions.py:

This example reconfigures a TCIntf during runtime with different traffic control commands to test bandwidth, loss, and delay.
此範例在不同流量控致命令執行過程中,重新配置一個TCI介面以測試頻寬、丟失率以及延遲。

limit.py:

This example shows how to use link and CPU limits.
此範例顯示如何使用 link 和 CPU 限制。

linearbandwidth.py:

This example shows how to create a custom topology programatically by subclassing Topo, and how to run a series of tests on it.此範例顯示如何基於 Topo 子類別創建一個自定義拓撲,並進行一系列簡單的測試。

linuxrouter.py:

This example shows how to create and configure a router in Mininet that uses Linux IP forwarding.
此範例顯示如何在Mininet中創建並配置使用Linux IP轉送功能的Router

miniedit.py:

This example demonstrates creating a network via a graphical editor.
此範例演示以具有圖形介面的編輯器來創建網路。

mobility.py:

This example demonstrates detaching an interface from one switch and attaching it another as a basic way to move a host around a network.
此範例演示一個
在網路中移動Host的基本方法:從一台Switch中分離出介面,並與另一台Switch連接。

multiLink.py:

This example demonstrates the creation of multiple links between nodes using a custom Topology class.
此範例演示使用自定義拓樸類別創建Nodes之間的多條Links。


multiping.py:

This example demonstrates one method for monitoring output from multiple hosts, using node.monitor().
此範例演示如何使用 node.monitor() 來監控多個Host的output。


multipoll.py:

This example demonstrates monitoring output files from multiple hosts.
此範例演示如何監控多個Host的輸出文件。


multitest.py:

This example creates a network and runs multiple tests on it.
此範例創建一個網路,並在其上進行多個測試。

nat.py:
This example shows how to connect a Mininet network to the Internet using NAT. It also answers the eternal question "why can't I ping google.com?"
此範例顯示如何將 Mininet 的網路透過 nat 連接到外部網路。


natnet.py:

This example demonstrates how to create a network using a NAT node to connect hosts to the internet.
此範例演事如何在網路中使用NAT node將Host連到外部網路


numberedports.py:

This example verifies the mininet of port numbers match up to the ovs port numbers. It also verifies that the port numbers match up to the interface numbers
此範例用於驗證mininet的port numbers是否與ovs的port numbers媒合。同時驗證與port numbers媒合的interface number。


popen.py:

This example monitors a number of hosts using host.popen() and pmonitor().
使用 host.popen() 和 pmonitor() 來檢測大量Host。


popenpoll.py:

This example demonstrates monitoring output from multiple hosts using the node.popen() interface (which returns Popen objects) and pmonitor().
使用 node.popen() 介面(回傳Popen物件)和 pmonitor() 監控多個Host的output。

scratchnet.py, scratchnetuser.py:

These two examples demonstrate how to create a network by using the lowest- level Mininet functions. Generally the higher-level API is easier to use, but scratchnet shows what is going on behind the scenes.
使用低階的 Mininet 函數來創建網路。一般來說高階API較容易使用,但scratchnet 演示的是幕後工作。


simpleperf.py:

A simple example of configuring network and CPU bandwidth limits.
一個配置網路和 CPU、頻寬限制等的簡單範例。


sshd.py:

This example shows how to run an sshd process in each host, allowing you to log in via ssh. This requires connecting the Mininet data network to an interface in the root namespace (generaly the control network already lives in the root namespace, so it does not need to be explicitly connected.)
此範例在每個Host裡面運行一個sshd process,讓使用者透過 ssh 來登入Host。
這需要將 Mininet 的資料網路連接到 root namespace的一個介面上。
(一般來說,控制網路已經存在 root  namespace中,所以默認已經連接。)


tree1024.py:

This example attempts to create a 1024-host network, and then runs the CLI on it. It may run into scalability limits, depending on available memory and sysctl configuration (see INSTALL.)
創建一個 1024 Host的網路,然後運行 CLI。
根據系統資源情況發生可擴展性的限制,可能需要利用 sysctl 進行相關修改(請見INSTALL)。


treeping64.py:

This example creates a 64-host tree network, and attempts to check full connectivity using ping, for different switch/datapath types.
創建一個 64 Host的樹狀網路,利用 ping 來檢查連接狀態。


vlanhost.py:

An example of how to subclass Host to use a VLAN on its primary interface.
演示子類別的Host如何在它的primary interface中使用VLAN。

沒有留言:

張貼留言