The ns-3 mesh module extends the ns-3 wifi module to provide mesh networking capabilities according to the IEEE 802.11s standard [ieee80211s].
The basic purpose of IEEE 802.11s is to define a mode of operation for Wi-Fi that permits frames to be forwarded over multiple radio hops transparent to higher layer protocols such as IP. To accomplish this, mesh-capable stations form a Mesh Basic Service Set (MBSS) by running a pair-wise peering protocol to establish forwarding associations, and by running a routing protocol to find paths through the network. A special gateway device called a mesh gate allows a MBSS to interconnect with a Distribution System (DS).
The basic enhancements defined by IEEE 802.11s include:
The ns-3 models implement only a subset of the above service extensions, focusing mainly on those items related to peering and routing/forwarding of data frames through the mesh.
The Mesh NetDevice based on 802.11s D3.0 draft standard was added in ns-3.6 and includes the Mesh Peering Management Protocol and HWMP (routing) protocol implementations. An overview presentation by Kirill Andreev was published at the Workshop on ns-3 in 2009 [And09]. An overview paper is available at [And10].
As of ns-3.23 release, the model has been updated to the 802.11s-2012 standard [ieee80211s] with regard to packet formats, based on the contribution in [Hep15].
These changes include:
With these changes the messages of the Peering Management Protocol and Hybrid Wireless Mesh Protocol will be transmitted compliant to IEEE802.11-2012 and the resulting pcap trace files can be analyzed by Wireshark.
The multi-interface mesh points are supported as an extension of IEEE draft version 3.0. Note that corresponding ns-3 mesh device helper creates a single interface station by default.
The implementation of the 802.11s extension consists of two main parts: the Peer Management Protocol (PMP) and Hybrid Wireless Mesh Protocol (HWMP).
The tasks of the peer management protocol are the following:
If a peer link between the sender and receiver does not exist, a frame will be dropped. So, the plug-in to the peer management protocol (PMP) is the first in the list of ns3::MeshWifiInterfaceMacPlugins to be used.
The peer management protocol consists of three main parts:
The procedure of closing a peer link is not described in detail in the standard, so in the model the link may be closed by:
The peer management protocol is also responsible for beacon collision avoidance, because it keeps beacon timing elements from all neighbours. Note that the PeerManagementProtocol is not attached to the MeshPointDevice as a routing protocol, but the structure is similar: the upper tier of the protocol is ns3::dot11s::PeerManagementProtocol`` and its plug-in is ``ns3::dot11s::PeerManagementProtocolMac.
HWMP is implemented in both modes, reactive and proactive, although path maintenance is not implemented (so active routes may time out and need to be rebuilt, causing packet loss). Also the model implements an ability to transmit broadcast data and management frames as unicasts (see appropriate attributes). This feature is disabled at a station when the number of neighbors of the station is more than a threshold value.
802.11 packets (e.g. using UDP, ARP) which are generated in the simulator ns-3 are not recognized correctly in Wireshark. They are erroneously detected as LLC packets by using the mesh module. The reason is that the IEEE 802.11 frame is of type Data frame/Subtype 0 (not QoS). However at the end of the header are some additional bytes (referring to QoS) which should not be there and therefore the frame can’t be detected with Wireshark.
Bug 1605 describes scenarios for which no data packets can be delivered through the network due to synchronized losses. The model is highly sensitive to the fact that node packet processing time is not modelled. The following is adapted from the bug report.
The symptoms are the following:
The explanation is the following:
Adding random jitter to all packets that go from the mesh interface mac to EdcaTxopN can remedy this problem.