2022 LAB (Repaired)
2022 LAB (Repaired)
Planned Date of
S.NO. EXPERIMENT Date Conduction
1.
Study of Different Type of LAN&
Network Equipments.
4.
Write a program to implement various
types of error correcting techniques.
Theory
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.
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.
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.
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.
Point-to-point
Bus
Star
Ring or circular
Mesh
Tree
Hybrid
Daisy chain
EXPERIMENT NO. 3
Apparatus Required
Theory
Performance:
Perform the following steps as directed
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
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)
#include <math.h>
#include <stdio.h>
// 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;
}
c_l = p_n + n;
j = k = 0;
// 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
Implement the data link layer farming methods such as and bit stuffing.
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 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
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 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.
Content:
I. Install Linux
II. Install NS2
III. Set Environmental variables
IV. Validation
V. Run the First nam example
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
$ ./install
SIRT, BHOPAL
III.
SET ENVIRONMENTAL VARIABLES
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
$ source ~/.bashrc
Note: the previous step is important; else you cannot successfully run ns-2.
$ 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