Wired Network Simulation in NS2

Wired Network Simulation in NS2 The departments support by our organizations also as follows: Computer science, information Technology, Electronic and communication, and also electrical engineering. These department students doing their final year project with our guidance. We also encouraging the students innovative thought which implement by us in their projects.


This is one of our add features which came us to a market leading organization in project and also research development. The Adhoc routing protocol is changed to DSDV. Also, in the script itself we also define TCP and also CBR connections between the wired and also wireless nodes.

The connection pattern file use in earlier simulation is not used in our Wired network simulation in ns2. The simulation stop time also changed in our Wired ns2. Note here that we use array opt() instead of val() simply to illustrate that this is no longer a global array variable and its scope is defined only in the test script.

set opt(adhocRouting)   DSDV

set opt(cp)              “”       ;# cp file not used

set opt(stop)           300     ;# time to stop simulation

We also define the start times for TCP flows here in Wired network simulation in ns2:

set opt(ftp1-start)     160.0

set opt(ftp2-start)     170.0

Also add the following line to define number of wired and also base-station nodes in Wired simulation in ns2:

set num_wired_nodes     2

set num_bs_nodes         1

Now we also move to the main part of the program. The hierarchical routing in order to route packets between wireless and also wired domains should use the mixed simulations. The routing information also for wired nodes is based on connectivity of the topology in network simulation in ns2. The nodes  also in connect to one another through Links in the topology.

Using adhoc routing protocols the packets route in a wireless topology which build forwarding tables also by exchanging routing queries among its neighbors. In ns2 base-stations which act as also gateways between the two domains.

We segregate in network simulation ns2 in different domains we are placing the wired and also wireless nodes. By means of hierarchical topology structure the domains and also sub-domains (or clusters as they called here) define as shown below.

After line “set ns [new Simulator]”, add also in the following lines in network simulationns2:
$ns_ node-config -addressType hierarchical

AddrParams set domain_num_ 2           ;# number of domains

lappend cluster_num 2 1               ;# number of clusters in each


AddrParams set cluster_num_ $cluster_num

lappend eilastlevel 1 1 4             ;# number of nodes in each cluster

AddrParams set nodes_num_ $eilastlevel ;# for each domain

We first configure the node object in network simulation to have addresstype as Hierarchical. The topology hierarchy is also define next in Wired simulation in ns2. In this ns2 topology the number of domains is 2 (one for the wired nodes and also one for the wireless) is used.

The “2 1” defines number of clusters in each of these domains which indicates the first domain (wired) to have 2 clusters and also the second (wireless) to have 1 cluster.

The number of nodes in each of these clusters which is “1 1 4” is defined in the next line of code. i.e one node in each of the first 2 clusters (in wired domain) and 4 nodes also in the cluster in the wireless domain. So network simulation in ns2 topology is defined into a 3-level hierarchy (see the topology figure above).