Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Installation of NS2 and Congestion Control
1. 1
Department of Information Science and Engineering
M S Ramaiah Institute of Technology
(Autonomous Institute, Affiliated to VTU)
Bangalore-560054
NS2 Installation and Congestion control
A presentation submitted to
M S Ramaiah Institute of Technology
An Autonomous Institute, Affiliated to
Visvesvaraya Technological University, Belgaum
in partial fulfillment of 5th Sem Under
DATA COMMUNICATIONS
Submitted by
Suman Raj K(1MS14IS417)
Suneel N P(1MS13IS114)
under the guidance of
Dr. Mydhili K. Nair
3. LINUX FOR NS2
Linux
Use of Linux is recommended
Fedora (10, 12)
If DVD Version- no need of additional package installation
Install all the packages (if default installation selected, then additional
packages have to be installed)
Ubuntu (9.04, 9.10, 10.04, 10.10)
Additional packages to be installed, there may be GCC Issues, xgraph and
NAM issues
Red Hat Enterprise Linux 5 (RHEL5)
Cent OS is the alternative for RHEL
Basic commands (ls, chmod, tar, rpm, make, gedit, vi, pwd,
passwd, echo, cd, etc)
Directory structure and shell prompt
Path variables setting, Installation of packages and
dependencies
4. INSTALLATION OF NS2
Download from http://isi.edu/nsnam/ns/ns-
build.html#allinone
Copy the file under /home/pradeep (if your
username is “abcdef” then home folder will be
/home/abcdef)
Extract it using “tar zxvf ns-allinone-
2.34.tar.gz”
“cd ns-allinone-2.34”
“./install “ (if any errors, please correct it)
Setting of paths in “.bash_profile” or “.bashrc”
7. TCLCL
TCLCL Consists of Six main classes
Tcl (Methods to access the interpreted hierarchy)
InstVar (binds member variable in both
hierarchies together
TclObject (base class of all simulation objects)
TclClass (maps class of IH to class of CH)
TclCommand (global access to CH from IH)
EmbeddedTcl (translates OTCL Script to C++
Code)
8. TCLCL
Each class have various member functions
that are used to get compiled
As a case study, lets start how to create a
simple agent.
9. SIMPLE AGENT
class TSPAgent : public Agent {
public:
TSPAgent();
protected:
int command(int argc, const char*const* argv);
private:
int tsp_var1;
double tsp_var2;
void TSPPrivFunc(void);
};
13. SIMPLE AGENT TO TEST
#name it as .tcl file
# Create TSPAgent
set myagent [new Agent/TSPAgentOtcl]
# Set configurable parameters of TSPAgent
$myagent set tsp_var1_otcl 2
$myagent set tsp_var2_otcl 3.14
# Give a command to TSPAgent
$myagent call-tsp-priv-fun
15. 15
CONGESTION CONTROL
When one part of the subnet (e.g. one or
more routers in an area) becomes
overloaded, congestion results.
Because routers are receiving packets faster
than they can forward them, one of two things
must happen:
The subnet must prevent additional packets from
entering the congested region until those already
present can be processed.
The congested routers can discard queued
packets to make room for those that are arriving.
16. 16
FACTORS THAT CAUSE CONGESTION
Packet arrival rate exceeds the outgoing link
capacity.
Insufficient memory to store arriving packets
Bursty traffic
Slow processor
17. 17
CONGESTION CONTROL VS FLOW CONTROL
Congestion control is a global issue –
involves every router and host within the
subnet
Flow control – scope is point-to-point;
involves just sender and receiver.
18. 18
CONGESTION CONTROL, CONT.
Congestion Control is concerned with
efficiently using a network at high load.
Techniques for detection and recovery
are:
Warning bit
Choke packets
Load shedding
19. 19
WARNING BIT
A special bit in the packet header is set by
the router to warn the source when
congestion is detected.
The bit is copied and piggy-backed on the
ACK and sent to the sender.
The sender monitors the number of ACK
packets it receives with the warning bit set
and adjusts its transmission rate accordingly.
20. 20
CHOKE PACKETS
A more direct way of telling the source
to slow down.
A choke packet is a control packet
generated at a congested node and
transmitted to restrict traffic flow.
The source, on receiving the choke
packet must reduce its transmission
rate by a certain percentage.
An example of a choke packet is the
ICMP Source Quench Packet.