Steps for conducting the experiment
Follow are the steps to be followed in general to perform the experiments in Advanced Network Technologies Virtual Lab.
- Read the theory about the experiment
- View the simulation provided for a chosen, related problem
- Take the self evaluation to judge your understanding (optional, but recommended)
- Go to the exercises section, choose a problem, and carefully read the problem description
- Write a script (or make necessary changes) to simulate the desired scenario in the code editor just below the problem statement
- Click on the 'Run' button to execute the simulation script
- Simulation with ns2: If the simulation was successful, and was instructed to create a trace file, contents of the trace file would be displayed in the area below the 'Run' button
- Simulation with ns3: If the simulation was successful, output of the program would be displayed in the area below the 'Run' button
- A trace file generated as a result of simulation with ns2 could be used for certain kind of analysis, which would be discussed in a later section
Experiment Specific Instructions
- The problem statement is presented on the 'Exercises' page, which you have to simulate with ns2.
- Set the global configuration parameter for satellite terminals.
- For exercise#1, find the position of geostationary satellite node and satellite terminals.
- Configure the geostationary satellite node for bent-pipe satellite and set the position of INSAT-3A at 93.5 degrees longitude East.
- Configure the node generator for terminal nodes and set the position of Bangkok and Baghdad.
- Add GSL(Ground to Satellite Link) to Bangkok and Baghdad.
- Trace all satellite links.
- Set up the UDP connection(s), a FTP source and a CBR stream that will run over it
- Set centralizing routing for all nodes to compute new routes and use the routes to build a forwarding table on each node.
- Schedule the different events like simulation start and stop, data transmission start and stop.
- Call the finish procedure and mention the time when your simulation will end.
- Find out the average delay for this process using the tool trace file analysis. For satellite use wired simulation model as first 12 fields of satellite trace format are similar to conventional ns tracing.
- For exercise #2, follow the following instructions written below:
- Set global configuration parameters for leo satellite networks.
- The Iridium satellite constellation consists of 66 (n0 – n65) operational satellites which are organized into six orbital planes. The satellites are in near-polar orbits at an altitude of 780 km above the earth. Each satellite is cross-linked to four other satellites — two in the same orbital plane and two others in adjacent planes.
- Iridium satellites are organized into six orbital planes. Each plane have 11 satellites. Set position of 11 satellites in plane-1(n0 - n10), then next 11 satellites in plane-2(n11- n21), and so on for 6 planes. Set position of these satellites on six planes.
- Intraplane ISLs exists in its own plane.Set intraplane ISLs for each nodes with its neighboring nodes in its own plane.
- Interplane ISLs exists between satellites of neighboring co-rotating planes.Set inetplane ISLs for each nodes with its neighboring nodes in its neighboring planes.
- Set up terrestrial nodes one in Berkeley another at Boston and add GSL(Ground to Satellite Link) to of them.
- Then follow step-7 to step-11 as written above.
- Find out end-to-end delays and number of hop versus packet sequence number between Berkeley and Boston using the tool trace file analysis (use wired simulation model).
global opt set opt(chan) Channel/Sat set opt(bw_up) 2Mb set opt(bw_down) 2Mb set opt(phy) Phy/Sat set opt(mac) Mac/Sat set opt(ifq) Queue/DropTail set opt(qlim) 50 set opt(ll) LL/Sat set opt(wiredRouting) OFF
The INSAT-3A is positioned at 93.5 degrees longitude East. In our simulation we used two terminals one in Bangkok and one in Baghdad . The longitude and latitude of Bangkok is 13 degree north and 100 degree east and Baghdad is 33 degree north and 44 degree east.
$ns node-config -satNodeType geo-repeater \ -phyType Phy/Repeater \ -channelType $opt(chan) \ -downlinkBW $opt(bw_down) \ -wiredRouting $opt(wiredRouting) # GEO satellite at 93.5 degrees longitude East set n1 [$ns node] $n1 set-position 93.5
# Configure the node generator for satellite terminals $ns node-config -satNodeType terminal \ -llType $opt(ll) \ -ifqType $opt(ifq) \ -ifqLen $opt(qlim) \ -macType $opt(mac) \ -phyType $opt(phy) \ -channelType $opt(chan) \ -downlinkBW $opt(bw_down) \ -wiredRouting $opt(wiredRouting) # Two terminals: one in Bangkok and one in Baghdad set n2 [$ns node] $n2 set-position 13.9 100.9; # BK set n3 [$ns node] $n3 set-position 33.8 44.4; # BD
$n2 add-gsl geo $opt(ll) $opt(ifq) $opt(qlim) $opt(mac) $opt(bw_up) \ $opt(phy) [$n1 set downlink_] [$n1 set uplink_] $n3 add-gsl geo $opt(ll) $opt(ifq) $opt(qlim) $opt(mac) $opt(bw_up) \ $opt(phy) [$n1 set downlink_] [$n1 set uplink_]
# We use centralized routing set satrouteobject_ [new SatRouteObject] $satrouteobject_ compute_routes
HandoffManager/Term set elevation_mask_ 8.2 HandoffManager/Term set term_handoff_int_ 10 HandoffManager/Sat set sat_handoff_int_ 10 HandoffManager/Sat set latitude_threshold_ 60 HandoffManager/Sat set longitude_threshold_ 10 HandoffManager set handoff_randomization_ true
Trace File Analysis
A simple tool has been provided as part of this lab to analyze the trace files generated after simulation with ns2. A summary of the available options, and usage guide is given below.
Following is a list of functionalities provided by the Trace Analysis tool:
Trace file formats: Following trace file formats are
- Wireless (new format)
- Satellite -- currently redirects to wired mode
- Mixed -- when both wired and wireless connections are present in the simulation
General Statistics: To provide some common statistics
about the simulation being run. Currently displays only the simulation duration.
- Inputs: None
- Output: Text
Average Throughput: Computes total # of bytes received
by a node over the entire simulation duration
- Inputs: Node #
- Output: Number
Bytes Received: Plots cumulative count of bytes received by
a node over the entire simulation duration
- Inputs: Node #; for wireless scenario, trace levels (AGT, MAC, RTR)
- Output: Graph
End-to-end Delay: Plots the end-to-end delay delay encountered
by packets while moving from a source node to the destination node
- Inputs: Source node #, destination node #, scaling factor [optional] -- scaling factor helps to amplify the y-axis values
- Output: Graph
Packet Retransmissions: Plots # of retransmission(s) of
a given packet occurs between the source and destination nodes
- Inputs: Source node #, destination node #
- Output: Graph
Hop Count: Plots the # of hops traveled by a packet to reach
the destination node from the source node. It counts the destination node as well.
- Inputs: Source node #, source port #, destination node #, destination port #
- Output: Graph
- For analyzing the problems in the "Satellite Networks" experiment, please use the Wired mode of analysis
- Analysis of trace files for mixed mode of simulations (wired & wireless) is not supported currently
- Outputs produced do not necessarily have accuracy for scientific publications. In particular, the plot of hop counts may vary a bit from the original count (in wireless mode) in cases when a packet has been forwarded to more than one node.
- The tool currently allows only a single instance of a given type of plot. For example, this doesn't let you plot end-to-end delays between multiple (source, destination) node pairs