I am trying to get the information for link's bandwidth from mininet
by using Opendaylight
Controller, but the problem is that even though there are different links with different bandwidth in the mininet
topology, the information that I get from opendaylight
controller (using Postman) is showing the same result for every link.
The python code used to create the topology is:
from mininet.net import Mininet
from mininet.node import CPULimitedHost
from mininet.link import TCLink
from mininet.util import dumpNodeConnections
from mininet.log import setLogLevel
from mininet.topo import Topo
class MyTopo( Topo ):
"Simple topology example."
def __init__( self ):
"Create custom topo."
# Initialize topology
Topo.__init__( self )
# Add hosts and switches
H1 = self.addHost( 'h1' )
H2 = self.addHost( 'h2' )
H3 = self.addHost( 'h3' )
H4 = self.addHost( 'h4' )
S1 = self.addSwitch( 's1')
S2 = self.addSwitch( 's2')
S3 = self.addSwitch( 's3')
S4 = self.addSwitch( 's4')
# Add links
self.addLink( H1, S1,cls = TCLink, bw = 5)
self.addLink( H2, S2,cls = TCLink, bw = 1)
self.addLink( H3, S3,cls = TCLink, bw = 1)
self.addLink( H4, S4,cls = TCLink, bw = 1)
self.addLink( S1, S2,cls = TCLink, bw = 1)
self.addLink( S2, S3,cls = TCLink, bw = 1)
self.addLink( S3, S4,cls = TCLink, bw = 1)
self.addLink( S4, S1,cls = TCLink, bw = 1)
topos = { 'mytopo': ( lambda: MyTopo() ) }
The result from opendaylight controller is:
The result for "sh ovs-ofctl -O OpenFlow13 dump-ports-desc s1", where s1-eth1 is the port that connects H1 with S1:
I would really appreciate if someone could help me find a way to get the real information for link capacities from mininet.