install ns-3-allinone to join with quagga

401 views
Skip to first unread message

Kasemsak Singtakaew

unread,
Nov 26, 2010, 1:52:38 AM11/26/10
to ns-3-users
Dear, all

1.I want to install ns-3-allinone to join the work with quagga ,how
can i do to install it?
2.I want to study Link State routing protocol such as OSPF in ns-3,
how can i get start?

suggest me , please..

thank

Hajime Tazaki

unread,
Nov 26, 2010, 2:52:08 AM11/26/10
to ns-3-...@googlegroups.com

At Thu, 25 Nov 2010 22:52:38 -0800 (PST),

Kasemsak Singtakaew wrote:
>
>Dear, all
>
>1.I want to install ns-3-allinone to join the work with quagga ,how
>can i do to install it?

you can try with ns-3-dce-quagga-umip, since it also include
zebra support.

- ns-3-dce-quagga-umip
http://groups.google.com/group/ns-3-users/browse_frm/thread/ea7c71e635254204/b5a7ab7acdda6b29#b5a7ab7acdda6b29

It only works under Ubuntu 10.04 x86_64, so far.

>2.I want to study Link State routing protocol such as OSPF in ns-3,
>how can i get start?

you can take a look of example at

ns-3-dce-quagga-umip/src/dce/example/quagga.cc
ns-3-dce-quagga-umip/src/dce/example/quagga-rocketfuel.cc


regards,
hajime

Kasemsak Singtakaew

unread,
Nov 26, 2010, 4:04:09 AM11/26/10
to ns-3-users
thank you for reply Hajime , you have a very good friend ...

On Nov 26, 2:52 pm, Hajime Tazaki<thehaj...@gmail.com> wrote:
> At Thu, 25 Nov 2010 22:52:38 -0800 (PST),
>
> Kasemsak Singtakaew wrote:
>
> >Dear, all
>
> >1.I want to install ns-3-allinone to join the work with quagga ,how
> >can i do to install it?
>
> you can try with ns-3-dce-quagga-umip, since it also include
> zebra support.
>
> - ns-3-dce-quagga-umiphttp://groups.google.com/group/ns-3-users/browse_frm/thread/ea7c71e63...

Bruno

unread,
Dec 1, 2010, 1:31:35 PM12/1/10
to ns-3-users
Dear Hajime, all.

I used the great work you did with zebra (ns-3-dce-quagga-umip) and
try to simulate failure in OSPF networks.
I used the quagga-rockfuel example and try to simulate link failure by
using the ipv4::SetDown function but the simulation failed with a
SIGSEGV signal.

My question is then, is link failure possible with your zebra and
ns3 ?, have you already tested it ?
if not, is it easily feasible to add link failure support.

I looked into ns3 with quagga since It seems that global routing
objects in ns3 don't support failure detection with hello protocol,
but if 'iam wrong, please tell me.

Regards,

Bruno

Bruno

unread,
Dec 1, 2010, 1:31:46 PM12/1/10
to ns-3-users
Dear Hajime, all.

I used the great work you did with zebra (ns-3-dce-quagga-umip) and
try to simulate failure in OSPF networks.
I used the quagga-rockfuel example and try to simulate link failure by
using the ipv4::SetDown function but the simulation failed with a
SIGSEGV signal.

My question is then, is link failure possible with your zebra and
ns3 ?, have you already tested it ?
if not, is it easily feasible to add link failure support.

I looked into ns3 with quagga since It seems that global routing
objects in ns3 don't support failure detection with hello protocol,
but if 'iam wrong, please tell me.

Regards,

Bruno

On 26 nov, 10:04, Kasemsak Singtakaew <handfoot4w...@gmail.com> wrote:

Hajime Tazaki

unread,
Dec 2, 2010, 3:49:24 AM12/2/10
to ns-3-...@googlegroups.com

Hello Bruno,

At Wed, 1 Dec 2010 10:31:46 -0800 (PST),


Bruno wrote:
>
>Dear Hajime, all.
>
>I used the great work you did with zebra (ns-3-dce-quagga-umip) and
>try to simulate failure in OSPF networks.
>I used the quagga-rockfuel example and try to simulate link failure by
>using the ipv4::SetDown function but the simulation failed with a
>SIGSEGV signal.

could you give me your simulation script? I'll try to
reproduce what you pointed out.

and it is helpful if you also give me stacktrace of gdb with
the core file.

>My question is then, is link failure possible with your zebra and
>ns3 ?, have you already tested it ?
>if not, is it easily feasible to add link failure support.

I guess current version of netlink implementation in ns-3
doesn't have link notification to the application. but it's
possible to notify with modification.

>I looked into ns3 with quagga since It seems that global routing
>objects in ns3 don't support failure detection with hello protocol,
>but if 'iam wrong, please tell me.

sorry, i'm not sure.

regards,
hajime

Bruno

unread,
Dec 2, 2010, 9:47:56 AM12/2/10
to ns-3-users
Hello Hajime,

I'm newbie with network simulation, but in real, OSPF use keep alive
messages (hello protocol) to manage adjacencies. What I expect, would
be that quagga detect itself that a link is down because of missing
hello messages.

Anyway, following is the backtrace of the execution:
Reading symbols from /home/bvidalen/NS3/ns-3-dce-quagga-umip/build/
debug/src/dce/example/quagga-bruno...done.
(gdb) backtrace
No stack.
(gdb) run
Starting program: /home/bvidalen/NS3/ns-3-dce-quagga-umip/build/debug/
src/dce/example/quagga-bruno backtrace
[Thread debugging using libthread_db enabled]
setrlimit: Operation not permitted
topology created with 4 nodes and 4 links (from examples/topology-
read/bruno.topo.txt)
creating ip4 addresses
creating node containers
creating net device containers
creating ipv4 interfaces
creating all the route
creating quagga process

Program received signal SIGUSR1, User defined signal 1.
0x0012d422 in __kernel_vsyscall ()
(gdb) backtrace
#0 0x0012d422 in __kernel_vsyscall ()
#1 0x022ee230 in raise (sig=10)
at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:42
#2 0x011aa921 in StackTrampoline (this=0x80bad80)
at ../src/dce/model/pthread-fiber-manager.cc:139
#3 0x011a80ab in PthreadFiberManager (this=0x80bad70)
at ../src/dce/model/pthread-fiber-manager.cc:240
#4 0x011afee1 in ns3::TaskManager::SetFiberManagerType
(this=0x80bad00,
type=ns3::TaskManager::PTHREAD_FIBER_MANAGER)
at ../src/dce/model/task-manager.cc:375
#5 0x011b0482 in DoSet (this=0x8067c40, object=0x80bad00,
v=0x80647a0)
at debug/ns3/attribute-accessor-helper.h:184
#6 0x011b184e in ns3::AccessorHelper<ns3::TaskManager,
ns3::EnumValue>::Set (
this=0x8067c40, object=0x80bad00, val=...)
at debug/ns3/attribute-accessor-helper.h:74
#7 0x00805a64 in ns3::ObjectBase::DoSet (this=0x80bad00, spec=...,
checker=..., value=...) at ../src/core/object-base.cc:169
#8 0x00805605 in ns3::ObjectBase::ConstructSelf (this=0x80bad00,
attributes=...) at ../src/core/object-base.cc:151
#9 0x00807d60 in ns3::Object::Construct (this=0x80bad00,
attributes=...)
at ../src/core/object.cc:129
#10 0x0083ea9b in ns3::ObjectFactory::Create (this=0xbfffeb38)
at ../src/core/object-factory.cc:72
---Type <return> to continue, or q <return> to quit---
#11 0x01201743 in ns3::ObjectFactory::Create<ns3::TaskManager> (this=
0xbfffeb38) at debug/ns3/object-factory.h:110
#12 0x01200f57 in ns3::DceManagerHelper::Install (this=0xbfffeb14,
nodes=...)
at ../src/dce/helper/dce-manager-helper.cc:82
#13 0x08054205 in main (argc=2, argv=0xbfffef24)
at ../src/dce/example/quagga-bruno.cc:223

And here is the example I used, Its a modification from de quagga-
rockfuel example, but using a simple topology of four routers in the
Inet format.

/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */

#include "ns3/core-module.h"
#include "ns3/helper-module.h"
#include "ns3/mobility-module.h"
#include "ns3/dce-module.h"
#include "ns3/quagga-helper.h"
#include "ns3/simulator-module.h"
#include "ns3/global-route-manager.h"
#include "ns3/node-module.h"
#include "ns3/log.h"
#include "ns3/wifi-module.h"
#include "ns3/ipv4-l3-protocol.h"
#include "ns3/ipv4-global-routing-helper.h"
#include "ns3/ipv6-l3-protocol.h"
#include "ns3/ipv6-header.h"
#include "ns3/icmpv6-header.h"
#include "ns3/ipv6-static-routing.h"
#include "ns3/udp-header.h"
#include "ns3/realtime-simulator-impl.h"
#include "ns3/visualizer.h"
#include "ns3/pyviz.h"
#include "ns3/v4ping-module.h"
#include "ns3/mpi-interface.h"

#include <sys/resource.h>
/*/
#ifdef NS3_MPI
#include <mpi.h>
#endif
*/
using namespace ns3;

NS_LOG_COMPONENT_DEFINE ("bruno");

// Parameters
uint32_t nNodes = 2;
//uint32_t stopTime = 600;
uint32_t stopTime = 10000;
static void
SetRlimit ()
{
int ret;
struct rlimit limit;
limit.rlim_cur = 1000000;
limit.rlim_max = 1000000;

ret = setrlimit(RLIMIT_NOFILE, &limit);
if (ret == -1)
{
perror ("setrlimit");
}
return;
}

int
main (int argc, char *argv[])
{
LogComponentEnable ("bruno", LOG_LEVEL_INFO);
/*
#ifdef NS3_MPI
// Distributed simulation setup
MpiInterface::Enable (&argc, &argv);
GlobalValue::Bind ("SimulatorImplementationType",
StringValue ("ns3::DistributedSimulatorImpl"));

uint32_t systemId = MpiInterface::GetSystemId ();
uint32_t systemCount = MpiInterface::GetSize ();
#endif
*/
CommandLine cmd;
cmd.AddValue ("nNodes", "Number of Router nodes", nNodes);
cmd.AddValue ("stopTime", "Time to stop(seconds)", stopTime);
cmd.Parse (argc,argv);

SetRlimit ();

//
// Step o
// Read Topology information
// ------------------------------------------------------------
// -- Read topology data.
// --------------------------------------------

// Pick a topology reader based in the requested format.

Ptr<TopologyReader> inFile = 0;
TopologyReaderHelper topoHelp;

NodeContainer nodes;

string format ("Inet");
string input ("examples/topology-read/bruno.topo.txt");
//string input ("3967.weights.intra");

topoHelp.SetFileName(input);
topoHelp.SetFileType(format);
inFile = topoHelp.GetTopologyReader();

if (inFile != 0)
{
nodes = inFile->Read ();
}

if (nodes.GetN () == 0)
{
NS_LOG_ERROR ("Problems reading node information the topology
file. Failing.");
return -1;
}
if (inFile->LinksSize () == 0)
{
NS_LOG_ERROR ("Problems reading the topology file. Failing.");
return -1;
}
NS_LOG_INFO (" topology created with " << nodes.GetN () << " nodes
and " <<
inFile->LinksSize () << " links (from " << input <<
")");
/*
// Tricky things XXX
// Change systemId for MPI by hand...
#ifdef NS3_MPI
for (uint32_t i = 0; i < nodes.GetN (); i++)
{
nodes.Get (i)->SetSystemId (i % systemCount);
}
#endif
*/
//
// Step 1
// Node Basic Configuration
//

// Internet stack install
InternetStackHelper stack; // IPv4 is required for GlobalRouteMan
stack.Install (nodes);

//
// Step 2
// Address Configuration
//
//
Ipv4AddressHelper ipv4AddrHelper;

NS_LOG_INFO ("creating ip4 addresses");
Ipv4AddressHelper address;
address.SetBase ("10.0.0.0", "255.255.255.252");

int totlinks = inFile->LinksSize ();
NS_LOG_INFO ("creating node containers");
NodeContainer nc[totlinks];
TopologyReader::ConstLinksIterator iter;
int i = 0;
for ( iter = inFile->LinksBegin (); iter != inFile->LinksEnd (); iter
++, i++ )
{
nc[i] = NodeContainer (iter->GetFromNode (), iter->GetToNode
());
}


NS_LOG_INFO ("creating net device containers");
NetDeviceContainer ndc[totlinks];
PointToPointHelper p2p;
for (int i = 0; i < totlinks; i++)
{
// p2p.SetChannelAttribute ("Delay",
TimeValue(MilliSeconds(weight[i])));
p2p.SetChannelAttribute ("Delay", StringValue ("1ns"));
p2p.SetDeviceAttribute ("DataRate", StringValue ("100Mbps"));
ndc[i] = p2p.Install (nc[i]);
}
// p2p.EnablePcapAll ("bruno");

NS_LOG_INFO ("creating ipv4 interfaces");
Ipv4InterfaceContainer ipic[totlinks];
for (int i = 0; i < totlinks; i++)
{
ipic[i] = address.Assign (ndc[i]);
address.NewNetwork ();
}


//
// Application configuration for Nodes
//
NS_LOG_INFO ("creating all the route");
// Ipv4GlobalRoutingHelper::PopulateRoutingTables ();

NS_LOG_INFO ("creating quagga process");
//run quagga programs in every node
DceManagerHelper processManager;
QuaggaHelper quagga;

//
// Step 3
// Traffic configuration
//
/*
#ifdef NS3_MPI
if (systemId == 0)
#endif

*/
{
Ptr<V4Ping> app = CreateObject<V4Ping> ();
//Ptr<Ipv4> ipv4Server = nodes.Get (25)->GetObject<Ipv4> ();
//Ptr<Ipv4> ipv4Server = nodes.Get (nodes.GetN () - 1)-
>GetObject<Ipv4> ();

Ptr<Ipv4> ipv4Server = nodes.Get (2)->GetObject<Ipv4> ();

app->SetAttribute ("Remote", Ipv4AddressValue (ipv4Server-
>GetAddress (1, 0).GetLocal ()));

app->SetAttribute ("Verbose", BooleanValue (true));

// nodes.Get (0)->AddApplication (app);
//app->SetStartTime (Seconds (20.0));
//app->SetStopTime (Seconds (stopTime));
}

for (uint32_t i = 0; i < nodes.GetN (); i++)
{
#ifdef NS3_MPI
if (i % systemCount == systemId % systemCount)
#endif
{
// std::cout << "[" << systemId << "] start quagga Node
" << i << std::endl;
processManager.Install (nodes.Get (i));
quagga.EnableOspf (nodes.Get (i));
quagga.EnableZebraDebug (nodes.Get (i));
quagga.Install (nodes.Get (i));
}
}
//.getDevice(0).down(Seconds (25.0));
//nodes.Get(1)->GetObject<Ipv4>()->SetDown(0);
//
// Step 9
// Now It's ready to GO!
//

//RunIp (nodes.Get (0), Seconds (0.1), "route show table all");

if (stopTime != 0)
{
Simulator::Stop (Seconds (stopTime));
}
// Visualizer::Run ();
Ptr<Node> n1 = nodes.Get (2);
Ptr<Ipv4> ipv41 = n1->GetObject<Ipv4> ();
// The first ifIndex is 0 for loopback, then the first p2p is
numbered 1,
// then the next p2p is numbered 2

uint32_t ipv4ifIndex1 = 2;

Simulator::Schedule (Seconds (30.0),&Ipv4::SetDown,ipv41,
ipv4ifIndex1);



Simulator::Run ();

//setMetrics
Simulator::Destroy ();


std::cout << "End of experiment" << std::endl;

return 0;
}


--------------------------------------------
lastly , here is the simple topo utilized.

4 4
0 5625 2473
1 4505 4098
2 9866 2148
3 8315 7088
0 1 1
0 3 10
1 2 1
2 3 2

Thank you for your help.

Best regards
Bruno

Tom Henderson

unread,
Dec 2, 2010, 10:18:12 AM12/2/10
to ns-3-...@googlegroups.com

>
>> I looked into ns3 with quagga since It seems that global routing
>> objects in ns3 don't support failure detection with hello protocol,
>> but if 'iam wrong, please tell me.
>
> sorry, i'm not sure.
>

That is true; global routing is mainly designed for static topologies
for cases in which users don't want to bother with any routing
protocols, and it doesn't support failure detection. That is also why
it is not really well suited for wireless, because it decides that every
device attached to the channel is reachable regardless of the
propagation conditions.

- Tom

Kasemsak Singtakaew

unread,
Dec 6, 2010, 2:23:10 PM12/6/10
to ns-3-users
I try to install ns-3-dce-quagga-umip then I execute command
"./waf configure --with-linux-stack=./dce_build/ns-3-linux --with-
pybindgen=./dce_build/pybindgen-0.15.0.770" in your suggest ,it show
some error

Checking for regression reference traces : not found
Checking for type uint128_t : not found
Checking for type __uint128_t : not found
Checking for header sys/inttypes.h : not found
Checking for NSC location : not found
hecking for Python module pygccxml : not found
Checking for program mpic++ : not found

, how i can do?

I working on Ubuntu 2.6.32-21-generic

thank...



On Nov 26, 2:52 pm, Hajime Tazaki<thehaj...@gmail.com> wrote:
> At Thu, 25 Nov 2010 22:52:38 -0800 (PST),
>
> Kasemsak Singtakaew wrote:
>
> >Dear, all
>
> >1.I want to install ns-3-allinone to join the work withquagga,how
> >can i do to install it?
>
> you can try with ns-3-dce-quagga-umip, since it also include
> zebra support.
>
> - ns-3-dce-quagga-umiphttp://groups.google.com/group/ns-3-users/browse_frm/thread/ea7c71e63...

Aditya Subramaniam

unread,
Dec 6, 2010, 10:42:19 PM12/6/10
to ns-3-...@googlegroups.com
Hey

Is there any easy way to implement a Poissons' distribution for vehicular flow? I'm attempting to model vehicular traffic, but then noticed that Poissons' distribution is not implemented in random-variable.h/.cc. Is there any way I could use existing functions in order to implement this? It's also necessary for me to ensure that the random variable that is generated is also of the type RandomVariable and not double.

Thanks in advance.

Regards,
Aditya G Subramaniam
Graduate Student
Electrical & Comp Engineering
Georgia Tech


伟伟

unread,
Dec 6, 2010, 10:47:31 PM12/6/10
to ns-3-...@googlegroups.com
check the wiki for the exact way of installing it.
i wonder wheather you have the required dependency installed or not
---==Steve @ MBP==---



2010/12/7 Aditya Subramaniam <subramani...@gmail.com>



--
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.

Kasemsak Singtakaew

unread,
Dec 8, 2010, 7:10:23 PM12/8/10
to ns-3-users
I have install many times for ns-3 packege follow step from
http://www.nsnam.org/wiki/index.php/Installation#Ubuntu.2FDebian ,
and I try to install code ns-3 from http://code.nsnam.org/thehajime/ns-3-dce-quagga-umip/

but the result show
Checking for regression reference traces : not found
Checking for type uint128_t : not found
Checking for type __uint128_t : not found
Checking for header sys/inttypes.h : not found
Checking for NSC location : not found

(1). how can I solve the problem ?
(2). the message will have problem for develop? or not?


On Dec 7, 2:23 am, Kasemsak Singtakaew <handfoot4w...@gmail.com>
wrote:

Mathieu Lacage

unread,
Dec 9, 2010, 7:04:32 AM12/9/10
to ns-3-...@googlegroups.com
This is SIGUSR1, not SEGFAULT: it's used by some code to handle task
switching. Try the gdb command:
"handle SIGUSR1 nostop"
and
"continue"

> --
> 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.
>
>

--
Mathieu Lacage <mathieu...@gmail.com>

Reply all
Reply to author
Forward
0 new messages