0% found this document useful (0 votes)
3 views34 pages

2022 LAB (Repaired)

The document outlines a series of planned experiments related to Local Area Networks (LANs), including studies on network equipment, topologies, installations, and error correction techniques. It provides detailed theoretical backgrounds for each experiment, such as the physical components of LANs, various network topologies, and methods for configuring LANs. Additionally, it includes practical steps for setting up network connections and implementing error correction programs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views34 pages

2022 LAB (Repaired)

The document outlines a series of planned experiments related to Local Area Networks (LANs), including studies on network equipment, topologies, installations, and error correction techniques. It provides detailed theoretical backgrounds for each experiment, such as the physical components of LANs, various network topologies, and methods for configuring LANs. Additionally, it includes practical steps for setting up network connections and implementing error correction programs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 34

LIST OF EXPERIMENTS

Planned Date of
S.NO. EXPERIMENT Date Conduction

1.
Study of Different Type of LAN&
Network Equipments.

Study and Verification of standard


2. Network topologies i.e. Star, Bus, Ring
etc.

3. LAN installations and Configurations.

4.
Write a program to implement various
types of error correcting techniques.

5. Write a program to Implement various


types of farming methods.

6. Study of Tool Command Language


(TCL).
Study and Installation of Standard
7. Network Simulator: N.S-2, N.S3.OpNet,
QualNet etc.

Study & Installation of ONE


8. (Opportunistic Network Environment)
Simulator for High Mobility Networks.

9. Configure 802.11 WLAN.

10. Study of Application layer protocols-DNS,


HTTP, HTTPS, FTP and TelNet.
EXPERIMENT NO. 1

Aim: To study of different type of LAN equipment’s.

Theory

PHYSICAL COMPONENTS OF LANS


The physical properties of a LAN include network access units (or interfaces) that connect the personal
computer to the network. These units are actually interface cards installed on computer motherboards.
Their job is to provide a connection, monitor availability of access to the LAN, set or buffer the data
transmission speed, ensure against transmission errors and collisions, and assemble data from the LAN
into usable form for the computer.

The next part of a LAN is the wiring, which provides the physical connection from one computer to
another, and to printers and file servers. The properties of the wiring determine transmission speeds.
The first LANs were connected with coaxial cable, the same type used to deliver cable television.
These facilities are relatively inexpensive and simple to attach. More importantly, they provided great
bandwidth (the system's rate of data transfer), enabling transmission speeds initially up to 20 megabits
per second.

Another type of wiring, developed in the 1980s, used ordinary twisted wire pair (commonly used for
telephones). The primary advantages of twisted wire pair are that it is very cheap, simpler to splice than
coaxial, and is already installed in many buildings. The downside of this simplicity is that its
bandwidth is more limited.

A more recent development in LAN wiring is optical fiber cable. This type of wiring uses thin strands
of glass to transmit pulses of light between terminals. It provides tremendous bandwidth, allowing very
high transmission speeds and because it is optical rather than electronic, it is impervious to
electromagnetic interference. Still, splicing it can be difficult and requires a high degree of skill. The
primary application of fiber is not between terminals, but between LAN buses (terminals) located on
different floors. As a result, fiber distributed data interface is used mainly in building risers. Within
individual floors, LAN facilities remain coaxial or twisted wire pair.

When a physical connection cannot be made between two LANs, such as across a street or between
buildings, microwave radio may be used. However, it is often difficult to secure frequencies for this
medium. Another alternative in this application is light transceivers, which project a beam of light
similar to fiber optic cable, but through the air rather than over cable. These systems do not have the
frequency allocation or radiation problems associated with microwave, but they are susceptible to
interference from fog and other natural obstructions.
LAN TOPOLOGIES
LANs are designed in several different topologies, or physical patterns, connecting terminals. These
shapes can range from straight lines to a ring. Each terminal on the LAN contends with other terminals
for access to the system. When it has secured access to the system, it broadcasts its message to all the
terminals at once. The message is picked up by the one or group of terminal stations for which it is
intended. The branching tree topology is an extension of the bus, providing a link between two or more
buses.

A third topology, the star network, also works like a bus in terms of contention and broadcast. But in
the star, stations are connected to a single, central node (individual computer) that administers access.
Several of these nodes may be connected to one another. For example, a bus serving six stations may
be connected to another bus serving 10 stations and a third bus connecting 12 stations. The star
topology is most often used where the connecting facilities are coaxial or twisted wire pair.

The ring topology connects each station to its own node, and these nodes are connected in a circular
fashion. Node 1 is connected to node 2, which is connected to node 3, and so on, and the final node is
connected back to node 1. Messages sent over the LAN are regenerated by each node, but retained only
by the addressees. Eventually, the message circulates back to the sending node, which removes it from
the stream.

TRANSMISSION METHODS USED BY LANS


LANs function because their transmission capacity is greater than any single terminal on the system.
As a result, each station terminal can be offered a certain amount of time on the LAN, like a
timesharing arrangement. To economize on this small window of opportunity, stations organize their
messages into compact packets that can be quickly distributed. When two messages are sent
simultaneously, they could collide on the LAN causing the system to be temporarily disrupted. Busier
LANs usually utilize special software that virtually eliminates the problem of collisions by providing
orderly, non-contention access.

The transmission methods used on LANs are either baseband or broadband. The baseband medium
uses a high-speed digital signal consisting of square wave DC voltage. While it is fast, it can
accommodate only one message at a time. As a result, it is suitable for smaller networks where
contention is low. It also is very simple to use, requiring no tuning or frequency discretion circuits.
This transmission medium may be connected directly to the network access unit and is suitable for use
over twisted wire pair facilities.

By contrast, the broadband medium tunes signals to special frequencies, much like cable television.
Stations are instructed by signaling information to tune to a specific channel to receive information.
The information within each channel on a broadband medium may also be digital, but they are
separated from other messages by frequency. As a result, the medium generally requires higher
capacity facilities, such as coaxial cable. Suited for busier LANs, broadband systems require the use of
tuning devices in the network access unit that can filter out all but the single channel it needs.

THE FILE SERVER


The administrative software of the LAN resides in a dedicated file server; in a smaller, less busy LAN;
or in a personal computer that acts as a file server. In addition to performing as a kind of traffic
controller, the file server holds files for shared use in its hard drives, administers applications such as
the operating system, and allocates functions.

When a single computer is used as both a workstation and a file server, response times may lag because
its processors are forced to perform several duties at once. This system will store certain files on
different computers on the LAN. As a result, if one machine is down, the entire system may be
crippled. If the system were to crash due to under capacity, some data may be lost or corrupted.

The addition of a dedicated file server may be costly, but it provides several advantages over a
distributed system. In addition to ensuring access even when some machines are down, its only duties
are to hold files and provide access.

OTHER LAN EQUIPMENT


LANs are generally limited in size because of the physical properties of the network including distance,
impedance, and load. Some equipment, such as repeaters, can extend the range of a LAN. Repeaters
have no processing ability, but simply regenerate signals that are weakened by impedance. Other types
of LAN equipment with processing ability include gateways, which enable LANs operating dissimilar
protocols to pass information by translating it into a simpler code, such as ASCII. A bridge works like
a gateway, but instead of using an intermediate code, it translates one protocol directly into another. A
router performs essentially the same function as a bridge, except that it administers communications
over alternate paths. Gateways, bridges, and routers can act as repeaters, boosting signals over greater
distances. They also enable separate LANs located in different buildings to communicate with each
other.

The connection of two or more LANs over any distance is referred to as a wide area network (WAN).
WANs require the use of special software programs in the operating system to enable dial-up
connections that may be performed by a telephone lines or radio waves. In some cases, separate LANs
located in different cities—and even separate countries—may be linked over the public network.
EXPERIMENT NO. 2

Aim: Study and verification of standard Network topologies i.e. Star, Bus, Ring
etc.

Theory

Network topology is the arrangement of the various elements (links, nodes, etc.) of a computer or
biological network. Essentially, it is the topological structure of a network, and may be depicted
physically or logically. Physical topology refers to the placement of the network's various components,
including device location and cable installation, while logical topology shows how data flows within a
network, regardless of its physical design. Distances between nodes, physical interconnections,
transmission rates, and/or signal types may differ between two networks, yet their topologies may be
identical.

A good example is a local area network (LAN): Any given node in the LAN has one or more physical
links to other devices in the network; graphically mapping these links results in a geometric shape that
can be used to describe the physical topology of the network. Conversely, mapping the data flow
between the components determines the logical topology of the network.

Topology
There are two basic categories of network topologies:

1. Physical topologies
2. Logical topologies

The shape of the cabling layout used to link devices is called the physical topology of the
network. This refers to the layout of cabling, the locations of nodes, and the interconnections
between the nodes and the cabling The physical topology of a network is determined by the
capabilities of the network access devices and media, the level of control or fault tolerance
desired, and the cost associated with cabling or telecommunications circuits.

The logical topology, in contrast, is the way that the signals act on the network media, or the
way that the data passes through the network from one device to the next without regard to the
physical interconnection of the devices. A network's logical topology is not necessarily the
same as its physical topology. For example, the original twisted pair Ethernet using repeater
hubs was a logical bus topology with a physical star topology layout. Token Ring is a logical
ring topology, but is wired a physical star from the Media Access Unit.
The logical classification of network topologies generally follows the same classifications as
those in the physical classifications of network topologies but describes the path that the data
takes between nodes being used as opposed to the actual physical connections between nodes.
The logical topologies are generally determined by network protocols as opposed to being
determined by the physical layout of cables, wires, and network devices or by the flow of the
electrical signals, although in many cases the paths that the electrical signals take between
nodes may closely match the logical flow of data, hence the convention of using the terms
logical topology and signal topology interchangeably.

Logical topologies are often closely associated with Media Access Control methods and
protocols. Logical topologies are able to be dynamically reconfigured by special types of
equipment such as routers and switches.

The study of network topology recognizes eight basic topologies:

 Point-to-point
 Bus
 Star
 Ring or circular
 Mesh
 Tree
 Hybrid
 Daisy chain
EXPERIMENT NO. 3

Aim: LAN installations and their Configurations.

Apparatus Required

Theory
Performance:
Perform the following steps as directed

Step 1: To make a Direct Cable connection


1. Click Start, click Control Panel, and then double-click Network Connections.
2. Under Network Tasks, click Create a new connection, and then click next.
3. Click Set up an advanced connection, and then click next.
4. Click Connect directly to another computer, and click next.
5. Choose the role this machine will play in the communication. If this computer has the information to
which you need to gain access, click Host. If this computer will access information from the other
computer, click Guest.

Step 2: To Set Up the Host Computer


1. Click the connection device that you want to use for this connection (a parallel or serial port, or an
infrared port), and then click Next.
2. Grant access to the users who are allowed to connect by selecting the appropriate check boxes, and
then click Next.
3. Click Finish to end the configuration process.

Step 3: to Set up the Guest Computer


1. Type a name to identify this connection, and then click Next.
2. Click the connection device that you want to use for this connection (a parallel or serial port, or an
infrared port), and then click Next.
3. Decide whether this connection will be available for all users (click Anyone's use), or only for you
(click my use only), and then click Next.
4. Click Finish to end the setup process

Step 4: To create Windows Workgroup


1. In Windows XP, right click on My Computer, select System Properties.
2. Select the Computer Name tab, click on Change.
3. Enter the appropriate Computer name and Workgroup.
4.
Make sure that every computer on your home network references the same workgroup.

Step 5:
To Configure TCP/IP
To assign IP address, gateway, subnet mask, DNS
Step 6:
To create domain Bring all the PC of Lab under a network using workgroup or domain.
Create client and server
Result/ Conclusions
Windows workgroup is established and used for sharing and transferring data between physically
connected PCs.
EXPERIMENT NO. 4

Aim: Write a program to implement various types of error correcting techniques.

Theory
Error detection and correction are implemented either at the data link layer
or the transport layer of the OSI model.
Types of Errors

Single-bit error

Single bit errors are the least likely type of errors in serial data transmission because the noise must
have a very short duration which is very rare. However this kind of errors can happen in parallel
transmission.

Example:
 If data is sent at 1Mbps then each bit lasts only 1/1,000,000 sec. or 1 μs.
 For a single-bit error to occur, the noise must have a duration of only 1 μs, which is very rare.
Burst error

The term burst error means that two or more bits in the data unit have changed from 1 to 0 or
from 0 to 1.
Burst errors do not necessarily mean that the errors occur in consecutive bits, the length of
the burst is measured from the first corrupted bit to the last corrupted bit. Some bits in between
may not have been corrupted.
Burst error is most likely to happen in serial transmission since the duration of noise is
normally longer than the duration of a bit.
The number of bits affected depends on the data rate and duration of noise.
Example:

If data is sent at rate = 1Kbps then a noise of 1/100 sec can affect 10 bits.(1/100*1000)
If same data is sent at rate = 1Mbps then a noise of 1/100 sec can affect 10,000 bits.(1/100*106)

CYCLIC REDUNDANCY CHECK (CRC)


LOGIC:
1. Let r be the degree of G(x).Append r zero bits to the low-order end of the frame. So it now contains m+r
bits and corresponds to the polynomial x2 m(x).
2. Divide the bit string corresponding to G(x) into the bit string corresponding to x 2 m(x) using modulo-2
division.
3. Subtract the remainder from the bit string corresponding to x 2 m(x) using modulo-2 sub. The result is the
check summed frame to be transmitted. We call it as a polynomial.
//
C program for the above approach

#include <math.h>
#include <stdio.h>

// Store input bits


int input[32];

// Store hamming code


int code[32];

int ham_calc(int, int);


void solve(int input[], int);

// Function to calculate bit for


// ith position
int ham_calc(int position, int c_l)
{
int count = 0, i, j;
i = position - 1;

// Traverse to store Hamming Code


while (i < c_l) {

for (j = i; j < i + position; j++) {

// If current boit is 1
if (code[j] == 1)
count++;
}

// Update i
i = i + 2 * position;
}

if (count % 2 == 0)
return 0;
else
return 1;
}

// Function to calculate hamming code


void solve(int input[], int n)
{
int i, p_n = 0, c_l, j, k;
i = 0;
// Find msg bits having set bit
// at x'th position of number
while (n > (int)pow(2, i) - (i + 1)) {
p_n++;
i++;
}

c_l = p_n + n;

j = k = 0;

// Traverse the msgBits


for (i = 0; i < c_l; i++) {

// Update the code


if (i == ((int)pow(2, k) - 1)) {
code[i] = 0;
k++;
}

// Update the code[i] to the


// input character at index j
else {
code[i] = input[j];
j++;
}
}

// Traverse and update the


// hamming code
for (i = 0; i < p_n; i++) {

// Find current position


int position = (int)pow(2, i);

// Find value at current position


int value = ham_calc(position, c_l);

// Update the code


code[position - 1] = value;
}

// Print the Hamming Code


printf("\nThe generated Code Word is: ");
for (i = 0; i < c_l; i++) {
printf("%d", code[i]);
}
}

// Driver Code
void main()
{
// Given input message Bit
input[0] = 0;
input[1] = 1;
input[2] = 1;
input[3] = 1;

int N = 4;

// Function Call
solve(input, N);
}
EXPERIMENT NO. 5

Aim: Write a program to implement various types of farming methods.

Implement the data link layer farming methods such as and bit stuffing.

Introduction to bit stuffing framing method used in Data Link layer:


The new technique allows data frames to contain an arbitrary number of bits
and allows character codes with an arbitrary no of bits per character. Each
frame begins and ends with the special bit pattern, 01111110, called a flag
byte. Whenever the sender's data link layer encounters five consecutive ones
in the data, it automatically stuffs a 0 bit into the outgoing bit stream. This bit
stuffing is analogous to character stuffing, in which a DLE is stuffed into the
outgoing character stream before DLE in the data.

Program Algorithm:
Begin
Step 1: Read frame length n
Step 2: Repeat step (3 to 4) until i<n(: Read values into the input frame (0’s
and
1’s) i.e.
Step 3: initialize I i=0;
Step 4: read a[i] and increment i
Step 5: Initialize i=0, j=0,count =0
Step 6: repeat step (7 to 22) until i<n
Step 7: If a[i] == 1 then
Step 8: b[j] = a[i]
Step 9: Repeat step (10 to 18) until (a[k] =1 and k<n and count <5)
Step 10: Initialize k=i+1;
Step 11: Increment j and b[j]= a[k];
Step 12: Increment count ;
Step 13: if count =5 then
Step 14: increment j,
Step 15: b[j] =0
Step 16: end if
Step 17: i=k;
Step 18: increment k
Step 19: else
Step 20: b[j] = a[i]
Step 21: end if
Step 22: increment I and j
Step 23: print the frame after bit stuffing
Step 24: repeat step (25 to 26) until i< j
Step 25: print b[i]
Step 26: increment i
End

Program Code: // BIT Stuffing program


#include<stdio.h>
#include<string.h>
void main()
{
int a[20],b[30],i,j,k,count,n;
printf("Enter frame length:");
scanf("%d",&n);
printf("Enter input frame (0's & 1's only):");
for(i=0;i<n;i++)
scanf("%d",&a[i]);
i=0; count=1; j=0;
while(i<n)
{
if(a[i]==1)
{
b[j]=a[i];
for(k=i+1;a[k]==1 && k<n && count<5;k++)
{
j++;
b[j]=a[k];
count++;
if(count==5)
{
j++;
b[j]=0;
}
i=k;
}}
else
{
b[j]=a[i];
}
i++;
j++;
}
printf("After stuffing the frame is:");
for(i=0;i<j;i++)
printf("%d",b[i]);
}

Program Output:
Enter frame length:5
Enter input frame (0's & 1's only):
1
1
1
1
1
After stuffing the frame is:111110
------------------
(Program exited with code: 6)
EXPERIMENT NO. 6

Aim: Study of Tool Command Language (TCL).

Study of Tool command language (Tcl)

Study of Tool command language (Tcl) is a powerful scripting language with


programming features. It is available across Unix, Windows and Mac OS
platforms. Tcl is used for Web and desktop applications, networking,
administration, testing, rapid prototyping, scripted applications and graphical
user interfaces (GUI).

Tcl is shortened form of Tool Command Language. John Ousterhout of the


University of California, Berkeley, designed it. It is a combination of a scripting
language and its own interpreter that gets embedded to the application, we
develop with it.
Tcl was developed initially for Unix. It was then ported to Windows, DOS, OS/2,
and Mac OSX. Tcl is much similar to other unix shell languages like Bourne
Shell (Sh), the C Shell (csh), the Korn Shell (sh), and Perl.
It aims at providing ability for programs to interact with other programs and also
for acting as an embeddable interpreter. Even though, the original aim was to
enable programs to interact, you can find full-fledged applications written in
Tcl/Tk.

Features of Tcl
The features of Tcl are as follows −
 Reduced development time.
 Powerful and simple user interface kit with integration of TK.
 Write once, run anywhere. It runs on Windows, Mac OS X, and almost on
every Unix platform.
 Quite easy to get started for experienced programmers; since, the language
is so simple that they can learn Tcl in a few hours or days.
 You can easily extend existing applications with Tcl. Also, it is possible to
include Tcl in C, C++, or Java to Tcl or vice versa.
 Have a powerful set of networking functions.
 Finally, it's an open source, free, and can be used for commercial
applications without any limit.
Introduced in 1988 by John Ousterhout, Tcl is used for common gateway interface
(CGI) scripting and serves as the Eggdrop bot scripting language. Tcl/Tk refers to
a combination of Tcl and the Tk GUI toolkit.

Tcl features include:


 Complete Unicode and cross-platform usage
 Extensibility through Java and C++
 Integration with Windows GUI toolkit
 Data types, including source code, may be manipulated as strings.
 Event-driven interface to sockets and files
 Variadic function commands and interpreted language with bytecode
 Error message generation on incorrect usage by Tcl commands.
 FreeWrap TCLSH
 Berkeley Software Distribution (BSD) license
 Full development version

Tcl interfaces with the C language. Arrays of values that describe command
arguments are passed to the command implementation functions. Digital
logic simulators also include a Tcl scripting interface for Verilog, VHSIC
hardware description language (VHDL) and SystemVerilog hardware
language simulation. Tools like Simplified Wrapper and Interface
Generator (SWIG) and ffidl automatically generate the code required to
connect arbitrary C functions and Tcl runtime. Tcl scripts house command
invocations as a list of words separated by whitespace and terminated by a
newline or semicolon.

Major substitutions supported by Tcl are command substitution, variable


substitution and backslash substitution. Additionally, there is a database
access interface for Tcl scripts that supports access drivers for MySQL,
Open Database Connectivity (ODBC), PostgreSQL and SQLitedatabases.

Tcl supports extension packages for additional functionality, including


GUI, terminal-based application automation and database access.
Applications
Tcl is a general-purpose language and you can find Tcl everywhere. It includes,

 Scalable websites that are often backed by databases.


 High performance web servers build with TclHttpd.
 Tcl with CGI based websites.
 Desktop GUI applications.
 Embedded applications.
EXPERIMENT NO. 7

Aim: Study and Installation of Standard Network Simulator: N.S-2, N.S3.OpNet,


QualNet etc .

STEP BY STEP GUIDE ON HOW TO INSTALL NETWORK SIMULATOR (NS2) ON LINUX


MACHINE (UBUNTU 8.10)

Content:

I. Install Linux
II. Install NS2
III. Set Environmental variables
IV. Validation
V. Run the First nam example

I. INSTALL LINUX (UBUNTU 8.10)

1. First of all, get the Linux OS image or CD. You can get it for free from Linux website
http://www.ubuntu.com/GetUbuntu/download
Or, if you are looking for old versions, you can find
it in: http://mirrors.isu.net.sa/

2. If you are a windows user, then you have to download Linux in a separate partition, or use a virtual
machine. My advice to you is to use a virtual machine. One of the best virtual machine SW is
Vmware. You can buy it or Install trial Vmware Workstaion SW from:
http://www.vmware.com/support/product-support/workstation/
There are bunch of alternative Free SW to create Virtual machines, one of them is Virtual
Box. You can download it from:
http://www.virtualbox.org/wiki/Downloads

3. In this manual, I will be using Vmware to create my virtual machine. To create a virtual machine:
Open the Vmware workstation -> Click "New Virtual Machine"
4. Choose "Typical" and click "Next"

5. Then browse to the directory where you saved the Ubuntu iso image, or choose install it from a dis if
you Ubuntu is placed in a CD and click "Next".
6. Enter a user name and password to log in to Ubuntu after you install it, and click "Next"

7. Give your virtual machine a name, and choose its location, and click "Next"

8. Choose the size for the hard disk for the virtual machine, I will leave this as default, and then click
"Next"
9. Click "Finish", and the Ubuntu installation will start
Note: You can change the RAM size and many of the virtual machine specifications but this is
out of this manual scope. Just keep in mind that you are using your real machine resources like
RAM, Processor to run the virtual machine.

10. After that, the installation will continue, and after that you finish installing ubuntu

SIRT, BHOPAL
II.
INSTALL NS2
1. Download the NS2 files from the Internet
http://sourceforge.net/projects/nsnam/files/ns-2/2.34/
2. Extract the files
3. Put the files in the Home folde

4. Set the appropriate permissions for the ns-allinone-2.34 to allow executing the files inside it. To do that:
Right click the folder -> Properties -> Permissions , and choose the appropriate group with the
appropriate file access, then click "Allow executing file as program" and then click "Apply permissions to
enclosed files"

SIRT, BHOPAL
5. From the Accessories -> Terminal
6. Type the following command to know in which directory you are:
~$ pwd

7. You need to be in the directory where you placed the ns-allinone-2.34 folder
8. If you are not in the /home/e , then move to it by using the command cd
9. Now, supposing you are in the directory /home/e (e can be any other user) type the following
command to move inside the ns-allinone-2.34 using the command cd

$ cd ns-allinone-2.34
10. Then, type the following command (you will be asked to enter the system password to process. Also, you
will be asked if you want to continue, type: y to continue):
$ sudo apt-get install build-essential autoconf automake libxmu-dev

11. Type the following command to install NS2

$ ./install

SIRT, BHOPAL
III.
SET ENVIRONMENTAL VARIABLES

1. Write the following line:


gedit ~/.bashrc

2. After the previous command, a file will open to you. Add the following lines to the end of the file. Replace
"/your/path" by the folder where you placed the extracted ns-allinone-2.34 (For example, if your Linux
user name is e, and you placed the ns-allinone-2.34 in the home directory, you have to change
/your/path to /home/e)
# LD_LIBRARY_PATH
OTCL_LIB=/your/path/ns-allinone-2.34/otcl-1.13
NS2_LIB=/your/path/ns-allinone-2.34/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:
$USR_LOCAL_LIB

# TCL_LIBRARY
TCL_LIB=/your/path/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/your/path/ns-allinone-2.34/bin:/your/path/ns-allinone-
2.34/tcl8.4.18/unix:/your/path/ns-allinone-2.34/tk8.4.18/unix
NS=/your/path/ns-allinone-2.34/ns-2.34/
NAM=/your/path/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM

3. Save the file changes after your edit


4. Ensure that it immediately takes effect:

$ source ~/.bashrc
Note: the previous step is important; else you cannot successfully run ns-2.

5. Now, the installation has been completed. Try:

$ ns
6. The "%" symbol appears on the screen. Type "exit" to quit.

IV. Validation
1. To run the ns validation suite:
$ cd ns-2.34
$ ./validate
2. The validation will take long time, wait until it finish.

SIRT, BHOPAL
V. RUN YOUR FIRST NAM EXAMPLE
1. From the terminal type the following:

$ cd ns-allinone-2.34
$ cd nam-1.14
$ cd edu
$ exec nam A2-stop-n-wait-loss.nam

2. The following window appears, click the Play button to see the protocol animation

SIRT, BHOPAL
EXPERIMENT NO. 8

Aim: Study & Installation of ONE (Opportunistic Network Environment) Simulator for High
Mobility Networks.

SIRT, BHOPAL
SIRT, BHOPAL
SIRT, BHOPAL
SIRT, BHOPAL
EXPERIMENT NO. 9
%
Aim: Configure 802.11 WLAN.

The IEEE 802.11 standard provides wireless connectivity to computerized stations that
require rapid deployment, such as portable computers. The Medium Access Control (MAC)
sublayer in the standard includes two fundamental access methods: distributed coordination
function (DCF) and point coordination function (PCF). DCF utilizes the carrier sense
multiple access with collision avoidance (CSMA/CA) approach. DCF is implemented in all
stations in the wireless local area network (WLAN). PCF is based on polling to determine
the station that can transmit next. Stations in an infrastructure network optionally implement
the PCF access method. In addition to the physical CSMA/CA, DCF and PCF utilize a
virtual carrier-sense mechanism to determine the state of the medium. This virtual
mechanism is implemented by means of the network allocation vector (NAV), which
provides each station with a prediction
of future traffi c on the medium. Each station uses NAV as an indicator of time periods
during which transmission will not be initiated even if the station senses that the wireless
medium
is not busy. NAV gets the information about future traffi c from management frames and the
header of regular frames being exchanged in the network.
With DCF, every station senses the medium before transmitting. The transmitting station
defers as long as the medium is busy. After deferral and while the medium is idle, the
transmitting
station has to wait for a random backoff interval. After the backoff interval and if the
medium is still idle, the station initiates data transmission or optionally exchanges request to
send (RTS) and clear to send (CTS) frames with the receiving station. The effect of RTS and
CTS frames will be studied in the Mobile WLAN lab.
With PCF, the access point (AP) in the network acts as a point coordinator (PC). The PC
uses polling to determine which station can initiate data transmission. It is optional for the

SIRT, BHOPAL
=

EXPERIMENT NO. 10
%
Aim: Study of Application layer protocols-DNS, HTTP, HTTPS, FTP and TelNet.

SIRT, BHOPAL

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy