I am using mininet
with a Ryu controller
.
For the Ryu controller
I am using the command:
ryu-manager simple_switch_stp_13.py
Concerning mininet
I use the topology defined in the file Topo1.py
:
from mininet.topo import Topo
class Project( Topo ):
def __init__( self ):
# Initialize topology
Topo.__init__( self )
# Add hosts
h1 = self.addHost('h1')
h2 = self.addHost('h2')
# Add switches
s1 = self.addSwitch('s1')
s2 = self.addSwitch('s2')
s3 = self.addSwitch('s3')
s4 = self.addSwitch('s4')
# Add links
self.addLink(h1,s1)
self.addLink(s1,s2)
self.addLink(s2,s4)
self.addLink(s3,s1)
self.addLink(s3,s4)
self.addLink(h2,s4)
topos = { 'myTopo': ( lambda: Project() )}
Then I run mininet
with the command:
sudo mn --custom Topo1.py --topo=myTopo --switch ovsk --controller=remote --mac
The connection between them is perfect; I succeed to run a ping from host 1 to host 2. What I want to do is to cut the link with s1 and s2 (without stopping the ping between h1 and h2).
Secondly, the issues I have : According to https://osrg.github.io/ryu-book/en/Ryubook.pdf page 65 I used the command:
link s1 s2 down.
But, I can observe using wireshark that the controller sends Port_Mod
, in reaction to the Port_Status
, which asks to the switch to put the interface up again.
The switch does it so the ping repass by the interface between s1 and s2. I'm not understanding why the controller sends this Port_Mod
?
In https://osrg.github.io/ryu-book/en/Ryubook.pdf page 65 they do not have this issue.
Then, I tried the command:
py net.delLinkBetween(s1, s2)
The link is totally deleted, the controller is notified by a Port Status but the root, the cost to the root ... do not evolved at all. Then, the ping does not restart and does not pass by s3. I also do not get why ?
Do you know if the two observations I did are normal ? And if yes, do you know how to correct my experiment in order to have the expected behavior ?