Cannot reach from a wifi node to node connect via ethernet(addLink) in containernet

185 views
Skip to first unread message

srikrishna acharya

unread,
Jul 30, 2021, 1:42:11 AM7/30/21
to mininet-wifi-discuss
I have created two Wifi nodes and one ap and connected a host( using addDocker) to ap. net shows the links created but I couldn't ping the host from wifi nodes but the wifi nodes are able to ping each other 

net = Containernet(link=wmediumd, wmediumd_mode=interference, noise_th=-91, fading_cof=3)

info('*** Adding docker containers\n')
robo0 = net.addStation('robo0', ip='10.0.0.1', mac='00:02:00:00:00:10',
cls=DockerSta, dimage="cornet:focalfoxyNWH", cpu_shares=20, position='2,10,0')
robo1 = net.addStation('robo1', ip='10.0.0.2', mac='00:02:00:00:00:11',
cls=DockerSta, dimage="cornet:focalfoxyNWH", cpu_shares=20, position='10,10,0')
ap1 = net.addAccessPoint('ap1', ssid='new-ssid', mode='g', channel='6', position='1,1,0')
h1 = net.addDocker('h1', ip='10.0.0.4/8',
dimage="cornet:focalfoxyNWH")

c0 = net.addController('c0')

info("*** Configuring Propagation Model\n")
net.setPropagationModel(model="logDistance", exp=4.5)

info('*** Configuring WiFi nodes\n')
net.configureWifiNodes()

info("*** Creating links\n")
net.addLink(ap1, h1)
if '-p' not in args:
net.plotGraph(max_x=500, max_y=500)

info('*** Starting network\n')
net.build()
ap1.start([c0])

Screenshot from 2021-07-30 11-07-48.png

Ramon Fontes

unread,
Jul 30, 2021, 6:54:10 AM7/30/21
to srikrishna acharya, mininet-wifi-discuss
Sorry, what is the question? Which troubleshooting steps did you try??

Please provide all the information you have. Otherwise, we will just be wasting time trying to understand what might be going on. Did you check the ip address on h1? Did you run the code in debug mode? Any error and/or missing dependencies in your container??

srikrishna acharya

unread,
Aug 8, 2021, 6:27:48 AM8/8/21
to mininet-wifi-discuss
Sorry for the delay, 
I have run the topology with debug mode.  and I tried ping by opening the xterms and I have put all the dependencies of the container 

RUN apt-get update && apt-get install -y \
net-tools \
ethtool \
iputils-ping \
iproute2 \
python3-setuptools \
python3-pip \
vim \
wavemon \
wireless-tools \
nmap \
traceroute \
iw


topology is we have 
STA2
  |         
  |
AP1  ----S1-----H1
  |
  |
STA1 

STA1 has 10.0.0.1 IP address 
STA2 has 10.0.0.2 IP address
H1 has 10.0.0.4 IP address 

STA1 and STA2 are able to ping each other but H1 is not accessible 
I cross-checked the IP in H1 by opening xterm in H1 and route also shows 10.0.0.0 to the h1-eth0 interface 

One error I noticed is telnet to controller resulted in error 
*** c0 : ('echo A | telnet -e A 127.0.0.1 6653',)
DEBUG:mininet:*** c0 : ('echo A | telnet -e A 127.0.0.1 6653',)

Telnet escape character is 'A'.
Trying 127.0.0.1...
DEBUG:mininet:Telnet escape character is 'A'.
Trying 127.0.0.1...

telnet: Unable to connect to remote host: Connection refused
DEBUG:mininet:telnet: Unable to connect to remote host: Connection refused 

I have attached the log for your reference 

log_mininet_882021.txt

Ramon Fontes

unread,
Aug 8, 2021, 6:39:14 AM8/8/21
to srikrishna acharya, mininet-wifi-discuss
Please make sure you have the tcp port 6653 is open in your system and the controller is working. It seems that you have a problem at the control plane. Moreover, you have to install all the dependencies before running the code.

Sent from my android

--
You received this message because you are subscribed to the Google Groups "mininet-wifi-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mininet-wifi-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mininet-wifi-discuss/a3d5e7db-8d65-4771-a541-c200ab8d8af2n%40googlegroups.com.

Ramon Fontes

unread,
Aug 8, 2021, 6:39:49 AM8/8/21
to srikrishna acharya, mininet-wifi-discuss
Please make sure you have the tcp port 6653 open in your system and the controller is working. It seems that you have a problem at the control plane. Moreover, you have to install all the dependencies before running the code.

Sent from my android

On Sun, 8 Aug 2021, 07:27 srikrishna acharya, <srikris...@gmail.com> wrote:

srikrishna acharya

unread,
Aug 8, 2021, 9:19:00 AM8/8/21
to mininet-wifi-discuss
The controller is running properly  when I use mininet_wifi but if I use containernet the controller is not working. 
2021-08-08T12:58:19.085Z|10891|bridge|INFO|bridge ap1: added interface ap1-eth1 on port 1
2021-08-08T12:58:19.087Z|10892|bridge|INFO|bridge ap1: added interface ap1 on port 65534
2021-08-08T12:58:19.088Z|10893|bridge|INFO|bridge ap1: using datapath ID 1000000000000001
2021-08-08T12:58:19.088Z|10894|connmgr|INFO|ap1: added service controller "punix:/var/run/openvswitch/ap1.mgmt"
2021-08-08T12:58:19.088Z|10895|connmgr|INFO|ap1: added primary controller "tcp:127.0.0.1:6653"
2021-08-08T12:58:19.088Z|10896|rconn|INFO|ap1<->tcp:127.0.0.1:6653: connecting...
2021-08-08T12:58:19.088Z|10897|rconn|WARN|ap1<->tcp:127.0.0.1:6653: connection failed (Connection refused)
2021-08-08T12:58:19.088Z|10898|rconn|INFO|ap1<->tcp:127.0.0.1:6653: waiting 1 seconds before reconnect


srikrishna acharya

unread,
Aug 9, 2021, 12:54:23 AM8/9/21
to mininet-wifi-discuss
when mn uses mininet_wifi context  the controller is working properly 
2021-08-08T12:56:05.139Z|10856|connmgr|INFO|ap1: added primary controller "tcp:127.0.0.1:6653"
2021-08-08T12:56:05.139Z|10857|rconn|INFO|ap1<->tcp:127.0.0.1:6653: connecting...
2021-08-08T12:56:05.147Z|10858|rconn|INFO|ap1<->tcp:127.0.0.1:6653: connected


Ramon Fontes

unread,
Aug 9, 2021, 9:11:24 AM8/9/21
to srikrishna acharya, mininet-wifi-discuss
You can start ovs-testcontroller with "sudo ovs-testcontroller ptcp:"

Reply all
Reply to author
Forward
0 new messages