Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Routing Issues with Docker-Connected Nodes in Ns3 Simulations

53 views
Skip to first unread message

Daniel Kim

unread,
Nov 25, 2024, 2:09:12 PM11/25/24
to ns-3-users
Hello, I recently discovered this place, and I wanted to share an issue regarding Ns3 and get some advice, so I decided to write this post. I am conducting MANET simulations using real Docker containers through a Tap bridge.

I have successfully verified the functionality of the examples in the 'tap-wifi-virtual-machine.cc', 'tap-csma-machine.cc', and 'tap-wifi-dumbbell.cc' files located in the example folder. However, as soon as I include routing protocols like OLSR or AODV in the simulation code, routing fails. For instance:

- Number of nodes: 4  
- docker-1 and docker-2 containers are connected to 'node0' and 'node1', respectively.  
- Ping between unconnected nodes ('node2' and 'node3') works fine.  
- Ping between 'node0' and 'node1' also works fine.  
- However, ping between connected nodes ('node0', 'node1') and unconnected nodes ('node2', 'node3')—in other words, between nodes with containers and those without—is not possible.

If I do not include protocols like OLSR, the above issue does not occur.

One possible cause that I suspect might be related to this issue is the following behavior that occurs even before setting up protocols like OLSR:

- Number of nodes: 4  
- docker-1 and docker-2 containers are connected to node0 and node1, respectively.  
- When using Ns3's 'V4PingHelper', ping between the container-connected nodes ('node0 <-> node1') fails.  
- However, if I directly access the containers and attempt a ping, it succeeds.  
- Using 'V4PingHelper', pings from unconnected nodes (e.g., 'node2 -> node0') succeed, but the reverse direction (e.g., 'node0 -> node2') fails.

It seems like issues arise whenever trying to manipulate container-connected nodes within Ns3. Is there any way to resolve this? For reference, I'll also attach my code.
setup.sh
tap-wifi-test.cc
olsr.routes

Tommaso Pecorella

unread,
Nov 25, 2024, 7:13:57 PM11/25/24
to ns-3-users
I'm quite confused by your network setup (sorry). Mind drawing a diagram of the network highlighting the ns-3 nodes and the docker interfaces?

As a side note, I suspect a network address collision in your setup. As and example, you are assigning 10.1.1.1 both to an ns-3 node and to a docker node...

Daniel Kim

unread,
Nov 26, 2024, 1:24:28 AM11/26/24
to ns-3-users
Thank you for your response.
I’m attaching a diagram here.I thought that I needed to assign the same IP address to both the ns3 node and the Docker container. Was that incorrect?
2024년 11월 26일 화요일 오전 9시 13분 57초 UTC+9에 Tommaso Pecorella님이 작성:
Diagram.png
Reply all
Reply to author
Forward
0 new messages