Help to implement a new routing protocol in NS3

1,265 views
Skip to first unread message

Praveen

unread,
Feb 28, 2014, 4:17:59 PM2/28/14
to ns-3-...@googlegroups.com
Hi.

I would like to implement a new routing protocol as part of my Project. The
problem is I am very new to network simulators and I am completely lost.

Can someone please guide me on how to start and proceed my work. Initially I
thought of creating the topology first and then worry about the other
process. But the problem is I am stuck after creating the topology. Where
should I have my routing table and How can i make each node follow my
protocol?

Any help will be greatly useful and continued guidance is always welcome :)

Regards,
Praveen

Tommaso Pecorella

unread,
Feb 28, 2014, 5:02:08 PM2/28/14
to ns-3-...@googlegroups.com, prvn...@gmail.com
Hi,

follow this:
http://codereview.appspot.com/38960045

It's RIPng. The RFC describing it is: http://tools.ietf.org/html/rfc2080

About your routing protocol, you should do the same as RIPng.

1) Define the packets being exchanged (fields, meaning, etc.)
2) Define what the protocol will do upon receiving a packet (Rx part), and when it have to send a packet (Tx part).
3) Develop the packets (see point 1).
4) Develop the Rx and Tx procedures (see point 2).

The routing table will be made by the Rx procedures, typically.

The RouteInput and RouteOutput functions (they're the ones used by IP) can be copied from another routing protocol, mostly. They're "just" something like:
a) look at the routing table and decide what's the next hop by looking at the routing table (RouteOutput)
b) what to do with an incoming packet (it's for me? shall I forward it?)

Simple... once you did it once.

Cheers,

T.

PS. don't look at the topology. That is a consequence of the routing protocol. Not the opposite :)

tenbea...@gmail.com

unread,
Apr 11, 2018, 8:17:51 AM4/11/18
to ns-3-users
Hi, 
I want to create a ad-hoc routing protocol,but I am surely a newbee.Do you have any detailed blogs about this problem?
 
Thankyou!

Regards,

Peng.

在 2014年3月1日星期六 UTC+8上午6:02:08,Tommaso Pecorella写道:

Ammar Farooq

unread,
Apr 12, 2020, 12:11:29 AM4/12/20
to ns-3-users
Hello Peng,

    I want to do something similar. Did you manage to find a solution for this, if so, can you please guide me.

Thanks

Mohit P. Tahiliani

unread,
Apr 13, 2020, 10:53:46 AM4/13/20
to ns-3-users
Hi,

Tommaso has explained the process in detail about adding a new routing protocol. It remains the same even now.

This thread is quite old, so I'll mark it as completed.

I'd recommend you to start a new thread if you have any specific problem while developing a new routing protocol.

-
Mohit P. Tahiliani

Ashagrie Mosu

unread,
May 5, 2020, 9:40:40 AM5/5/20
to ns-3-users

1.     please say something the following questions :


Is it possible to integrated MATLAB with ns3? If yes how please show me some steps

2.      How implement generic algorithms on AODV protocol in MANET?

3.      How to add a malicious node configuration on AODV protocols (Jellyfish attacks)?

4.      How to implement Fuzzy algorithm on AODV protocol in MANET.

5.      How to display the plot graph the performance of AODV protocol with packet drop, E2ED, throughput etc.

6.      How to implement ns3 to eclipse C/C++ development with clearly (watched some video but did not clear)

Reply all
Reply to author
Forward
0 new messages