To view the graph in NS 3

6,380 views
Skip to first unread message

john

unread,
Jan 18, 2012, 6:26:12 AM1/18/12
to ns-3-users
Dear users,


As so far i am using NS-3 and executing programs in that case when ia
m building the ./waf shell
i got the message that all the modules are build except click and flow-
monitor what is the remedy of this.




It will be more helpful i think so to view the graph.....

Thanking You!

Yeison Camargo

unread,
Jan 18, 2012, 9:59:58 AM1/18/12
to ns-3-...@googlegroups.com
Hello there, 
If you want to see the graph you could use a visualizer, Pyviz is a visualiser very easy to use (but is not the only one), the point is that you have to run the program in this way : ./waf --run xxxxx --vis, but inside the program you need to add this:

CommandLine cmd;
cmd.Parse (argc, argv);

I will send you an example if you have any question please write. Please copy the code in the scratch folder with a name for example myfirst.cc then run it with ./waf --run myfirst --vis and that's it, very easy. I'll send you a image of the visualizer (Pyviz)


#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/applications-module.h"

using namespace ns3;

NS_LOG_COMPONENT_DEFINE ("FirstScriptExample");

int
main (int argc, char *argv[])
{

  CommandLine cmd;
  cmd.Parse(argc, argv);
  LogComponentEnable ("UdpEchoClientApplication", LOG_LEVEL_INFO);
  LogComponentEnable ("UdpEchoServerApplication", LOG_LEVEL_INFO);

  NodeContainer nodes;
  nodes.Create (2);

  PointToPointHelper pointToPoint;
  pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
  pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms"));

  NetDeviceContainer devices;
  devices = pointToPoint.Install (nodes);

  InternetStackHelper stack;
  stack.Install (nodes);

  Ipv4AddressHelper address;
  address.SetBase ("10.1.1.0", "255.255.255.0");

  Ipv4InterfaceContainer interfaces = address.Assign (devices);

  UdpEchoServerHelper echoServer (9);

  ApplicationContainer serverApps = echoServer.Install (nodes.Get (1));
  serverApps.Start (Seconds (1.0));
  serverApps.Stop (Seconds (10.0));

  UdpEchoClientHelper echoClient (interfaces.GetAddress (1), 9);
  echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
  echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
  echoClient.SetAttribute ("PacketSize", UintegerValue (1024));

  ApplicationContainer clientApps = echoClient.Install (nodes.Get (0));
  clientApps.Start (Seconds (2.0));
  clientApps.Stop (Seconds (10.0));

  Simulator::Run ();
  Simulator::Destroy ();
  return 0;
}

pyvizfirst.png


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




--
YEISON JULIAN CAMARGO
Cisco Systems CCNA
Cisco Systems CCNA Security
Microsoft MTA Windows Server Administration
Microsoft MTA Security
Microsoft MTA Networking
IPv6 Hurricane Electric SAGE

pyvizfirst.png

Nikx

unread,
Jan 18, 2012, 12:13:32 PM1/18/12
to ns-3-users
Thanks for giving such a great insight.Thanks a lot.Please can you say
how to build the two modules click and openflow that were not built
with ./waf shell or ./waf build commands.I am facing similar problems
with those two modules not built.Please help?Also NSC and mpi not
enabled.Am working in fedora 15 to work with ns3
>  pyvizfirst.png
> 94KViewDownload

NAFIS

unread,
Jan 18, 2012, 6:40:44 PM1/18/12
to ns-3-users
I was trying to run your code .But getting the error at the last.Do
you have a solution:
root@UPF:~/repos/ns-3-allinone/ns-3-dev# ./waf --run myfirst --vis
Waf: Entering directory `/root/repos/ns-3-allinone/ns-3-dev/build'
Waf: Leaving directory `/root/repos/ns-3-allinone/ns-3-dev/build'
'build' finished successfully (1.351s)
scanning topology: 2 nodes...
scanning topology: calling graphviz layout
scanning topology: all done.
/root/repos/ns-3-allinone/ns-3-dev/src/visualizer/visualizer/core.py:
1340: Warning: g_object_set_qdata: assertion `G_IS_OBJECT (object)'
failed
item = item.props.parent
Thanks.How can I solve this problem pls.

NAFIS

unread,
Jan 19, 2012, 4:33:44 AM1/19/12
to ns-3-users
When I am running the code I am getting the following warning:How can
I over come the problem pls.Thanks Nafis
(python:2045): Gtk-WARNING **: Unable to locate theme engine in
module_path: "pixmap",

(python:2045): Gtk-WARNING **: Unable to locate theme engine in
module_path: "pixmap",

(python:2045): Gtk-WARNING **: Unable to locate theme engine in
module_path: "pixmap",

(python:2045): Gtk-WARNING **: Unable to locate theme engine in
module_path: "pixmap",
Could not load icon applets-screenshooter due to missing gnomedesktop
Python module
scanning topology: 2 nodes...
scanning topology: calling graphviz layout
scanning topology: all done.
/root/repos/ns-3-allinone/ns-3-dev/src/visualizer/visualizer/core.py:
1340: Warning: g_object_set_qdata: assertion `G_IS_OBJECT (object)'
failed
item = item.props.parent


>  pyvizfirst.png
> 94KViewDownload

Yeison Camargo

unread,
Jan 19, 2012, 11:36:20 AM1/19/12
to ns-3-...@googlegroups.com
Hello Nafis,

First that all please check if you have all the packets needs as prerequisites, in order to do this check this page out:


Then try to run the example (I'm assuming you copy the code and in the scratch simulator folder, created a file called myfirst.cc and pasted the code)

NAFIS

unread,
Jan 19, 2012, 11:51:58 AM1/19/12
to ns-3-users
Yap.I did in that way.

Yeison Camargo

unread,
Jan 19, 2012, 11:55:43 AM1/19/12
to ns-3-...@googlegroups.com
John in order to solve your problem please check you have installed the prerequisites packets, to do this please refer to this page:


After installing the packets when you build with waf (./waf) you will get something like this (in the ns-3.13 version), it could change if your version is different:


Modules built:
aodv                      applications              bridge                   
config-store              core                      csma                     
csma-layout               dsdv                      emu                      
energy                    flow-monitor              internet                 
lte                       mesh                      mobility                 
mpi                       netanim                   network                  
nix-vector-routing        olsr                      point-to-point           
point-to-point-layout     propagation               spectrum                 
stats                     tap-bridge                test                     
tools                     topology-read             uan                      
virtual-net-device        visualizer                wifi                     
wimax                    

Modules not built:
click                     openflow             

Now, if you see in my case the click and openflow modules are not built but this is not a problem if what you need is to visualize the graph of your script, if you are interested in buiding the other modules you could check the ns3's wiki page or with the modules mainters (in the case of click module the mainter is Lalith Suresh, all the list could be found in http://www.nsnam.org/developers/maintainers/) and you could check in this page http://lalith.in/2011/05/22/howto-getting-started-with-ns-3-click-part-i

Finally, if any module is not build the first thing you need to do is to find out what does the module do?, if you don't need that feature don't worry about it (but in general if you install the prerequsites you will get all what you need about the ns3 basic features), for example openflow is used to send packet from ns3 to real switches (unless you need that feature don't worry about it).

Yeison Camargo

unread,
Jan 19, 2012, 11:56:49 AM1/19/12
to ns-3-...@googlegroups.com
I'm sorry NAFIS, I didn't understand you

NAFIS

unread,
Jan 19, 2012, 12:07:13 PM1/19/12
to ns-3-users
I am getting the same warning.the visulizer is showing up with two
node and connection nothing else.how can i sove this problem.

/root/repos/ns-3-allinone/ns-3-dev/src/visualizer/visualizer/core.py:
1340: Warning: g_object_set_qdata: assertion `G_IS_OBJECT (object)'
failed
item = item.props.parent


Yeison Camargo

unread,
Jan 19, 2012, 12:23:05 PM1/19/12
to ns-3-...@googlegroups.com
What you mean is in the terminal you get this (but the simulation works perfect??):

(python:5905): Gtk-WARNING **: Imposible encontrar el motor de temas en la ruta al _modulo: «pixmap»,

(python:5905): Gtk-WARNING **: Imposible encontrar el motor de temas en la ruta al _modulo: «pixmap»,

(python:5905): Gtk-WARNING **: Imposible encontrar el motor de temas en la ruta al _modulo: «pixmap»,

(python:5905): Gtk-WARNING **: Imposible encontrar el motor de temas en la ruta al _modulo: «pixmap»,
scanning topology: 2 nodes...
scanning topology: calling graphviz layout
scanning topology: all done.
/home/yeison/workspace/ns-3-allinone/ns-3.13/src/visualizer/visualizer/core.py:1340: Warning: g_object_set_qdata: assertion `G_IS_OBJECT (object)' failed
  item = item.props.parent
Sent 1024 bytes to 10.1.1.2
Received 1024 bytes from 10.1.1.1
Received 1024 bytes from 10.1.1.2

If that is what you mean, don't worry about it, in all the simulation i have run i always get that kind of warnings, but they are not error, if you continue working with pyviz you will see in some other cases will get different warnings, but just warning.

Nafis Zaman

unread,
Jan 19, 2012, 5:08:46 PM1/19/12
to ns-3-...@googlegroups.com
I am getting the visualizer view like this after running the program.Attach for your kind consideration I am giving the print screen view.As discussed earlier I am getting the error a after running the script but i think my vis graph is not okay.pls check for me.
Screenshot at 2012-01-19 23:03:37.png

Yeison Camargo

unread,
Jan 20, 2012, 10:00:45 AM1/20/12
to ns-3-...@googlegroups.com
Ok Nafis, now click on Simulate (F3) and you will see a packet from client to server (at 2 second) if you want more packets change the MaxPackets value.
echoClient.SetAttribute ("MaxPackets", UintegerValue (1));

NAFIS

unread,
Jan 23, 2012, 8:59:11 PM1/23/12
to ns-3-users
Thanks a lot.Now I can see the view.

nafis

On Jan 20, 4:00 pm, Yeison Camargo <yjc...@gmail.com> wrote:
> Ok Nafis, now click on Simulate (F3) and you will see a packet from client
> to server (at e 2 second) if you want more packets change the MaxPackets
> value.
> echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
>
> ...
>
> read more »

NAFIS

unread,
Jan 24, 2012, 7:52:14 AM1/24/12
to ns-3-users
As I said you earlier that I am trying to learn how to use NS3.I have
made a some modification to design a scenario where one wireless AP
will transmit to one STA node or mobile nodes.After that I have added
flow monitor to see the end to end delay ,throughput.I am giving you
the codes.I want use gnuplot to see the throughput of the medium and
end to end delay.Could you please help me how can I generate this plot
and how to write in the code.Advance thanks for your time.Moreover,I
want to use On OF application for generate the traffic instead of UDP
eco server and eco client.

Nafis

Codes:

#include "ns3/core-module.h"
//#include "ns3/point-to-point-module.h"
#include "ns3/network-module.h"
#include "ns3/applications-module.h"
#include "ns3/wifi-module.h"
#include "ns3/mobility-module.h"
//#include "ns3/csma-module.h"
#include "ns3/internet-module.h"
#include "ns3/flow-monitor-module.h"


// Default Network Topology
//
// Wifi 10.1.3.0
// AP
// * *
// | |
// n0 n0
//
//
//

using namespace ns3;

NS_LOG_COMPONENT_DEFINE ("SimpleWireless");

int
main (int argc, char *argv[])
{
bool verbose = True;
uint32_t nWifi = 1;

CommandLine cmd;
cmd.AddValue ("nWifi", "Number of wifi STA devices", nWifi);
cmd.AddValue ("verbose", "Tell echo applications to log if true",
verbose);

cmd.Parse (argc,argv);

if (verbose)
{
LogComponentEnable ("UdpEchoClientApplication", LOG_LEVEL_INFO);
LogComponentEnable ("UdpEchoServerApplication", LOG_LEVEL_INFO);
}


NodeContainer wifiStaNodes;
wifiStaNodes.Create (nWifi);
NodeContainer wifiApNode;
wifiApNode.Create(1);

YansWifiChannelHelper channel = YansWifiChannelHelper::Default ();
YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
phy.SetChannel (channel.Create ());

WifiHelper wifi = WifiHelper::Default ();
wifi.SetRemoteStationManager ("ns3::ArfWifiManager");

NqosWifiMacHelper mac = NqosWifiMacHelper::Default ();

Ssid ssid = Ssid ("ns-3-ssid");
mac.SetType ("ns3::StaWifiMac",
"Ssid", SsidValue (ssid),
"ActiveProbing", BooleanValue (false));

NetDeviceContainer staDevices;
staDevices = wifi.Install (phy, mac, wifiStaNodes);

mac.SetType ("ns3::ApWifiMac",
"Ssid", SsidValue (ssid),
"BeaconGeneration", BooleanValue (true));

NetDeviceContainer apDevices;
apDevices = wifi.Install (phy, mac, wifiApNode);

MobilityHelper mobility;

mobility.SetPositionAllocator ("ns3::GridPositionAllocator",
"MinX", DoubleValue (0.0),
"MinY", DoubleValue (0.0),
"DeltaX", DoubleValue (5.0),
"DeltaY", DoubleValue (10.0),
"GridWidth", UintegerValue (3),
"LayoutType", StringValue
("RowFirst"));

mobility.SetMobilityModel ("ns3::RandomWalk2dMobilityModel",
"Bounds", RectangleValue (Rectangle (-50,
50, -50, 50)));
mobility.Install (wifiStaNodes);

mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (wifiApNode);

InternetStackHelper stack;
stack.Install (wifiApNode);
stack.Install (wifiStaNodes);

Ipv4AddressHelper address;

address.SetBase ("10.1.3.0", "255.255.255.0");
address.Assign (staDevices);
Ipv4InterfaceContainer apInterface;
apInterface = address.Assign (apDevices);

// UDP client and server
UdpEchoServerHelper echoServer (9);

ApplicationContainer serverApps = echoServer.Install (wifiApNode.Get
(0));
serverApps.Start (Seconds (1.0));
serverApps.Stop (Seconds (10.0));

UdpEchoClientHelper echoClient (apInterface.GetAddress (0), 9);
echoClient.SetAttribute ("MaxPackets", UintegerValue (20));
echoClient.SetAttribute ("Interval", TimeValue (Seconds (0.001)));
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));

ApplicationContainer clientApps =
echoClient.Install (wifiStaNodes.Get (nWifi - 1));
clientApps.Start (Seconds (2.0));
clientApps.Stop (Seconds (10.0));

Ipv4GlobalRoutingHelper::PopulateRoutingTables ();

Simulator::Stop (Seconds (10.0));

// 8. Install FlowMonitor on all nodes
FlowMonitorHelper flowmon;
Ptr<FlowMonitor> monitor = flowmon.InstallAll ();


phy.EnablePcap ("simple_wireless", apDevices.Get (0));

Simulator::Run ();

// 10. Print per flow statistics
monitor->CheckForLostPackets ();
Ptr<Ipv4FlowClassifier> classifier = DynamicCast<Ipv4FlowClassifier>
(flowmon.GetClassifier ());
std::map<FlowId, FlowMonitor::FlowStats> stats = monitor-
>GetFlowStats ();
for (std::map<FlowId, FlowMonitor::FlowStats>::const_iterator i =
stats.begin (); i != stats.end (); ++i)
{
Ipv4FlowClassifier::FiveTuple t = classifier->FindFlow (i-
>first);
std::cout << "Flow " << i->first - 2 << " (" << t.sourceAddress
<< " -> " << t.destinationAddress << ")\n"; std::cout << "
Tx Bytes: " << i->second.txBytes << "\n";
std::cout << " Rx Bytes: " << i->second.rxBytes << "\n";
std::cout << " Throughput: " << i->second.rxBytes * 8.0 / 8.0 /
1024 / 1024 << " Mbps\n";
std::cout << " Tx Packets: " << i->second.txPackets << "\n";
std::cout << " Rx Packets: " << i->second.rxPackets << "\n";
std::cout << " Delay Sum: " << i->second.delaySum << "\n";
std::cout << " Average Delay: " << i->second.delaySum / i-
>second.rxPackets<< "\n";
}

Simulator::Destroy ();
return 0;
}




Thanks,

Nafis
> > >> You received this message because you are...
>
> read more »

NAFIS

unread,
Jan 24, 2012, 7:53:29 AM1/24/12
to ns-3-users
using namespace ns3;

NS_LOG_COMPONENT_DEFINE ("SimpleWireless");

int
main (int argc, char *argv[])
{
bool verbose = True;
uint32_t nWifi = 1;

CommandLine cmd;
cmd.AddValue ("nWifi", "Number of wifi STA devices", nWifi);
cmd.AddValue ("verbose", "Tell echo applications to log if true",
verbose);

cmd.Parse (argc,argv);

if (verbose)
{
LogComponentEnable ("UdpEchoClientApplication", LOG_LEVEL_INFO);
LogComponentEnable ("UdpEchoServerApplication", LOG_LEVEL_INFO);
}

UdpEchoServerHelper echoServer (9);

ApplicationContainer serverApps = echoServer.Install (wifiApNode.Get
(0));
serverApps.Start (Seconds (1.0));
serverApps.Stop (Seconds (10.0));

UdpEchoClientHelper echoClient (apInterface.GetAddress (0), 9);
echoClient.SetAttribute ("MaxPackets", UintegerValue (20));
echoClient.SetAttribute ("Interval", TimeValue (Seconds (0.001)));
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));

ApplicationContainer clientApps =
echoClient.Install (wifiStaNodes.Get (nWifi - 1));
clientApps.Start (Seconds (2.0));
clientApps.Stop (Seconds (10.0));

Simulator::Destroy ();
return 0;

}

On Jan 20, 4:00 pm, Yeison Camargo <yjc...@gmail.com> wrote:
> Ok Nafis, now click on Simulate (F3) and you will see a packet from client
> to server (at 2 second) if you want more packets change the MaxPackets
> value.
> echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
>
> ...
>
> read more »

Nafis Zaman

unread,
Jan 24, 2012, 9:51:09 AM1/24/12
to ns-3-users
Attach you find the file as well.
b.cc

Yeison Camargo

unread,
Jan 24, 2012, 11:43:03 AM1/24/12
to ns-3-...@googlegroups.com
Hello Nafis, if you need an OnOff application this code can help you, (it was taken from the simple-global-routing.cc file in the examples/routing folder, if you need to understand it better, please refer to that file). About the gnuplot topic, I'm sorry but i don't know how to do it, but i can give an advice, check in the mailing list because i have seen that question before, so i think you can find your answer in other mails from the mailing list, one last thing, if you learn how to do the thing about gnupot i will really appreciate if you let me know how to do it, it will be really useful for me. Do not forget to let me know (even if you find how to generate a graphic from the xml file generated by the FlowMonitor). I hope the code can help you.

// Create the OnOff application to send UDP datagrams of size
  // 210 bytes at a rate of 448 Kb/s
  NS_LOG_INFO ("Create Applications.");
  uint16_t port = 9;   // Discard port (RFC 863)
  OnOffHelper onoff ("ns3::UdpSocketFactory", 
                     Address (InetSocketAddress (i3i2.GetAddress (0), port)));
  onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
  onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
  ApplicationContainer apps = onoff.Install (c.Get (0));
  apps.Start (Seconds (1.0));
  apps.Stop (Seconds (10.0));

  // Create a packet sink to receive these packets
  PacketSinkHelper sink ("ns3::UdpSocketFactory",
                         Address (InetSocketAddress (Ipv4Address::GetAny (), port)));
  apps = sink.Install (c.Get (3));
  apps.Start (Seconds (1.0));
  apps.Stop (Seconds (10.0));

Mitch Watrous

unread,
Jan 24, 2012, 12:40:59 PM1/24/12
to ns-3-users
There are 2 common methods to make a plot using ns-3 and gnuplot:

1. Create a gnuplot control file using ns-3‘s Gnuplot class.
2. Create a gnuplot data file using values generated by ns-3.

If you are interested in method 1, see the “Making Plots using the
Gnuplot Class” section in the ns-3 Manual:

http://www.nsnam.org/docs/release/3.13/manual/html/gnuplot.html

If you are interested in method 2, see the “A Real Example” subsection
under the “Tracing” section in the ns-3 Tutorial:

http://www.nsnam.org/docs/release/3.13/tutorial/html/tracing.html

Mitch

john

unread,
Jan 24, 2012, 11:30:01 PM1/24/12
to ns-3-users
Hi camargo,

I have used pyviz visualizer ti view the graph as ./waf
--run myfirst --vis, here build finished successfully, but no output,
it seemed as,

/////////////////////////////////////////////////////////////
[root@localhost ns-3.13]# ./waf --run myfirst --vis
Waf: Entering directory `/home/ME212/ns-allinone-3.13/ns-3.13/build'
Waf: Leaving directory `/home/ME212/ns-allinone-3.13/ns-3.13/build'
'build' finished successfully (6.211s)

No visualization support (No module named pygraphviz).
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/abrt_exception_handler.py",
line 133, in <lambda>
sys.excepthook = lambda etype, value, tb:
handleMyException((etype, value, tb))
RuntimeError: maximum recursion depth exceeded

Original exception was:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "/home/ME212/ns-allinone-3.13/ns-3.13/src/visualizer/visualizer/
core.py", line 1479, in start
import sys
RuntimeError: maximum recursion depth exceeded while calling a Python
object
//////////////////////////////////////////////////////////////

then also i have installed NS3.13 in fedora 13 from the source
nsnam.org i have downloaded it as tar file and extract and
install.................................

Where you have told that in fedora you download and install like this,

""yum install gcc gcc-c++ python""

but i got error in that as,

""[root@localhost ME212]# yum install gcc gcc-c++ python
Loaded plugins: presto, refresh-packagekit
http://linuxdownload.adobe.com/linux/i386/repodata/repomd.xml: [Errno
14] PYCURL ERROR 6 - ""
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for
repository: adobe-linux-i386. Please verify its path and try again""

please rectify my doubt.......Thanking you!

NAFIS

unread,
Jan 25, 2012, 12:11:20 PM1/25/12
to ns-3-users
I am very new in ubuntu and as well as NS3.So,I am still learning.

Thanks
> Loaded plugins: presto, refresh-packagekithttp://linuxdownload.adobe.com/linux/i386/repodata/repomd.xml:[Errno

Yeison Camargo

unread,
Jan 26, 2012, 2:44:20 PM1/26/12
to ns-3-...@googlegroups.com
Hi Jhon, I think you need to update the repositories, in ubuntu i used apt-get update so i think it must be yum update for fedora, after the update try again to install the packets.

Which version of ns3 are you using? 

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

Yeison Camargo

unread,
Jan 26, 2012, 2:47:09 PM1/26/12
to ns-3-...@googlegroups.com
Hi Nafis,

Don't worry about being a new user in ubuntu or in NS3, all the people started there, the important thing is to practice, try the examples i told you but before everything a good point of start is the manual, so try reading the ns-3 manual it will be useful for you and you will understand many things.

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

Mitch Watrous

unread,
Jan 26, 2012, 3:08:00 PM1/26/12
to ns-3-users
Please look at this wiki that talks about installing ns-3:

http://www.nsnam.org/wiki/index.php/Installation

Also, look at the "Getting Started" section in the ns-3 Tutorial,
which talks about installing ns-3:

http://www.nsnam.org/docs/release/3.13/tutorial/singlehtml/index.html#document-getting-started

Mitch

john

unread,
Jan 29, 2012, 11:59:06 PM1/29/12
to ns-3-users
Hi Camargo,

Now i am using NS 3.13 and my problem is how to view the
graph.........as you have mentioned that to install the step is based
on

"http://www.nsnam.org/wiki/index.php/Installation"

but i have installed it as from nsnam.org as a tar file and extract it
in the same folder

then also i build it as ./build.py in ns 3.13 folder and test all the
modules but the modules click and flow-monitor not enabled.

what i want to do pls tell the steps in brief i need your phone no for
my clarification, if yo give it will be more helpful, if not also pls
tell the steps

Thank you !

Mitch Watrous

unread,
Jan 30, 2012, 12:09:15 PM1/30/12
to ns-3-users
The click and openflow modules are optional. Unless you have a reason
to use those modules, the list of unbuilt modules can be ignored.

The following ns-3 model library document chapter tells you how to
install and use the click module:

http://www.nsnam.org/docs/release/3.13/models/html/click.html

The following ns-3 model library document chapter tells you how to
install and use the openflow module:

http://www.nsnam.org/docs/release/3.13/models/html/openflow-switch.htlm

Mitch

Mitch Watrous

unread,
Jan 30, 2012, 12:09:23 PM1/30/12
to ns-3-users
The click and openflow modules are optional. Unless you have a reason
to use those modules, the list of unbuilt modules can be ignored.

The following ns-3 model library document chapter tells you how to
install and use the click module:

http://www.nsnam.org/docs/release/3.13/models/html/click.html

The following ns-3 model library document chapter tells you how to
install and use the openflow module:

http://www.nsnam.org/docs/release/3.13/models/html/openflow-switch.htlm

Mitch


john wrote:

Mitch Watrous

unread,
Jan 30, 2012, 12:21:57 PM1/30/12
to ns-3-users
Here is the proper link for the openflow module:

http://www.nsnam.org/docs/release/3.13/models/html/openflow-switch.html

Mitch

Yeison Camargo

unread,
Jan 31, 2012, 10:55:47 AM1/31/12
to ns-3-...@googlegroups.com
Hi John, I imagine that before download ns-3 as a tar and extract it "you installed the packets from the ns3 wiki". Now the task is very very easy. All what you have to do is:

  • Copy the script i wrote in the scratch folder. I mean create a file (with nano or vi or gedit or whatever you feel confident), paste the script and save it with the name : myfirst.cc.
  • Now the file you just created is in the folder scratch and is called myfirst.cc, in order to check it use the command: ls. You will see all the files in the scratch directory, something like this:
.../ns-3.13/scratch$ ls
myfirst.cc

  • Now in the ns-3.13 folder (NO IN THE scratch, I mean if you are in the scratch folder please use the command: cd..) type ./waf --run myfirst --vis. That's it very easy!!!


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

john

unread,
Feb 1, 2012, 6:12:35 AM2/1/12
to ns-3-users
Hi camargo,

I have already done this, but no soln, pls tell me how to
visualize , no visualization support pls say some steps in brief from
the installation to execution ........


Thanking you !

Mitch Watrous

unread,
Feb 1, 2012, 12:04:29 PM2/1/12
to ns-3-users
Have you read the PyViz wiki:

http://www.nsnam.org/wiki/index.php/PyViz

Mitch

On Jan 29, 8:59 pm, john <rimlonsh...@gmail.com> wrote:
> Hi Camargo,
>
>             Now i am using NS 3.13 and my problem is how toviewthegraph.........as you have mentioned that to install the step is based

Kashif

unread,
Feb 1, 2012, 3:43:43 PM2/1/12
to ns-3-users
Hi Camargo!

I have installed all the prerequisites but still I am getting
following error

'build' finished successfully (2m51.815s)
assert failed. cond="uid != 0", msg="Assert in TypeId::LookupByName:
ns3::VisualSimulatorImpl not found", file=../src/core/model/type-
id.cc, line=388

any clue??

Regards
Kashif
On Jan 31, 9:55 am, Yeison Camargo <yjc...@gmail.com> wrote:
> Hi John, I imagine that before download ns-3 as a tar and extract it "you
> installed the packets from the ns3 wiki". Now the task is very very easy.
> All what you have to do is:
>
>    - Copy the script i wrote in the scratch folder. I mean create a file
>    (with nano or vi or gedit or whatever you feel confident), paste the script
>    and save it with the name : myfirst.cc.
>    - Now the file you just created is in the folder scratch and is called
>    myfirst.cc, in order to check it use the command: ls. You will see all the
>    files in the scratch directory, something like this:
>
> .../ns-3.13/scratch$ ls
> myfirst.cc
>
>    - Now in the ns-3.13 folder (NO IN THE scratch, I mean if you are in the

Yeison Camargo

unread,
Feb 1, 2012, 8:10:34 PM2/1/12
to ns-3-...@googlegroups.com
Hi Kashif.

Questions: What ns-3 version are you using?
Which scrip are you running?
Did you include:
CommandLine cmd;
  cmd.Parse(argc, argv);
Are you working on ubuntu, fedora .. ??

Kashif Bilal

unread,
Feb 1, 2012, 8:16:29 PM2/1/12
to ns-3-...@googlegroups.com
Hi !!

Thanks for your reply..

I am using NS 3.12.1 on Ubuntu 11.10

Yes I included
CommandLine cmd;
  cmd.Parse(argc, argv);
in myfirst.cpp and placed it in scratch.

I have also installed all the prerequisites mentioned :(
I have tried to search the problem on internet and it seems to have some issue with Ubuntu ...

any remedy ??

Regards

Yeison Camargo

unread,
Feb 1, 2012, 8:21:38 PM2/1/12
to ns-3-...@googlegroups.com
Kashif, Im sure there is not problem with ubuntu (maybe the ns-3 version) because in this moment I'm running in ubuntu 11.10 with ns-3.13 and everything works perfect. Try with the ns-3.13 version, it is very easy to do because it will be just like other folder in you pc, i mean you can have multiple ns-3 instances.

If any question do not hesitate to write.

Kashif Bilal

unread,
Feb 1, 2012, 8:23:54 PM2/1/12
to ns-3-...@googlegroups.com
OK ...
let me try ns 3.13 ... :(
May I ask you something about  tracing ?
Is there any any utility to generate results using trace file.
I am pretty new to NS-3 :(

Regards

Yeison Camargo

unread,
Feb 1, 2012, 8:32:07 PM2/1/12
to ns-3-...@googlegroups.com
Yes, You can have different approaches:

  • Wireshark : I  mean .pcap (of course you can use tcpdump but i think wireshark is better).
  • NS Loggin : Something like cout in c++ but ns-3 have a module with different level (information, warnings..)
  • Tracing with callback: Some a little bit difficult. It works based on trace sinks and trace source
If you need more information please refer to the manual section 8 and tutorial section 5 and 7

I will attach the manual and tutorial
ns-3-tutorial.pdf
ns-3-manual.pdf

Kashif Bilal

unread,
Feb 1, 2012, 8:44:42 PM2/1/12
to ns-3-...@googlegroups.com
Thanks a lot for your time, efforts and consideration...

Regards

Yeison Camargo

unread,
Feb 1, 2012, 8:56:54 PM2/1/12
to ns-3-...@googlegroups.com
All right, don't worry.

Μαγλαράς Λέανδρος

unread,
Feb 1, 2012, 3:56:27 PM2/1/12
to ns-3-...@googlegroups.com
i tried to run the example but got the following error message

assert failed. cond="uid != 0", msg="Assert in TypeId::LookupByName:
ns3::VisualSimulatorImpl not found",
file=../src/core/model/type-id.cc, line=388

Command ['/home/leandro/ns3/repos/ns-3.12/build/debug/scratch/lio',
'--SimulatorImplementationType=ns3::VisualSimulatorImpl'] terminated
with signal SIGSEGV. Run it under a debugger to get more information
(./waf --run <program> --command-template="gdb --args %s <args>").

any ideas?

2012/2/1 Kashif <eishaa...@gmail.com>:

Yeison Camargo

unread,
Feb 2, 2012, 9:43:41 AM2/2/12
to ns-3-...@googlegroups.com
Hi Leandros,

Please chech that you have included 
CommandLine cmd;
  cmd.Parse(argc, argv);
The prerequisites packets from the ns-3 wiki
Which ns-3 version are you running ?

Kashif

unread,
Feb 3, 2012, 4:18:14 PM2/3/12
to ns-3-users
I have installed NS3.13 and pyViz is working in 3.13 but not in
3.12.1 :(
Regards


On Feb 2, 8:43 am, Yeison Camargo <yjc...@gmail.com> wrote:
> Hi Leandros,
>
> Please chech that you have included
> CommandLine cmd;
>   cmd.Parse(argc, argv);
> The prerequisites packets from the ns-3 wiki
> Which ns-3 version are you running ?
>
> On Wed, Feb 1, 2012 at 3:56 PM, Μαγλαράς Λέανδρος <leandros...@gmail.com>wrote:
>
>
>
>
>
>
>
>
>
> > i tried to run the example but got the following error message
>
> > assert failed. cond="uid != 0", msg="Assert in TypeId::LookupByName:
> > ns3::VisualSimulatorImpl not found",
> > file=../src/core/model/type-id.cc, line=388
> > Command ['/home/leandro/ns3/repos/ns-3.12/build/debug/scratch/lio',
> > '--SimulatorImplementationType=ns3::VisualSimulatorImpl'] terminated
> > with signal SIGSEGV. Run it under a debugger to get more information
> > (./waf --run <program> --command-template="gdb --args %s <args>").
>
> > any ideas?
>
> > 2012/2/1 Kashif <eishaalkas...@gmail.com>:

Yeison Camargo

unread,
Feb 3, 2012, 8:04:03 PM2/3/12
to ns-3-...@googlegroups.com
Did you see?, I told you it was the ns3 version, not ubuntu issue. Now is working. Right!!!!!

Kashif

unread,
Feb 4, 2012, 9:26:28 PM2/4/12
to ns-3-users
Thanks ...

Yeison Camargo

unread,
Feb 5, 2012, 9:10:24 AM2/5/12
to ns-3-...@googlegroups.com
Hi Kashif,

I will give you an advice, if you are planning to write long code in ns-3 it will be better to work under eclipe (it will help you so much with classes, auto completion, syntax errors ...) Please check this link: http://www.nsnam.org/wiki/index.php/HOWTO_configure_eclipse_with_ns-3

Kashif

unread,
Feb 5, 2012, 4:42:06 PM2/5/12
to ns-3-users
Thanks a lot Yeison ..

Yup I am using eclipse .. but was unable to configure it properly ..
but at least I am able to get the intellisense in Eclipse that I
needed the most.

I am working on Data Center Network ..
can you please suggest any framework or tool, to analyze then trace
files ? as the network is too large (thousands of nodes) so it is
almost impossible manually.

also is there any way to run the workload from a trace file in NS3 ? I
mean Iwant to run the applications and communication pattern from an
available trace file.

Best Regards
Kashif

Yeison Camargo

unread,
Feb 9, 2012, 12:41:29 PM2/9/12
to ns-3-...@googlegroups.com
Hi Kashif,

I think what you need it NetAmin. Please check this: http://www.nsnam.org/wiki/index.php/NetAnim
If you need further information just search in the mailing list, there are many conversation about NetAnim, I will give you one that has images: https://groups.google.com/forum/?fromgroups#!topic/ns-3-users/SRN1kbe6VHo

Kashif

unread,
Feb 9, 2012, 3:01:25 PM2/9/12
to ns-3-users
Hi Camargo...

Thankyou very very much ..
I will install it and then catch you if I faced some problems :(

I thank you your time, support and efforts.

Best Regards
Kashif

On Feb 9, 11:41 am, Yeison Camargo <yjc...@gmail.com> wrote:
> Hi Kashif,
>
> I think what you need it NetAmin. Please check this:http://www.nsnam.org/wiki/index.php/NetAnim
> If you need further information just search in the mailing list, there are
> many conversation about NetAnim, I will give you one that has images:https://groups.google.com/forum/?fromgroups#!topic/ns-3-users/SRN1kbe...
> This one has videos:https://groups.google.com/forum/?fromgroups#!searchin/ns-3-users/NAM/...
> IPv6 Hurricane...
>
> read more »

Kashif

unread,
Feb 10, 2012, 7:42:52 PM2/10/12
to ns-3-users
Hi Yeison !!

I have installed NetAnime 2.0
Its working fine in SImple mode ,but when I try to make advance
mode ..
it gives errors

can you please help

I need to show.

1. Packet loss
2. packet delay

I have to show results on Monday

qmake NeAnim.pro run successfully.
But when Irun make command
Following errors comes :(


In file included from ./MainInfo/MainInfo.h:32,
from ./Animator/NetModel.h:32,
from XML/animparser.h:23,
from XML/animparser.cpp:20:
./Filter/packetfilter.h:26:29: error: ns3/core-module.h: No such file
or directory
./Filter/packetfilter.h:27:32: error: ns3/network-module.h: No such
file or directory
./Filter/packetfilter.h:28:33: error: ns3/internet-module.h: No such
file or directory
In file included from ./MainInfo/MainInfo.h:33,
from ./Animator/NetModel.h:32,
from XML/animparser.h:23,
from XML/animparser.cpp:20:
./Simulation/private/simulation.h:28:32: error: ns3/netanim-module.h:
No such file or directory
In file included from ./MainInfo/MainInfo.h:32,
from ./Animator/NetModel.h:32,
from XML/animparser.h:23,
from XML/animparser.cpp:20:
./Filter/packetfilter.h:90: error: ‘ns3’ has not been declared
./Filter/packetfilter.h:90: error: expected ‘,’ or ‘...’ before ‘<’
token
In file included from ./MainInfo/MainInfo.h:33,
from ./Animator/NetModel.h:32,
from XML/animparser.h:23,
from XML/animparser.cpp:20:
./Simulation/private/simulation.h:79: error: ‘ns3’ has not been
declared
./Simulation/private/simulation.h:79: error: expected ‘,’ or ‘...’
before ‘<’ token
./Simulation/private/simulation.h:80: error: ‘ns3’ has not been
declared
./Simulation/private/simulation.h:80: error: expected ‘,’ or ‘...’
before ‘<’ token



On Feb 9, 11:41 am, Yeison Camargo <yjc...@gmail.com> wrote:
> Hi Kashif,
>
> I think what you need it NetAmin. Please check this:http://www.nsnam.org/wiki/index.php/NetAnim
> If you need further information just search in the mailing list, there are
> many conversation about NetAnim, I will give you one that has images:https://groups.google.com/forum/?fromgroups#!topic/ns-3-users/SRN1kbe...
> This one has videos:https://groups.google.com/forum/?fromgroups#!searchin/ns-3-users/NAM/...
> IPv6 Hurricane...
>
> read more »

Kashif

unread,
Feb 10, 2012, 9:55:14 PM2/10/12
to ns-3-users
Hi Yeison ..

I have figured out the error ..
I have not used sudo ./waf install
as my NS 3.13 was already built .. so I didn't paid attention.
But now when I make, its giving another error :(

/usr/bin/ld: cannot find -lns3-ns3tcp

Any clue ??

Best Regards
> > On Sun, Feb 5, 2012 at 4:42 PM,Kashif<eishaalkas...@gmail.com> wrote:
> > > Thanks a lot Yeison ..
>
> > > Yup I am using eclipse .. but was unable to configure it properly ..
> > > but at least I am able to get the intellisense in Eclipse that I
> > > needed the most.
>
> > > I am working on Data Center Network ..
> > > can you please suggest any framework or tool, to analyze then trace
> > > files ? as the network is too large (thousands of nodes) so it is
> > > almost impossible manually.
>
> > > also is there any way to run the workload from a trace file in NS3 ? I
> > > mean Iwant to run the applications and communication pattern from an
> > > available trace file.
>
> > > Best Regards
> > >Kashif
>
> > > On Feb 5, 8:10 am, Yeison Camargo <yjc...@gmail.com> wrote:
> > > > HiKashif,
>
> > > > I will give you an advice, if you are planning to write long code in ns-3
> > > > it will be better to work under eclipe (it will help you so much with
> > > > classes, auto completion, syntax errors ...) Please check this link:
> > >http://www.nsnam.org/wiki/index.php/HOWTO_configure_eclipse_with_ns-3
>
> > > > On Sat, Feb 4, 2012 at 9:26 PM,Kashif<eishaalkas...@gmail.com> wrote:
> > > > > Thanks ...
>
> > > > > On Feb 3, 7:04 pm, Yeison Camargo <yjc...@gmail.com> wrote:
> > > > > > Did you see?, I told you it was the ns3 version, not ubuntu issue.
> > > Now is
> > > > > > working. Right!!!!!
>
> > > > > > On Fri, Feb 3, 2012 at 4:18 PM,Kashif<eishaalkas...@gmail.com>
> > > > > > > > > 2012/2/1Kashif<eishaalkas...@gmail.com>:
> > > > > > > > > You received this message because you are subscribed...
>
> read more »

John Abraham

unread,
Feb 10, 2012, 10:19:01 PM2/10/12
to ns-3-...@googlegroups.com
edit ns3.pro
and remove the following two lines
-PKGCONFIG+=libns3-ns3tcp        
-PKGCONFIG+=libns3-template

then "make clean" "qmake NetAnim.pro" "./NetAnim".

Note: the advanced-mode is an experimental feature. Use it only if you have time.
I am going to phase-out this feature in the future versions of netanim, because it is hard to use.

But if you still want to try, once you are able to open the executable
1. click "offline" to make it "online"
2. click the play button.

go to the Netdevices tab and toggle the "Stopped" button to begin polling.
you should see the stats go up. Similar steps apply to the Applications tab.

If all this is working, then take a few minutes to look at the file in "ns3test/ns3test.cpp". This is where your code needs to go in.




2012/2/10 Kashif <eishaa...@gmail.com>

Kashif

unread,
Feb 13, 2012, 2:42:10 PM2/13/12
to ns-3-users
Thanks a lot John..

Actually I am in a hurry to find results.
I have to submit a paper in conference and dead line is Feb 16 :(
I want to calculate the Throughput and packet delay ..
Is there any way to calculate it from code ? as I can find dropped
packets by
Config::Connect ("/NodeList/*/DeviceList/*/TxQueue/Drop",MakeCallback
(&TraceDevQueueDrop));

I have tried to define static variable in UdpoEchoClient class, but it
is giving linker error.
When I try to initialize static variable in class in normal c++ way,
its gives multiple deceleration error.

Regards


On Feb 10, 9:19 pm, John Abraham <john.abraham...@gmail.com> wrote:
> edit ns3.pro
> and remove the following two lines
> -PKGCONFIG+=libns3-ns3tcp
> -PKGCONFIG+=libns3-template
>
> then "make clean" "qmake NetAnim.pro" "./NetAnim".
>
> Note: the advanced-mode is an experimental feature. Use it only if you have
> time.
> I am going to phase-out this feature in the future versions of netanim,
> because it is hard to use.
>
> But if you still want to try, once you are able to open the executable
> 1. click "offline" to make it "online"
> 2. click the play button.
>
> go to the Netdevices tab and toggle the "Stopped" button to begin polling.
> you should see the stats go up. Similar steps apply to the Applications tab.
>
> If all this is working, then take a few minutes to look at the file in
> "ns3test/ns3test.cpp". This is where your code needs to go in.
>
> 2012/2/10 Kashif <eishaalkas...@gmail.com>

John Abraham

unread,
Feb 13, 2012, 2:45:06 PM2/13/12
to ns-3-...@googlegroups.com
Hmm, if you are short of time. You might want to invest time in FlowMonitor , although I have never used it, many people have.

John Abraham

unread,
Feb 13, 2012, 4:17:25 PM2/13/12
to ns-3-...@googlegroups.com
Well, from my end I have written several replies to you, on how to use NetAnim, to get throughput, and queue drops statistics
I am not sure at what point you are stuck. Please go through my previous replies on this thread



2012/2/13 Kashif <eishaa...@gmail.com>
Flow Monitor works fine with simple topology and when there is no
packet drop at Queue :(
But whenever a packet id dropped due to Queue overflow .. FlowMonitor
throws an assert.
I have checked group for assertion, and this is considered as bug and
submitted :(

I am adding 2 global variables in simulation and counting the no. of
sent packets and received packets and based on this statistic , I m
trying to find throughput :(

Regards
Kashif

Kashif

unread,
Feb 13, 2012, 7:37:02 PM2/13/12
to ns-3-users
Thanks a lot John.
I appreciate you for your time and efforts.

Regards
Kashif

On Feb 13, 3:17 pm, John Abraham <john.abraham...@gmail.com> wrote:
> Well, from my end I have written several replies to you, on how to use
> NetAnim, to get throughput, and queue drops statistics
> I am not sure at what point you are stuck. Please go through my previous
> replies on this thread
>
> 2012/2/13 Kashif <eishaalkas...@gmail.com>
> ...
>
> read more »

Yu Zhang

unread,
Mar 3, 2014, 2:05:20 AM3/3/14
to ns-3-...@googlegroups.com
Hellooo, do you have the Modules built for version 3.19?

在 2012年1月20日星期五UTC+8上午12时55分43秒,Yeison Camargo写道:
John in order to solve your problem please check you have installed the prerequisites packets, to do this please refer to this page:


After installing the packets when you build with waf (./waf) you will get something like this (in the ns-3.13 version), it could change if your version is different:


Modules built:
aodv                      applications              bridge                   
config-store              core                      csma                     
csma-layout               dsdv                      emu                      
energy                    flow-monitor              internet                 
lte                       mesh                      mobility                 
mpi                       netanim                   network                  
nix-vector-routing        olsr                      point-to-point           
point-to-point-layout     propagation               spectrum                 
stats                     tap-bridge                test                     
tools                     topology-read             uan                      
virtual-net-device        visualizer                wifi                     
wimax                    

Modules not built:
click                     openflow             

Now, if you see in my case the click and openflow modules are not built but this is not a problem if what you need is to visualize the graph of your script, if you are interested in buiding the other modules you could check the ns3's wiki page or with the modules mainters (in the case of click module the mainter is Lalith Suresh, all the list could be found in http://www.nsnam.org/developers/maintainers/) and you could check in this page http://lalith.in/2011/05/22/howto-getting-started-with-ns-3-click-part-i

Finally, if any module is not build the first thing you need to do is to find out what does the module do?, if you don't need that feature don't worry about it (but in general if you install the prerequsites you will get all what you need about the ns3 basic features), for example openflow is used to send packet from ns3 to real switches (unless you need that feature don't worry about it).

On Thu, Jan 19, 2012 at 11:36 AM, Yeison Camargo <yjc...@gmail.com> wrote:
Hello Nafis,

First that all please check if you have all the packets needs as prerequisites, in order to do this check this page out:


Then try to run the example (I'm assuming you copy the code and in the scratch simulator folder, created a file called myfirst.cc and pasted the code)


On Thu, Jan 19, 2012 at 4:33 AM, NAFIS <nafisimt...@gmail.com> wrote:
When I am running the code I am getting the following warning:How can
I over come the problem pls.Thanks Nafis
(python:2045): Gtk-WARNING **: Unable to locate theme engine in
module_path: "pixmap",

(python:2045): Gtk-WARNING **: Unable to locate theme engine in
module_path: "pixmap",

(python:2045): Gtk-WARNING **: Unable to locate theme engine in
module_path: "pixmap",

(python:2045): Gtk-WARNING **: Unable to locate theme engine in
module_path: "pixmap",
Could not load icon applets-screenshooter due to missing gnomedesktop
Python module
scanning topology: 2 nodes...
scanning topology: calling graphviz layout
scanning topology: all done.
/root/repos/ns-3-allinone/ns-3-dev/src/visualizer/visualizer/core.py:
1340: Warning: g_object_set_qdata: assertion `G_IS_OBJECT (object)'
failed
 item = item.props.parent


On Jan 18, 3:59 pm, Yeison Camargo <yjc...@gmail.com> wrote:
> Hello there,
> If you want to see the graph you could use a visualizer, Pyviz is a
> visualiser very easy to use (but is not the only one), the point is that
> you have to run the program in this way : ./waf --run xxxxx --vis, but
> inside the program you need to add this:
>
> CommandLine cmd;
> cmd.Parse (argc, argv);
>
> I will send you an example if you have any question please write. Please
> copy the code in the scratch folder with a name for example myfirst.cc then
> run it with ./waf --run myfirst --vis and that's it, very easy. I'll send
> you a image of the visualizer (Pyviz)
>
> #include "ns3/core-module.h"
> #include "ns3/network-module.h"
> #include "ns3/internet-module.h"
> #include "ns3/point-to-point-module.h"
> #include "ns3/applications-module.h"
>
> using namespace ns3;
>
> NS_LOG_COMPONENT_DEFINE ("FirstScriptExample");
>
> int
> main (int argc, char *argv[])
> {
>
>   CommandLine cmd;
>   cmd.Parse(argc, argv);
>   LogComponentEnable ("UdpEchoClientApplication", LOG_LEVEL_INFO);
>   LogComponentEnable ("UdpEchoServerApplication", LOG_LEVEL_INFO);
>
>   NodeContainer nodes;
>   nodes.Create (2);
>
>   PointToPointHelper pointToPoint;
>   pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
>   pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms"));
>
>   NetDeviceContainer devices;
>   devices = pointToPoint.Install (nodes);
>
>   InternetStackHelper stack;
>   stack.Install (nodes);
>
>   Ipv4AddressHelper address;
>   address.SetBase ("10.1.1.0", "255.255.255.0");
>
>   Ipv4InterfaceContainer interfaces = address.Assign (devices);
>
>   UdpEchoServerHelper echoServer (9);
>
>   ApplicationContainer serverApps = echoServer.Install (nodes.Get (1));
>   serverApps.Start (Seconds (1.0));
>   serverApps.Stop (Seconds (10.0));
>
>   UdpEchoClientHelper echoClient (interfaces.GetAddress (1), 9);
>   echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
>   echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
>   echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
>
>   ApplicationContainer clientApps = echoClient.Install (nodes.Get (0));
>   clientApps.Start (Seconds (2.0));
>   clientApps.Stop (Seconds (10.0));
>
>   Simulator::Run ();
>   Simulator::Destroy ();
>   return 0;
>
> }
>
> [image: pyvizfirst.png]
>
>
>
>
>
>
>
>
>
> On Wed, Jan 18, 2012 at 6:26 AM, john <rimlonsh...@gmail.com> wrote:
> > Dear users,
>
> > As so far i am using NS-3 and executing programs in that case when ia
> > m building the ./waf shell
> > i got the message that all the modules are build except click and flow-
> > monitor what is the remedy of this.
>
> > It will be more helpful i think so to view the graph.....
>
> > Thanking You!

>
> > --
> > 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.
>
> --
> YEISON JULIAN CAMARGO
> Cisco Systems CCNA
> Cisco Systems CCNA Security
> Microsoft MTA Windows Server Administration
> Microsoft MTA Security
> Microsoft MTA Networking
> IPv6 Hurricane Electric SAGE
>
>  pyvizfirst.png
> 94KViewDownload


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

--
YEISON JULIAN CAMARGO
Cisco Systems CCNA
Cisco Systems CCNA Security
Microsoft MTA Windows Server Administration
Microsoft MTA Security
Microsoft MTA Networking
IPv6 Hurricane Electric SAGE

Tommaso Pecorella

unread,
Mar 3, 2014, 2:54:51 AM3/3/14
to ns-3-...@googlegroups.com
Hi,

I was just writing a post for my blog about what to do and what not to do to request help on a forum.

I'd like to thank you for your input. I'll take your post as an example.... about what not to do.

Cheers,

T.

PS: why it's an example of things to not do:
1) you didn't state what's your problem
2) you replied to a non-relvant (apparently) post
3) the original thread is dating back to 2012

Agnes Ling

unread,
Mar 4, 2014, 2:16:44 PM3/4/14
to ns-3-...@googlegroups.com
 hi guys,

my visualizer is not build... even i have installed it. and i m using ns-3.18...

is there any idea how to build it? :(

regards,
agnes

Tommaso Pecorella

unread,
Mar 4, 2014, 4:32:38 PM3/4/14
to ns-3-...@googlegroups.com
Hi,

two questions:
1) which visualiser, and
2) what do you mean with "is not built" ?

Cheers,

T.
Message has been deleted

mohamed rahees

unread,
Mar 9, 2014, 6:18:14 AM3/9/14
to ns-3-...@googlegroups.com, rimlo...@gmail.com
hey guys i wanna know how to perform a node as selfish in a manet...and i am using ns3 to do it..could u pls help to do that

:) 

Tommaso Pecorella

unread,
Mar 9, 2014, 9:33:48 AM3/9/14
to ns-3-...@googlegroups.com, rimlo...@gmail.com
Hi,

and what is the relationship with the thread topic ?

T.

Kanagap

unread,
Jul 9, 2014, 6:00:31 PM7/9/14
to ns-3-...@googlegroups.com
Hi,

I recently installed NS3 in my CentOS 6.5., everything working fine except visualizer. I found all the packages related to visualizer except pyhton-kiwi, my python version is python-devel-2.6.6-52.el6.x86_64 there is no compatible kiwi for this. It requires either 2.7 or 2.4, when I run my test I'm getting this error "Could not load plugin 'show_last_packets.py': No module named kiwi.ui.objectlist". How to come out of this issue ?

Thanks.

Kashif

unread,
Feb 13, 2012, 4:00:23 PM2/13/12
to ns-3-users
Flow Monitor works fine with simple topology and when there is no
packet drop at Queue :(
But whenever a packet id dropped due to Queue overflow .. FlowMonitor
throws an assert.
I have checked group for assertion, and this is considered as bug and
submitted :(

I am adding 2 global variables in simulation and counting the no. of
sent packets and received packets and based on this statistic , I m
trying to find throughput :(

Regards
Kashif


> ...
>
> read more »

Tommaso Pecorella

unread,
Jul 10, 2014, 2:27:05 AM7/10/14
to ns-3-...@googlegroups.com
Do
Not
Post
Your
Question
Twice

Do
Not
Append
Unrelated
Questions
To
Extremely
Old
Topics

Thanks for understanding

T.
Reply all
Reply to author
Forward
0 new messages