Hello,
I'm currently trying to run a simple IPv6 example using tap devices (on ns-3 version 3.29). I modified the "examples/ipv6/ping6.cc" and added a TapBridge, but I'm not able to get it working. I've attached the script to this message.
It seems like the tap device in configure local mode does not support ipv6, is this correct?
I'm using "UseLocal" mode now, as "ConfigureLocal" didn't work at all. Before running my ns-3 script, I create a tap interface on the host with the following commands:
ip tuntap add dev tap-container1 mode tap
ip -6 addr add fe80::200:ff:fe00:8/64 dev tap-container1
ifconfig tap-container1 promisc
ip link set tap-container1 up
After executing these steps, "ip a" shows the following configuration for my tap interface:
326: tap-container1: <NO-CARRIER,BROADCAST,MULTICAST,PROMISC,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether d2:3c:98:e8:85:d9 brd ff:ff:ff:ff:ff:ff
inet6 fe80::200:ff:fe00:8/64 scope link tentative
valid_lft forever preferred_lft forever
However, when I start ns-3, another ipv6 address is assigned to my tap interface. The configuration, after starting ns-3, is the following:
325: tap-container1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 0a:cc:a3:53:b5:bb brd ff:ff:ff:ff:ff:ff
inet6 fe80::8cc:a3ff:fe53:b5bb/64 scope link tentative
valid_lft forever preferred_lft forever
inet6 fe80::200:ff:fe00:8/64 scope link
valid_lft forever preferred_lft forever
There are two things I don't understand:
- It seems like ns-3 assigns another ipv6 address to my tap interface, but why?
- After removing this ipv6 address, I can ping another device in the ns-3 network (e.g. ping -6 -I tap-container1 fe80::200:ff:fe00:2). However, after 5 successful pings, ns-3 crashes with the following error message:
assert failed. cond="m_current >= m_dataStart && m_current < m_dataEnd", msg="You have attempted to read beyond the bounds of the available buffer space. This usually indicates that a Header::Deserialize or Trailer::Deserialize method is trying to read data which was not written by a Header::Serialize or Trailer::Serialize method. In short: check the code of your Serialize and Deserialize methods.", file=./ns3/buffer.h, line=1000
terminate called without an active exception
I tried different setups with different configurations, but I just don't get it working... Actually, my goal is to use tap devices in a 6LoWPAN network, but this didn't work as well so I thought I'll start with a simpler setup. Any help is appreciated!