Hi,

I am working in the area of Hybrid SDN. I have a use case where I have to
introduce fake node and fake links in between OpenFlow switches which have
legacy switches in between. Below i'm sharing the mininet script, and in
this script i have to introduce a node in between s3 and s6 with the links
of fake node connected to these two switches. Considering this use case do
it have embed this logic in mininet or ryu controller  How can i achieve
this thing dynamically, could anyone kindly suggest something (possibly
code) in this regard.
-------------------------------------------MININET_SCRIPT-----------------------------------------------------------
*from mininet.node import RemoteController*
*from mininet.net <http://mininet.net/> import **
*from mininet.cli import CLI*
*from mininet.log import setLogLevel, info*

*def Hybridtopology():*
*    net = Mininet(
topo=None,listenPort=6633,build=False,ipBase='10.0.0.0/8
<http://10.0.0.0/8>')*
*    info( '*** Adding controller\n' )*
*    c1 =
net.addController("c1",controller=RemoteController,ipBase="127.0.0.0")*
*    info( '*** Add switches\n')*
*    s1 = net.addSwitch('s1', cls=OVSKernelSwitch, failMode='secure')*
*    s2 = net.addSwitch('s2', cls=OVSKernelSwitch, failMode='secure')*
*    s3 = net.addSwitch('s3', cls=OVSKernelSwitch, failMode='secure')*
*    s4 = net.addSwitch('s4', cls=OVSKernelSwitch, failMode='standalone')*
*    s5 = net.addSwitch('s5', cls=OVSKernelSwitch, failMode='standalone')*
*    s6 = net.addSwitch('s6', cls=OVSKernelSwitch, failMode='secure')*

*    info( '*** Add hosts\n')*
*    h1 = net.addHost('h1', cls=Host, ip='10.0.0.1')*
*    h2 = net.addHost('h2', cls=Host, ip='10.0.0.2')*
*    h3 = net.addHost('h3', cls=Host, ip='10.0.0.3')*
*    h4 = net.addHost('h4', cls=Host, ip='10.0.0.4')*
*    h5 = net.addHost('h5', cls=Host, ip='10.0.0.5')*
*    h6 = net.addHost('h6', cls=Host, ip='10.0.0.6')*

*    info( '*** Add links\n')*
*    net.addLink(h1, s1)*
*    net.addLink(h2, s2)*
*    net.addLink(h3, s3)*
*    net.addLink(h4, s4)*
*    net.addLink(h5, s5)*
*    net.addLink(h6, s6)*
*    net.addLink(s1, s2)*
*    net.addLink(s2, s3)*
*    net.addLink(s3, s4)*
*    net.addLink(s4, s5)*
*    net.addLink(s5, s6)*

*    info( '*** Starting network\n')*
*    net.build()*
*    info( '*** Starting controllers\n')*
*    for controller in net.controllers:*
*        controller.start()*

*    info( '*** Starting switches\n')*
*   for switch in net.switches:*
*     if (switch.failMode=="standalone"):*
*       info( switch.name <http://switch.name> + ' ')*
*       switch.start( [ ] )*
*     else :*
*       info( switch.name <http://switch.name> + ' ')*
*       switch.start( net.controllers )*

*    info( '*** Topology Running\n')*

*    CLI(net)*
*    net.stop()*

*if __name__ == '__main__':*
*    setLogLevel( 'info' )*
*    Hybridtopology()*



With Regards
Mir Wajahat Hussain
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to