You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to modify the topology during runtime, adding new switches and links on the fly. I use the gui_topology.py app to monitor the current topology (with --observe-links). If I add and connect switches before net.start() it shows correctly.
If I add a switch and start it up it shows correctly.
If I try to link it, the event is not caught by EventLinkAdd, and not shown.
If I query the current links (nodes, links etc.) in mininet CLI, everything seems to be correct and working (I can ping the new switch, works).
Tried:
Link status up/down, adding links from mininet CLI, removing/readding, adding flows to working links etc.
Simple demonstration below:
from mininet.topo import Topo
from mininet.net import Mininet
from mininet.log import setLogLevel
from mininet.cli import CLI
class TwoSwitchTopo(Topo):
def build(self):
s1 = self.addSwitch('s1')
s2 = self.addSwitch('s2')
h1 = self.addHost('h1', mac="00:00:00:00:11:11", ip="192.168.1.1/24")
h2 = self.addHost('h2', mac="00:00:00:00:11:12", ip="192.168.1.2/24")
self.addLink(h1, s1)
self.addLink(h2, s1)
self.addLink(s1, s2)
if __name__ == '__main__':
setLogLevel('info')
topo = TwoSwitchTopo()
c1 = RemoteController('c1')
net = Mininet(topo=topo, controller=c1)
net.start()
#sleep(5)
print("Topology is up, adding new switch and link")
s3 = net.addSwitch('s3')
net.addLink(net.getNodeByName('s1'), s3)
s3.start([c1])
CLI(net)
net.stop()
Result:
The text was updated successfully, but these errors were encountered:
I solve it by adding the parameter "--observe-links" when I launch my RYU-controller python file, just like what you do when you want to show links on the RYU_GUI_Topology. Finally the EventLinkAdd could be caught.
I'm trying to modify the topology during runtime, adding new switches and links on the fly. I use the gui_topology.py app to monitor the current topology (with --observe-links). If I add and connect switches before net.start() it shows correctly.
If I add a switch and start it up it shows correctly.
If I try to link it, the event is not caught by EventLinkAdd, and not shown.
If I query the current links (nodes, links etc.) in mininet CLI, everything seems to be correct and working (I can ping the new switch, works).
Tried:
Link status up/down, adding links from mininet CLI, removing/readding, adding flows to working links etc.
Simple demonstration below:
Result:
The text was updated successfully, but these errors were encountered: