Thursday 26 November 2020

Installing NS 2 Network Simulator on Ubuntu 18.04.02

Introduction

NS2 is an open-source simulation tool that runs on Linux. It is a discreet event simulator targeted at networking research and provides substantial support for simulation of routing, multicast protocols and IP protocols, such as UDP, TCP, RTP and SRM over wired and wireless (local and satellite) networks.


Pre-requisites

To view your network simulation traces made using ns-2, you’ll need Nam: Network Animator.

Nam is a Tcl/TK based animation tool for viewing network simulation traces and real world packet traces. It supports topology layout, packet level animation, and various data inspection tools.

Install it by running the following command in your terminal:

sudo apt-get install -y nam


Installation

Run the following command in your terminal to install ns-2:

sudo apt-get install -y ns2


Check your installation

You can check your installation by running a simple Tcl script.

  1. Create a file:
     gedit add.tcl
    
  2. Paste the following code in the file:
     set a 20
     set b 30
     set c [expr $a+$b]
     puts $c
    
  3. Run in the terminal using ns-2:
     ns add.tcl
    


Running a simple simulation

  1. Paste the following code in a file simple.tcl:
    #Create a simulator object
    set ns [new Simulator]
    #Define different colors for data flows (for NAM)
    $ns color 1 Blue
    $ns color 2 Red
    #Open the NAM trace file
    set nf [open out.nam w]
    $ns namtrace-all $nf
    #Define a 'finish' procedure
    proc finish {} {
    global ns nf
    $ns flush-trace
    #Close the NAM trace file
    close $nf
    #Execute NAM on the trace file
    exec nam out.nam &
    exit 0
    }
    #Create four nodes
    set n0 [$ns node]
    set n1 [$ns node]
    set n2 [$ns node]
    set n3 [$ns node]
    #Create links between the nodes
    $ns duplex-link $n0 $n2 2Mb 10ms DropTail
    $ns duplex-link $n1 $n2 2Mb 10ms DropTail
    $ns duplex-link $n2 $n3 1.7Mb 20ms DropTail
    #Set Queue Size of link (n2-n3) to 10
    $ns queue-limit $n2 $n3 10
    #Give node position (for NAM)
    $ns duplex-link-op $n0 $n2 orient right-down
    $ns duplex-link-op $n1 $n2 orient right-up
    $ns duplex-link-op $n2 $n3 orient right
    #Monitor the queue for link (n2-n3). (for NAM)
    $ns duplex-link-op $n2 $n3 queuePos 0.5
    #Setup a TCP connection
    set tcp [new Agent/TCP]
    $tcp set class_ 2
    $ns attach-agent $n0 $tcp
    set sink [new Agent/TCPSink]
    $ns attach-agent $n3 $sink
    $ns connect $tcp $sink
    $tcp set fid_ 1
    #Setup a FTP over TCP connection
    set ftp [new Application/FTP]
    $ftp attach-agent $tcp
    $ftp set type_ FTP
    #Setup a UDP connection
    set udp [new Agent/UDP]
    $ns attach-agent $n1 $udp
    set null [new Agent/Null]
    $ns attach-agent $n3 $null
    $ns connect $udp $null
    $udp set fid_ 2
    #Setup a CBR over UDP connection
    set cbr [new Application/Traffic/CBR]
    $cbr attach-agent $udp
    $cbr set type_ CBR
    $cbr set packet_size_ 1000
    $cbr set rate_ 1mb
    $cbr set random_ false
    #Schedule events for the CBR and FTP agents
    $ns at 0.1 "$cbr start"
    $ns at 1.0 "$ftp start"
    $ns at 4.0 "$ftp stop"
    $ns at 4.5 "$cbr stop"
    #Detach tcp and sink agents (not really necessary)
    $ns at 4.5 "$ns detach-agent $n0 $tcp ; $ns detach-agent $n3 $sink"
    #Call the finish procedure after 5 seconds of simulation time
    $ns at 5.0 "finish"
    #Print CBR packet size and interval
    puts "CBR packet size = [$cbr set packet_size_]"
    puts "CBR interval = [$cbr set interval_]"
    #Run the simulation
    $ns run
    view rawsimple.tcl hosted with ❤ by GitHub
  2. Run the simulation from the terminal using ns-2:
     ns simple.tcl
    
  3. Click on the play button to start the simulation:

If you are a beginner to network simulation, you can find the explanation for the above script here.

The ns-allinone-2.31 package is available here if needed.

Wednesday 18 November 2020

How to win Every Argument

 To win Every Argument

Click to Download

Resume Secrets Exposed

 Resume Secrets Exposed

Click to Download

Job Searching Tools

Job Searching Tools

Click to Download

Interview Secrets

Interview Secrets Exposed PDF Book

Click to Download 

Oracle Business Intelligence Enterprise Edition (OBIEE)

02. BI PUBLISHER

04. INFORMATICA

06. OBIEE 11G ADVANCED TRAINING

01 OBIEE Practitioner Level

02 OBIEE Learner Level

03 OBIEE Specialist Level

Oracle Business Intelligence Enterprise Edition (OBIEE) is a Business Intelligence (BI) tool by Oracle Corporation. Its proven architecture and common infrastructure producing and delivering enterprise reports, scorecards, dashboards, ad-hoc analysis, and OLAP analysis provides a rich end-user experience.

Click to Download

Tuesday 10 November 2020

Error in Installing XAMPP On Windows-10 UAC Warning Message Solution fix

 

  •  I am trying to install xampp-windows-x64-7.1.29-1-VC14-installer. I get a message saying " Because an activated user account control ( UAC ) on your system some functions of XAMPP are possibly restricted with UAC please avoid to install XAMPP to c:\program Files (x86) ( missing write permisssions). Or deactivate UAC with msconfig after the setup.

    Installing XAMPP On Windows 10 & User Account Control (UAC) Warning Message

    How To work on UAC when Installing XAMPP 

    There are two things you need to check: 
    Ensure that your user account has administrator privilege.

    Disable UAC (User Account Control) as it restricts certain administrative function needed to run a web server.

    To ensure that your user account has administrator privilege, run lusrmgr.msc from the Windows Start > Run menu to bring up the Local Users and Groups Windows.
    Double-click on your user account that appears under Users, and verifies that it is a member of Administrators.

    To disable UAC (as an administrator), from Control Panel:According to the instruction they had given I simply went to

    • Start Menu –> Control Panel–> In the Control Panel search box just type User Account Control.
    • Then you will get the results among which I found; 

    Kumar Atul Jaiswal

    • “Change User Account Control Settings”

    Kumar Atul Jaiswal

    In this User Account Control Settings Form you will find a slider that controls the level of notification messages you want when changes are done to your computer.

    Kumar Atul Jaiswal
    NOTE :- Alternately, if you don't want to disable UAC, you will have to install XAMPP in a different folder, outside of C:\Program Files (x86), such as C:\xampp.