Revision 55dd9368 mininet.py

View differences:

mininet.py
18 18
Hosts have a network interface which is configured via ifconfig/ip
19 19
link/etc. with data network IP addresses (e.g. 192.168.123.2 )
20 20

  
21
This version supports both the kernel or user space datapaths
21
This version supports both the kernel and user space datapaths
22 22
from the OpenFlow reference implementation.
23 23

  
24 24
In kernel datapath mode, the controller and switches are simply
25 25
processes in the root namespace.
26 26

  
27
Kernel OpenFlow datapaths are instantiated using dpctl(8), and are attached
28
to the one side of a veth pair; the other side resides in the host
29
namespace. In this mode, switch processes can simply connect to the
27
Kernel OpenFlow datapaths are instantiated using dpctl(8), and are
28
attached to the one side of a veth pair; the other side resides in the
29
host namespace. In this mode, switch processes can simply connect to the
30 30
controller via the loopback interface.
31 31

  
32 32
In user datapath mode, the controller and switches are full-service
......
35 35
currently routed although it could be bridged.)
36 36

  
37 37
In addition to a management interface, user mode switches also have
38
several switch interfaces, halves of veth pairs whose other halves reside
39
in the host nodes that the switches are connected to.
38
several switch interfaces, halves of veth pairs whose other halves
39
reside in the host nodes that the switches are connected to.
40 40

  
41 41
Naming:
42 42
   Host nodes are named h1-hN
......
61 61

  
62 62
History:
63 63
11/19/09 Initial revision (user datapath only)
64
11/19/09 Mininet demo at OpenFlow SWAI meeting
64 65
12/08/09 Kernel datapath support complete
65 66
12/09/09 Moved controller and switch routines into classes
66 67
12/12/09 Added subdivided network driver workflow
......
788 789

  
789 790
def init():
790 791
   "Initialize Mininet."
791
   # Note: this script must be run as root 
792
   # Perhaps we should do so automatically!
793 792
   if os.getuid() != 0: 
793
      # Note: this script must be run as root 
794
      # Perhaps we should do so automatically!
794 795
      print "*** Mininet must run as root."; exit( 1 )
795 796
   fixLimits()
796 797

  
797 798
if __name__ == '__main__':
798 799
   init()
799 800
   results = {}
800
   exit( 1 )
801
   print "*** Welcome to Mininet!"
802
   print "*** Look in examples/ for more examples\n"
801 803
   print "*** Testing Mininet with kernel and user datapath"
802 804
   for datapath in [ 'kernel', 'user' ]:
803 805
      k = datapath == 'kernel'
804
      # results += [ TreeNet( depth=2, fanout=2, kernel=k ).
805
      #   run( pingTestVerbose ) ]
806
      results[ datapath ] = []
807
      for switchCount in range( 1, 4 ):
808
         results[ datapath ]  += [ ( switchCount,
809
            LinearNet( switchCount, k).run( iperfTest ) ) ]
810
      # GridNet( 2, 2 ).run( Cli )
811
   print "*** Test results:", results
806
      network = TreeNet( depth=2, fanout=4, kernel=k)
807
      result = network.run( pingTestVerbose )
808
      results[ datapath ] = result
809
   print "*** Test results:", results

Also available in: Unified diff