Strict source routing in NS-3

479 views
Skip to first unread message

Kashif

unread,
Feb 1, 2012, 7:37:51 PM2/1/12
to ns-3-users
Hi!!

I am implementing DCell , a proposed architecture for Data Center
Networks.
In DCell, route from source to destination is decided at source Node.
DCell is a server based routing, so switches or routers are not used,
rather servers serve as packet forwarders.

I want to ask whether NS-3 has some mechanism to perform Strict source
routing, in which I can place all the ips in IP header options field
and packet can be routed?

Best Regards
Kashif

Lalith Suresh

unread,
Feb 2, 2012, 3:43:52 PM2/2/12
to ns-3-...@googlegroups.com
As far as source routing goes, the closest I can point you to is the DSR model, which is under review (almost merge ready): http://codereview.appspot.com/4823051/
 
Best Regards
Kashif

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.




--
Lalith Suresh

Kashif

unread,
Feb 3, 2012, 4:01:26 PM2/3/12
to ns-3-users
Hi Lalith!!

Thanks a lot for information, but I am not using Mnaets, rather I am
using PointToPoint Device and wired environment.
Can you suggest how to achieve it with pointToPoint topology ??

I am thinking to add a field in packet or IpHeader and place the ip's
or all intermediate hops (calculated at sender Node)
I am trying to place the information in Send funtion of ipv4-l3-
protocol.cc
Is there any other suitable way ??

Regards



On Feb 2, 2:43 pm, Lalith Suresh <suresh.lal...@gmail.com> wrote:

Tommaso Pecorella

unread,
Feb 3, 2012, 4:57:25 PM2/3/12
to ns-3-users
Hi,

take a deep breath, empty your mind and ask yourself:
what communication layer in my servers will do this ?

Case 1: at IP level.
Answer: you need to use source routing IP extension headers. Dunno if
they are supported tho.

Case 2: at application level.
Answer: you need to put the hop-by-hop infos in the packet.

For sure sockets don't support setting up headers for case 1 at the
moment, or they do in a way I'm not aware of.
So you'll have to create your packets "by hand" and send them using a
RawSocket.

My suggestion is:
Check how the hop-by-hop, aka source routing is achieved by IP
studying the IPv4 and IPv6 RFCs.
Then check how Linux can (or can't) use it. Mind that source routing
is usually used only for network probing, so ping, trace route and so
on.
Then check if ns-3 can do something similar. If it can't, propose a
new feature, API or whatever.
Possibly implement it :)

Painful ? Yes.
Challenging ? Yes.
Fulfilling ? It depends on you :)
Result achieved: a better understanding on how it works "for real".

Cheers,

T.

PS: DSR, like all the routing protocols, can be used on p2p links as
well. On the other hand routing protocols do their job considering the
src/dst pair (or more params) and can't help if you want to send 2
almost identical packets using two completely different paths.

Ashok Kumar

unread,
Feb 4, 2012, 12:22:08 AM2/4/12
to ns-3-...@googlegroups.com
Hi
Better is NixVector routing. It is similar to source routing. It will calculate the output port at the beginning to determine the path from source to destination. Probably DCell routing is also same but output ports are different based in higher level dcells connection. This you can determine at source node and modify NixVector to compute intermediate ports according to Dcell i's and j's. May be you give it a try.

Kashif

Kashif

unread,
Feb 4, 2012, 9:30:13 PM2/4/12
to ns-3-users
Thanks alot Ashoke..

I will try to have a look at NixVector routing.
Have you implemented FAT tree based DataCenter architecture ?
Regards

Ashok Kumar

unread,
Feb 5, 2012, 12:04:14 AM2/5/12
to ns-3-...@googlegroups.com
Yes but without diffusion at aggregation level

Kashif

unread,
Feb 5, 2012, 4:36:14 PM2/5/12
to ns-3-users
Thanks a lot Ashoke...
I have tried NixVector routing and its working ..

Actually I have already implemented routing algorithm for DCell (they
have written it really bad and sort of incomplete information:( ),
now I have found a place to start with .. and I think I only need to
change BFS (that is used by NixVector) by the DCell routing
algorim :)

Now I want to ask How can I run a datacenter workload (from a trace
file) in NS-3.
and if just point me to a link or help file, I will be thankful to
you.
and also How to gather the different statistics .. I hope that
information is available in trace files, but as you know when the
network would be large (thousands of nodes) then it would be difficult
to analyze tracefile manually ...

Best Regards
Kashif

Ashok Kumar

unread,
Feb 5, 2012, 11:14:09 PM2/5/12
to ns-3-...@googlegroups.com
Hi
I am using a flow monitor to calculate delay and bandwidth. I had not tested for any real traffic but used bulk send between all to all traffic.

Kashif

unread,
Feb 6, 2012, 1:48:27 PM2/6/12
to ns-3-users
Thanks a lot Ashoke.


On Feb 5, 10:14 pm, Ashok Kumar <ashokiitg...@gmail.com> wrote:
> Hi

Kashif

unread,
Feb 11, 2012, 7:01:55 PM2/11/12
to ns-3-users
Hoi Ashoke..
Sorry for bothering you again.
I have tried to use flowmonitor, and included the code from its
conference paper.
I am using this code in my file

//FlowMonitorHelper fmh ;
//Ptr<FlowMonitor> mon = fmh.InstallAll();
//mon->SetAttribute("DelayBinWidth",ns3::DoubleValue(0.001));
//mon->SetAttribute("JitterBinWidth",ns3::DoubleValue(.001));
//mon->SetAttribute("PacketSizeBinWidth",ns3::DoubleValue(20));

MakeCallback (&TraceDevQueueDrop));

It compiles fine, but output gets stuck after sending and receiving
all the packets .
Can you please tell me what is the problem ??

Moreover, I have also installed NetAnime in Advance mode.

I am generation animation file using

AnimationInterface anim ("animation1.xml") ;

When I run this file in basic mode it runs fine,
but I am unable to run this file in advance mode.

Can you please guide me how to run simulation in NetAnim advance
mode?
I mean what changes I need to do in code and how to run it :(

Best Regards


On Feb 5, 10:14 pm, Ashok Kumar <ashokiitg...@gmail.com> wrote:
> Hi

John Abraham

unread,
Feb 11, 2012, 7:13:10 PM2/11/12
to ns-3-...@googlegroups.com
1. Are you getting the "Logging, NetDevices, Routing" tab in NetAnim? 
2. If Step 1 is , "yes", then when you click the "offline" button and play button do you see a star topology?
3. While the simulation is being "played" ,if you click the Routing tab, select a node Id button and click "force update" do you see the routing table?

If step 1, 2, 3 are working let us know.

John Abraham

unread,
Feb 11, 2012, 7:16:31 PM2/11/12
to ns-3-...@googlegroups.com
Here is an old video of how the routing table looks like.

Ensure that you are able to see something like this video, before proceeding to import your own code to NetAnim.

Kashif

unread,
Feb 12, 2012, 5:40:26 PM2/12/12
to ns-3-users
Hi John !!

Thanks a lot for your advice ..

Yes I am able to see the logging and routing button ,and able to see
the star topology running and packets moving.

Kindly inform me how to use my own code to run in NetAnim.
Moreover, if there is any good article to show to collect statistics
and other functionalities of Net Anime of Flow Monitor,. kindly
provide me link .

Best Regards


On Feb 11, 6:16 pm, John Abraham <john.abraham...@gmail.com> wrote:
> Here is an old video of how the routing table looks like.http://www.youtube.com/watch?v=gYnh0TqKdYk&feature=related
>
> Ensure that you are able to see something like this video, before
> proceeding to import your own code to NetAnim.
>
> On Sat, Feb 11, 2012 at 4:13 PM, John Abraham <john.abraham...@gmail.com>wrote:
>
>
>
>
>
>
>
> > 1. Are you getting the "Logging, NetDevices, Routing" tab in NetAnim?
> > 2. If Step 1 is , "yes", then when you click the "offline" button and play
> > button do you see a star topology?
> > 3. While the simulation is being "played" ,if you click the Routing tab,
> > select a node Id button and click "force update" do you see the routing
> > table?
>
> > If step 1, 2, 3 are working let us know.
>

John Abraham

unread,
Feb 12, 2012, 5:42:16 PM2/12/12
to ns-3-...@googlegroups.com
did you finish all 3 steps ?
1. Are you getting the "Logging, NetDevices, Routing" tab in NetAnim? 
2. If Step 1 is , "yes", then when you click the "offline" button and play button do you see a star topology?
3. While the simulation is being "played" ,if you click the Routing tab, select a node Id button and click "force update" do you see the routing table?




John Abraham

unread,
Feb 12, 2012, 6:09:25 PM2/12/12
to ns-3-...@googlegroups.com
In any case , if you were able to complete all the 3 steps I mentioned before, then you can see the application tab which records the application throughput, as seen in this video

There is a log-to-file option, which records this to a file under "logs" directory.
If all this is working, you can go to the next step of running your own code.
The star-topology you saw is already built-in to NetAnim as an example. The code for that is in the file "ns3test/ns3test.cpp".
Replace the start-topology simulation code found in "ns3test.cpp" with your own code. i.e move the contents of your main function , to the function "ConfigureSimulation".

Rebuild, and repeat, 

jasonw...@gmail.com

unread,
May 24, 2016, 11:31:35 PM5/24/16
to ns-3-users
Hi Kashif
I'm a beginner of NS-3,I want to implement a strict source routing in ns3,and the different packets through different route path,How should I do? Could you give me some suggestion.

Best regards
Jason

在 2012年2月2日星期四 UTC+8上午8:37:51,Kashif写道:
Reply all
Reply to author
Forward
0 new messages