Bellmanford + WIFIBridgeLink Examples




Host 1 --wired link-- s3(open vswitch) -- ( WIFIBridgeLink) -- s4(open vswitch) -- ( WIFIBridgeLink) -- s5(open vswitch) -- ( WIFIBridgeLink) --wired link-- Host 2



  Try to use remote controller with bellmanford module find a way from the sender to receiver.


p.s. In this example, I try to use two different virtual machines. One is mininet + NS3 environment (generate hosts, open vswitches, and wireless links). The other is used for remote POX controller.


[Scripts for mininet + NS3] (




This example shows how to create an empty Mininet object

(without a topology object) and add nodes to it manually.



from import Mininet

from mininet.node import OVSController,RemoteController

from import Link

from mininet.cli import CLI

from mininet.log import setLogLevel, info


import mininet.ns3

from mininet.ns3 import WIFIBridgeLink, WIFISegment

import ns.wifi

from functools import partial


def emptyNet():


    "Create an empty network and add nodes to it."


    net = Mininet( controller = partial(RemoteController, ip='', port=6633))


    info( '*** Adding controllers\n' )

    net.addController( 'c0' )

    net.addController( 'c1' )


    info( '*** Adding hosts\n' )

    h1 = net.addHost( 'h1', ip='' )

    h2 = net.addHost( 'h2', ip='' )


    info( '*** Adding switches\n' )

    s3 = net.addSwitch( 's3' )

    s4 = net.addSwitch( 's4' )

    s5 = net.addSwitch( 's5' )


    info( '*** Creating links\n' )

    Link( s3, h1 )

    Link( s5, h3 )

    #wifi=WIFISegment(standard = ns.wifi.WIFI_PHY_STANDARD_80211a)

    WIFIBridgeLink( s3, s4 )

    WIFIBridgeLink( s4, s5 )


    info( '*** Starting network\n')




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

    CLI( net )


    info( '*** Stopping network' )





if __name__ == '__main__':

    setLogLevel( 'info' )




1. Run the remote pox controller on virtual machine 1.


2. Execute the on virtual machine 2.


3. h1 ping h2.

on virtual machine 2.


on virtual machine 1.

from the above figure, we can clearly see that the bellmanford finds a way for h1 to h2 via s 3, s4, and s5.


Dr. Chih-Heng Ke

Department of Computer Science and Information Engineering, National Quemoy University, Kinmen, Taiwan

Email: /