May 3, 2007

Hacks : Adding Forward Error Correction (FEC) into NS-2 Sender & Receiver Agents

This is a hack for NS FEC sender and receiver agents. The sender agent waits for a request from the receiver and then sends the file. Below is a description on integration of these agents into NS. (For more information, please refer to the ping tutorial)

Forward error correction (FEC) is a system of error control for data transmission, whereby the sender adds redundant data to its messages, which allows the receiver to detect and correct errors (within some bound) without the need to ask the sender for additional data. The advantage of forward error correction is that retransmission of data can often be avoided, at the cost of higher bandwidth requirements on average, and is therefore applied in situations where retransmissions are relatively costly or impossible.

Steps :

  1. Get the following files to put in your NS Agent C++ directory:
    • FEC Agent fec.h
    • FEC Sender Agent fec_snd.h
    • FEC Receiver Agent fec_rcv.h
  2. 2. Add fec.o, fec_snd.o, and fec_rcv.o to NS Makefile
  3. In packet.h, add "PT_FEC," to the "enum packet_t" list and add "name_[PT_FEC]= "fec";" to the class p_info p_info() function.
  4. Perform a "make depend". Ignore any warnings.
  5. Add the following to the end of tcl/lib/ns-default.tcl:
    • Agent/FEC/Snd set packetSize_ 64
    • Agent/FEC/Snd set rate_ 100Kbps
    • Agent/FEC/Snd set extraPkts_ 0
    • Agent/FEC/Snd set debug_ false
    • Agent/FEC/Rcv set debug_ false
  6. Add the following to the "foreach pair" list in tcl/lib/ns-packet.tcl:
    • { FEC off_fec_ }
  7. Run "make"
  8. Try ns on the example TCL script, fec.tcl
  9. You can also try this TCL multicast script, mfec.tcl

Download the source files, here

tags :


parimala said...

hi frnd
whehter this is applicable to mobil ip home agend nd foriegn agents....
i am not getting the NS AGENT C++ direcotry..

could u helps me..

thx in advance
waiting 4 u r reply

salah said...

When we follow these steps, there is an error in make file that tclInt file is not found. How to solve this problem?

ank88 said...

The files provided are no longer available. Can you please post another link.


Anonymous said...

hi link for the files is no more can you please correct it or send the file in zip format to
please do reply.