75
Mininet Python API Reference Manual Generated by Doxygen 1.8.3.1 Tue Jul 30 2013 16:44:13

Mininet Python API Reference Manual

Embed Size (px)

DESCRIPTION

Python API manual for mininet

Citation preview

Page 1: Mininet Python API Reference Manual

Mininet Python API Reference Manual

Generated by Doxygen 1.8.3.1

Tue Jul 30 2013 16:44:13

Page 2: Mininet Python API Reference Manual
Page 3: Mininet Python API Reference Manual

Contents

1 Namespace Index 1

1.1 Namespace List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 Hierarchical Index 3

2.1 Class Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3 Class Index 5

3.1 Class List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

4 Namespace Documentation 7

4.1 topo Namespace Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4.1.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

5 Class Documentation 9

5.1 mininet.cli.CLI Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

5.1.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5.1.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5.1.2.1 default . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5.1.2.2 do_dpctl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5.1.2.3 do_dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5.1.2.4 do_gterm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5.1.2.5 do_help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5.1.2.6 do_intfs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5.1.2.7 do_iperf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5.1.2.8 do_iperfudp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5.1.2.9 do_link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

5.1.2.10 do_net . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

5.1.2.11 do_nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

5.1.2.12 do_noecho . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

5.1.2.13 do_pingall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Page 4: Mininet Python API Reference Manual

ii CONTENTS

5.1.2.14 do_pingallfull . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

5.1.2.15 do_pingpair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

5.1.2.16 do_pingpairfull . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

5.1.2.17 do_px . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

5.1.2.18 do_py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

5.1.2.19 do_source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

5.1.2.20 do_time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

5.1.2.21 do_x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

5.1.2.22 do_xterm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

5.1.2.23 emptyline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

5.1.2.24 waitForNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

5.1.3 Member Data Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

5.1.3.1 helpStr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

5.2 mininet.node.Controller Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

5.2.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

5.2.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

5.2.2.1 start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

5.2.2.2 stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

5.3 mininet.node.CPULimitedHost Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

5.3.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5.3.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5.3.2.1 config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5.3.2.2 popen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5.3.2.3 setCPUFrac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5.4 mininet.topo.Graph Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5.4.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5.5 mininet.node.Host Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5.5.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

5.6 mininet.link.Intf Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

5.6.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5.6.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5.6.2.1 __init__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5.6.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5.6.3.1 config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5.6.3.2 setMAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

5.6.3.3 setParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

5.7 mininet.topo.LinearTopo Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 5: Mininet Python API Reference Manual

CONTENTS iii

5.7.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

5.7.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

5.7.2.1 __init__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

5.8 mininet.link.Link Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

5.8.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

5.8.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

5.8.2.1 __init__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

5.8.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

5.8.3.1 intfName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

5.8.3.2 makeIntfPair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

5.9 mininet.net.Mininet Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

5.9.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5.9.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5.9.2.1 __init__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5.9.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

5.9.3.1 __getitem__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

5.9.3.2 addController . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

5.9.3.3 addHost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

5.9.3.4 addLink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

5.9.3.5 addSwitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

5.9.3.6 build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

5.9.3.7 buildFromTopo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

5.9.3.8 configHosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

5.9.3.9 configLinkStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

5.9.3.10 interact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

5.9.3.11 iperf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

5.9.3.12 monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

5.9.3.13 ping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

5.9.3.14 pingAll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

5.9.3.15 pingAllFull . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

5.9.3.16 pingFull . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

5.9.3.17 pingPair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

5.9.3.18 pingPairFull . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

5.9.3.19 run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

5.9.3.20 runCpuLimitTest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

5.9.3.21 start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

5.9.3.22 startTerms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 6: Mininet Python API Reference Manual

iv CONTENTS

5.9.3.23 staticArp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

5.9.3.24 stopXterms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

5.10 mininet.log.MininetLogger Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

5.10.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

5.10.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

5.10.2.1 output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

5.10.2.2 setLogLevel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

5.11 mininet.net.MininetWithControlNet Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

5.11.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

5.11.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

5.11.2.1 configureControlNetwork . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

5.11.2.2 configureRoutedControlNetwork . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

5.12 mininet.node.Node Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

5.12.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

5.12.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

5.12.2.1 __init__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

5.12.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

5.12.3.1 addIntf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

5.12.3.2 cleanup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

5.12.3.3 cmd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

5.12.3.4 cmdPrint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

5.12.3.5 config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

5.12.3.6 connectionsTo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

5.12.3.7 deleteIntfs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

5.12.3.8 fdToNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

5.12.3.9 intf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

5.12.3.10 intfIsUp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

5.12.3.11 IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

5.12.3.12 MAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

5.12.3.13 monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

5.12.3.14 newPort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

5.12.3.15 pexec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

5.12.3.16 popen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

5.12.3.17 read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

5.12.3.18 readline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

5.12.3.19 sendCmd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

5.12.3.20 sendInt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 7: Mininet Python API Reference Manual

CONTENTS v

5.12.3.21 setARP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

5.12.3.22 setDefaultRoute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

5.12.3.23 setHostRoute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

5.12.3.24 setIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

5.12.3.25 setMAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

5.12.3.26 setParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

5.12.3.27 stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

5.12.3.28 terminate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

5.12.3.29 waitOutput . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

5.12.3.30 waitReadable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

5.12.3.31 write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

5.13 mininet.node.NOX Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

5.13.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

5.13.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

5.13.2.1 __init__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

5.14 mininet.node.OVSController Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

5.14.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

5.15 mininet.node.OVSLegacyKernelSwitch Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 42

5.15.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

5.15.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

5.15.2.1 __init__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

5.15.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

5.15.3.1 setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

5.15.3.2 start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

5.15.3.3 stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

5.16 mininet.node.OVSSwitch Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

5.16.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

5.16.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

5.16.2.1 __init__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

5.16.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

5.16.3.1 stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

5.16.3.2 TCReapply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

5.17 mininet.node.RemoteController Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

5.17.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

5.17.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

5.17.2.1 __init__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

5.17.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 8: Mininet Python API Reference Manual

vi CONTENTS

5.17.3.1 start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

5.17.3.2 stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

5.18 mininet.topo.SingleSwitchReversedTopo Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . 46

5.18.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

5.18.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

5.18.2.1 __init__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

5.19 mininet.topo.SingleSwitchTopo Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

5.19.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

5.19.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

5.19.2.1 __init__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

5.20 mininet.log.Singleton Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

5.20.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

5.21 mininet.log.StreamHandlerNoNewline Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 49

5.21.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

5.21.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

5.21.2.1 emit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

5.22 mininet.node.Switch Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

5.22.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

5.22.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

5.22.2.1 __init__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

5.22.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

5.22.3.1 sendCmd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

5.23 mininet.link.TCIntf Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

5.23.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

5.23.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

5.23.2.1 config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

5.24 mininet.link.TCLink Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

5.24.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

5.25 mininet.topo.Topo Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

5.25.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

5.25.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

5.25.2.1 __init__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

5.25.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

5.25.3.1 addHost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

5.25.3.2 addLink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

5.25.3.3 addNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

5.25.3.4 addPort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 9: Mininet Python API Reference Manual

CONTENTS vii

5.25.3.5 addSwitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

5.25.3.6 hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

5.25.3.7 isSwitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

5.25.3.8 links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

5.25.3.9 port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

5.25.3.10 sorted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

5.25.3.11 switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

5.26 mininet.topolib.TreeTopo Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

5.26.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

5.26.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

5.26.2.1 addTree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

5.27 mininet.node.UserSwitch Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

5.27.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

5.27.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

5.27.2.1 __init__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

5.27.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

5.27.3.1 setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

5.27.3.2 start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

5.27.3.3 stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

Index 60

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 10: Mininet Python API Reference Manual
Page 11: Mininet Python API Reference Manual

Chapter 1

Namespace Index

1.1 Namespace List

Here is a list of all documented namespaces with brief descriptions:

topoNetwork topology creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Page 12: Mininet Python API Reference Manual

2 Namespace Index

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 13: Mininet Python API Reference Manual

Chapter 2

Hierarchical Index

2.1 Class Hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:

objectmininet.link.Intf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

mininet.link.TCIntf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51mininet.link.Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

mininet.link.TCLink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52mininet.log.MininetLogger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30mininet.net.Mininet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

mininet.net.MininetWithControlNet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31mininet.node.Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

mininet.node.Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13mininet.node.NOX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41mininet.node.OVSController . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41mininet.node.RemoteController . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

mininet.node.Host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17mininet.node.CPULimitedHost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

mininet.node.Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50mininet.node.OVSLegacyKernelSwitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42mininet.node.OVSSwitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44mininet.node.UserSwitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

mininet.topo.Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17mininet.topo.Topo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

mininet.topo.LinearTopo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20mininet.topo.SingleSwitchReversedTopo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46mininet.topo.SingleSwitchTopo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47mininet.topolib.TreeTopo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

StreamHandlermininet.log.StreamHandlerNoNewline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

typemininet.log.Singleton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

Cmdmininet.cli.CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Loggermininet.log.MininetLogger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Page 14: Mininet Python API Reference Manual

4 Hierarchical Index

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 15: Mininet Python API Reference Manual

Chapter 3

Class Index

3.1 Class List

Here are the classes, structs, unions and interfaces with brief descriptions:

mininet.cli.CLISimple command-line interface to talk to nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

mininet.node.ControllerA Controller is a Node that is running (or has execed?) an OpenFlow controller . . . . . . . . . . . 13

mininet.node.CPULimitedHostCPU limited host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

mininet.topo.GraphUtility class to track nodes and edges - replaces networkx.Graph . . . . . . . . . . . . . . . . . . . 17

mininet.node.HostA host is simply a Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

mininet.link.IntfBasic interface object that can configure itself . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

mininet.topo.LinearTopoLinear topology of k switches, with n hosts per switch . . . . . . . . . . . . . . . . . . . . . . . . . 20

mininet.link.LinkA basic link is just a veth pair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

mininet.net.MininetNetwork emulation with hosts spawned in network namespaces . . . . . . . . . . . . . . . . . . . 23

mininet.log.MininetLoggerMininet-specific logger Enable each mininet .py file to with one . . . . . . . . . . . . . . . . . . . . 30

mininet.net.MininetWithControlNetControl network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

mininet.node.NodeA virtual network node is simply a shell in a network namespace . . . . . . . . . . . . . . . . . . . 32

mininet.node.NOXController to run a NOX application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

mininet.node.OVSControllerOpen vSwitch controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

mininet.node.OVSLegacyKernelSwitchOpen VSwitch legacy kernel-space switch using ovs-openflowd . . . . . . . . . . . . . . . . . . . . 42

mininet.node.OVSSwitchOpen vSwitch switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

mininet.node.RemoteControllerController running outside of Mininet’s control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

Page 16: Mininet Python API Reference Manual

6 Class Index

mininet.topo.SingleSwitchReversedTopoSingle switch connected to k hosts, with reversed ports . . . . . . . . . . . . . . . . . . . . . . . . 46

mininet.topo.SingleSwitchTopoSingle switch connected to k hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

mininet.log.SingletonSingleton pattern from Wikipedia See . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

mininet.log.StreamHandlerNoNewlineStreamHandler that doesn’t print newlines by default . . . . . . . . . . . . . . . . . . . . . . . . . 49

mininet.node.SwitchA Switch is a Node that is running (or has execed?) an OpenFlow switch . . . . . . . . . . . . . . . 50

mininet.link.TCIntfInterface customized by tc (traffic control) utility Allows specification of bandwidth limits (various meth-ods) as well as delay, loss and max queue length . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

mininet.link.TCLinkLink with symmetric TC interfaces configured via opts . . . . . . . . . . . . . . . . . . . . . . . . . 52

mininet.topo.TopoData center network representation for structured multi-trees . . . . . . . . . . . . . . . . . . . . . 53

mininet.topolib.TreeTopoTopology for a tree network with a given depth and fanout . . . . . . . . . . . . . . . . . . . . . . . 57

mininet.node.UserSwitchUser-space switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 17: Mininet Python API Reference Manual

Chapter 4

Namespace Documentation

4.1 topo Namespace Reference

Network topology creation.

4.1.1 Detailed Description

Network topology creation.

Author

Brandon Heller ([email protected])

This package includes code to represent network topologies.

A Topo object can be a topology database for NOX, can represent a physical setup for testing, and can even be emulatedwith the Mininet package.

Page 18: Mininet Python API Reference Manual

8 Namespace Documentation

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 19: Mininet Python API Reference Manual

Chapter 5

Class Documentation

5.1 mininet.cli.CLI Class Reference

Simple command-line interface to talk to nodes.

Inheritance diagram for mininet.cli.CLI:

mininet.cli.CLI

Cmd

Public Member Functions

• def __init__• def emptyline

Don’t repeat last command when you hit return.

• def do_help

Describe available CLI commands.

• def do_nodes

List all nodes.

• def do_net

List network connections.

• def do_sh

Run an external shell command.

• def do_py

Evaluate a Python expression.

• def do_px

Execute a Python statement.

• def do_pingall

Ping between all hosts.

• def do_pingpair

Ping between first two hosts, useful for testing.

Page 20: Mininet Python API Reference Manual

10 Class Documentation

• def do_pingallfull

Ping between first two hosts, returns all ping results.• def do_pingpairfull

Ping between first two hosts, returns all ping results.• def do_iperf

Simple iperf TCP test between two (optionally specified) hosts.• def do_iperfudp

Simple iperf TCP test between two (optionally specified) hosts.• def do_intfs

List interfaces.• def do_dump

Dump node info.• def do_link

Bring link(s) between two nodes up or down.• def do_xterm

Spawn xterm(s) for the given node(s).• def do_x

Create an X11 tunnel to the given node, optionally starting a client.• def do_gterm

Spawn gnome-terminal(s) for the given node(s).• def do_exit

Exit.• def do_quit

Exit.• def do_EOF

Exit.• def isatty

Is our standard input a tty?• def do_noecho

Run an interactive command with echoing turned off.• def do_source

Read commands from an input file.• def do_dpctl

Run dpctl (or ovs-ofctl) command on all switches.• def do_time

Measure time taken for any command in Mininet.• def default

Called on an input line when the command prefix is not recognized.• def waitForNode

Wait for a node to finish, and print its output.

Public Attributes

• mn• nodelist• nodemap• locals• stdin• inPoller• inputFile

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 21: Mininet Python API Reference Manual

5.1 mininet.cli.CLI Class Reference 11

Static Public Attributes

• string prompt = ’mininet> ’

• tuple helpStr

5.1.1 Detailed Description

Simple command-line interface to talk to nodes.

5.1.2 Member Function Documentation

5.1.2.1 def mininet.cli.CLI.default ( self, line )

Called on an input line when the command prefix is not recognized.

Overridden to run shell commands when a node is the first CLI argument. Past the first CLI argument, node names areautomatically replaced with corresponding IP addrs.

5.1.2.2 def mininet.cli.CLI.do dpctl ( self, line )

Run dpctl (or ovs-ofctl) command on all switches.

5.1.2.3 def mininet.cli.CLI.do dump ( self, line )

Dump node info.

5.1.2.4 def mininet.cli.CLI.do gterm ( self, line )

Spawn gnome-terminal(s) for the given node(s).

5.1.2.5 def mininet.cli.CLI.do help ( self, line )

Describe available CLI commands.

5.1.2.6 def mininet.cli.CLI.do intfs ( self, line )

List interfaces.

5.1.2.7 def mininet.cli.CLI.do iperf ( self, line )

Simple iperf TCP test between two (optionally specified) hosts.

5.1.2.8 def mininet.cli.CLI.do iperfudp ( self, line )

Simple iperf TCP test between two (optionally specified) hosts.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 22: Mininet Python API Reference Manual

12 Class Documentation

5.1.2.9 def mininet.cli.CLI.do link ( self, line )

Bring link(s) between two nodes up or down.

5.1.2.10 def mininet.cli.CLI.do net ( self, line )

List network connections.

5.1.2.11 def mininet.cli.CLI.do nodes ( self, line )

List all nodes.

5.1.2.12 def mininet.cli.CLI.do noecho ( self, line )

Run an interactive command with echoing turned off.

5.1.2.13 def mininet.cli.CLI.do pingall ( self, line )

Ping between all hosts.

5.1.2.14 def mininet.cli.CLI.do pingallfull ( self, line )

Ping between first two hosts, returns all ping results.

5.1.2.15 def mininet.cli.CLI.do pingpair ( self, line )

Ping between first two hosts, useful for testing.

5.1.2.16 def mininet.cli.CLI.do pingpairfull ( self, line )

Ping between first two hosts, returns all ping results.

5.1.2.17 def mininet.cli.CLI.do px ( self, line )

Execute a Python statement.

Node names may be used, e.g.: px print h1.cmd(’ls’)

5.1.2.18 def mininet.cli.CLI.do py ( self, line )

Evaluate a Python expression.

Node names may be used, e.g.: py h1.cmd(’ls’)

5.1.2.19 def mininet.cli.CLI.do source ( self, line )

Read commands from an input file.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 23: Mininet Python API Reference Manual

5.2 mininet.node.Controller Class Reference 13

5.1.2.20 def mininet.cli.CLI.do time ( self, line )

Measure time taken for any command in Mininet.

5.1.2.21 def mininet.cli.CLI.do x ( self, line )

Create an X11 tunnel to the given node, optionally starting a client.

5.1.2.22 def mininet.cli.CLI.do xterm ( self, line, term = ’xterm’ )

Spawn xterm(s) for the given node(s).

5.1.2.23 def mininet.cli.CLI.emptyline ( self )

Don’t repeat last command when you hit return.

5.1.2.24 def mininet.cli.CLI.waitForNode ( self, node )

Wait for a node to finish, and print its output.

5.1.3 Member Data Documentation

5.1.3.1 tuple mininet.cli.CLI.helpStr [static]

Initial value:

1 = (2 ’You may also send a command to a node using:\n’3 ’ <node> command {args}\n’4 ’For example:\n’5 ’ mininet> h1 ifconfig\n’6 ’\n’7 ’The interpreter automatically substitutes IP addresses\n’8 ’for node names when a node is the first arg, so commands\n’9 ’like\n’10 ’ mininet> h2 ping h3\n’11 ’should work.\n’12 ’\n’13 ’Some character-oriented interactive commands require\n’14 ’noecho:\n’15 ’ mininet> noecho h2 vi foo.py\n’16 ’However, starting up an xterm/gterm is generally better:\n’17 ’ mininet> xterm h2\n\n’18 )

The documentation for this class was generated from the following file:

• mininet/cli.py

5.2 mininet.node.Controller Class Reference

A Controller is a Node that is running (or has execed?) an OpenFlow controller.

Inheritance diagram for mininet.node.Controller:

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 24: Mininet Python API Reference Manual

14 Class Documentation

mininet.node.Controller

mininet.node.Node

object

mininet.node.NOX mininet.node.OVSController mininet.node.RemoteController

Public Member Functions

• def __init__• def checkListening

Make sure no controllers are running on our port.

• def start

Start <controller> <args> on controller.

• def stop

Stop controller.

• def IP

Return IP address of the Controller.

• def __repr__

More informative string representation.

Public Attributes

• command• cargs• cdir• ip• port• execed

Additional Inherited Members

5.2.1 Detailed Description

A Controller is a Node that is running (or has execed?) an OpenFlow controller.

5.2.2 Member Function Documentation

5.2.2.1 def mininet.node.Controller.start ( self )

Start <controller> <args> on controller.

Log to /tmp/cN.log

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 25: Mininet Python API Reference Manual

5.3 mininet.node.CPULimitedHost Class Reference 15

5.2.2.2 def mininet.node.Controller.stop ( self )

Stop controller.

The documentation for this class was generated from the following file:

• mininet/node.py

5.3 mininet.node.CPULimitedHost Class Reference

CPU limited host.

Inheritance diagram for mininet.node.CPULimitedHost:

mininet.node.CPULimitedHost

mininet.node.Host

mininet.node.Node

object

Public Member Functions

• def __init__• def cgroupSet

Set a cgroup parameter and return its value.• def cgroupGet

Return value of cgroup parameter.• def cgroupDel

Clean up our cgroup.• def popen

Return a Popen() object in node’s namespace.• def cleanup

Clean up Node, then clean up our cgroup.• def chrt

Set RT scheduling priority.• def rtInfo

Internal method: return parameters for RT bandwidth.• def cfsInfo

Internal method: return parameters for CFS bandwidth.• def setCPUFrac

Set overall CPU fraction for this host.• def setCPUs

Specify (real) cores that our cgroup can run on.• def config• def init

Initialization for CPULimitedHost class.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 26: Mininet Python API Reference Manual

16 Class Documentation

Public Attributes

• cgroup• period_us• sched• rtprio

Static Public Attributes

• inited = False

5.3.1 Detailed Description

CPU limited host.

5.3.2 Member Function Documentation

5.3.2.1 def mininet.node.CPULimitedHost.config ( self, cpu = None, cores = None, params )

Parameterscpu desired overall system CPU fraction

cores (real) core(s) this host can run onparams parameters for Node.config()

5.3.2.2 def mininet.node.CPULimitedHost.popen ( self, args, kwargs )

Return a Popen() object in node’s namespace.

Parametersargs Popen() args, single list, or string

kwargs Popen() keyword args

5.3.2.3 def mininet.node.CPULimitedHost.setCPUFrac ( self, f = -1, sched = None )

Set overall CPU fraction for this host.

Parametersf CPU bandwidth limit (fraction)

sched ’rt’ or ’cfs’ Note ’cfs’ requires CONFIG_CFS_BANDWIDTH

The documentation for this class was generated from the following file:

• mininet/node.py

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 27: Mininet Python API Reference Manual

5.4 mininet.topo.Graph Class Reference 17

5.4 mininet.topo.Graph Class Reference

Utility class to track nodes and edges - replaces networkx.Graph.

Inheritance diagram for mininet.topo.Graph:

mininet.topo.Graph

object

Public Member Functions

• def __init__

• def add_node

Add node to graph.

• def add_edge

Add edge to graph.

• def nodes

Return list of graph nodes.

• def edges

Iterator: return graph edges.

• def __getitem__

Return link dict for the given node.

Public Attributes

• data

5.4.1 Detailed Description

Utility class to track nodes and edges - replaces networkx.Graph.

The documentation for this class was generated from the following file:

• mininet/topo.py

5.5 mininet.node.Host Class Reference

A host is simply a Node.

Inheritance diagram for mininet.node.Host:

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 28: Mininet Python API Reference Manual

18 Class Documentation

mininet.node.Host

mininet.node.Node

object

mininet.node.CPULimitedHost

Additional Inherited Members

5.5.1 Detailed Description

A host is simply a Node.

The documentation for this class was generated from the following file:

• mininet/node.py

5.6 mininet.link.Intf Class Reference

Basic interface object that can configure itself.

Inheritance diagram for mininet.link.Intf:

mininet.link.Intf

object

mininet.link.TCIntf

Public Member Functions

• def __init__• def cmd

Run a command in our owning node.

• def ifconfig

Configure ourselves using ifconfig.

• def setIP

Set our IP address.

• def setMAC

Set the MAC address for an interface.

• def updateIP

Return updated IP address based on ifconfig.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 29: Mininet Python API Reference Manual

5.6 mininet.link.Intf Class Reference 19

• def updateMAC

Return updated MAC address based on ifconfig.

• def IP

Return IP address.

• def MAC

Return MAC address.

• def isUp

Return whether interface is up.

• def rename

Rename interface.

• def setParam

Internal.

• def config

Configure Node according to (optional)

• def delete

Delete interface.

• def __repr__• def __str__

Public Attributes

• node• name• link• prefixLen• params• mac• ip

5.6.1 Detailed Description

Basic interface object that can configure itself.

5.6.2 Constructor & Destructor Documentation

5.6.2.1 def mininet.link.Intf. init ( self, name, node = None, port = None, link = None, params )

Parametersname interface name (e.g. h1-eth0)node owning node (where this intf most likely lives)

link parent link if we’re part of a link other arguments are passed to config()

5.6.3 Member Function Documentation

5.6.3.1 def mininet.link.Intf.config ( self, mac = None, ip = None, ifconfig = None, up = True, params )

Configure Node according to (optional)

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 30: Mininet Python API Reference Manual

20 Class Documentation

Parametersparameters

mac MAC addressip IP address

ifconfig arbitrary interface configuration Subclasses should override this method and call the parent class’sconfig(∗∗params)

5.6.3.2 def mininet.link.Intf.setMAC ( self, macstr )

Set the MAC address for an interface.

Parametersmacstr MAC address as string

5.6.3.3 def mininet.link.Intf.setParam ( self, results, method, param )

Internal.

Parametersmethod configure a single parameterresults dict of results to update

method config method nameparam arg=value (ignore if value=None) value may also be list or dict

The documentation for this class was generated from the following file:

• mininet/link.py

5.7 mininet.topo.LinearTopo Class Reference

Linear topology of k switches, with n hosts per switch.

Inheritance diagram for mininet.topo.LinearTopo:

mininet.topo.LinearTopo

mininet.topo.Topo

object

Public Member Functions

• def __init__

Init.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 31: Mininet Python API Reference Manual

5.8 mininet.link.Link Class Reference 21

Public Attributes

• k• n

Additional Inherited Members

5.7.1 Detailed Description

Linear topology of k switches, with n hosts per switch.

5.7.2 Constructor & Destructor Documentation

5.7.2.1 def mininet.topo.LinearTopo. init ( self, k = 2, n = 1, opts )

Init.

Parametersk number of switchesn number of hosts per switch

hconf host configuration optionslconf link configuration options

The documentation for this class was generated from the following file:

• mininet/topo.py

5.8 mininet.link.Link Class Reference

A basic link is just a veth pair.

Inheritance diagram for mininet.link.Link:

mininet.link.Link

object

mininet.link.TCLink

Public Member Functions

• def __init__

Create veth link to another node, making two new interfaces.

• def intfName

Construct a canonical interface name node-ethN for interface n.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 32: Mininet Python API Reference Manual

22 Class Documentation

• def makeIntfPair

Create pair of interfaces.

• def delete

Delete this link.

• def __str__

Public Attributes

• intf2

5.8.1 Detailed Description

A basic link is just a veth pair.

Other types of links could be tunnels, link emulators, etc..

5.8.2 Constructor & Destructor Documentation

5.8.2.1 def mininet.link.Link. init ( self, node1, node2, port1 = None, port2 = None, intfName1 = None, intfName2 =None, intf = Intf, cls1 = None, cls2 = None, params1 = None, params2 = None )

Create veth link to another node, making two new interfaces.

Parametersnode1 first nodenode2 second nodeport1 node1 port number (optional)port2 node2 port number (optional)

intf default interface class/constructor cls1,cls2 optional interface-specific constructors

intfName1 node1 interface name (optional)intfName2 node2 interface name (optional)

params1 parameters for interface 1params2 parameters for interface 2

5.8.3 Member Function Documentation

5.8.3.1 def mininet.link.Link.intfName ( cls, node, n )

Construct a canonical interface name node-ethN for interface n.

5.8.3.2 def mininet.link.Link.makeIntfPair ( cls, intf1, intf2 )

Create pair of interfaces.

Parametersintf1 name of interface 1intf2 name of interface 2 (override this class method [and possibly delete()] to change link type)

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 33: Mininet Python API Reference Manual

5.9 mininet.net.Mininet Class Reference 23

The documentation for this class was generated from the following file:

• mininet/link.py

5.9 mininet.net.Mininet Class Reference

Network emulation with hosts spawned in network namespaces.

Inheritance diagram for mininet.net.Mininet:

mininet.net.Mininet

object

mininet.net.MininetWithControlNet

Public Member Functions

• def __init__

Create Mininet object.

• def addHost

Add host.

• def addSwitch

Add switch.

• def addController

Add controller.

• def getNodeByName

Return node(s) with given name(s)

• def get

Convenience alias for getNodeByName.

• def __getitem__

net [ name ]

• def __iter__

return iterator over nodes

• def addLink

"Add a link from node1 to node2

• def configHosts

Configure a set of hosts.

• def buildFromTopo

Build mininet from a topology object At the end of this function, everything should be connected and up.

• def configureControlNetwork

Control net config hook: override in subclass.

• def build

Build mininet.

• def startTerms

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 34: Mininet Python API Reference Manual

24 Class Documentation

Start a terminal for each node.

• def stopXterms

Kill each xterm.

• def staticArp

Add all-pairs ARP entries to remove the need to handle broadcast.

• def start

Start controller and switches.

• def stop

Stop the controller(s), switches and hosts.

• def run

Perform a complete start/test/stop cycle.

• def monitor

Monitor a set of hosts (or all hosts by default), and return their output, a line at a time.

• def ping

Ping between all specified hosts.

• def pingFull

Ping between all specified hosts and return all data.

• def pingAll

Ping between all hosts.

• def pingPair

Ping between first two hosts, useful for testing.

• def pingAllFull

Ping between all hosts.

• def pingPairFull

Ping between first two hosts, useful for testing.

• def iperf

Run iperf between two hosts.

• def runCpuLimitTest

run CPU limit test with ’while true’ processes.

• def configLinkStatus

Change status of src <-> dst links.

• def interact

Start network and run our simple CLI.

• def init

Initialize Mininet.

Public Attributes

• topo• switch• host• controller• link• intf• ipBase• prefixLen• nextIP

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 35: Mininet Python API Reference Manual

5.9 mininet.net.Mininet Class Reference 25

• inNamespace• xterms• cleanup• autoSetMacs• autoStaticArp• autoPinCpus• numCores• nextCore• listenPort• hosts• switches• controllers• nameToNode• terms• built

Static Public Attributes

• inited = False

5.9.1 Detailed Description

Network emulation with hosts spawned in network namespaces.

5.9.2 Constructor & Destructor Documentation

5.9.2.1 def mininet.net.Mininet. init ( self, topo = None, switch = OVSKernelSwitch, host = Host, controller= Controller, link = Link, intf = Intf, build = True, xterms = False, cleanup = False, ipBase =’10.0.0.0/8’, inNamespace = False, autoSetMacs = False, autoStaticArp = False, autoPinCpus =False, listenPort = None )

Create Mininet object.

Parameterstopo Topo (topology) object or None

switch default Switch classhost default Host class/constructor

controller default Controller class/constructorlink default Link class/constructorintf default Intf class/constructor

ipBase base IP address for hosts,build build now from topo?

xterms if build now, spawn xterms?cleanup if build now, cleanup before creating?

inNamespace spawn switches and controller in net namespaces?autoSetMacs set MAC addrs automatically like IP addresses?autoStaticArp set all-pairs static MAC addrs?autoPinCpus pin hosts to (real) cores (requires CPULimitedHost)?

listenPort base listening port to open; will be incremented for each additional switch in the net if in-Namespace=False

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 36: Mininet Python API Reference Manual

26 Class Documentation

5.9.3 Member Function Documentation

5.9.3.1 def mininet.net.Mininet. getitem ( self, args )

net [ name ]

Parametersoperator Return node(s) with given name(s)

5.9.3.2 def mininet.net.Mininet.addController ( self, name = ’c0’, controller = None, params )

Add controller.

Parameterscontroller Controller class

5.9.3.3 def mininet.net.Mininet.addHost ( self, name, cls = None, params )

Add host.

Parametersname name of host to add

cls custom host class/constructor (optional)params parameters for host

Returns

added host

5.9.3.4 def mininet.net.Mininet.addLink ( self, node1, node2, port1 = None, port2 = None, cls = None, params )

"Add a link from node1 to node2

Parametersnode1 source nodenode2 dest nodeport1 source portport2 dest port

Returns

link object

5.9.3.5 def mininet.net.Mininet.addSwitch ( self, name, cls = None, params )

Add switch.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 37: Mininet Python API Reference Manual

5.9 mininet.net.Mininet Class Reference 27

Parametersname name of switch to add

cls custom switch class/constructor (optional)

Returns

added switch side

Parameterseffect increments listenPort ivar .

5.9.3.6 def mininet.net.Mininet.build ( self )

Build mininet.

5.9.3.7 def mininet.net.Mininet.buildFromTopo ( self, topo = None )

Build mininet from a topology object At the end of this function, everything should be connected and up.

5.9.3.8 def mininet.net.Mininet.configHosts ( self )

Configure a set of hosts.

5.9.3.9 def mininet.net.Mininet.configLinkStatus ( self, src, dst, status )

Change status of src <-> dst links.

Parameterssrc node namedst node name

status string {up, down}

5.9.3.10 def mininet.net.Mininet.interact ( self )

Start network and run our simple CLI.

5.9.3.11 def mininet.net.Mininet.iperf ( self, hosts = None, l4Type = ’TCP’, udpBw = ’10M’ )

Run iperf between two hosts.

Parametershosts list of hosts; if None, uses opposite hosts

l4Type string, one of [ TCP, UDP ]

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 38: Mininet Python API Reference Manual

28 Class Documentation

Returns

results two-element array of server and client speeds

5.9.3.12 def mininet.net.Mininet.monitor ( self, hosts = None, timeoutms = -1 )

Monitor a set of hosts (or all hosts by default), and return their output, a line at a time.

Parametershosts (optional) set of hosts to monitor

timeoutms (optional) timeout value in ms

Returns

iterator which returns host, line

5.9.3.13 def mininet.net.Mininet.ping ( self, hosts = None, timeout = None )

Ping between all specified hosts.

Parametershosts list of hosts

timeout time to wait for a response, as string

Returns

ploss packet loss percentage

5.9.3.14 def mininet.net.Mininet.pingAll ( self )

Ping between all hosts.

Returns

ploss packet loss percentage

5.9.3.15 def mininet.net.Mininet.pingAllFull ( self )

Ping between all hosts.

Returns

ploss packet loss percentage

5.9.3.16 def mininet.net.Mininet.pingFull ( self, hosts = None, timeout = None )

Ping between all specified hosts and return all data.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 39: Mininet Python API Reference Manual

5.9 mininet.net.Mininet Class Reference 29

Parametershosts list of hosts

timeout time to wait for a response, as string

Returns

all ping data; see function body.

5.9.3.17 def mininet.net.Mininet.pingPair ( self )

Ping between first two hosts, useful for testing.

Returns

ploss packet loss percentage

5.9.3.18 def mininet.net.Mininet.pingPairFull ( self )

Ping between first two hosts, useful for testing.

Returns

ploss packet loss percentage

5.9.3.19 def mininet.net.Mininet.run ( self, test, args, kwargs )

Perform a complete start/test/stop cycle.

5.9.3.20 def mininet.net.Mininet.runCpuLimitTest ( self, cpu, duration = 5 )

run CPU limit test with ’while true’ processes.

Parameterscpu desired CPU fraction of each host

duration test duration in seconds returns a single list of measured CPU fractions as floats.

5.9.3.21 def mininet.net.Mininet.start ( self )

Start controller and switches.

5.9.3.22 def mininet.net.Mininet.startTerms ( self )

Start a terminal for each node.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 40: Mininet Python API Reference Manual

30 Class Documentation

5.9.3.23 def mininet.net.Mininet.staticArp ( self )

Add all-pairs ARP entries to remove the need to handle broadcast.

5.9.3.24 def mininet.net.Mininet.stopXterms ( self )

Kill each xterm.

The documentation for this class was generated from the following file:

• mininet/net.py

5.10 mininet.log.MininetLogger Class Reference

Mininet-specific logger Enable each mininet .py file to with one.

Inheritance diagram for mininet.log.MininetLogger:

mininet.log.MininetLogger

Logger object

Public Member Functions

• def __init__• def setLogLevel

Setup loglevel.

• def output

Log ’msg % args’ with severity ’OUTPUT’.

5.10.1 Detailed Description

Mininet-specific logger Enable each mininet .py file to with one.

Parametersimport

from mininet.log import [lg, info, error]

...get a default logger that doesn’t require one newline per loggingcall.

Inherit from object to ensure that we have at least one new-style baseclass, and can then use the __metaclass__ directive, to prevent this

errorTypeError Error when calling the metaclass bases a new-style class can’t have only classic bases

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 41: Mininet Python API Reference Manual

5.11 mininet.net.MininetWithControlNet Class Reference 31

If Python2.5/logging/__init__.py defined Filterer as a new-style class, via Filterer( object ): rather than Filterer, wewouldn’t need this.

Use singleton pattern to ensure only one logger is ever created.

5.10.2 Member Function Documentation

5.10.2.1 def mininet.log.MininetLogger.output ( self, msg, args, kwargs )

Log ’msg % args’ with severity ’OUTPUT’.

To pass exception information, use the keyword argument exc_info with a true value, e.g.

logger.warning("Houston, we have a %s", "cli output", exc_info=1)

5.10.2.2 def mininet.log.MininetLogger.setLogLevel ( self, levelname = None )

Setup loglevel.

Convenience function to support lowercase names.

ParameterslevelName level name from LEVELS

The documentation for this class was generated from the following file:

• mininet/log.py

5.11 mininet.net.MininetWithControlNet Class Reference

Control network.

Inheritance diagram for mininet.net.MininetWithControlNet:

mininet.net.MininetWithControlNet

mininet.net.Mininet

object

Public Member Functions

• def configureControlNetwork

Configure control network.

• def configureRoutedControlNetwork

Configure a routed control network on controller and switches.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 42: Mininet Python API Reference Manual

32 Class Documentation

Additional Inherited Members

5.11.1 Detailed Description

Control network.

Parameterssupport

Create an explicit control network. Currently this is onlyused/usable with the user datapath.

Notes

1. If the controller and switches are in the same (e.g. root)namespace, they can just use the loopback connection.

2. If we can get unix domain sockets to work, we can use theminstead of an explicit control network.

3. Instead of routing, we could bridge or use ’in-band’ control.

4. Even if we dispense with this in general, it could still beuseful for people who wish to simulate a separate controlnetwork (since real networks may need one!)

5. Basically nobody ever used this code, so it has been movedinto its own class.

6. Ultimately we may wish to extend this to allow us to create acontrol network which every node’s control interface isattached to.

5.11.2 Member Function Documentation

5.11.2.1 def mininet.net.MininetWithControlNet.configureControlNetwork ( self )

Configure control network.

5.11.2.2 def mininet.net.MininetWithControlNet.configureRoutedControlNetwork ( self, ip = ’192.168.123.1’, prefixLen =16 )

Configure a routed control network on controller and switches.

For use with the user datapath only right now.

The documentation for this class was generated from the following file:

• mininet/net.py

5.12 mininet.node.Node Class Reference

A virtual network node is simply a shell in a network namespace.

Inheritance diagram for mininet.node.Node:

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 43: Mininet Python API Reference Manual

5.12 mininet.node.Node Class Reference 33

mininet.node.Node

object

mininet.node.Controller mininet.node.Host mininet.node.Switch

mininet.node.NOX mininet.node.OVSController mininet.node.RemoteController mininet.node.CPULimitedHost mininet.node.OVSLegacyKernelSwitch mininet.node.OVSSwitch mininet.node.UserSwitch

Public Member Functions

• def __init__• def fdToNode

Return node corresponding to given file descriptor.

• def startShell

Start a shell process for running commands.

• def cleanup

Help python collect its garbage.

• def read

Buffered read from node, non-blocking.

• def readline

Buffered readline from node, non-blocking.

• def write

Write data to node.

• def terminate

Send kill signal to Node and clean up after it.

• def stop

Stop node.

• def waitReadable

Wait until node’s output is readable.

• def sendCmd

Send a command, followed by a command to echo a sentinel, and return without waiting for the command to complete.

• def sendInt

Interrupt running command.

• def monitor

Monitor and return the output of a command.

• def waitOutput

Wait for a command to complete.

• def cmd

Send a command, wait for output, and return it.

• def cmdPrint

Call cmd and printing its output.

• def popen

Return a Popen() object in our namespace.

• def pexec

Execute a command using popen.

• def newPort

Return the next port number to allocate.

• def addIntf

Add an interface.

• def defaultIntf

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 44: Mininet Python API Reference Manual

34 Class Documentation

Return interface for lowest port.

• def intf

Return our interface object with given string name, default intf if name is falsy (None, empty string, etc).

• def connectionsTo

Return [ intf1, intf2...

• def deleteIntfs

Delete all of our interfaces.

• def setARP

Add an ARP entry.

• def setHostRoute

Add route to host.

• def setDefaultRoute

Set the default route to go through intf.

• def setMAC

Set the MAC address for an interface.

• def setIP

Set the IP address for an interface.

• def IP

Return IP address of a node or specific interface.

• def MAC

Return MAC address of a node or specific interface.

• def intfIsUp

Check if an interface is up.

• def setParam

Internal.

• def config

Configure Node according to (optional)

• def configDefault

Configure with default parameters.

• def linkTo

(Deprecated) Link to another node replace with Link( node1, node2)

• def intfList

List of our interfaces sorted by port number.

• def intfNames

The names of our interfaces sorted by port number.

• def __repr__

More informative string representation.

• def __str__

Abbreviated string representation.

• def checkSetup

Make sure our class and superclasses are set up.

• def setup

Make sure our class dependencies are available.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 45: Mininet Python API Reference Manual

5.12 mininet.node.Node Class Reference 35

Public Attributes

• name• inNamespace• params• intfs• ports• nameToIntf• waiting• readbuf• shell• stdin• stdout• pid• pollOut• execed• lastCmd• lastPid

Static Public Attributes

• int portBase = 0• dictionary inToNode = {}• dictionary outToNode = {}• isSetup = False

5.12.1 Detailed Description

A virtual network node is simply a shell in a network namespace.

We communicate with it using pipes.

5.12.2 Constructor & Destructor Documentation

5.12.2.1 def mininet.node.Node. init ( self, name, inNamespace = True, params )

Parametersname name of node

inNamespace in network namespace?params Node parameters (see config() for details)

5.12.3 Member Function Documentation

5.12.3.1 def mininet.node.Node.addIntf ( self, intf, port = None )

Add an interface.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 46: Mininet Python API Reference Manual

36 Class Documentation

Parametersintf interface

port port number (optional, typically OpenFlow port number)

5.12.3.2 def mininet.node.Node.cleanup ( self )

Help python collect its garbage.

5.12.3.3 def mininet.node.Node.cmd ( self, args, kwargs )

Send a command, wait for output, and return it.

Parameterscmd string

5.12.3.4 def mininet.node.Node.cmdPrint ( self, args )

Call cmd and printing its output.

Parameterscmd string

5.12.3.5 def mininet.node.Node.config ( self, mac = None, ip = None, defaultRoute = None, lo = ’up’, params )

Configure Node according to (optional)

Parametersparameters

mac MAC address for default interfaceip IP address for default interface

ifconfig arbitrary interface configuration Subclasses should override this method and call the parent class’sconfig(∗∗params)

5.12.3.6 def mininet.node.Node.connectionsTo ( self, node )

Return [ intf1, intf2...

] for all intfs that connect self to node.

5.12.3.7 def mininet.node.Node.deleteIntfs ( self, checkName = True )

Delete all of our interfaces.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 47: Mininet Python API Reference Manual

5.12 mininet.node.Node Class Reference 37

ParameterscheckName only delete interfaces that contain our name

5.12.3.8 def mininet.node.Node.fdToNode ( cls, fd )

Return node corresponding to given file descriptor.

Parametersfd file descriptor

Returns

node

5.12.3.9 def mininet.node.Node.intf ( self, intf = ’’ )

Return our interface object with given string name, default intf if name is falsy (None, empty string, etc).

or the input intf arg.

Having this fcn return its arg for Intf objects makes it easier to construct functions with flexible input args for interfaces(those that accept both string names and Intf objects).

5.12.3.10 def mininet.node.Node.intfIsUp ( self, intf = None )

Check if an interface is up.

5.12.3.11 def mininet.node.Node.IP ( self, intf = None )

Return IP address of a node or specific interface.

5.12.3.12 def mininet.node.Node.MAC ( self, intf = None )

Return MAC address of a node or specific interface.

5.12.3.13 def mininet.node.Node.monitor ( self, timeoutms = None )

Monitor and return the output of a command.

Set self.waiting to False if command has completed.

Parameterstimeoutms timeout in ms or None to wait indefinitely.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 48: Mininet Python API Reference Manual

38 Class Documentation

5.12.3.14 def mininet.node.Node.newPort ( self )

Return the next port number to allocate.

5.12.3.15 def mininet.node.Node.pexec ( self, args, kwargs )

Execute a command using popen.

Returns

out, err, exitcode

5.12.3.16 def mininet.node.Node.popen ( self, args, kwargs )

Return a Popen() object in our namespace.

Parametersargs Popen() args, single list, or string

kwargs Popen() keyword args

5.12.3.17 def mininet.node.Node.read ( self, maxbytes = 1024 )

Buffered read from node, non-blocking.

Parametersmaxbytes maximum number of bytes to return

5.12.3.18 def mininet.node.Node.readline ( self )

Buffered readline from node, non-blocking.

Returns

line (minus newline) or None

5.12.3.19 def mininet.node.Node.sendCmd ( self, args, kwargs )

Send a command, followed by a command to echo a sentinel, and return without waiting for the command to complete.

Parametersargs command and arguments, or string

printPid print command’s PID?

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 49: Mininet Python API Reference Manual

5.12 mininet.node.Node Class Reference 39

5.12.3.20 def mininet.node.Node.sendInt ( self, sig = signal.SIGINT )

Interrupt running command.

5.12.3.21 def mininet.node.Node.setARP ( self, ip, mac )

Add an ARP entry.

Parametersip IP address as string

mac MAC address as string

5.12.3.22 def mininet.node.Node.setDefaultRoute ( self, intf = None )

Set the default route to go through intf.

Parametersintf Intf or {dev <intfname> via <gw-ip> ...}

5.12.3.23 def mininet.node.Node.setHostRoute ( self, ip, intf )

Add route to host.

Parametersip IP address as dotted decimal

intf string, interface name

5.12.3.24 def mininet.node.Node.setIP ( self, ip, prefixLen = 8, intf = None )

Set the IP address for an interface.

Parametersintf intf or intf name

ip IP address as a stringprefixLen prefix length, e.g. 8 for /8 or 16M addrs

5.12.3.25 def mininet.node.Node.setMAC ( self, mac, intf = None )

Set the MAC address for an interface.

Parametersintf intf or intf name

mac MAC address as string

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 50: Mininet Python API Reference Manual

40 Class Documentation

5.12.3.26 def mininet.node.Node.setParam ( self, results, method, param )

Internal.

Parametersmethod configure a single parameterresults dict of results to update

method config method nameparam arg=value (ignore if value=None) value may also be list or dict

5.12.3.27 def mininet.node.Node.stop ( self )

Stop node.

5.12.3.28 def mininet.node.Node.terminate ( self )

Send kill signal to Node and clean up after it.

5.12.3.29 def mininet.node.Node.waitOutput ( self, verbose = False )

Wait for a command to complete.

Completion is signaled by a sentinel character, ASCII(127)appearing in the output stream. Wait for the sentinel and returnthe output, including trailing newline.

Parametersverbose print output interactively

5.12.3.30 def mininet.node.Node.waitReadable ( self, timeoutms = None )

Wait until node’s output is readable.

Parameterstimeoutms timeout in ms or None to wait indefinitely.

5.12.3.31 def mininet.node.Node.write ( self, data )

Write data to node.

Parametersdata string

The documentation for this class was generated from the following file:

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 51: Mininet Python API Reference Manual

5.14 mininet.node.OVSController Class Reference 41

• mininet/node.py

5.13 mininet.node.NOX Class Reference

Controller to run a NOX application.

Inheritance diagram for mininet.node.NOX:

mininet.node.NOX

mininet.node.Controller

mininet.node.Node

object

Public Member Functions

• def __init__

Init.

Additional Inherited Members

5.13.1 Detailed Description

Controller to run a NOX application.

5.13.2 Constructor & Destructor Documentation

5.13.2.1 def mininet.node.NOX. init ( self, name, noxArgs, kwargs )

Init.

Parametersname name to give controller

noxArgs arguments (strings) to pass to NOX

The documentation for this class was generated from the following file:

• mininet/node.py

5.14 mininet.node.OVSController Class Reference

Open vSwitch controller.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 52: Mininet Python API Reference Manual

42 Class Documentation

Inheritance diagram for mininet.node.OVSController:

mininet.node.OVSController

mininet.node.Controller

mininet.node.Node

object

Public Member Functions

• def __init__

Additional Inherited Members

5.14.1 Detailed Description

Open vSwitch controller.

The documentation for this class was generated from the following file:

• mininet/node.py

5.15 mininet.node.OVSLegacyKernelSwitch Class Reference

Open VSwitch legacy kernel-space switch using ovs-openflowd.

Inheritance diagram for mininet.node.OVSLegacyKernelSwitch:

mininet.node.OVSLegacyKernelSwitch

mininet.node.Switch

mininet.node.Node

object

Public Member Functions

• def __init__

Init.

• def setup

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 53: Mininet Python API Reference Manual

5.15 mininet.node.OVSLegacyKernelSwitch Class Reference 43

Ensure any dependencies are loaded; if not, try to load them.

• def start

Start up kernel datapath.

• def stop

Terminate kernel datapath.

Public Attributes

• dp• intf• execed

Additional Inherited Members

5.15.1 Detailed Description

Open VSwitch legacy kernel-space switch using ovs-openflowd.

Currently only works in the root namespace.

5.15.2 Constructor & Destructor Documentation

5.15.2.1 def mininet.node.OVSLegacyKernelSwitch. init ( self, name, dp = None, kwargs )

Init.

Parametersname name for switch

dp netlink id (0, 1, 2, ...)defaultMAC default MAC as unsigned int; random value if None

5.15.3 Member Function Documentation

5.15.3.1 def mininet.node.OVSLegacyKernelSwitch.setup ( cls )

Ensure any dependencies are loaded; if not, try to load them.

5.15.3.2 def mininet.node.OVSLegacyKernelSwitch.start ( self, controllers )

Start up kernel datapath.

5.15.3.3 def mininet.node.OVSLegacyKernelSwitch.stop ( self )

Terminate kernel datapath.

The documentation for this class was generated from the following file:

• mininet/node.py

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 54: Mininet Python API Reference Manual

44 Class Documentation

5.16 mininet.node.OVSSwitch Class Reference

Open vSwitch switch.

Inheritance diagram for mininet.node.OVSSwitch:

mininet.node.OVSSwitch

mininet.node.Switch

mininet.node.Node

object

Public Member Functions

• def __init__

Init.

• def setup

Make sure Open vSwitch is installed and working.

• def dpctl

Run ovs-ofctl command.

• def attach

Connect a data port.

• def detach

Disconnect a data port.

• def controllerUUIDs

Return ovsdb UUIDs for our controllers.

• def connected

Are we connected to at least one of our controllers?

• def start

Start up a new OVS OpenFlow switch using ovs-vsctl.

• def stop

Terminate OVS switch.

Static Public Member Functions

• def TCReapply

Unfortunately OVS and Mininet are fighting over tc queuing disciplines.

Public Attributes

• failMode• datapath

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 55: Mininet Python API Reference Manual

5.17 mininet.node.RemoteController Class Reference 45

Additional Inherited Members

5.16.1 Detailed Description

Open vSwitch switch.

Depends on ovs-vsctl.

5.16.2 Constructor & Destructor Documentation

5.16.2.1 def mininet.node.OVSSwitch. init ( self, name, failMode = ’secure’, datapath = ’kernel’, params )

Init.

Parametersname name for switch

failMode controller loss behavior (secure|open)datapath userspace or kernel mode (kernel|user)

5.16.3 Member Function Documentation

5.16.3.1 def mininet.node.OVSSwitch.stop ( self )

Terminate OVS switch.

5.16.3.2 def mininet.node.OVSSwitch.TCReapply ( intf ) [static]

Unfortunately OVS and Mininet are fighting over tc queuing disciplines.

As a quick hack/ workaround, we clear OVS’s and reapply our own.

The documentation for this class was generated from the following file:

• mininet/node.py

5.17 mininet.node.RemoteController Class Reference

Controller running outside of Mininet’s control.

Inheritance diagram for mininet.node.RemoteController:

mininet.node.RemoteController

mininet.node.Controller

mininet.node.Node

object

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 56: Mininet Python API Reference Manual

46 Class Documentation

Public Member Functions

• def __init__

Init.

• def start

Overridden to do nothing.

• def stop

Overridden to do nothing.

• def checkListening

Warn if remote controller is not accessible.

Additional Inherited Members

5.17.1 Detailed Description

Controller running outside of Mininet’s control.

5.17.2 Constructor & Destructor Documentation

5.17.2.1 def mininet.node.RemoteController. init ( self, name, ip = ’127.0.0.1’, port = 6633, kwargs )

Init.

Parametersname name to give controller

ip the IP address where the remote controller is listeningport the port where the remote controller is listening

5.17.3 Member Function Documentation

5.17.3.1 def mininet.node.RemoteController.start ( self )

Overridden to do nothing.

5.17.3.2 def mininet.node.RemoteController.stop ( self )

Overridden to do nothing.

The documentation for this class was generated from the following file:

• mininet/node.py

5.18 mininet.topo.SingleSwitchReversedTopo Class Reference

Single switch connected to k hosts, with reversed ports.

Inheritance diagram for mininet.topo.SingleSwitchReversedTopo:

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 57: Mininet Python API Reference Manual

5.19 mininet.topo.SingleSwitchTopo Class Reference 47

mininet.topo.SingleSwitchReversedTopo

mininet.topo.Topo

object

Public Member Functions

• def __init__

Init.

Public Attributes

• k

Additional Inherited Members

5.18.1 Detailed Description

Single switch connected to k hosts, with reversed ports.

The lowest-numbered host is connected to the highest-numbered port.

Useful to verify that Mininet properly handles custom port numberings.

5.18.2 Constructor & Destructor Documentation

5.18.2.1 def mininet.topo.SingleSwitchReversedTopo. init ( self, k = 2, opts )

Init.

Parametersk number of hosts

enable_all enables all nodes and switches?

The documentation for this class was generated from the following file:

• mininet/topo.py

5.19 mininet.topo.SingleSwitchTopo Class Reference

Single switch connected to k hosts.

Inheritance diagram for mininet.topo.SingleSwitchTopo:

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 58: Mininet Python API Reference Manual

48 Class Documentation

mininet.topo.SingleSwitchTopo

mininet.topo.Topo

object

Public Member Functions

• def __init__

Init.

Public Attributes

• k

Additional Inherited Members

5.19.1 Detailed Description

Single switch connected to k hosts.

5.19.2 Constructor & Destructor Documentation

5.19.2.1 def mininet.topo.SingleSwitchTopo. init ( self, k = 2, opts )

Init.

Parametersk number of hosts

enable_all enables all nodes and switches?

The documentation for this class was generated from the following file:

• mininet/topo.py

5.20 mininet.log.Singleton Class Reference

Singleton pattern from Wikipedia See.

Inheritance diagram for mininet.log.Singleton:

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 59: Mininet Python API Reference Manual

5.21 mininet.log.StreamHandlerNoNewline Class Reference 49

mininet.log.Singleton

type

Public Member Functions

• def __init__• def __call__

5.20.1 Detailed Description

Singleton pattern from Wikipedia See.

Parametershttp//en.-

wikipedia.-org/wiki/-Singleton-

Pattern

Python

Intended to be used as a __metaclass_ param, as shown for the classbelow.

The documentation for this class was generated from the following file:

• mininet/log.py

5.21 mininet.log.StreamHandlerNoNewline Class Reference

StreamHandler that doesn’t print newlines by default.

Inheritance diagram for mininet.log.StreamHandlerNoNewline:

mininet.log.StreamHandlerNoNewline

StreamHandler

Public Member Functions

• def emit

Emit a record.

5.21.1 Detailed Description

StreamHandler that doesn’t print newlines by default.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 60: Mininet Python API Reference Manual

50 Class Documentation

Since StreamHandler automatically adds newlines, define a mod to more easily support interactive mode when we wantit, or errors-only logging for running unit tests.

5.21.2 Member Function Documentation

5.21.2.1 def mininet.log.StreamHandlerNoNewline.emit ( self, record )

Emit a record.

If a formatter is specified, it is used to format the record. The record is then written to the stream with a trailing newline [N.B. this may be removed depending on feedback ]. If exception information is present, it is formatted using traceback.-printException and appended to the stream.

The documentation for this class was generated from the following file:

• mininet/log.py

5.22 mininet.node.Switch Class Reference

A Switch is a Node that is running (or has execed?) an OpenFlow switch.

Inheritance diagram for mininet.node.Switch:

mininet.node.Switch

mininet.node.Node

object

mininet.node.OVSLegacyKernelSwitch mininet.node.OVSSwitch mininet.node.UserSwitch

Public Member Functions

• def __init__• def defaultDpid

Derive dpid from switch name, s1 -> 1.

• def defaultIntf

Return control interface.

• def sendCmd

Send command to Node.

• def connected

Is the switch connected to a controller? (override this method)

• def __repr__

More informative string representation.

Public Attributes

• dpid

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 61: Mininet Python API Reference Manual

5.23 mininet.link.TCIntf Class Reference 51

• opts• listenPort• controlIntf

Static Public Attributes

• int portBase = 1• int dpidLen = 16

5.22.1 Detailed Description

A Switch is a Node that is running (or has execed?) an OpenFlow switch.

5.22.2 Constructor & Destructor Documentation

5.22.2.1 def mininet.node.Switch. init ( self, name, dpid = None, opts = ’’, listenPort = None, params )

Parametersdpid dpid for switch (or None to derive from name, e.g. s1 -> 1)opts additional switch options

listenPort port to listen on for dpctl connections

5.22.3 Member Function Documentation

5.22.3.1 def mininet.node.Switch.sendCmd ( self, cmd, kwargs )

Send command to Node.

Parameterscmd string

The documentation for this class was generated from the following file:

• mininet/node.py

5.23 mininet.link.TCIntf Class Reference

Interface customized by tc (traffic control) utility Allows specification of bandwidth limits (various methods) as well asdelay, loss and max queue length.

Inheritance diagram for mininet.link.TCIntf:

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 62: Mininet Python API Reference Manual

52 Class Documentation

mininet.link.TCIntf

mininet.link.Intf

object

Public Member Functions

• def bwCmds

Return tc commands to set bandwidth.

• def tc

Execute tc command for our interface.

• def config

Configure the port and set its properties.

Static Public Member Functions

• def delayCmds

Internal method: return tc commands for delay and loss.

Additional Inherited Members

5.23.1 Detailed Description

Interface customized by tc (traffic control) utility Allows specification of bandwidth limits (various methods) as well asdelay, loss and max queue length.

5.23.2 Member Function Documentation

5.23.2.1 def mininet.link.TCIntf.config ( self, bw = None, delay = None, jitter = None, loss = None, disable gro = True,speedup = 0, use hfsc = False, use tbf = False, latency ms = None, enable ecn = False, enable red =False, max queue size = None, params )

Configure the port and set its properties.

The documentation for this class was generated from the following file:

• mininet/link.py

5.24 mininet.link.TCLink Class Reference

Link with symmetric TC interfaces configured via opts.

Inheritance diagram for mininet.link.TCLink:

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 63: Mininet Python API Reference Manual

5.25 mininet.topo.Topo Class Reference 53

mininet.link.TCLink

mininet.link.Link

object

Public Member Functions

• def __init__

Additional Inherited Members

5.24.1 Detailed Description

Link with symmetric TC interfaces configured via opts.

The documentation for this class was generated from the following file:

• mininet/link.py

5.25 mininet.topo.Topo Class Reference

Data center network representation for structured multi-trees.

Inheritance diagram for mininet.topo.Topo:

mininet.topo.Topo

object

mininet.topo.LinearTopo mininet.topo.SingleSwitchReversedTopo mininet.topo.SingleSwitchTopo mininet.topolib.TreeTopo

Public Member Functions

• def __init__

Topo.

• def addNode

Add Node to graph.

• def addHost

Convenience.

• def addSwitch

Convenience.

• def addLink

node1,

• def addPort

Generate port mapping for new edge.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 64: Mininet Python API Reference Manual

54 Class Documentation

• def nodes

Return nodes in graph.

• def isSwitch

Returns true if node is a switch.

• def switches

Return switches.

• def hosts

Return hosts.

• def links

Return links.

• def port

Get port number.

• def linkInfo

Return link metadata.

• def setlinkInfo

Set link metadata.

• def nodeInfo

Return metadata (dict) for node.

• def setNodeInfo

Set metadata (dict) for node.

Static Public Member Functions

• def sorted

Items sorted in natural (i.e.

Public Attributes

• g• node_info• link_info• hopts• sopts• lopts• ports

5.25.1 Detailed Description

Data center network representation for structured multi-trees.

5.25.2 Constructor & Destructor Documentation

5.25.2.1 def mininet.topo.Topo. init ( self, hopts = None, sopts = None, lopts = None )

Topo.

Parameters

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 65: Mininet Python API Reference Manual

5.25 mininet.topo.Topo Class Reference 55

objecthinfo default host optionssopts default switch optionslopts default link options

5.25.3 Member Function Documentation

5.25.3.1 def mininet.topo.Topo.addHost ( self, name, opts )

Convenience.

Parametersmethod Add host to graph.

name host nameopts host options

Returns

host name

5.25.3.2 def mininet.topo.Topo.addLink ( self, node1, node2, port1 = None, port2 = None, opts )

node1,

Parametersnode2 nodes to link together port1,port2 ports (optional)opts link options (optional)

Returns

link info key

5.25.3.3 def mininet.topo.Topo.addNode ( self, name, opts )

Add Node to graph.

Parametersname name

opts node options

Returns

node name

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 66: Mininet Python API Reference Manual

56 Class Documentation

5.25.3.4 def mininet.topo.Topo.addPort ( self, src, dst, sport = None, dport = None )

Generate port mapping for new edge.

Parameterssrc source switch namedst destination switch name

5.25.3.5 def mininet.topo.Topo.addSwitch ( self, name, opts )

Convenience.

Parametersmethod Add switch to graph.

name switch nameopts switch options

Returns

switch name

5.25.3.6 def mininet.topo.Topo.hosts ( self, sort = True )

Return hosts.

sort: sort hosts alphabetically

Returns

dpids list of dpids

5.25.3.7 def mininet.topo.Topo.isSwitch ( self, n )

Returns true if node is a switch.

5.25.3.8 def mininet.topo.Topo.links ( self, sort = True )

Return links.

sort: sort links alphabetically

Returns

links list of name pairs

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 67: Mininet Python API Reference Manual

5.26 mininet.topolib.TreeTopo Class Reference 57

5.25.3.9 def mininet.topo.Topo.port ( self, src, dst )

Get port number.

Parameterssrc source switch namedst destination switch name

Returns

tuple (src_port, dst_port): src_port: port on source switch leading to the destination switch dst_port: port on desti-nation switch leading to the source switch

5.25.3.10 def mininet.topo.Topo.sorted ( items ) [static]

Items sorted in natural (i.e.

alphabetical) order

5.25.3.11 def mininet.topo.Topo.switches ( self, sort = True )

Return switches.

sort: sort switches alphabetically

Returns

dpids list of dpids

The documentation for this class was generated from the following file:

• mininet/topo.py

5.26 mininet.topolib.TreeTopo Class Reference

Topology for a tree network with a given depth and fanout.

Inheritance diagram for mininet.topolib.TreeTopo:

mininet.topolib.TreeTopo

mininet.topo.Topo

object

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 68: Mininet Python API Reference Manual

58 Class Documentation

Public Member Functions

• def __init__

• def addTree

Add a subtree starting with node n.

Public Attributes

• hostNum

• switchNum

Additional Inherited Members

5.26.1 Detailed Description

Topology for a tree network with a given depth and fanout.

5.26.2 Member Function Documentation

5.26.2.1 def mininet.topolib.TreeTopo.addTree ( self, depth, fanout )

Add a subtree starting with node n.

Returns

last node added

The documentation for this class was generated from the following file:

• mininet/topolib.py

5.27 mininet.node.UserSwitch Class Reference

User-space switch.

Inheritance diagram for mininet.node.UserSwitch:

mininet.node.UserSwitch

mininet.node.Switch

mininet.node.Node

object

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 69: Mininet Python API Reference Manual

5.27 mininet.node.UserSwitch Class Reference 59

Public Member Functions

• def __init__

Init.

• def setup

Ensure any dependencies are loaded; if not, try to load them.

• def dpctl

Run dpctl command.

• def connected

Is the switch connected to a controller?

• def start

Start OpenFlow reference user datapath.

• def stop

Stop OpenFlow reference user datapath.

Public Attributes

• dpopts

Static Public Attributes

• int dpidLen = 12

5.27.1 Detailed Description

User-space switch.

5.27.2 Constructor & Destructor Documentation

5.27.2.1 def mininet.node.UserSwitch. init ( self, name, dpopts = ’--no-slicing’, kwargs )

Init.

Parametersname name for the switch

dpopts additional arguments to ofdatapath (–no-slicing)

5.27.3 Member Function Documentation

5.27.3.1 def mininet.node.UserSwitch.setup ( cls )

Ensure any dependencies are loaded; if not, try to load them.

5.27.3.2 def mininet.node.UserSwitch.start ( self, controllers )

Start OpenFlow reference user datapath.

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 70: Mininet Python API Reference Manual

60 Class Documentation

Log to /tmp/sN-{ofd,ofp}.log.

Parameterscontrollers list of controller objects

5.27.3.3 def mininet.node.UserSwitch.stop ( self )

Stop OpenFlow reference user datapath.

The documentation for this class was generated from the following file:

• mininet/node.py

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 71: Mininet Python API Reference Manual

Index

__getitem__mininet::net::Mininet, 26

__init__mininet::link::Intf, 19mininet::link::Link, 22mininet::net::Mininet, 25mininet::node::Node, 35mininet::node::NOX, 41mininet::node::OVSLegacyKernelSwitch, 43mininet::node::OVSSwitch, 45mininet::node::RemoteController, 46mininet::node::Switch, 51mininet::node::UserSwitch, 59mininet::topo::LinearTopo, 21mininet::topo::SingleSwitchReversedTopo, 47mininet::topo::SingleSwitchTopo, 48mininet::topo::Topo, 54

addControllermininet::net::Mininet, 26

addHostmininet::net::Mininet, 26mininet::topo::Topo, 55

addIntfmininet::node::Node, 35

addLinkmininet::net::Mininet, 26mininet::topo::Topo, 55

addNodemininet::topo::Topo, 55

addPortmininet::topo::Topo, 55

addSwitchmininet::net::Mininet, 26mininet::topo::Topo, 56

addTreemininet::topolib::TreeTopo, 58

buildmininet::net::Mininet, 27

buildFromTopomininet::net::Mininet, 27

cleanupmininet::node::Node, 36

cmd

mininet::node::Node, 36cmdPrint

mininet::node::Node, 36config

mininet::link::Intf, 19mininet::link::TCIntf, 52mininet::node::CPULimitedHost, 16mininet::node::Node, 36

configHostsmininet::net::Mininet, 27

configLinkStatusmininet::net::Mininet, 27

configureControlNetworkmininet::net::MininetWithControlNet, 32

configureRoutedControlNetworkmininet::net::MininetWithControlNet, 32

connectionsTomininet::node::Node, 36

defaultmininet::cli::CLI, 11

deleteIntfsmininet::node::Node, 36

do_dpctlmininet::cli::CLI, 11

do_dumpmininet::cli::CLI, 11

do_gtermmininet::cli::CLI, 11

do_helpmininet::cli::CLI, 11

do_intfsmininet::cli::CLI, 11

do_iperfmininet::cli::CLI, 11

do_iperfudpmininet::cli::CLI, 11

do_linkmininet::cli::CLI, 11

do_netmininet::cli::CLI, 12

do_nodesmininet::cli::CLI, 12

do_noechomininet::cli::CLI, 12

do_pingall

Page 72: Mininet Python API Reference Manual

62 INDEX

mininet::cli::CLI, 12do_pingallfull

mininet::cli::CLI, 12do_pingpair

mininet::cli::CLI, 12do_pingpairfull

mininet::cli::CLI, 12do_px

mininet::cli::CLI, 12do_py

mininet::cli::CLI, 12do_source

mininet::cli::CLI, 12do_time

mininet::cli::CLI, 12do_x

mininet::cli::CLI, 13do_xterm

mininet::cli::CLI, 13

emitmininet::log::StreamHandlerNoNewline, 50

emptylinemininet::cli::CLI, 13

fdToNodemininet::node::Node, 37

helpStrmininet::cli::CLI, 13

hostsmininet::topo::Topo, 56

IPmininet::node::Node, 37

interactmininet::net::Mininet, 27

intfmininet::node::Node, 37

intfIsUpmininet::node::Node, 37

intfNamemininet::link::Link, 22

iperfmininet::net::Mininet, 27

isSwitchmininet::topo::Topo, 56

linksmininet::topo::Topo, 56

MACmininet::node::Node, 37

makeIntfPairmininet::link::Link, 22

mininet.cli.CLI, 9mininet.link.Intf, 18mininet.link.Link, 21mininet.link.TCIntf, 51mininet.link.TCLink, 52mininet.log.MininetLogger, 30mininet.log.Singleton, 48mininet.log.StreamHandlerNoNewline, 49mininet.net.Mininet, 23mininet.net.MininetWithControlNet, 31mininet.node.CPULimitedHost, 15mininet.node.Controller, 13mininet.node.Host, 17mininet.node.NOX, 41mininet.node.Node, 32mininet.node.OVSController, 41mininet.node.OVSLegacyKernelSwitch, 42mininet.node.OVSSwitch, 44mininet.node.RemoteController, 45mininet.node.Switch, 50mininet.node.UserSwitch, 58mininet.topo.Graph, 17mininet.topo.LinearTopo, 20mininet.topo.SingleSwitchReversedTopo, 46mininet.topo.SingleSwitchTopo, 47mininet.topo.Topo, 53mininet.topolib.TreeTopo, 57mininet::cli::CLI

default, 11do_dpctl, 11do_dump, 11do_gterm, 11do_help, 11do_intfs, 11do_iperf, 11do_iperfudp, 11do_link, 11do_net, 12do_nodes, 12do_noecho, 12do_pingall, 12do_pingallfull, 12do_pingpair, 12do_pingpairfull, 12do_px, 12do_py, 12do_source, 12do_time, 12do_x, 13do_xterm, 13emptyline, 13helpStr, 13waitForNode, 13

mininet::link::Intf

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 73: Mininet Python API Reference Manual

INDEX 63

__init__, 19config, 19setMAC, 20setParam, 20

mininet::link::Link__init__, 22intfName, 22makeIntfPair, 22

mininet::link::TCIntfconfig, 52

mininet::log::MininetLoggeroutput, 31setLogLevel, 31

mininet::log::StreamHandlerNoNewlineemit, 50

mininet::net::Mininet__getitem__, 26__init__, 25addController, 26addHost, 26addLink, 26addSwitch, 26build, 27buildFromTopo, 27configHosts, 27configLinkStatus, 27interact, 27iperf, 27monitor, 28ping, 28pingAll, 28pingAllFull, 28pingFull, 28pingPair, 29pingPairFull, 29run, 29runCpuLimitTest, 29start, 29startTerms, 29staticArp, 29stopXterms, 30

mininet::net::MininetWithControlNetconfigureControlNetwork, 32configureRoutedControlNetwork, 32

mininet::node::CPULimitedHostconfig, 16popen, 16setCPUFrac, 16

mininet::node::Controllerstart, 14stop, 14

mininet::node::NOX__init__, 41

mininet::node::Node

__init__, 35addIntf, 35cleanup, 36cmd, 36cmdPrint, 36config, 36connectionsTo, 36deleteIntfs, 36fdToNode, 37IP, 37intf, 37intfIsUp, 37MAC, 37monitor, 37newPort, 37pexec, 38popen, 38read, 38readline, 38sendCmd, 38sendInt, 38setARP, 39setDefaultRoute, 39setHostRoute, 39setIP, 39setMAC, 39setParam, 39stop, 40terminate, 40waitOutput, 40waitReadable, 40write, 40

mininet::node::OVSLegacyKernelSwitch__init__, 43setup, 43start, 43stop, 43

mininet::node::OVSSwitch__init__, 45stop, 45TCReapply, 45

mininet::node::RemoteController__init__, 46start, 46stop, 46

mininet::node::Switch__init__, 51sendCmd, 51

mininet::node::UserSwitch__init__, 59setup, 59start, 59stop, 60

mininet::topo::LinearTopo

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 74: Mininet Python API Reference Manual

64 INDEX

__init__, 21mininet::topo::SingleSwitchReversedTopo

__init__, 47mininet::topo::SingleSwitchTopo

__init__, 48mininet::topo::Topo

__init__, 54addHost, 55addLink, 55addNode, 55addPort, 55addSwitch, 56hosts, 56isSwitch, 56links, 56port, 56sorted, 57switches, 57

mininet::topolib::TreeTopoaddTree, 58

monitormininet::net::Mininet, 28mininet::node::Node, 37

newPortmininet::node::Node, 37

outputmininet::log::MininetLogger, 31

pexecmininet::node::Node, 38

pingmininet::net::Mininet, 28

pingAllmininet::net::Mininet, 28

pingAllFullmininet::net::Mininet, 28

pingFullmininet::net::Mininet, 28

pingPairmininet::net::Mininet, 29

pingPairFullmininet::net::Mininet, 29

popenmininet::node::CPULimitedHost, 16mininet::node::Node, 38

portmininet::topo::Topo, 56

readmininet::node::Node, 38

readlinemininet::node::Node, 38

run

mininet::net::Mininet, 29runCpuLimitTest

mininet::net::Mininet, 29

sendCmdmininet::node::Node, 38mininet::node::Switch, 51

sendIntmininet::node::Node, 38

setARPmininet::node::Node, 39

setCPUFracmininet::node::CPULimitedHost, 16

setDefaultRoutemininet::node::Node, 39

setHostRoutemininet::node::Node, 39

setIPmininet::node::Node, 39

setLogLevelmininet::log::MininetLogger, 31

setMACmininet::link::Intf, 20mininet::node::Node, 39

setParammininet::link::Intf, 20mininet::node::Node, 39

setupmininet::node::OVSLegacyKernelSwitch, 43mininet::node::UserSwitch, 59

sortedmininet::topo::Topo, 57

startmininet::net::Mininet, 29mininet::node::Controller, 14mininet::node::OVSLegacyKernelSwitch, 43mininet::node::RemoteController, 46mininet::node::UserSwitch, 59

startTermsmininet::net::Mininet, 29

staticArpmininet::net::Mininet, 29

stopmininet::node::Controller, 14mininet::node::Node, 40mininet::node::OVSLegacyKernelSwitch, 43mininet::node::OVSSwitch, 45mininet::node::RemoteController, 46mininet::node::UserSwitch, 60

stopXtermsmininet::net::Mininet, 30

switchesmininet::topo::Topo, 57

TCReapply

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen

Page 75: Mininet Python API Reference Manual

INDEX 65

mininet::node::OVSSwitch, 45terminate

mininet::node::Node, 40topo, 7

waitForNodemininet::cli::CLI, 13

waitOutputmininet::node::Node, 40

waitReadablemininet::node::Node, 40

writemininet::node::Node, 40

Generated on Tue Jul 30 2013 16:44:09 for Mininet Python API Reference Manual by Doxygen