intrig-unicamp / mininet-wifi

Emulator for Software-Defined Wireless Networks
https://mn-wifi.readthedocs.io/
Other
431 stars 239 forks source link

Port down in docker container connected with ethernet to access point #435

Closed alamfaisal654 closed 2 years ago

alamfaisal654 commented 2 years ago

I have a mininet-wifi topology where I have one access point connected over wmediumd to two dockerised stations (sta1 and sta2) and the same access point connected over ethernet to one host runnning docker conatiner (Dap) . All the docker containers run same image server_example. The controller is onos running on a remote VM. All nodes are able to ping each other.

Issue: Docker containers on all the nodes (stations and DockerisedHost) run simple web service running on port 80. This web service is accessible using curl when connecting from one dockerised station to another dockerised station. However, when trying to connect to the web service on Dockerised host, the connection times out. Remember, the dockerised Host is connected over ethernet to AP via simple addLink function.

Troubleshooting Steps:

  1. Tried to see the links. It was all connected

containernet> links ap1-eth2<->Dap-eth0 (OK OK) sta1-wlan0<->wifi (use iw/iwconfig to check connectivity) sta2-wlan0<->wifi (use iw/iwconfig to check connectivity)

  1. Tried to see if the stations were connected by iw. It was up

containernet> sta1 iw dev sta1-wlan0 link Connected to 00:00:00:00:00:01 (on sta1-wlan0) SSID: new-ssid freq: 2412 RX: 70061 bytes (1702 packets) TX: 288 bytes (4 packets) signal: -16 dBm tx bitrate: 1.0 MBit/s

    bss flags:
    dtim period:    2
    beacon int:     100
  1. Checked if the controller was running. The Onos GUI showed all the nodes (Dap, sta1 and sta2) connected to the AP.
  2. Checked if all nodes were pining each other. They did
  3. Checked if the dockers are added to the bridge network. They all were added.

Attaching the code in a separate file Code.py.txt

ramonfontes commented 2 years ago

It seems to me that the same ports of two different nodes are being exposed to the host. Is that correct?

alamfaisal654 commented 2 years ago

Apologies for copy pasting the Code file when I was debugging the issue. I have removed all the port publishes and uploaded the original file again. No, there are no ports that are clashing as there is no port that is published to the host OS. The port (80) that is used here is unpublished and stays with the docker. The ports are in general accessible from one docker container to another, for example sta1 can access port 80 of sta2. But, the issue here is why sta1 cannot access port 80 of Dap (container attached to AP).

ramonfontes commented 2 years ago

the issue here is why sta1 cannot access port 80 of Dap (container attached to AP).

This seems to be a TCP checksum issue because you are running OVS with netdev datapath. Google will help you with this issue.

alamfaisal654 commented 2 years ago

Converting to kernel datapath solved the issue. Thanks for the help.