Closed ecklm closed 4 years ago
Virtual interfaces are only generated for links
defined in the mininet topology file with the self.addLink()
function. It's enough to simply iterate through the list of all interfaces and set queues there.
The solution is not perfect, certainly the extraction of port names is insufficient as lines like these suggest in the log:
http://localhost:8080 "POST /qos/queue/0000000000000005 HTTP/1.1" 400 21
400 - s5 port is not exists
The problem is that the internal interface -- named equivalently as the switch -- is not always on the same position in the list. I have come up with two heuristical solutions to work this around.
sx-ethy
, simply dropping the shortest one will drop the default internal interface.curr
and curr_speed
-- that are 0 on the internal interface and not 0 on others. The advantage of determining based on these is that possible further internal interfaces would also be filtered out. The downside is, that this being a legit differentiation is only a theory at the moment.
{
3: OFPPort(port_no=3,hw_addr='46:d3:e6:1b:e0:71',name=b's2-eth3',config=0,state=0,curr=2112,advertised=0,supported=0,peer=0,curr_speed=10000000,max_speed=0),
1: OFPPort(port_no=1,hw_addr='1a:5e:2d:ee:db:94',name=b's2-eth1',config=0,state=0,curr=2112,advertised=0,supported=0,peer=0,curr_speed=10000000,max_speed=0),
2: OFPPort(port_no=2,hw_addr='8e:eb:e5:1c:f0:4e',name=b's2-eth2',config=0,state=0,curr=2112,advertised=0,supported=0,peer=0,curr_speed=10000000,max_speed=0),
4294967294: OFPPort(port_no=4294967294,hw_addr='92:31:ef:44:fd:4b',name=b's2',config=0,state=0,curr=0,advertised=0,supported=0,peer=0,curr_speed=0,max_speed=0)
}
In the output of ovs-vsctl show
there is a type
field on the internal ones, but it doesn't seem to appear in the OpenFlow message.
Example:
Bridge "s10"
Controller "tcp:192.0.2.1:6653"
Controller "ptcp:6663"
fail_mode: secure
Port "s10-eth2"
Interface "s10-eth2"
Port "s10"
Interface "s10"
type: internal
Port "s10-eth3"
Interface "s10-eth3"
Port "s10-eth1"
Interface "s10-eth1"
I haven't found a specific definition of the curr
and curr_speed
fields so let's just go for solution 1 now.
Things like the following restrict topology expansion for multiple switches.