0

I have created a topology at Mininet-Wifi with 4 access point and 2 station.

#!/usr/bin/python
import sys
from mininet.net import Mininet
from mininet.node import Controller,OVSKernelSwitch, RemoteController
from mininet.link import TCLink
from mininet.log import setLogLevel, info
from mn_wifi.cli import CLI_wifi
from mn_wifi.net import Mininet_wifi

def topology():

net = Mininet_wifi( controller=RemoteController, link=TCLink, switch=OVSKernelSwitch )

print "*** Creating nodes"
ap1 = net.addAccessPoint( 'ap1', ssid= 'ssid-ap1', mode= 'g', channel= '1', position='30,70,0', range='20' )
ap2 = net.addAccessPoint( 'ap2', ssid= 'ssid-ap2', mode= 'g', channel= '1', position='70,110,0', range='20' )
ap3 = net.addAccessPoint( 'ap3', ssid= 'ssid-ap3', mode= 'g', channel= '1', position='110,70,0', range='20' )
ap4 = net.addAccessPoint( 'ap4', ssid= 'ssid-ap4', mode= 'g', channel= '1', position='70,30,0', range='20' )
sta1 = net.addStation( 'sta1', mac='00:00:00:00:00:01', ip='10.0.0.1/8', position='28,68,0', range='10' )
sta2 = net.addStation( 'sta2', mac='00:00:00:00:00:02', ip='10.0.0.2/8', position='108,68,0', range='10' )
c1 = net.addController( 'c1', controller=RemoteController, ip="127.0.0.1" )

"""plot graph"""
net.plotGraph(max_x=220, max_y=150)

# Comment out the following two lines to disable AP
print "*** Enabling association control (AP)"
net.configureWifiNodes()

print "*** Creating links and associations"
net.addLink( ap1, ap2 )
net.addLink( ap2, ap3 )
net.addLink( ap4, ap3 )
net.addLink( ap1, ap4 )

net.addLink( ap1, sta1 )
net.addLink( ap3, sta2 )

print "*** Starting network"
net.build()
c1.start()
ap1.start( [c1] )
ap2.start( [c1] )
ap3.start( [c1] )
ap4.start( [c1] )

print "*** Running CLI"
CLI_wifi( net )

print "*** Stopping network"
net.stop()

if __name__ == '__main__':
    setLogLevel( 'info' )
    topology()

and then when running this code the topology like that

Mininet-wifi topology

I run POX controller with that features like below

sudo ~/pox/pox.py forwarding.l2_learning openflow.spanning_tree --no-flood --hold-down log.level --DEBUG samples.pretty_log --DEBUG openflow.discovery host_tracker --DEBUG info.packet_dump

After all that I pinged sta1 to sta2 and ping was succesful but I wanna learn ping is going on which way?

ap1->ap2->ap3 or ap1->ap4->ap3

How can i check the way? And also I wanna add a question to that question. When I was checking openflow.discovery messages, I encountered that message

[openflow.discovery     ] link detected: 00-00-00-00-00-04|4096.2 -> 00-00-00-00-00-03|4096.3

What this message mean? What is 4096.2? and 4096.3? I am really struggled with understanding that subject. Please help. I also wanna add mininet-wifi and pox tags but not have enough reputation.

1
  • Oh no. No one knows that? Dec 30 '18 at 6:11
0

Q1. After all that I pinged sta1 to sta2 and ping was succesful but I wanna learn ping is going on which way

A. You can use ovs-ofctl and check flows table out.

Q2. And also I wanna add a question to that question. When I was checking openflow.discovery messages, I encountered that message

A. 00-00-00-00-00-04|4096 is the dpid whereas 2 the interface number. Take a look at this code.

2
  • Why 4096 is there? Do that have special meaning? Jan 3 '19 at 15:18
  • Not sure why 4096, but I've figured out the reason. According your code the default dpid for ap1 is: 10000000000000001. However, if the dpid is 0000000000000001, 4096 disappears. That said, you can try ap1 = net.addAccessPoint( 'ap1', ssid= 'ssid-ap1', mode= 'g', channel= '1', position='30,70,0', range='20', dpid='1' ) and you won't see 4096 anymore. Ps. A new git pull and sudo make install of the mn-wifi source code is needed. Jan 4 '19 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.