From bf9c6ab7b4bcdabbcd154c95546c9808b54664fd Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Mon, 12 Mar 2012 00:29:55 -0700 Subject: [PATCH] Clarify comments and finally remove ControllerParams definition. --- mininet/node.py | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) diff --git a/mininet/node.py b/mininet/node.py index 5960076..10a3b45 100644 --- a/mininet/node.py +++ b/mininet/node.py @@ -607,12 +607,14 @@ class CPULimitedHost( Host ): # Some important things to note: # -# The "IP" address which we assign to the switch is not +# The "IP" address which setIP() assigns to the switch is not # an "IP address for the switch" in the sense of IP routing. -# Rather, it is the IP address for a control interface if -# (and only if) you happen to be running the switch in a -# namespace, which is something we currently don't support -# for OVS! +# Rather, it is the IP address for the control interface, +# on the control network, and it is only relevant to the +# controller. If you are running in the root namespace +# (which is the only way to run OVS at the moment), the +# control interface is the loopback interface, and you +# normally never want to change its IP address! # # In general, you NEVER want to attempt to use Linux's # network stack (i.e. ifconfig) to "assign" an IP address or @@ -620,16 +622,8 @@ class CPULimitedHost( Host ): # the IP and MAC addresses in the controller by specifying # packets that you want to receive or send. The "MAC" address # reported by ifconfig for a switch data port is essentially -# meaningless. -# -# So, I'm trying changing the API to make it -# impossible to try this, since it will not work, since nobody -# ever makes separate control networks in Mininet, and indeed -# we don't even support running OVS in a namespace. -# -# Note if we have a separate control network, then it does -# make sense to have s1-eth0 as s1's control network interface, -# and we should set controlIntf accordingly. +# meaningless. It is important to understand this if you +# want to create a functional router using OpenFlow. class Switch( Node ): """A Switch is a Node that is running (or has execed?) @@ -898,20 +892,6 @@ class OVSController( Controller ): Controller.__init__( self, name, command=command, **kwargs ) -# BL: This really seems to be poorly specified, -# so it's going to go away! - -class ControllerParams( object ): - "Container for controller IP parameters." - - def __init__( self, ip, prefixLen ): - """Init. - ip: string, controller IP address - prefixLen: prefix length, e.g. 8 for /8, covering 16M""" - self.ip = ip - self.prefixLen = prefixLen - - class NOX( Controller ): "Controller to run a NOX application."