News & Visitors

802.11MX Reliable MAC Multicast Extension

The current release is 802.11MX 2.0 and has been tested for ns-2.28 on Cygwin. 802.11MX is designed to be compatible with IEEE 802.11 MAC. It supports reliable multicast, broadcast and unicast communications. The current implementation does not support unreliable data transmissions i.e. even control packets from higher layers must be sent reliably. This limitation will be removed in the next release. Also, 802.11MX 2.0 is a significant improvement over the earlier version and as such does not conform to the publication material currently available.

The current release also contains implementation for busy tone channels. The busy tone implementation (PHY and wireless channel) may be used independently of the MAC. This release also includes a MAC Data Generator and Consumer for studying throughput and reliability of any MAC.


Download and install MX for ns-2.28:

This code has been tested only for ns-2.28 on Cygwin.

  1. Download code to your ns-allinone-2.28/ns-2.28/ directory.
  2. gunzip MX2.tar.gz
  3. tar -xvf MX2.tar
  4. Install using either of the following methods:

Install with script:

  1. This method is recommended only if you haven't made significant changes to the files that must be patched (see Notes for a list of files.)

  2. Download installer to your ns-allinone-2.28/ns-2.28/ directory.

  3. gunzip MX-Installer.tar.gz

  4. tar -xvf MX-Installer.tar

  5. ./


    * The script will apply patches to Makefile, tcl/lib/ns-mobilenode.tcl, tcl/lib/ns-defaults.tcl, tcl/lib/ns-lib.tcl, and common/packet.h.

    * Your original files will be backed up to <filename>.orig. In case a patch fails, please revert to your original file and follow the  instructions under 'Manual Install'.

    * The script will run make for you.

Manual Install:

  1. Change to directory ns-allinone-2.28\ns-2.28\

  2. Edit 'Makefile'

    Add the following line after the definition for PERL:
    MX_DIR = mac/mac11MX/RELEASE2.0/

    Add to the variable INCLUDES: -I./mac/mac11MX/RELEASE2.0


    Add the following two lines to OBJ_CC:

    $(MX_DIR)tone-channel.o $(MX_DIR)tone-wireless-phy.o $(MX_DIR)mac-11MX-timers.o \
    $(MX_DIR)mac-11MX.o  $(MX_DIR)mac-data-handler.o $(MX_DIR)mac-data-timer.o \


  3. Edit the file 'tcl/lib/ns-mobilenode.tcl'

    Add the following lines to the procedure Node/MobileNode instproc add-interface :

     # Add the following lines for MX
     if {$mactype == "Mac/802_11MX"} {
               if {$iftype != "Phy/ToneWirelessPhy"} {
                          puts "Error! Mac/802_11MX requires Phy/ToneWirelessPhy"
     # End of MX additional code


  4. Edit the file 'tcl/lib/ns-default.tcl'

    Add the following lines, preferably after the defaults for Phy/WirelessPhy:

     # Initialize the SharedMedia interface with parameters to make
     # it work like the 914MHz Lucent WaveLAN DSSS radio interface
     Phy/ToneWirelessPhy set CPThresh_ 10.0
     Phy/ToneWirelessPhy set CSThresh_ 1.559e-11
     Phy/ToneWirelessPhy set RXThresh_ 3.652e-10
     Phy/ToneWirelessPhy set bandwidth_ 2e6
     Phy/ToneWirelessPhy set Pt_ 0.28183815
     Phy/ToneWirelessPhy set freq_ 914e+6
     Phy/ToneWirelessPhy set L_ 1.0
     Phy/ToneWirelessPhy set debug_ false


    MACDataGen set debug_ false


  5. Edit the file 'tcl/lib/ns-lib.tcl'

    Source an extra tcl file by adding the following statement amongst the other sourcing statements:

    source ns-wmcast.tcl


  6. Edit the file common/packet.h

    Add the following definition:

    #define HDR_MAC11MX(p) ((hdr_mac11MX *)hdr_mac::access(p))


  7. make


Instructions on using MX for simulations:

  1. Locate the file MX-Sample-MAC-Data.tcl in the directory "ns-allinone-2.28/ns-2.28/tcl/ex/Impact/MX"
  2. Change the parameters in the MX-Sample-MAC-Data.tcl script to suit your simulation needs.
  3. Create a movement file.
  4.  run "ns <tcl script file> -movement <movement file> -BER <exponent value of bit error rate>"
    e.g.-> ns MX-Sample-MAC-Data.tcl -movement MX-Movement-Static.tcl  -BER 5
    Note: Parsing for -movement {movement file} and -BER {Bit Error Rate} is done in MX-Sample-Script.tcl and not in ns.exe. You may also use -node to set the number of nodes.

Frequently Asked Questions

  1. How do I form multicast groups?
    Multicast groups are formed by choosing a multicast address and having nodes join a group represented by that multicast address. You may choose any address greater than 7000 to be a multicast address. For example, the following tcl script creates two groups with addresses 9000 and 8000. Group 9000 has nodes 0, 5 and 8 while group 8000 has nodes 5, 8 and 10.

    $ns_ at 0.5 "$node_(0) join-group 9000"
    $ns_ at 0.5 "$node_(5) join-group 9000"
    $ns_ at 0.5 "$node_(8) join-group 9000"

    $ns_ at 0.5 "$node_(5) join-group 8000"
    $ns_ at 0.5 "$node_(8) join-group 8000"
    $ns_ at 0.5 "$node_(10) join-group 8000"

    $ns_ at 5.0 "$node_(0) leave-group 9000"


  2. What is the MACDataGenerator and why use it?
    MACDataGenerator is a C++ module designed to study throughput and reliability of a MAC without interference from higher layers of the network stack.  It generates and consumes its own data and.includes functionality to log packet transmission and reception. Further, it prevents packets from higher layers, such as ARP and JOIN,  from skewing results. It replaces the LL in simulations meant to study MAC performance. Output is written to Transceive-Info.dat. Current implementation assumes unbounded buffer i.e. packets are not dropped due to delays.

    Do not use MACDataGenerator if your simulations are intended to study layers above the MAC Layer.

  3. How do I send multicast data to a group?
    To generate CBR traffic with the MACDataGenerator, set the "-interval" parameter in the "generate-data" function call in your tcl scripts. For example,
    $ns_ at 1.0 "$node_(7) generate-data -interval $PKT_INTERVAL -destn 8000 -pktsize 512"

    To generate CBR traffic with the MACDataGenerator, set the "-pktnum" parameter in the "generate-data" function call in your tcl scripts. For example,
    $ns_ at 1.0 "$node_(7) generate-data -pktnum $PKT_NUM -destn 9000 -pktsize 512"

    To send broadcast data, -destn must be set to -1. Nodes need not explicitly join group -1.

  4. How do I send unicast data with the MACDataGenerator?
    Just specify a valid node address in the "generate-data" function. For example, to set up unicast traffic between node 8 and node 15:
    $ns_ at 1.0 "$node_(8) generate-data -interval $PKT_INTERVAL -destn 15 -pktsize 512"

  5. How do I use MX with the complete stack including the LL and network layers?
    You may use MX as your MAC layer, without the data generator, just like you would any other MAC. Packets must then be generated and consumed at the application layer. You must still explicitly inform the MAC about multicast groups by using the join-group and leave-group calls. You may use any routing protocol. However, care must be taken to set the RTSThreshold in the MX MAC so that even control packets, such as ARP, are delivered reliably. The current implementation does not correctly deliver unreliable packets. This constraint will be removed in the next release of MX.


Details of  802.11MX may be found in:

  1. S. K. S. Gupta, V. Shankar, S. Lalwani, Reliable Multicast MAC Protocol for Wireless LANs, IEEE International Conference on Communications, 2003. ICC '03. Volume: 1, 2003, Page(s): 93-97. [PDF]

  2. V. Shankar, S. K. S. Gupta, Mobility-Tolerant Reliable Wireless LAN Multicast Communication, Submitted to IEEE Transactions on Mobile Computing. [PDF]


Bug Reports and Compatability Issues

Please send queries and bug reports to:


Home | Projects | People | Publications | Courses | Calendar | Resources | News & Visitors | Contact