
I am new to ns3 and am trying to reproduce the simulation architecture in the paper "SDMANET: Enhancing MANETs with Hybrid Protocols through SDN Integration".
I found the tutorial provided in the ns3 HOWTO (https://www.nsnam.org/wiki/HOWTO_Use_Linux_Containers_to_set_up_virtual_networks) and two examples: "tap-csma-virtual-machine.cc" and "tap-wifi-virtual-machine".
Following this HOWTO, I successfully achieved communication between two containers over a CSMA network. However, when switching to an ad-hoc network, the simulation program fails to run. The error message is as follows:
hym@hym:~/ns/ns-3-allinone/ns-3.45$ ./ns3 run tap-wifi-virtual-machine
[0/2] Re-checking globbed directories...
ninja: no work to do.
Sudo password:
NS_ASSERT failed, cond="linkId.has_value()", +0.012826928s 0 file=/home/hym/ns/ns-3-allinone/ns-3.45/src/wifi/model/wifi-mac-queue-scheduler-impl.h, line=420
NS_FATAL, terminating
terminate called without an active exception
Command 'build/src/tap-bridge/examples/ns3.45-tap-wifi-virtual-machine-debug' died with <Signals.SIGABRT: 6>.I am using ns3 version 3.45, and my local environment is an Ubuntu 22.04 virtual machine running on VMware.
Below is the debug information when I successfully ran the CSMA network:
hym@hym:~/ns/ns-3-allinone/ns-3.45$ ./ns3 run tap-csma-virtual-machine
[0/2] Re-checking globbed directories...
ninja: no work to do.
Sudo password:root@hym:~# ip netns exec ns1 ifconfig
left: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.1 netmask 255.255.255.0 broadcast 0.0.0.0
inet6 fe80::ac79:4cff:fe85:b7df prefixlen 64 scopeid 0x20<link>
ether ae:79:4c:85:b7:df txqueuelen 1000 (Ethernet)
RX packets 133 bytes 14242 (14.2 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 57 bytes 4282 (4.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0root@hym:~# ip netns exec ns1 ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.794 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=0.580 ms
^C
--- 10.0.0.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1012ms
rtt min/avg/max/mdev = 0.580/0.687/0.794/0.107 msroot@hym:~# sudo brctl show
bridge name bridge id STP enabled interfaces
br-left 8000.9acda1a59d13 no left_p
tap-left
br-right 8000.c255e11dd50d no right_p
tap-right
Has anyone encountered this issue? Could you give me some suggestions?