Static routing vs OLSR/AODV for multiple interfaces

255 views
Skip to first unread message

Mahesh

unread,
Feb 8, 2018, 1:34:55 AM2/8/18
to ns-3-users
Hi all,

I am looking to simulate the attached scripts in which multiple interfaces (NetDeviceContainer instances) are present on a node. I want to compare the effect of static routing vs OLSR/AODV.

When I use static routing, the interfaces through which packets have to be routed work as intended. However, when I am using OLSR/AODV protocols, all the packets from node 0 get routed through the same interface. I came across few posts which talk about OLSR/AODV being incapable of handling multi-interface nodes. 

How do I make my simulation work in multi-interface scenario with OLSR/AODV? Looking forward to your kind reply.

Thanks,
Mahesh
olsr.cc
static-routing.cc

Mahesh

unread,
Feb 10, 2018, 12:52:30 PM2/10/18
to ns-3-users
Can anyone please point me on how to make OLSR/AODV work with multiple interfaces?

N0----N1----N2
           |
         N3

For example, in the above sample wireless topology, if N3----N1 link is already being used through one interface, then I would like to route packets between N3----N0 through a different interface. Similar for N3----N2. Routing should work based on shortest path first.

- Mahesh

Tommaso Pecorella

unread,
Feb 10, 2018, 3:34:36 PM2/10/18
to ns-3-users
Hi,

both AODV and OLSR should be able to handle multiple interfaces.

Try debugging your code and especially the OLSR (or AODV) protocols. It's also possible that you found a bug...

T.

Mahesh

unread,
Feb 11, 2018, 1:13:55 PM2/11/18
to ns-3-users
Hi Tommaso,

Thanks for your reply. I thought maybe my attached script itself has a fault. I have the following topology:

                                 N1
                                   |
                        Ch. 1  |
                                   |
           Ch.2                |           Ch. 4
N2------------------------N0------------------------N4
                                   |
                        Ch. 3  |
                                   |
                                   |
                                 N3

Node 0 has 4 interfaces (one each for communicating with nodes 1 to 4) with IP addresses: 10.1.1.1, 10.1.1.3, 10.1.1.5, 10.1.1.7
Node 1 has 1 interface with IP: 10.1.1.2
Node 2 has 1 interface with IP: 10.1.1.4
Node 3 has 1 interface with IP: 10.1.1.6
Node 4 has 1 interface with IP: 10.1.1.8 

Now I setup 4 flows between node 0 and nodes 1 to 4 which are on 4 different channels. When I install the sourceHelper on node 0, how will OLSR/AODV "decide" that it has to use 4 different interfaces on node 0 for communicating with the nodes 1 to 4?
sourceApp[i] = sourceHelper.Install (nc_wireless.Get(0));

I am confused regarding this part. Kindly reply.

- Mahesh
olsr.cc

Tommaso Pecorella

unread,
Feb 11, 2018, 4:40:25 PM2/11/18
to ns-3-users
Hi,

well, N0 should send its route discovery packets on all the interfaces. If it doesn't it's a bug.

T. 

Mahesh

unread,
Feb 12, 2018, 2:09:53 AM2/12/18
to ns-3-users
Hi Tommaso,

I ran my script on ns-3-dev and ns-3.26. In both the versions, OLSR is not working with multiple interfaces. I am attaching the script herewith. N0 has 4 interfaces. There are 2 scenarios:

Scenario 1 (all interfaces on node 0 are on same channel):

                                 N1
                                   |
                        Ch. 1  |
                                   |
           Ch. 1               |           Ch. 1
N2------------------------N0------------------------N4
                                   |
                        Ch. 1  |
                                   |
                                   |
                                 N3


Scenario 2 (all interfaces on node 0 are on different channels):

                                 N1
                                   |
                        Ch. 1  |
                                   |
           Ch. 2               |           Ch. 4
N2------------------------N0------------------------N4
                                   |
                        Ch. 3  |
                                   |
                                   |
                                 N3


N0 is not sending its route discovery packets on all the interfaces. I am attaching the neighbors, routes and throughput stats of scenario 1 and 2's executions. Kindly check at your end and let me know.

Thanks,
Mahesh
olsr.cc
olsr_same_ch_dev.txt
olsr_same_ch_dev.routes
olsr_same_ch_dev.neighbors
olsr_diff_ch_dev.txt
olsr_diff_ch_dev.routes
olsr_diff_ch_dev.neighbors

Mahesh

unread,
Feb 15, 2018, 4:17:26 AM2/15/18
to ns-3-users
Hi,

Can anyone please look into this issue? Awaiting your kind reply.

- Mahesh

Mahesh

unread,
Feb 19, 2018, 2:41:08 PM2/19/18
to ns-3-...@googlegroups.com
Hi Tommaso and ns3 community,

I have attached the script in my previous post which shows non-working of OLSR with multiple interfaces.

Can you please review if it is indeed a bug in ns3?

Thanks,
Mahesh

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/gPLCBWF6IxM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Mahesh

unread,
Feb 20, 2018, 2:19:43 PM2/20/18
to ns-3-users
Someone please look into this issue/bug.

Tommaso Pecorella

unread,
Feb 21, 2018, 11:55:03 PM2/21/18
to ns-3-users
Hi,

I'm sorry, I was quite busy. I'll look at the issue as soon as I can.

T.

Tommaso Pecorella

unread,
Feb 22, 2018, 12:58:03 AM2/22/18
to ns-3-users
Hi,

ok, I thought it was a bug in OLSR, but it isn't.
It's actually bad design (not in OLSR, in the setup).

First and foremost: you're trying to send flows from the central node to the other nodes. As a consequence, OLSR doesn't have anything to do with it.
Second: it works when all the nodes are in the same channel by sheer luck: they're all connected in a big, huge, mesh.

And now the design issue.

When you have a node with multiple IP interfaces, you have to have a "normal" routing protocol. OLSR, AODV, or whatever, won't work.
In your case, the sender node (which has multiple interfaces) is picking up the wrong one to send all the traffic, purely because when it goes through the routing table it finds the first one first.

The solution is: bridge the interfaces, i.e., use BridgeNetDevice to connect all the interfaces in node 0.

T.

Mahesh

unread,
Feb 24, 2018, 1:30:31 PM2/24/18
to ns-3-users
Thanks for your kind reply, Tommaso. I tried linking the interfaces on central node (node 0) through BridgeNetDevice by following csma-bridge-one-hop.cc file. I read that bridging does not work in adhoc wifi mode so I made the central node as AP and the other nodes as STAs.

However, when I run the script, there seems to be no flow of packets. Can you please tell where I am going wrong?

Thanks,
Mahesh
5-nodes-bridge.cc

Mahesh

unread,
Feb 27, 2018, 12:30:54 PM2/27/18
to ns-3-users
Please guide where I am going wrong, Tommaso.

Thanks,
Mahesh

Tommaso Pecorella

unread,
Mar 3, 2018, 10:58:44 PM3/3/18
to ns-3-users
There should be only ONE node with bridged interfaces, i.e., the central node.

T.

Mahesh

unread,
Mar 7, 2018, 10:15:28 AM3/7/18
to ns-3-users
In my script, the central node is bridged to 4 BridgeDevices each through a separate interface. The other 4 nodes are all configured on a channel so as to receive the packets. Something like this:

                  N1
                    |
                    |
                    | Ch. 38
                    | 
                    |
      Ch. 46 ___  Ch. 62  
N2----------|-N0-|----------N4
                  ___ 
                    |  
                    |
                    | Ch. 54
                    |
                    |  
                  N3

Still no packets are being transferred, why? Kindly tell.

- Mahesh

Mahesh

unread,
Apr 17, 2018, 12:14:56 PM4/17/18
to ns-3-users
Up. 

Also, I wanted to ask why does ns-3 not support bridging in adhoc mode? 
Reply all
Reply to author
Forward
0 new messages