Module 1 Networking

Published on May 2016 | Categories: Types, Instruction manuals | Downloads: 21 | Comments: 0 | Views: 169
of 57
Download PDF   Embed   Report

Comments

Content

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

BASIC COMMUNICATION MODEL
Communication is the conveyance of a message from one entity, called the source or
transmitter, to another, called the destination or receiver, via a channel of some sort. To give a
very basic example of such a communication system is conversation; people commonly exchange
verbal messages, with the channel consisting of waves of compressed air molecules at frequencies,
which are audible to the human ear. Another example is the exchange of voice signals between two
telephones over the same network
The only way that a message source can be certain that the destination properly received the
message is by some kind of acknowledgment response from the destination. Conversing people might
say "I understand" or nod their head in response to a statement made by their peer. This
acknowledged form of dialogue is the basis of reliable communications - somehow the source must
get feedback that the destination correctly received the message.

(Fig:1.1) Basic Communication Model

The key elements of a communication model are:
Source: This device generates the data to be transmitted; examples are telephones and personal
computers.
Transmitter: Usually, the data generated by a source system are not transmitted directly in the
form in which they were generated. Rather, a transmitter transforms and encodes the information in
such a way as to produce electromagnetic signals that can be transmitted across some sort of
transmission system. For example, a modem takes a digital bit stream from an attached device such as

Dept. of Computer Science And Applications, SJCET, Palai

Page 1

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

a personal computer and transforms that bit stream into an analog signal that can be handled by the
telephone network.
Transmission system: This can be a single transmission line connecting the two systems
communicating or a complex network to which numerous communicating systems are connected.
Receiver: The receiver accepts the signal from the transmission system and converts it into a form
that can be handled by the destination device. For example, a modem will accept an analog signal
coming from a network or transmission line and convert it into a digital bit stream.
Destination: Takes the incoming data from the receiver

(Fig:1.2) Simple Data Communication Model

COMMUNICATIONS MODEL TASKS
Some of the Key tasks to be performed by a Communications System are listed below:








Transmission System Utilization
Interfacing
Signal Generation
Synchronization
Exchange Management
Error detection and correction
Addressing and routing

Dept. of Computer Science And Applications, SJCET, Palai

Page 2

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

• Recovery
• Message formatting
• Security
TRANSMISSION SYSTEM UTILIZATION: refers to the need to make efficient use of transmission
facilities that are typically shared among a number of communicating devices. Various techniques
(referred to as multiplexing) are used to allocate the total capacity of a transmission medium among a
number of users.
INTERFACE:- A device must interface with the transmission system in order to communicate.
SIGNAL GENERATION: All the data that are transmitted over the transmitting system propagate as
Electromagnetic signals. Hence the communicating device must be able to generate and receive these
signals. Signal generation should be such that the resultant signal is capable of being propagated
through the transmission medium and interpretable as data at the receiver.
SYNCHRONIZATION: Unless the receiver and transmitter are in Synchronization the receiver will
not be able to make sense out of received signals. Receiver should know when the transmission of
data starts, when it ends.
EXCHANGE MANAGEMENT: For meaningful data transaction there should be some kind
management of data being exchanged. Both the transmitter and receiver should adhere to some
common convention about the format of data, amount of data that can be sent at a time and so
on. This requires a prior definition of message formatting.
ERROR DETECTION AND CORRECTION: In any communication system transmitted data is prone
to error. Either it is because of transmitted signal getting distorted in the transmission medium
leading to misinterpretation of signal or errors introduced by the intermediate devices. Error
detection and Correction is required in cases where there is no scope for error in the data
transaction. We can think of file transfer between two computers where there is a need for this. But
in some cases it may not be very important as in the case of telephonic conversation.
ADDRESSING AND ROUTING: When more than two devices share a transmission facility, a source
system must indicate the identity(or address) of the intended destination. The transmission system
must assure that the destination system, and only that system, receives the data. Further, the
transmission system may itself be a network through which various paths may be taken. A specific
route through this network must be chosen.
RECOVERY is a concept distinct from that of error correction. Recovery techniques are needed in
situations in which an information exchange, such as a database transaction or file transfer, is
interrupted due to a fault somewhere in the system. The objective is either to be able to resume
activity at the point of interruption or at least to restore the state of the systems involved to the
condition prior to the beginning of the exchange
Dept. of Computer Science And Applications, SJCET, Palai

Page 3

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

MESSAGE FORMATTING has to do with an agreement between two parties as to the form of the
data to be exchanged or transmitted, such as the binary code for characters.
SECURITY: It is important to provide some measure of security in a data communications system.
The sender of data may wish to be assured that only the intended receiver actually receives the data
and the receiver of data may wish to be assured that the received data have not been altered in
transit and that the data actually come from the purported sender
NETWORK MANAGEMENT: Data communications facility is a complex system that cannot create
or run itself. Network management capabilities are needed to configure the system, monitor its
status, react to failures and overloads, and plan intelligently for future growth.
DATA COMMUNICATION MODEL
Data Communication is a process of exchanging data or information between two devices via
some form of transmission medium such as a wire cable. The word data refers to any information
which is presented in a form that is agreed and accepted upon by its creators and users. For data
communication to occur, the communicating devices should be part of a communication system made
up of a combination of hardware and software. The hardware part involves the sender and receiver
devices and the intermediate devices through which the data passes. The software part involves
certain rules which specify what is to be communicated, how it is to be communicated and when. It is
also called as a Protocol.
The effectiveness of any data communications system depends upon the following four fundamental
characteristics:
DELIVERY: The data should be delivered to the correct destination and correct user.
ACCURACY: The communication system should deliver the data accurately, without introducing any
errors. The data may get corrupted during transmission affecting the accuracy of the delivered data.
TIMELINESS: Audio and Video data has to be delivered in a timely manner without any delay; such a
data delivery is called real time transmission of data.
JITTER: It is the variation in the packet arrival time. Uneven Jitter may affect the timeliness of data
being transmitted.
There may be different forms in which data may be represented. Some of the forms of data used in
communications are as follows:
 Text: Text includes combination of alphabets in small case as well as upper case. It is stored as a
pattern of bits. Prevalent encoding system : ASCII, Unicode
Dept. of Computer Science And Applications, SJCET, Palai

Page 4

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

 Numbers: Numbers include combination of digits from 0 to 9. It is stored as a pattern of bits.
Prevalent encoding system : ASCII, Unicode
 Images: In computers images are digitally stored. A Pixel is the smallest element of an image. To
put it in simple terms, a picture or image is a matrix of pixel elements. The pixels are represented
in the form of bits. Depending upon the type of image (black n white or color) each pixel would
require different number of bits to represent the value of a pixel. The size of an image depends
upon the number of pixels (also called resolution) and the bit pattern used to indicate the value of
each pixel.
Example: if an image is purely black and white (two color) each pixel can be represented by a
value either 0 or 1, so an image made up of 10 x 10 pixel elements would require only 100 bits in
memory to be stored. On the other hand an image that includes gray may require 2 bits to
represent every pixel value (00 - black, 01 – dark gray, 10 – light gray, 11 –white). So the same 10
x 10 pixel image would now require 200 bits of memory to be stored. Commonly used Image
formats : jpg, png, bmp, etc
 Audio: Data can also be in the form of sound which can be recorded and broadcasted. Example:
What we hear on the radio is data or information. Audio data is continuous, not discrete.
 Video: Video refers to broadcasting of data in form of picture or movie

DATA COMMUNICATION NETWORK
A communication network, in its simplest form, is a set of equipment and facilities that
provides a communication service: the transfer of information between users located at various
geographical points. Examples of such networks include telephone networks, computer networks,
television broadcast networks, cellular telephone networks, and the Internet. The ability of
communication network to transfer information at extremely high speeds allows users to gather
information in large volumes, nearly instantaneously and, with the aid of computers, to almost
immediately exercise action at a distance. These two unique capabilities form the basis for many
existing services and an unlimited number of future network-based services
In its simplest form, data communication takes place between two devices that are directly
connected by some form of point-to-point transmission medium. Often, however, it is impractical for
two devices to be directly, point-to-point connected. This is so for one (or both) of the following
contingencies:
• The devices are very far apart. It would be inordinately expensive, for example, to string a
dedicated link between two devices thousands of miles apart.

Dept. of Computer Science And Applications, SJCET, Palai

Page 5

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

• There is a set of devices, each of which may require a link to many of the others at various times.
Examples are all of the telephones in the world and all of the terminals and computers owned by
single organization. Except for the case of a very few devices, it is impractical to provide a
dedicated wire between each pair of devices.
The solution to this problem is to attach each device to a communications network like Wide Area
Network (WAN) or Local Area Network(LAN).

COMPUTER NETWORKS
A computer network is simply a collection of computers or other hardware devices that are
connected together, either physically or logically, using special hardware and software, to allow them
to exchange and share information. Networking is the term that describes the processes involved in
designing, implementing, upgrading, managing and otherwise working with networks and network
technologies. Three criteria necessary for an effective and efficient network are:
PERFORMANCE: Performance of the network depends on number of users, type of transmission
medium, the capabilities of the connected h/w and the efficiency of the s/w.
RELIABILITY: Reliability is measured by frequency of failure, the time it takes a link to recover from
the failure and the network‟s robustness in a catastrophe.
SECURITY: Network security issues include protecting data from unauthorized access, protecting
data from damage and development, and implementing policies and procedures for recovery from
breaches and data losses.

Dept. of Computer Science And Applications, SJCET, Palai

Page 6

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

CLASSIFICATION OF NETWORKS

Computers connected to a network are broadly categorized as servers or workstations.
Servers are generally not used by humans directly, but rather run continuously to provide
"services" to the other computers (and their human users) on the network. Services provided can
include printing and faxing, software hosting, file storage and sharing, messaging, data storage and
retrieval, complete access control (security) for the network's resources, and many others.
Workstations are called such because they typically do have a human user which interacts
with the network through them. Workstations were traditionally considered a desktop, consisting
of a computer, keyboard, display, and mouse, or a laptop, with integrated keyboard, display, and
touchpad. Every computer on a network should be appropriately configured for its use. Depending
upon the geographical area covered by a network, it is classified as:




Local Area Network (LAN)
Metropolitan Area Network (MAN)
Wide Area Network (WAN)

LOCAL AREA NETWORK
A Local Area Network (LAN) is a network that is confined to a relatively small area. It is
generally limited to a geographic area such as a writing lab, school, or building. LANs interconnect
computers and peripherals over a common medium in order that users might share access to host
computers, databases, files, applications, and peripherals. LANs in addition to linking the computer
equipment available in a particular premises can also provide a connection to other networks either
through a computer, which is attached to both networks, or through a, dedicated device called a
gateway. The main users of LANs include business organizations, research and development groups in
science and engineering, industry, educational institutions.
The most common use of LANs is for linking personal computers within a building or office to
share information and expensive peripheral devices such as laser printers. Most local area networks
are built with relatively inexpensive hardware such as Ethernet cables, network adapters, and hubs.
The defining characteristics of LANs, in contrast to WANs (wide area networks), include their higher
data transfer rates, smaller geographic range, and lack of a need for leased telecommunication lines
METROPOLITAN AREA NETWORK
The term Metropolitan Area Network (MAN) is typically used to describe a network that spans
a citywide area or a town. It is confined to a larger area than a LAN and can range from 10km to a
few 100km in length. MANs are larger than traditional LANs and predominantly use high-speed
media, such as fiber optic cable, for their backbones. MANs are common in organizations that need
to connect several smaller facilities together for information sharing. This is often the case for
hospitals that need to connect treatment facilities, outpatient facilities, doctor's offices, labs, and
research offices for access to centralized patient and treatment information
Dept. of Computer Science And Applications, SJCET, Palai

Page 7

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

WIDE AREA NETWORK
A Wide Area Network (WAN) covers a significantly larger geographic area than LANs
or MANs. WAN can range from 100krn to 1000krn and the speed between cities can vary from l.5
Mbps to 2.4 Gbps. Typically, a WAN consists of two or more local-area networks (LANs) or MANs.
They can connect networks across cities, states or even countries. Computers connected to a widearea network are often connected through public networks, such as the telephone system. They can
also be connected through leased lines or satellites.
Typically, a WAN consists of a number of interconnected switching nodes. Transmission from
any one device is routed through these internal nodes to the specified destination device. These
nodes (including the boundary nodes to which the devices are connected) are not concerned with
the content of the data; rather, their purpose is to provide a switching facility that will move the data
from node to node until they reach their destination. Traditionally, WANs have been implemented
using one of two technologies: circuit switching and packet switching. More recently, frame
relay and ATM networks have assumed major roles.
In Circuit Switching a dedicated communications channel is established between sender and
receiver for the duration of a given transmission. This works like a normal telephone line works for
voice communication. Packet switched Networks use a networking technology that breaks up a
message into smaller packets where each packet carries the destination address and a sequence
number. Here no dedicated line is being provided for data transmission. So packets may travel
different routes to the destination and they may reach out of sequence or experience different types
of delays.
Frame Relay was developed at a time when digital long-distance transmission facilities exhibited
a relatively high error rate compared to today's facilities. As a result, there is a considerable amount
of overhead built into packet-switched schemes to compensate for errors. The overhead includes
additional bits added to each packet to introduce redundancy and additional processing at the end
stations and the intermediate switching nodes to detect and recover from errors. But with modern
high-speed telecommunication systems, the rate of errors has been dramatically lowered. Frame relay
was developed to take advantage of these high data rates and low error rates. Frame relay puts data
in a variable-size unit called a frame and leaves any necessary error correction (retransmission of
data) up to the end-points, which speeds up overall data transmission.
Asynchronous Transfer Mode (ATM), sometimes referred to as cell relay, is a culmination
of all of the developments in circuit switching and packet switching over the past 25 years. ATM can
be viewed as an evolution from frame relay. The most obvious difference between frame relay and
ATM is that frame relay uses variable-length packets, called frames, and ATM uses fixed-length
packets, called cells. As with frame relay, ATM provides little overhead for error control, depending
on the inherent reliability of the transmission system and on higher layers of logic in the end systems
to catch and correct errors. By using a fixed-packet length, the processing overhead is reduced even

Dept. of Computer Science And Applications, SJCET, Palai

Page 8

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

THE INTERNET
Internet is evolved from the ARPANET, which was developed in 1969 by the Advanced
Research Projects Agency (ARPA) of the U.S. Department of Defense. It was the first operational
packet-switching network whose main aim was to connect stand-alone research computers. It was
the first operational packet-switching network whose main aim was to connect stand-alone research
computers. The Internet is an example of a network that connects many WANs, MANs, and LANs
into the world's largest global network. Internet Service Providers (ISPs) are responsible for
maintaining the integrity of the Internet while providing connectivity between WANs, MANs, and
LANs throughout the world. ISPs provide customers with access to the Internet through the use of
points-of-presence (POP), also called network access points (NAP), in cities throughout the world.
Customers are provisioned access to POPs from their own WANs, MANs, and LANs to Internet
access to their users.
PROTOCOLS
In computer networks, communication occurs between entities in different systems. An entity is
anything capable of sending or receiving information. However, two entities cannot simply send bit
streams to each other and expect to be understood. For communication to occur, the entities must
agree on a protocol. A protocol is a set of rules that govern data communications. A protocol defines
what is communicated, how it is communicated, and when it is communicated. The key elements of a
protocol are syntax, semantics, and timing.
SYNTAX :
The term syntax refers to the structure or format of the data, meaning the order in which they are
presented. For example, a simple protocol might expect the first 8 bits of data to be the address of
the sender, the second 8 bits to be the address of the receiver, and the rest of the stream to be the
message itself.
SEMANTICS:
The word semantics refers to the meaning of each section of bits. How is a particular
pattern to be interpreted, and what action is to be taken based on that interpretation? For example,
does an address identify the route to be taken or the final destination of the message?
TIMING:
The term timing refers to two characteristics: when data should be sent and how fast they can be
sent. For example, if a sender produces data at 100 Mbps but the receiver can process data at only 1
Mbps, the transmission will overload the receiver and some data will be lost.

Dept. of Computer Science And Applications, SJCET, Palai

Page 9

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

NEED FOR PROTOCOL ARCHITECTURE
A computer network must provide general, cost effective, fair, and robust connectivity among a
large number of computers. Networks must also evolve to accommodate changes in both the
underlying technologies upon which they are based as well as changes in the demands placed on them
by application programs.
When computers, terminals, and/or other data processing devices exchange data, the procedures
involved can be quite complex. Consider, for example, the transfer of a file between two computers.
There must be a data path between the two computers either directly or via a communication
network
Typical tasks to be performed are as follow:


The source system must either activate the direct data communication path or inform the
communication network of the identity of the desired destination system.



The source system must ascertain that the destination system is prepared to receive data.



The file transfer application on the source system must ascertain that the file management
program on the destination system is prepared to accept and store the file for this particular
user.



If the file formats used on the two systems are different, one or the other system must
perform a format translation function.

It is clear that there must be a high degree of cooperation between the two computer
systems. Instead of implementing the logic for this as a single module, the task is broken up into
subtasks, each of which is implemented separately. In protocol architecture, the modules are
arranged in a vertical stack. Each layer in the stack performs a related subset of the functions
required to communicate with another system. It relies on the next lower layer to perform more
primitive functions and to conceal the details of those functions. Ideally, layers should be defined so
that changes in one layer do not require changes in other layers. A logical communication may exist
between any two computers through the layers of the same “level”. Layer-n on one computer may
converse with layer-n on another computer. There are rules and conventions used in the
communication at any given layers, which are known collectively as the layer-n protocol for the nth
layer.
The architecture is considered scalable if it is able to accommodate a number of layers in
either large or small scales. For example, a computer that runs an Internet application may require all
of the layers that were defined for the architectural model. The depth and functionality of this stack
differs from network to network. However, regardless of the differences among all networks, the

Dept. of Computer Science And Applications, SJCET, Palai

Page 10

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

purpose of each layer is to provide certain services (job responsibilities) to the layer above it,
shielding the upper layers from the intricate details of how the services offered are implemented.

Data are not directly transferred from layer-n on one computer to layer-n on another
computer. Rather, each layer passes data and control information to the layer directly below until the
lowest layer is reached. Below layer-1 (the bottom layer), is the physical medium (the hardware)
through which the actual transaction takes place. Logical communication is shown by a broken-line
arrow and physical communication by a solid-line arrow.

Between every pair of adjacent layers is an interface. The interface is a specification that
determines how the data should be passed between the layers. ]t defines what primitive operations
and services the lower layer should offer to the upper layer. One of the most important
considerations when designing a network is to design clean-cut interfaces between the layers. To
create such an interface between the layers would require each layer to perform a specific collection
of well understood functions. A clean-cut interface makes it easier to replace the implementation of
one layer with another implementation because all that is required of the new implementation is that,
it offers, exactly the same set of services to its neighboring layer above as the old implementation did.
A protocol architecture is the layered structure of hardware and software that supports the
exchange of data between systems. At each layer of a protocol architecture, one or more common
protocols are implemented in communicating systems. Each protocol provides a set of rules for the
exchange of data between systems. It acts as a blue print that guides the design and implementation
of networks and there by enables to divide the workload and to simplify the systems design. The
Dept. of Computer Science And Applications, SJCET, Palai

Page 11

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

specification of architecture must contain enough information to allow an implementer to write the
program or build the hardware for each layer so that it will correctly obey the appropriate protocol.
Neither the details of the implementation nor the specification of the interfaces is part of the
architecture because these are hidden away inside the machines and not visible from the outside.
THE OSI REFERENCE MODEL
This model is based on a proposal developed by the International Standards Organization
(ISO) as a first step toward international standardization of the protocols used in the various layers.
It was revised in 1995. The Open Systems Interconnection (OS1) reference model describes how
information from a software application in one computer moves through a network medium to a
software application in another computer. The OSI reference model is a conceptual model composed
of seven layers each specifying particular network functions and into these layers are fitted the
protocol standards developed by the ISO and other standards bodies. The principles that were
applied to arrive at the 7 layers can be summarized as follows:


A layer should be created only when an additional level of abstraction is required.



Each layer should perform a well-defined function.



The function of each layer should be chosen with the goal of defining internationally
standardized protocols.



The number of layers should be large enough to enable distinct functions to be separated, but
few enough to keep the architecture from becoming unwieldy.

The OSI model divides the tasks involved with moving information between networked
computers into seven smaller, more manageable task groups. A task or group of tasks is then
assigned to each of the seven OSI layers. Each layer is reasonably self-contained so that the tasks
assigned to each layer can be implemented independently. This enables the solutions offered by one
layer to be updated without affecting the other layers. The seven layers of OSI model are:
• Application
• Presentation
• Session
• Transport
• Network
• Data link
• Physical

Dept. of Computer Science And Applications, SJCET, Palai

Page 12

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

Although, each layer of the OSI model provides its own set of functions, it is possible to
group the layers into two distinct categories. The first four layers i.e., physical, data link, network, and
transport layer provide the end-to-end services necessary for the transfer of data between two
systems. These layers specify the protocols associated with the communications network used to link
two computers together. Together, these are communication oriented. The top three layers i.e., the
application, presentation, and session layers provide the application services required for the
exchange of information. That is, they allow two applications, each running on a different node of the
network to interact with each other through the services provided by their respective operating
systems. Together, these are data processing oriented.

A message begins at the top application layer and moves down the OSI layers to the
bottom physical layer. As the message descends, each successive OSI model layer adds a header to it.
A header is layer-specific information that basically explains what functions the layer carried out.
When formatted data passes through physical layer it is transformed into appropriate signals and
transmitted. Upon reaching destination signal is transformed back into digital format. Data then
moves up back through the layers and at each layer the headers and trailers are stripped off and the
actions appropriate to that layer are taken. When data reaches top layer it is in a form appropriate to
application and is made available to the recipient. On every sending device, each layer calls upon the
service offered by the layer below it. On every receiving device, each layer calls upon the service
offered by the layer above it.

Dept. of Computer Science And Applications, SJCET, Palai

Page 13

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

PHYSICAL LAYER
The data units on this layer are called bits. This layer defines the mechanical and electrical
definition of the network medium (cable) and network hardware. The physical layer is responsible for
passing bits onto and receiving them from the connecting medium. This layer gives the data-link layer
(layer 2) its ability to transport a stream of serial data bits between two communicating systems; it
conveys the bit that moves along the cable. It is responsible for ensuring that the raw bits get from
one place to another, no matter what shape they are in, and deals with the mechanical and electrical
characteristics of the cable.
The main network device found the Physical layer is a repeater. The purpose of a
repeater (as the name suggests) is simply to receive the digital signal, reform it, and retransmit the
signal. This has the effect of increasing the maximum length of a network, which would not be
possible due to signal deterioration if, a repeater were not available. Each layer, with the exception of
the physical layer, adds information to the data as it travels from the Application layer down to the
physical layer. This extra information is called a header. The physical layer does not append a header
to information because it is concerned with sending and receiving information on the individual bit
level.
The physical layer is also concerned with the following:
REPRESENTATION OF BITS: The physical layer is concerned with transmission of signals from one
device to another which involves converting data (1„s & 0„s) into signals and vice versa. It is not
concerned with the meaning or interpretation of bits.
DATA RATE: The physical layer defines the data transmission rate i.e. number of bits sent per
second. It is the responsibility of the physical layer to maintain the defined data rate.
SYNCHRONIZATION OF BITS: To interpret correct and accurate data the sender and receiver
have to maintain the same bit rate and also have synchronized clocks.
PHYSICAL TOPOLOGY: The physical layer defines the type of topology in which the device is
connected to the network. In a mesh topology it uses a multipoint connection and other topologies it
uses a point to point connection to send data.
TRANSMISSION MODE: The physical layer defines the direction of data transfer between the sender
and receiver. Two devices can transfer the data in simplex, half duplex or full duplex mode
On the sender side, the physical layer receives the data from Data Link Layer and encodes it into
signals to be transmitted onto the medium. On the receiver side, the physical layer receives the
signals from the transmission medium decodes it back into data and sends it to the Data Link Layer

Dept. of Computer Science And Applications, SJCET, Palai

Page 14

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

DATA LINK LAYER
The data link layer is concerned with the reliable transfer of data over the communication
channel provided by the physical layer. To do this, the data link layer breaks the data into data
frames, transmits the frames sequentially over the channel, and checks for transmission errors by
requiring the receiving end to send back acknowledgment frames. Responsibilities of the data link
layer include the following:
FRAMING: On the sender side, the Data Link layer receives the data from Network Layer and
divides the stream of bits into fixed size manageable units called as Frames and sends it to the physical
layer. On the receiver side, the data link layer receives the stream of bits from the physical layer and
regroups them into frames and sends them to the Network layer.
PHYSICAL ADDRESSING: The Data link layer appends the physical address in the header of the
frame before sending it to physical layer. The physical address contains the address of the sender and
receiver. In case the receiver happens to be on the same physical network as the sender; the receiver
is at only one hop from the sender and the receiver address contains the receiver„s physical address.
In case the receiver is not directly connected to the sender, the physical address is the address of the
next node where the data is supposed to be delivered.
FLOW CONTROL: The data link layer makes sure that the sender sends the data at a speed at
which the receiver can receive it else if there is an overflow at the receiver side the data will be lost.
The data link layer imposes flow control mechanism over the sender and receiver to avoid
overwhelming of the receiver.
ERROR CONTROL: The data link layer imposes error control mechanism to identify lost or
damaged frames, duplicate frames and then retransmit them. This is achieved by specifying error
control information is present in the trailer of a frame.

Dept. of Computer Science And Applications, SJCET, Palai

Page 15

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

NETWORK LAYER
The network layer is concerned with the routing of data across the network from one end to
another. To do this, the network layer converts the data into packets and ensures that the packets
are delivered to their final destination, where they can be converted back into the original data. In
order to route the data through multiple networks, network layer relies on two things: Logical
Addressing & Routing
LOGICAL ADDRESSING: The network layer uses logical address commonly known as IP address to
recognize devices on the network. The header appended by the network layer contains the actual
sender and receiver IP address. The network layer of intermediate nodes checks for a match of IP
address in the header. If no match is found the packet passes to the data link layer and it is forwarded
to next node

ROUTING: The network layer divides data into units called packets of equal size and bears a
sequence number for rearranging on the receiving end. Each packet is independent of the other and
may travel using different routes to reach the receiver hence may arrive out of turn at the receiver.
Hence every intermediate node which encounters a packet tries to compute the best possible path
for the packet. The best possible path may depend on several factors such as congestion, number of
hops, etc. This process of finding the best path is called as Routing. It is done using routing
algorithms.
When a packet has to travel from one network to another to get to its destination, many
problems can arise. The addressing used by the second network may be different from the first one.
The second one may not accept the packet at all because it is too large. The protocols may differ,
Dept. of Computer Science And Applications, SJCET, Palai

Page 16

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

and so on. It is up to the network layer to overcome all these problems to allow heterogeneous
networks to be interconnected.

TRANSPORT LAYER
The aim of the transport layer is to isolate the upper three layers from the network, so
that any changes to the network equipment technology will be confined to the lower three layers. It
provides a network independent, reliable message interchange service to the top three applicationoriented layers. This layer acts as an interface between the bottom and top three layers. The lower
data link layer (layer 2) is only responsible for delivering packets from one node to another, where as
the transport layer is responsible for overall end-to-end validity and integrity of the transmission i.e.,
it ensures that data is successfully sent and received between two computers. A logical address at
network layer facilitates the transmission of data from source to destination device. But the source
and the destination both may be having multiple processes communicating with each other. To
ensure process to process delivery the transport layer makes use of port address (also known as
Service Point Address) to identify the data from the sending and receiving process.

At the sending side, the transport layer receives data from the session layer, divides it into units
called segments with a sequence number. These numbers enable the transport layer to reassemble
the message correctly upon arriving at the destination. At the receiving side, the transport layer
receives packets from the network layer, converts and arranges into proper sequence of segments
and sends it to the session layer.
Dept. of Computer Science And Applications, SJCET, Palai

Page 17

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

The transport layer also carries out flow control and error control functions; but unlike data link
layer these are end to end rather than node to node. The data can be transported in a connection
oriented or connectionless manner. In connection oriented transmission, the receiving devices sends
an acknowledgement back to the source after a packet or group of packet is received. It is slower
transmission method. In Connectionless Transmission the receiving devices does not sends an
acknowledgement back to the source. It is faster transmission method.
SESSION LAYER
Session layer has the responsibility of beginning, maintaining and ending the communication
between two devices, called session. It establishes a session between the communicating devices
called dialog and synchronizes their interaction. The session layer at the sending side accepts data
from the presentation layer adds checkpoints to it called syn bits to allow for fast recovery in the
event of a connection failure. The checkpoints or synchronization points is a way of informing the
status of the data transfer. At the receiving end the session layer receives data from the transport
layer removes the checkpoints inserted previously and passes the data to the presentation layer.

PRESENTATION LAYER
Unlike lower layers, which are mostly concerned with moving bits around, the presentation layer
is concerned with the syntax and semantics of the information transmitted. It is also called syntax
layer The main services provided by presentation layer are: Translation, Compression and
Encryption.
TRANSLATION: The sending and receiving devices may run on different platforms (hardware,
software and operating system). Hence it is important that they understand the messages that are
used for communicating. Presentation layer provides a translation service which converts the
message into a common format supported by both sender and receiver.

Dept. of Computer Science And Applications, SJCET, Palai

Page 18

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

COMPRESSION: Data compression reduces the number of bits contained in the information and
there by ensures faster data transfer. The data compressed at sender has to be decompressed at the
receiving end, both performed by the Presentation layer.
ENCRYPTION: It is the process of transforming the original message to change its meaning before
sending it. The reverse process called decryption has to be performed at the receiving end to
recover the original message from the encrypted message. The encryption and decryption services
which ensures privacy of sensitive data
The presentation layer at sending side receives the data from the application layer adds
header which contains information related to encryption and compression and sends it to the session
layer. At the receiving side, the presentation layer receives data from the session layer decompresses
and decrypts the data as required and translates it back as per the encoding scheme used at the
receiver.

APPLICATION LAYER
The application layer is concerned with the semantics of data, i.e., what the data means to
applications. It provides an interface for the end user operating a device connected to a network.
This layer is what the user sees, in terms of loading an application (such as Web browser or e-mail);
that is, this application layer is the data the user views while using these applications. The application
layer provides standards for supporting a variety of application-independent services. In other words
application layer provides a variety of protocols that are commonly needed by users. One widely
used application protocol is HTTP (Hyper Text Transfer Protocol), which is the basis for the World
Wide Web. When a browser wants a Web page, it sends the name of the page it wants to the server
using HTTP. The server then sends the page back. Some of the functionalities provided by
application layer are:






File access and transfer: It allows a use to access, download or upload files from/to a
remote host.
Mail services: It allows the users to use the mail services.
Remote login: It allows logging into a host which is remote
World Wide Web (WWW): Accessing the Web pages is also a part of this layer

Dept. of Computer Science And Applications, SJCET, Palai

Page 19

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

TCP/IP REFERENCE MODEL
TCP/IP originated out of the investigative research into networking protocols that the US
Department of Defense (DoD) initiated in 1969. In 1968, the DoD Advanced Research Projects
Agency (ARPA) began researching the network technology that is called packet switching.
The original focus of this research was to develop a network that is able to survive loss of subnet
hardware, with existing conversations not being broken off. In other words, DoD wanted
connections to remain intact as long as the source and destination nodes were functioning, even if
some of the machines or transmission lines in between were suddenly put out of operation. The
network that was initially constructed as a result of this research was meant to provide a
communication that could function in wartime, then called ARPANET, gradually became known as
the Internet. The TCP/IP protocols played an important role in the development of the Internet. In
the early 1980s, the TCP/IP protocols were developed. In 1983, they became standard protocols for
ARPANET. The protocols within the TCP/IP Suite have been tested, modified, and improved over
time. Because of the history of the TCP/IP protocol suite, it's often referred to as the DoD
protocol suite or the Internet protocol suite.
TCP/IP Reference Model is named from two of the most important protocols in it
The Transmission Control Protocol (TCP) and the Internet Protocol (IP).TCP handles reliable
delivery for messages of arbitrary size, and defines a robust delivery mechanism for all kinds of data
across a network and IP manages the routing of network transmissions from sender to receiver,
along with issues related to network and computer addresses.Some of TCP/IP Ref Model goals are:




To support multiple, packet-switched pathways through the network so that transmissions
can survive all conceivable failures
To permit dissimilar computer systems to easily exchange data
To offer robust, reliable delivery services for both short- and long-distance communications

The TCP/IP model follows a layered architecture very similar to the OSI reference model. Based
on the protocol standards that have been developed, we can organize the communication task for
TCP/IP into four relatively independent layers:





Application layer
Transport layer
Internet layer
Network access layer

NETWORK ACCESS LAYER
This is the lowest layer of the TCP/IP Reference Model, responsible for placing TCP/IP
packets on the network medium and receiving TCP/IP packets of the network medium. TCP/IP was
designed to be independent of the network access method, frame format, and medium. In this way,
Dept. of Computer Science And Applications, SJCET, Palai

Page 20

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

TCP/IP can be used to connect differing network types. The Network Interface Layer encompasses
the Data Link and Physical layers of the OSI Model. Within the TCP/IP protocol suit the network
access layer is commonly viewed as a single layer with two sub layers: The Media Access Control (MAC)
Sub layer and The Physical Sub layer. The MAC sub layer prepares data for transmission and obtains
access to the transmission medium in shared access systems. The Physical sub layer encodes data and
transmits it over the physical network media. It operates with data in the form of bits transmitted
over a variety of electrical and optical cables, as well as radio frequencies. The responsibilities of this
layer include:
 Formatting the data into a unit called a frame and converting that frame into the stream of
electric or analog pulses that passes across the transmission medium.
 Checking for errors in incoming frames.
 Adding error-checking information to outgoing frames so that the receiving computer can check
the frame for errors.
 Acknowledging receipt of data frames and resending frames if acknowledgment is not received.
Network Access Layer protocols must know the details of the underlying network (its packet
structure, addressing, etc.) to correctly format the data being transmitted to comply with the
network constraints. The core protocols are:
PPP(Point to Point Protocol): commonly used to establish a direct physical connection between
two nodes and facilitates the transmission of data packets. PPP is used over many types of physical
networks including serial cable, phone line, specialized radio links, and fiber optic links
SLIP(Serial Line Interface Protocol):Older, simpler serial line protocol that only supports TCP/IPbased communications. Its main functionality is framing of data for transmission
INTERNET LAYER
The internet layer provides services that are roughly equivalent to the OSI Network layer. The
primary concern of the protocol at this layer is to manage the connections across networks as
information is passed from source to destination. It is at this layer logical addressing, packetization of
data and routing are handled. The various functions provided by Internet layer are:


Translation between logical addresses and physical addresses



Routing from the source to the destination computer



Managing traffic problems, such as switching, routing, and controlling the congestion of data
packets

Dept. of Computer Science And Applications, SJCET, Palai

Page 21

MODULE I



MCA-402 Computer Networks

ADMN 2011-‘14

Maintaining the quality of service requested by the transport layer

The primary protocols that function at the TCP/IP Internet layer are:
Internet Protocol(IP): connectionless protocol that is primarily responsible for addressing and
routing packets between network devices. It is unreliable because packet delivery is not guaranteed
and also the sender or receiver is not informed when a packet is lost or out of sequence. IP is also
responsible for fragmenting and reassembling packets
Address Resolution Protocol (ARP): Network devices must know each other‟s hardware address in
order to communicate on a network. Address resolution is the process of mapping a host‟s IP
address to its hardware address. The Address Resolution Protocol (ARP) is responsible for obtaining
hardware addresses of TCP/IP devices on networks. The source will broadcast an ARP request
containing destination IP address to find the intended destination‟s MAC address. Only the
destination device will respond to the ARP request
Internet Control Message Protocol(ICMP): provides a set of error and control messages to help
track and resolve network problems. ICMP is used to send a “destination unreachable” message
when there is an error somewhere in the network that is preventing the frame or packet from being
forwarded to the destination device. It includes a type of message, called an Echo Request, which can
be sent from one host to another to see if it is reachable on the network. If it is reachable, the
destination host will reply with the ICMP Echo Reply message.
TRANSPORT LAYER
It is designed to allow peer entities on the source and destination hosts to carry on a
conversation, just as in the OSI transport layer. From Application to Transport Layer, the application
delivers its data to the communications system by passing a Stream of data bytes to the transport
layer along with the socket of the destination machine. Its functions include:
 Sequencing and Transmission of packets
 Acknowledgment of receipts
 Error control
 Flow control
The transport layer is implemented by mainly two protocols: Transmission Control Protocol(TCP )
and the User Datagram Protocol (UDP).
TCP: TCP provides a one-to-one, connection-oriented, reliable communications service. TCP is
responsible for the establishment of a TCP connection, the sequencing and acknowledgment of
packets sent, and the recovery of packets lost during transmission. TCP is Slower compared to UDP

Dept. of Computer Science And Applications, SJCET, Palai

Page 22

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

because of additional error checking being performed. It also adds features such as flow control,
sequencing, error detection and correction
UDP: UDP provides a one-to-one or one-to-many, connectionless, unreliable communications
service. UDP is used when the amount of data to be transferred is small (such as the data that would
fit into a single packet), when the overhead of establishing a TCP connection is not desired, or when
the applications or upper layer protocols provide reliable delivery.It is commonly used in Video and
Audio Casting.
APPLICATION LAYER
The top layer of the protocol stack is the application layer. The Application Layer is equivalent to
the top three layers, (Application, Presentation and Session Layers), in the OSI model. It refers to the
programs that initiate communication in the first place. TCP/IP includes several application layer
protocols for mail, file transfer, remote access, authentication and name resolution. These protocols
are embodied in programs that operate at the top layer just as any custom made or packaged
client/server application would.
The most widely known Application Layer protocols are those used for the exchange of user
information, some of them are:


The HyperText Transfer Protocol (HTTP) is used to transfer files that make up the Web
pages of the World Wide Web.



The File Transfer Protocol (FTP) is used for interactive file transfer.



The Simple Mail Transfer Protocol (SMTP) is used for the transfer of mail messages and
attachments.



Telnet, is a terminal emulation protocol, and, is used for remote login to network hosts.

The process by which a TCP/IP host sends data can be viewed as a five-step process:
Step 1 Create and encapsulate the application data with any required application layer headers.
Step 2 Encapsulate the data supplied by the application layer inside a transport layer header. For enduser applications, a TCP or UDP header is typically used.
Step 3 Encapsulate the data supplied by the transport layer inside an Internet layer (IP) header. IP
defines the IP addresses that uniquely identify each computer.
Step 4 Encapsulate the data supplied by the Internet layer inside a data link layer header and trailer.
This is the only layer that uses both a header and a trailer. The physical layer encodes a signal onto
the medium to transmit the frame.
Dept. of Computer Science And Applications, SJCET, Palai

Page 23

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

COMPARISON OF THE OSI AND TCP/IP REF. MODELS

The OSI and TCP/IP reference models have much in common. Both are based on the
concept of a stack of independent protocols. Also, the functionality of the layers is roughly similar.
For example, in both models the layers up through and including the transport layer are there to
provide an end-to-end, network-independent transport service to processes wishing to
communicate. These layers form the transport provider. Again in both models, the layers above
transport are application-oriented users of the transport service.
Despite these fundamental similarities, the two models also have many differences. Three
concepts are central to the OSI model: Services, Interfaces and Protocols. Probably the biggest
contribution of the OSI model is to make the distinction between these three concepts explicit. Each
layer performs some services for the layer above it. The service definition tells what the layer does,
not how entities above it access it or how the layer works. It defines the layer's semantics. A layer's
interface tells the processes above it how to access it. It specifies what the parameters are and what
results to expect. The peer protocols used in a layer are the layer's own business. It can use any
protocols it wants to, as long as it gets the job done (i.e., provides the offered services). It can also
change them at will without affecting software in. higher layers. The TCP/IP model did not originally
clearly distinguish between service, interface, and protocol, For example, the only real services
offered by the internet layer are As a consequence, the protocols in the OSI model are better hidden
than in the TCP/IP model and can be replaced relatively easily as the technology changes.
The OSI reference model was devised before the corresponding protocols were
invented. This ordering means that the model was not biased toward one particular set of protocols,
a fact that made it quite general. The downside of this ordering is that the designers did not have
much experience with the subject and did not have a good idea of which functionality to put in which
layer. With TCP/IP the reverse was true: the protocols came first, and the model was really just a
description of the existing protocols. There was no problem with the protocols fitting the model.
They fit perfectly
Turning from philosophical matters to more specific ones, an obvious difference between
the two models is the number of layers: the OSI model has seven layers and the TCP/IP has four
layers. Both have (inter) network, transport, and application layers, but the other layers are different.
Another difference is in the area of connectionless versus connection oriented
communication. The OSI model supports both connectionless and connection oriented
communication in the network layer, but only connection-oriented communication in the transport
layer, where it counts (because-the transport service is visible to the users). The TCP/IP model has
only one mode in the network layer (connection less) but supports both modes in the transport
layer, giving the users a choice

Dept. of Computer Science And Applications, SJCET, Palai

Page 24

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

A CRITIQUE OF THE OSI MODEL AND PROTOCOLS
Neither the OSI model and its protocols nor the TCP/IP model and its protocols are perfect.
OSI model and its protocols did not take over the world and push everything else out of their way
because of:





Bad timing
Bad technology
Bad implementations
Bad policies

BAD TIMING
The time at which a standard is established is absolutely critical to its success. David Clark from
the MIT has developed the following theory regarding publishing a standard at the right time.

As shown in the figure, in the life cycle of a standard, there are 2 principal peaks of
activity: the research carried out in the field covered by the standard, and the industrial investments
for the implementation and deployment of the standard. These two peaks are separated by a off-peak
of activity that actually appears to be the ideal moment for the publication of the standard
When the subject is first discovered, there is a burst of research activity in the form of
discussions, papers, and meetings. After a while this activity subsides, corporations discover the
subject, and the billion-dollar wave of investment hits. It is essential that the standards be written in
the trough in between the two "peaks”. If the standards are written too early, before the research is
finished, the subject may still be poorly understood; the result is bad standards. If they are written
too late, so many companies may have already made major investments in different ways of doing
things that the standards are effectively ignored. If the interval between the two curves is very short
(because everyone is in a hurry to get started), the people developing the standards may get crushed

Dept. of Computer Science And Applications, SJCET, Palai

Page 25

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

It now appears that the standard OSI protocols got crushed. The competing TCP/IP
protocols were already in widespread use by research universities by the time the OSI protocols
appeared. While the billion-dollar wave of investment had not yet hit, the academic market was large
enough that many vendors had begun cautiously offering TCP/IP products. When OSI came around,
they did not want to support a second protocol stack until they were forced to, so there were no
initial offerings. With every company waiting for every other company to go first, no company went
first and OSI never happened.
BAD TECHNOLOGY
The second reason that OSI never caught on is that both the model and the protocols
are flawed. The choice of seven layers was more political than technical, and two of the layers
(session and presentation) are nearly empty, whereas two other ones (data link and network) are
overfull. The OSI model, along with the associated service definitions and protocols, is extraordinarily
complex. They are also difficult to implement and inefficient in operation. In addition to being
incomprehensible, another problem with OSI is that some functions, such .as addressing, flow
control, and error control, reappear again and again in each layer.
BAD IMPLEMENTATIONS
Given the enormous complexity of the model and the protocols, it will come as no
surprise that the initial implementations were huge, unwieldy, and slow. It did not take long for
people to associate "OSI" with "poor quality." Although the products improved in the course of time,
the image stuck. In contrast, one of the first implementations of TCP/IP was quite good (not to
mention, free). People began using it quickly, which led to a large user community, which led to
improvements, which led to an even larger community.
BAD POLICIES
On account of the initial implementation, many people, especially in academia, thought of
TCP/IP as part of UNIX.OSI, on the other hand, was widely thought to be the creature of the
European telecommunication ministries, the European Community, and later the U.S. Government.
This belief was only partly true, but the very idea of a bunch of government bureaucrats trying to
shove a technically inferior standard down the throats of the poor researchers and programmers
down in the trenches actually developing computer networks did not help much.
CRITIQUE OF THE TCP/IP REFERENCE MODEL
The TCPI/IP model and protocols have their problems too. First, the model does not
clearly distinguish the concepts of service, interface, and protocol. Good software engineering
practice requires differentiating between the specification and the implementation, something that
OSI does very carefully, and TCPI/IP does not. Consequently, the TCPI/IP model is not much of a
guide for designing new networks using new technologies.
Dept. of Computer Science And Applications, SJCET, Palai

Page 26

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

Second, the TCPI/IP model is not at all general and is poorly suited to describing any
protocol stack other than TCPI/IP. Third, the TCP/IP model does not distinguish (or even mention)
the physical and data link layers. These are completely different. The physical layer has to do with the
transmission characteristics of copper wire, fiber optics, and wireless communication. The data link
layer's job is to delimit the start and end of frames and get them from one side to the other with the
desired degree of reliability. A proper model should include both as separate layers. The TCP/IP
model does not do this.
Finally, although the IP and TCP protocols were carefully thought out and well
implemented, many of the other protocols were ad hoc, generally produced by a couple of graduate
students hacking away until they got tired. The protocol implementations were then distributed free,
which resulted in their becoming widely used, deeply entrenched, and thus hard to replace.
NOVEL NETWARE
Novell NetWare is the most popular network system in the PC world. It provides transparent
remote file access and numerous other distributed network services, including printer sharing and
support for various applications such as electronic mail transfer. NetWare was developed by Novell,
Inc., and introduced in the early 1980s.It was derived from Xerox Network Systems (XNS), which
was created by Xerox Corporation in the late 1970s.NetWare runs on virtually any kind of
computer system, from PCs to mainframes
Novell Networks are based on the client/server model in which at least one computer functions
as a network file server, which runs all of the NetWare protocols and maintains the networks shared
data on one or more disk drives. File servers generally allow users on other PC‟s to access
application software or data files i.e., it provides services to other network computers called clients.
NOVEL NETWARE PROTOCOL SUITE
Novell provides a suite of protocols developed specifically for NetWare. The five main protocols
used by NetWare are:


Media Access Protocol.



Internetwork Packet Exchange/Sequenced Packet Exchange (IPX/SPX).



Routing Information Protocol (RIP).



Service Advertising Protocol (SAP).



NetWare Core Protocol (NCP).

These protocols wh It defines the connection control and service request encoding that
make it possible for clients and servers to interact.

Dept. of Computer Science And Applications, SJCET, Palai

Page 27

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

This is the protocol that provides transport and session services.
NetWare security is also provided within this protocol. ich are associated with Novel Network
follows an enveloping pattern. More specifically, the upper-lever protocols (NCP, SAP, and RIP) are
enveloped by IPX/SPX.A Media Access Protocol header and trailer then envelop IPX/SPX. . The
following figure shows a Comparison between NetWare and OSI reference models
Media Access Protocols: The NetWare suite of protocols supports several media-access protocols,
including Ethernet/IEEE 802.3, Token Ring/IEEE 802.5, Fiber Distributed Data Interface (FDDI), and
Point-to-Point Protocol (PPP)
IPX(Internetwork Packet Exchange protocol):Routing and networking protocol at Network layer.
When a device to be communicated with is located on a different network, IPX routes the
information to the destination through any intermediate networks. It datagram-based, connectionless,
unreliable protocol that is equivalent to the IP
SPX(Sequenced Packet Exchange protocol): Control protocol at the transport layer (layer 3) for
reliable, connection-oriented datagram transmission. SPX is similar to TCP in the TCP/IP suite.
Routing Information Protocol (RIP): Facilitate the exchange of routing information on a NetWare
network. In RIP, an extra field of data was added to the packet to improve the decision criteria for
selecting the fastest route to a destination
Service Advertisement Protocol (SAP): It is an IPX protocol through which network resources,
such as file servers and print servers, advertise their addresses and the services they provide.
Advertisements are sent via SAP every 60 seconds. This SAP packet contains information regarding
the servers which provide services. Using these SAP packets, clients on the network are able to
obtain the internetwork address of any servers they can access
NetWare Core Protocol (NCP): It defines the connection control and service request encoding that
make it possible for clients and servers to interact. This is the protocol that provides transport and
session services. NetWare security is also provided within this protocol.

DATA LINK LAYER
In data communication, physical layer deals with transmission of signals over different
transmission medium. While sending data, the signals may get impaired due to the noise encountered
during transmission. The data flow rate between the source and destination also should be kept
under control. Therefore in order to achieve an efficient and reliable communication a data flow
control mechanism needs to be implemented. Data link layer deals with frame formation, flow
control, error control and addressing and ensures error free transfer of bits from one device to
another. For the effective data communication data link layer needs to perform a number of specified
functions.
Dept. of Computer Science And Applications, SJCET, Palai

Page 28

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

Services provided to network layer: The main functionality of this layer is to transfer data from the
network layer on source machine to the network layer on destination machine
Flow Control: The source machine should sent data at a rate faster than the destination machine can
accept them
Framing: The bits to be transmitted is broken down into discrete frames. A frame contains user data
and control fields.
Error Control: All the frames should be delivered from source to the destination. The errors made
in bits during transmission must be detected and corrected
Addressing: On a multipoint line, such as many machines connected together, identity of individual
machines must be specified while transmitting data frames
FRAME
Frame is a data structure used in transmissions at DLL. The data link layer takes the packets it
gets from the network layer and encapsulates them into frames for transmission. Each frame contains
a frame header with fields for addressing and is located at the beginning of the frame, a payload field
for holding the packet and a frame trailer. The trailer contains fields are used for error detection and
mark the end of the frame.

FRAME SYNCHRONIZATION
Frame synchronization or simply framing is the process of defining and locating frame boundaries
(start and end of the frame) on a bit sequence. Converting the bit stream into frames is a tedious
process. The frame format is designed in a way that enables the receiver to always locate the
beginning of a frame and its various fields and should be able to separate the data field. To identify a
frame and its various fields, field identifiers are incorporated. These are unique symbols that indicate
by their presence the beginning and end of a frame. Four methods can be used to mark the start and
end of each frame:
Dept. of Computer Science And Applications, SJCET, Palai

Page 29

MODULE I






MCA-402 Computer Networks

ADMN 2011-‘14

Character count
Flag bytes with byte stuffing
Starting and ending flags, with bit stuffing
Physical layer coding violations

CHARACTER COUNT
Character count, uses a header field to specify the number of characters in the frame. The
Data Link Layer at the destination checks the header field to know the size of the frame and hence,
the end of frame. The process is shown in the following figure for a four frame of size 5, 5,8 and 8
respectively.

However, problems may arise due to changes in character count value during transmission. For
example, in the second frame if the character count 5 changes to7, the destination will receive data
out of synchronization and hence, it will not be able to identify the start of the next frame.
FLAG BYTES WITH BYTE STUFFING
Byte Stuffing also known as Character Stuffing is one of the earliest schemes adopted for
delimiting packets containing character data. This method employees three special control characters
in ASCII for the purpose of framing: DLE -Data Link Escape, STX - Start of Text and ETX -End of
Text. The pattern DLE STX denotes the beginning of each frame and DLE ETX specifies the end of
each frame.

Dept. of Computer Science And Applications, SJCET, Palai

Page 30

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

However, there is a still a problem we have to solve. It may happen that the flag byte occurs in the
data. For example, if a DLE occurs in the middle of the data and interferes with the data during
framing then, sender stuffs an extra DLE into the data stream just before each occurrence of an
“accidental” DLE in the data stream. The data link layer on the receiving end discards the first DLE
and the second DLE is regarded as data.

BIT STUFFING
Bit Stuffing is similar to the Byte Stuffing, except that, the method of bit stuffing allows
insertion of bits instead of the entire character (8 bits). Here frames can contain an arbitrary number
of bits made up of units of any size. Each frame begins and ends with a special bit pattern, 01111110
or 0x7E in hexadecimal. Whenever the sender's data link layer encounters five consecutive 1‟s in the
data, it automatically stuffs a 0 bit into the outgoing bit stream. This bit stuffing is analogous to byte
stuffing.
When the receiver sees five consecutive incoming 1 bits, followed by a 0 bit, it
automatically removes the 0 bit. Just as byte stuffing is completely transparent to the network layer in
both computers, so is bit stuffing. With bit stuffing, the boundary between two frames can be
unambiguously recognized by the flag pattern. Thus, if the receiver loses track of where it is, all it has
to do is scan the input for flag sequences, since they can only occur at frame boundaries and never
within the data.

Dept. of Computer Science And Applications, SJCET, Palai

Page 31

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

With both bit and byte stuffing, a side effect is that the length of a frame now depends on the
contents of the data it carries. For instance, if there are no flag bytes in the data, 100 bytes might be
carried in a frame of roughly 100 bytes. If, however, the data consists solely of flag bytes, each flag
byte will be escaped and the frame will become roughly 200 bytes long. With bit stuffing, the increase
would be roughly 12.5% as 1 bit is added to every byte.
FRAMING BY ILLEGAL CODE (CODE VIOLATION)
A fourth method is based on any redundancy in the coding scheme. In this method, we simply
identify an illegal bit pattern, and use it as a beginning or end marker. For example, in Manchester
Encoding 1- can be coded into two parts i.e., high to low = 1 0 and can be coded into two parts i.e.,
low to high = 0 1.Codes of all low (000) or all high (111) aren‟t used for the data and therefore, can
be used for framing.
Many data link protocols use a combination of a character count with one of the other
methods for extra safety. When a frame arrives, the count field is used to locate the end of the
frame. Only if the appropriate delimiter is present at that position and the checksum is correct is the
frame accepted as valid. Otherwise, the input stream is scanned for the next delimiter.

FLOW CONTROL
Another important issue for the data link layer is dealing with the situation which occurs
when the sender transmits frames faster than the receiver can accept or process them. This situation
can easily occur when the sender is running on a fast computer and the receiver is running on a slow
machine. The sender keeps pumping the frames out at a high rate until the receiver is completely
swamped. Even if the transmission is error free, at a certain point the receiver will simply be unable
to handle the frames as they arrive and will start to lose some. To prevent this situation during
transmission, an approach is introduced called the Flow Control.
Flow Control is a set of procedures that tells the sender how much data it can transmit
before it must wait for an acknowledgment from the receiver. The flow of data should not be
allowed to overwhelm the receiver. Receiver should also be able to inform the transmitter before its
limits (this limit may be amount of memory used to store the incoming data or the processing power
at the receiver end) are reached and the sender must send fewer frames. Hence, Flow control refers
to the set of procedures used to restrict the amount of data the transmitter can send before waiting
for acknowledgment.
There are two methods developed for flow control namely Stop-and-wait and Slidingwindow. Stop-and-wait is also known as Request/reply sometimes. Request/reply (Stop-and-wait)
flow control requires each data packet to be acknowledged by the remote host before the next
packet is sent.. Sliding window permits multiple data packets to be in simultaneous transit, making
more efficient use of network bandwidth

Dept. of Computer Science And Applications, SJCET, Palai

Page 32

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

STOP AND WAIT
Stop-and-Wait Flow Control is the simplest form of flow control. The message is broken
into multiple frames and only a single frame is send at a time. The Sender waits for an ACK
(acknowledgement) after every frame for a specified time (called time out). It is sent to ensure that
the receiver has received the frame correctly. It will then send the next frame only after the ACK has
been received. Sender keeps a copy of the last frame until it receives an acknowledgement.

For identification, both data frames and acknowledgements (ACK) frames are numbered
alternatively 0 and 1. Sender has a control variable (S) that holds the number of the recently sent
frame (0 or 1). Receiver has a control variable R that holds the number of the next frame expected
(0 or 1).

Dept. of Computer Science And Applications, SJCET, Palai

Page 33

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

The problem with stop and wait is that at any point in time, there is only one frame that
is sent and waiting to be acknowledged. Each frame must travel all the way to the receiver and an
acknowledgment must travel all the way back before the next frame can be sent. Till we get the
acknowledgement the sender cannot transmit any new packet. During this time both the sender and
the channel are unutilized.
SLIDING WINDOW
With the use of multiple frames for a single message, the stop-and-wait protocol does not
perform well. Only one frame at a time can be in transit .Sliding Window approach allows the sender
to transmit multiple frames without an ACK. Each data frame carries a sequence number for its
identification. Sequence number is a field in the frame that is of finite size. If k bits are reserved for
k

the sequence number, then the values of sequence number ranges from 0 to 2 –1.The receiver
acknowledges the receipt of one or more data frames by sending back a numbered acknowledgment
which specifies the sequence number of the next expected frame. All the previous data frames are
assumed acknowledged on receipt of an acknowledgement. The sender sends the next n frames
starting with the last received sequence number that has been transmitted by the receiver (ACK).

Normal Flow diagram of a sliding window

The receiver receives frames 1,2 and 3. Once frame 3 arrives ACK4 is sent to the sender. This
ACK4 acknowledge the receipt of frame 1, 2 and 3 and informs the sender that the next expected
frame is frame 4. Therefore, the sender can send multiple back-to-back frames, making efficient use of
the channel.
OPERATION OF A SLIDING WINDOW
The idea of sliding windows is to keep track of the acknowledgements. In this mechanism we
maintain two types of windows (buffer) sending window and receiving window. The sender needs
buffer because it needs to keep copies of all the sent frames for which acknowledgments are yet to
Dept. of Computer Science And Applications, SJCET, Palai

Page 34

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

be received. The receiver may request for the retransmission of a data frame that is received with
errors. The receiver needs buffer to store the received data frames temporarily. The frames may be
received out of sequence and it must put them in sequence before processing them for retrieval of
k

user data. The size of the s window is at most 2 – 1.

SENDING WINDOW
The sending window contains the copies of those data frames that have been transmitted but
their acknowledgments are yet to be received, and the data frames which are next to be transmitted.
At the beginning of a transmission, the sender's window contains n-l frames. As the frames are sent
by source, the left boundary of the window moves inward, shrinking the size of window. This means
if window size is w, if four frames are sent by source after the last acknowledgment, then the number
of frames left in window is w-4. When the receiver sends an ACK, the source's window expand i.e.
(right boundary moves outward) to allow in a number of new frames equal to the number of frames
acknowledged by that ACK.

For example, Let the window size is 7.If frames 0 through 3 have been sent and no
acknowledgment has been received, then the sender's window contains three frames -4, 5, 6. Now, if
an ACK numbered 3 is received by source, it means three frames (0, 1, 2) have been received by
receiver and are undamaged. The sender's window will now expand to include the next three frames
.At this point the sender's window will contain six frames (4, 5, 6, 7, 0, 1).

Dept. of Computer Science And Applications, SJCET, Palai

Page 35

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

RECEIVING WINDOW
At the receiving end, the window contains the sequence numbers of the data frames the
receiver is ready to accept. As the new frames come in, the size of window shrinks. Therefore the
receiver window represents not the number of frames received but the number of frames that may
still be received without an acknowledgment ACK must be sent. Given a window of size w, if three
frames are received without an ACK being returned, the number of spaces in a window is w-3.As
soon as acknowledgment is sent, window expands to include the number of frames equal to the
number of frames acknowledged.

For example, let the size of receiver's window is 7. It means window contains spaces for
7 frames. With the arrival of the first frame, the receiving window shrinks, moving the boundary from
space 0 to 1. Now, window has shrunk by one, so the receiver may accept six more frame before it
is required to send an ACK. If frames 0 through 3 have arrived but have not been acknowledged, the
window will contain three frame spaces. As receiver sends an ACK, the window of the receiver
expands to include as many new placeholders as newly acknowledged frames. The window expands
to include a number of new frame spaces equal to the number of the most recently acknowledged
frame minus the number of previously acknowledged frame. For e.g., If window size is 7 and if prior
ACK was for frame 2 & the current ACK is for frame 5 the window expands by three (5-2).
Therefore, the sliding window of sender shrinks from left when frames of data are
sending and expands to right when acknowledgments are received. The sliding window of the
receiver shrinks from left when frames of data are received and expands to the right when
acknowledgement is sent.
In the following example, initially, both the sender and receiver windows have a size of
7.Sender transmits 3 frames numbered 0 through 2. The sliding window of sender shrinks 3 positions
from left since 3 frames are transmitted. At the receiver side when these 3 frames are received the
Dept. of Computer Science And Applications, SJCET, Palai

Page 36

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

receiving window shrinks 3 positions from left moving the boundary from space 0 to 3.Now, window
has shrunk by 3, so the receiver may accept 4 more frame before it is required to send an ACK. In
the next step ACK3 is send specifying the sequence number of the next frame to send. As the
receiver has send ACK3 acknowledging all the 3 frames which have been received, the window of the
receiver expands to include as many new placeholders as newly acknowledged frame.ie, It expands by
3 places to right and the size of the receiver window is again back to 7.Once the acknowledgment
ACK3 has reached the sender, it implies that three frames (0, 1, 2) have been received by receiver
and are undamaged. The sender's window will now expand to include the next three frames (7, 8 &
9).
In the next step 4 frames, 3 through 6 have been transmitted by the sender shrinking the
window size to 3.once these frames reaches the receiver, the receiving window shrinks by 4 places
moving the boundary from 3 to 7.The receiver can accept only 3 more frames. The receiver sends
ACK4 acknowledging the reception of frame no 3 and both the receiving window and sending
window slides 1 position to right.

ERROR CONTROL
The Network should ensure complete and accurate delivery of data from the source node to
destination node. The end to end transfer of data from a transmitting application to a receiving
application involves many steps, each subject to error. Error control refers to mechanisms to detect
errors that occur in the transmission of frames and take corrective steps to make sure frames are
received correctly.

Dept. of Computer Science And Applications, SJCET, Palai

Page 37

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

TYPES OF ERRORS
Several types of error may occur during transmission over the network:




1-bit error
burst error
lost message (frame)

1-Bit Error
1-bit error/Single bit error means that only one bit is changed in the data during transmission
from the source to the destination node i.e., either 0 is changed to 1 or 1 is changed to 0.

Burst Error
The term burst error means that two or more bits in the data unit have changed from 0 to 1 or
vice-versa. Note that burst error doesn‟t necessary means that error occurs in consecutive bits. The
length of the burst error is measured from the first corrupted bit to the last corrupted bit. Some bits
in between may not be corrupted.

Lost Message (Frame)
The sender has sent the frame but that is not received properly, this is known as loss of frame
during transmission. To deal with this type of error, a retransmission of the sent frame is required by
the sender.

Dept. of Computer Science And Applications, SJCET, Palai

Page 38

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

ERROR DETECTION
Accurate delivery of data at the receiver‟s site is very important in a network application.
This implies that the receivers should get the data that is error free. However, due to some factors if,
the data gets corrupted, we need to correct it using various techniques. So, we require error
detection methods first to detect the errors in the data before correcting it.
For error detection the sender can send every data unit twice and the receiver will do bit
by bit comparison between the two sets of information. Any alteration found after the comparison
will, indicate an error and a suitable method can be applied to correct the error. But, sending every
data unit twice increases the transmission time as well as overhead in comparison. Hence, the basic
strategy for dealing with errors is to include groups of bits as additional information in each
transmitted frame, so that, the receiver can detect the presence of errors. This method is called
Redundancy as extra bits appended in each frame are redundant. At the receiver end these extra bits
will be discarded when the accuracy of data is confirmed.
EXAMPLE:

Three types of redundancy check methods are commonly used in data transmission:




Parity check
CRC
Checksum

PARITY CHECK
This is the most common and least expensive mechanism for error detection. Parity
check can be simple or two dimensional.

Dept. of Computer Science And Applications, SJCET, Palai

Page 39

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

Simple Parity Checking or One-dimension Parity Check
This is the easiest method used for detecting errors when the number of bits in the data is small.
A parity bit is an extra binary digit added to the group of data bits, so that, the total number of one‟s
in the group is even or odd.. Data bits in each frame is inspected prior to transmission and an extra
bit (the parity bit) is computed and appended to the bit string to ensure even or odd parity. If odd
parity is being used, the receiver expects to receive a block of data with an odd number of 1‟s. For
even parity, the number of 1„s should be even.

Even Parity Checking Scheme
If a 7-bit ASCII character set is used, a parity is added as the eighth bit. Here the character ‟k‟
which is 1101011 in binary is transmitted by applying even parity. In order to make the number of
1‟s even the binary digit 1 is appended to the unit and transmitted as follows 11010111.There is now
an even number of 1‟s(six).If odd parity was used a 0 would have been added at the end, resulting in
11010110.
If the transmission error causes one of the bits to be flipped, at the receivers side the number of
1‟s received will be odd and know that there is an error. The main disadvantage of simple parity bit is
that it will fail to detect any error patterns that introduce an even number of errors since the
resulting code word will also have even parity. For example 11010111 is send with even parity and
during the transmission 2 bits are corrupted.ie, 00010111 is received. Here the error will not be
detected, because the number of 1‟s is still even. Simple parity can there for detect only odd number
of erroneous bits per character. The simple parity produces relatively high ratios of check bits to data
bits, while achieving only 50% error-detection.

Dept. of Computer Science And Applications, SJCET, Palai

Page 40

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

LONGITUDINAL PARITY
Longitudinal Parity also known as Two-Dimension Parity tries to solve weakness of simple parity,
ie. even numbers of errors are not detected. Parity check bits are calculated for each row, which is
equivalent to a simple parity check bit. Parity check bits are also calculated for all columns then both
are sent along with the data. In other words, after sending a set of code words a row of parity bits is
also sent. Each parity bit in this row is a parity check for all bits in the column above it. At the
receiving end these are compared with the parity bits calculated on the received data.
If one bit is altered in Row1, parity bit for Row1 as well as the parity bit for corresponding
column signals an error. If two bits in Row1 are flipped, the Row1 parity check will not signal an
error, but two column parity checks will signal an error. This is how longitudinal parity is able to
detect more errors than simple parity. However if two bits are flipped in Row1 and two bits are
flipped in Row2, and errors occur in same column, no errors will be detected.

Although, longitudinal parity provides an extra level of protection by using double parity check,
this method like simple parity, also introduces a high number of check bits relative to data bits.
CYCLIC REDUNDANCY CHECK (CRC)
The Cyclic Redundancy Check is the most powerful and easy to implement error
detection technique. The CRC is based on modulo arithmetic, where there are no carriers for
addition and borrows for subtraction. In CRC sender divides frame (data string) by a predetermined
Generator Polynomial and then appends the remainder (called checksum or CRC) onto the frame
before starting the process of transmission. A generating polynomial is an industry approved bit string
that is used to create cyclic checksum remainder. At the receiver end, the receiver divides the
received frame by the same Generator polynomial. If the remainder obtained after the division is
zero, it ensure that data received at the receiver‟s end is error free and accepted. A remainder
indicates that the data unit has been damaged in transmit and therefore must be rejected. To be valid,
a CRC must have two qualities: It must have exactly one less bit than the divisor, and appending it to
the end of the data string must make the resulting bit sequence exactly divisible by the divisor. The
following figure provides an outline of the basic steps.
Dept. of Computer Science And Applications, SJCET, Palai

Page 41

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

Suppose a m bit message is to be transmitted and we are using a generating polynomial of
length n+1. Append the original message by n 0‟s and divide it by generating polynomial. The
remainder of this division process generates the n-bit (CRC) remainder which will be appended to
the m-bit message producing (m+n) bit frame for transmission. On receiving the packet, the receiver
divides the (m+n) bit frame by the same generating polynomial and if it produces no remainder ,no
error has occurred.
Let the data which needs to be send be D= 1010001101. Let the predetermined bit pattern be
P=110101.Here m=10 and n+1=6.Multiply the value D by 25.The division process shown below:

The remainder is added to D to give T = 101000110101110, which is transmitted. If there are no
errors, the receiver receives T intact. The received frame is divided by P and if there is no remainder,
it is assumed that there have been no errors.

Dept. of Computer Science And Applications, SJCET, Palai

Page 42

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

Second way of viewing the CRC process is to express all values as polynomials in a
dummy variable X, with binary coefficients. The coefficients correspond to the bits in the binary
number. The polynomial format is useful for two reasons: It is short, and it can be used to prove the
concept mathematically.
Using the preceding example, for D=1010001101 we have D(X) = X9 + X7 + X3 + X2 + 1, and for
P=110101 we have P(X) = X5 + X4 + X2 + 1 and after division we obtain a remainder R=01110
which corresponds to R(X)=X3+X2+X.The following figure shows the polynomial division that
corresponds to the binary division in the preceding example:

Dept. of Computer Science And Applications, SJCET, Palai

Page 43

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

ERROR CONTROL
When an error is detected in a message, either due to loss of frame or due to damage of
frame the retransmission of the same is required by the sender. The most popular retransmission
scheme is known as Automatic-Repeat-Request (ARQ). The set of rules that will determine the
operations for the sender and the receiver are named the ARQ protocol. Such schemes, where
receiver asks transmitter to re-transmit if it detects an error, are known as reverse error correction
techniques. There exist three popular ARQ techniques:


Stop & Wait ARQ



Go Back-n ARQ



Selective Repeat ARQ

STOP & WAIT ARQ
Stop-and-wait ARQ is based on the stop-and-wait flow control technique. The source
station transmits a single frame and then must await an acknowledgment (ACK). No other data
frames can be sent until the destination station‟s reply arrives at the source station.
Error can be due to a frame getting damaged/lost during transmission. Then, the receiver
discards that frame by using error detection method. The sender will wait for acknowledgement of
frame sent for a predetermined time (allotted time). If timeout occurs in the system then, the same
frame is required to be retransmitted. Hence, the sender should maintain a duplicate copy of the last
frame sent, as, in future it can be required for retransmission. This will facilitate the sender in
retransmitting the lost/damaged frame.
At times the receiver receives the frame correctly, in time and sends the
acknowledgment also, but the acknowledgment gets lost/damaged during transmission. For the
sender it indicates time out and the demand for retransmission of the same frame appears in the
network. If, the sender sends the last frame again, at the receiver‟s site, the frame would be
duplicated. To overcome this problem it, follows a number mechanism and discards the duplicate
frame.
For distinguishing both data frame and acknowledgement frame, a number mechanism is
used. For example, a data frame 0 is acknowledged by acknowledgement frame 1, to show that the
receiver has received data frame 0 and is expecting data frame l from the sender. Both the sender
and the receiver both maintain control variable with volume 0 or 1 to get the status of recently sent
or received. The sender maintains variable S that can hold 0 or 1 depending on recently sent frame 0
or 1. Similarly the receiver maintains variable R that holds 0 or 1 depending on the next frame
expected 0 or 1.

Dept. of Computer Science And Applications, SJCET, Palai

Page 44

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

There are four different scenarios that can happen:





Normal Operation
When ACK is lost
When frame is lost
When ACK time out occurs

Normal Operation
If the sender is sending frame 0, then it will wait for ack 1 which will be transmitted by the
receiver with the expectation of the next frame numbered frame1. As it receives ACK1 in time
(allotted time) it will send frame I. This process will be continuous till complete data transmission
takes place. This will be successful transmission if acknowledgment for all frames sent is received in
time.

ACK is lost
Here the sender will receive corrupted ACK1 for frame sent ie, frame0. It will simply discard
corrupted ACK 1 and as the time expires for this ACK it will retransmit frame0. The receiver has
already received frame0 and is expecting frame1 hence, it will discard duplicate copy of frame 0. In
this way the numbering mechanism solves the problem of duplicate copy of frames. Finally the
receiver has only one correct copy of the frame

Dept. of Computer Science And Applications, SJCET, Palai

Page 45

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

Frame is lost
If the receiver receives corrupted/damaged frame1, it will simply discard it and assumes
that the frame was lost on the way. And correspondingly, the sender will not get ACK0 as frame has
not been received by the receiver. The sender will be in waiting stage for ACK0 till its time out
occurs in the system. As soon as time out occurs in the system, the sender will retransmit the same
frame i.e frame1 and the receiver will send ACK0 in reply

Delayed ACK frame
In this operation, the receiver is not able to send ACK1 for received frame0 in time, due to some
problem at the receiver‟s end or network communication. It is received after the timer for frame0
has expired. The sender retransmits frame0. At the receiver end, R=1 means receiver expects to see
frame1. So the receiver discards this frame0 as the duplicate copy .But it sends the ACK1 once again
corresponding to the copy received for frame0. At the sender‟s site, the duplicate copy of ACK1 is
discarded as the sender has received ACK1 earlier

Dept. of Computer Science And Applications, SJCET, Palai

Page 46

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

The operations discussed above indicate the importance of the numbering mechanism while,
transmitting frames over the network. The principal advantage of stop-and-wait ARQ is its simplicity.
Its principal disadvantage is that stop-and-wait is an inefficient mechanism.
Go-Back-N ARQ
Go-back-N ARQ is most commonly used form of error control based on sliding-window
flow control. The problem with stop and wait is that only one frame can be transmitted at a time and
this leads to inefficiency of transmission. Go-back-N ARQ overcomes the inefficiency of stop &wait
by allowing transmission of more than one frame without waiting for acknowledgement.
Each frame will have a sequence number that will be added with the frame. If the header
of the frame allows m bits for the sequence number, the sequence numbers range from 0 to 2m – 1.
The send window contains the sequence numbers of the data frames which can be in transit. In each
window position, some of these sequence numbers define the frames that have been sent; others
define those that can be sent. The maximum size of the window is 2m – 1. The window at any time
divides the possible sequence numbers into four regions. The first region, from the far left to the left
wall of the window, defines the sequence numbers belonging to frames that are already
acknowledged. The sender does not worry about these frames and keeps no copies of them. The
second region, defines the range of sequence numbers belonging to the frames that are sent and have
an unknown status. The sender needs to wait to find out if these frames have been received or were
lost. We call these outstanding frames. The third range, defines the range of sequence numbers for
frames that can be sent. Finally, the fourth region defines sequence numbers that cannot be used until
the window slides. The sender uses control variables SF and SN. SF holds the sequence number of
the 1st (i.e. oldest) outstanding frame in the retransmission list and SN holds the sequence number of
the next frame to be sent.

Dept. of Computer Science And Applications, SJCET, Palai

Page 47

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

The receive window makes sure that the correct data frames are received and that the
correct acknowledgments are sent. The size of the receive window is always I. The receiver is always
looking for the arrival of a specific frame. Any frame arriving out of order is discarded and needs to
be resent. The receiver‟s control variable RN holds the sequence number of the next frame
expected.

The sequence numbers to the left of the window belong to the frames already received and
acknowledged; the sequence numbers to the right of this window define the frames that cannot be
received. Any received frame with a sequence number in these two regions is discarded. Only a
frame with a sequence number matching the value of Rn is accepted and acknowledged. The receive
window also slides, but only one slot at a time. When a correct frame is received (and a frame is
received only one at a time), the window slides
Although there can be a timer for each frame that is sent, in our protocol we use only one.
The reason is that the timer for the first outstanding frame always expires first; we send all
outstanding frames when this timer expires. The receiver sends a positive acknowledgment if a frame
has arrived safe and sound and in order. The receiver is not bound to send an individual
acknowledgment for all frames received; it can send a cumulative acknowledgment also. The sender
will maintain a copy of each sent frame till acknowledgement reaches it safely. If a frame is damaged
or is received out of order, the receiver is silent and will discard all subsequent frames until it
receives the one it is expecting. The silence of the receiver causes the timer of the unacknowledged
frame at the sender site to expire. This, in turn, causes the sender to go back and resend all frames,
beginning with the one with the expired timer. For example, suppose the sender has already sent
frame 6, but the timer for frame 3 expires. This means that frame 3 has not been acknowledged; the
sender goes back and sends frames 3, 4,5, and 6 again. Hence, it is named as Go-Back-N ARQ.
Send Window Size
As an example, we choose m =2, which means the size of the window can be 2m - 1, or
3.compares a window size of 3 against a window size of 4. If the size of the window is 3 (less than 22)
and all three acknowledgments are lost, the frame timer expires and all three frames are resent. The
receiver is now expecting frame 3, not frame 0, so the duplicate frame is correctly discarded. On the
Dept. of Computer Science And Applications, SJCET, Palai

Page 48

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

other hand, if the size of the window is 4 (equal to 22) and all acknowledgments are lost, the sender
will send a duplicate of frame 0. However, this time the window of the receiver expects to receive
frame 0, so it accepts frame 0, not as a duplicate, but as the first frame in the next cycle. This is an
error.

In Go-Back-N ARQ 2 scenarios are possible:


An acknowledgment is lost



Frame is damaged or lost during transmission starting with one for which timer has expired
to the last one sent.

Lost Acknowledgment
Here no data frames are lost, but some ACKs are delayed and one is lost. The example also
shows how cumulative acknowledgments can help if acknowledgments are delayed or lost. After
initialization, there are seven sender events. Request events are triggered by data from the network
layer; arrival events are triggered by acknowledgments from the physical layer. There is no time-out
event here because all outstanding frames are acknowledged before the timer expires. Note that
although ACK 2 is lost, ACK 3 serves as both ACK 2 andACK3.
If an acknowledgement is lost during the transmission, but a cumulative acknowledgment
is received before the timer expires, there is no need to resend the frame. But if the
acknowledgment arrives after the timer expires, retransmission of the frames takes place, starting
with one for which timer has expired to the last one sent.

Dept. of Computer Science And Applications, SJCET, Palai

Page 49

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

Lost Frame
Following figure shows what happens when a frame is lost. Frames 0, 1, 2, and 3 are sent. However,
frame 1 is lost. The receiver receives frames 2 and 3, but they are discarded because they are
received out of order (frame 1 is expected). The sender receives no acknowledgment about frames
1, 2, or 3. Its timer finally expires. The sender sends all outstanding frames (1, 2, and 3) because it
does not know what is wrong. Note that the resending of frames l, 2, and 3 is the response to one
single event. When the sender is responding to this event, it cannot accept the triggering of other
events. This means that when ACK 2 arrives, the sender is still busy with sending frame 3. The
physica1layer must wait until this event is completed and the data link layer goes back to its sleeping
state. We have shown a vertical line to indicate the delay. It is the same story with ACK 3; but when
ACK 3 arrives, the sender is busy responding to ACK 2. It happens again when ACK 4 arrives. Note
that before the second timer expires, all outstanding frames have been sent and the timer is stopped.

Dept. of Computer Science And Applications, SJCET, Palai

Page 50

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

SELECTIVE REPEAT ARQ
Go-Back-N ARQ simplifies the process at the receiver site. The receiver keeps track of only one
variable, and there is no need to buffer out-of-order frames; they are simply discarded. However, this
protocol is very inefficient for a noisy link. In a noisy link a frame has a higher probability of damage,
which means the resending of multiple frames. This resending uses up the bandwidth and slows down
the transmission. For noisy links, there is another mechanism that does not resend N frames when
just one frame is damaged; only the damaged frame is resent. This mechanism is called Selective
RepeatARQ. It is more efficient for noisy links, but the processing at the receiver is more complex.
The send window maximum size can be 2m- I . For example, if m = 4, the sequence numbers go
from 0 to 15, but the size of the window is just 8 (it is 15 in the Go-Back-N Protocol). The smaller
window size means less efficiency in filling the pipe, but the fact that there are fewer duplicate frames
can compensate for this. The protocol uses the same variables as we discussed for Go-Back-N

The receive window in Selective Repeat is totally different from the one in Go Back- N.
First, the size of the receive window is the same as the size of the send window (2m- I ). The
Selective Repeat Protocol allows as many frames as the size of the receive window to arrive out of
order and be kept until there is a set of in-order frames to be delivered to the network layer.
Because the sizes of the send window and receive window are the same, all the frames in the send
frame can arrive out of order and be stored until they can be delivered. We need, however, to
mention that the receiver never delivers packets out of order to the network layer.

Dept. of Computer Science And Applications, SJCET, Palai

Page 51

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

Window Sizes
We can now show why the size of the sender and receiver windows must be at most
one half of 2m. For an example, we choose m = 2, which means the size of the window is 2m/2, or 2.
Following figure compares a window size of 2 with a window size of 3. If the size of the window is 2
and all acknowledgments are lost, the timer for frame 0 expires and frame 0 is resent. However, the
window of the receiver is now expecting frame 2, not frame 0, so this duplicate frame is correctly
discarded. When the size of the window is 3 and all acknowledgments are lost, the sender sends a
duplicate of frame 0. However, this time, the window of the receiver expects to receive frame 0 (0 is
part of the window), so it accepts frame 0, not as a duplicate, but as the first frame in the next cycle.
This is clearly an error.

The handling of the request event is similar to that of the previous protocol except that
one timer is started for each frame sent. In this method safely arrived frames can be delivered to the
network layer and send an ACK. The Out-of-sequence frames are accepted and stored in the
receiver side, but not delivered to the network layer. A negative acknowledgment is sent if one of
these two situations happened: (i) The received frame(N) is corrupted (ii) The received frame is not
the one expected. At sender a timer is started for each frame sent. If a NAK is received, the
corresponding frame is resent and its timer is restarted. If a timer expires, only the frame, which
times out, is resent. If the frame is not corrupted and the sequence number is in the window, we
store the frame and mark the slot.

Dept. of Computer Science And Applications, SJCET, Palai

Page 52

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

Here, each frame sent or resent needs a timer, which means that the timers need to be
numbered (0, 1, 2, and 3). The timer for frame0 starts at the first request, but stops when the ACK
for this frame arrives. The timer for frame I starts at the second request, restarts when a NAK
arrives, and finally stops when the last ACK arrives. The other two timers start when the
corresponding frames are sent and stop at the last arrival event. At the receiver site we need to
distinguish between the acceptance of a frame and its delivery to the network layer. At the second
arrival, frame 2 arrives and is stored and marked (colored slot), but it cannot be delivered because
frame I is missing. At the next arrival, frame 3 arrives and is marked and stored, but still none of the
frames can be delivered. Only at the last arrival, when finally a copy of frame 1 arrives, can frames I,
2, and 3 be delivered to the network layer. There are two conditions for the delivery of frames to
the network layer: First, a set of consecutive frames must have arrived. Second, the set starts from
the beginning of the window. After the first arrival, there was only one frame and it started from the
beginning of the window. After the last arrival, there are three frames and the first one starts from
the beginning of the window.
In Selective Repeat, ACKs are sent when data are delivered to the network layer. If the
data belonging to n frames are delivered in one shot, only one ACK is sent for all of them.
HDLC
High-Level Data Link Control, also known as HDLC is a specification for the Data Link
layer and lies between the Physical layer and the Network layer. The Network layer is responsible
for passing a packet of data through an internetwork, which can consist of many individual local area
networks and even wide area links. The Data Link layer, of which HDLC is a part of, is responsible
for passing the data between two nodes on the same network. HDLC takes packets from the
Network layer and attaches and address, control, and data integrity information to them. Once
formatted, the packets are sent "down the wire" using the Physical layer.

Dept. of Computer Science And Applications, SJCET, Palai

Page 53

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

Basic Characteristics of HDLC
To satisfy a variety of applications, HDLC defines three types of stations, two link configurations, and
three data-transfer modes of operation. The three station types are:
• Primary station: Has the responsibility for controlling the operation of the link. Frames issued by
the primary are called commands.
•Secondary station. Operates under the control of the primary station. Frames issued by a
secondary are called responses. The primary maintains a separate logical link with each secondary
station on the line.
• Combined station: Combines the Features of primary and secondary. A combined station may
issue both commands and responses.
The two link configurations are:
• Unbalanced configuration: Consists of one primary and one or more secondary stations and
supports both full-duplex and half-duplex transmission.
• Balanced configuration: Consists of two combined stations and supports both full duplex and
half-duplex transmission.
• Normal Response Mode (NRM): Used with an unbalanced configuration. The primary may initiate
data transfer to a secondary, but a secondary may only transmit data in response to a command from
the primary.
• Asynchronous balanced mode (ABM):Used with a balanced configuration. Either combined
station may initiate transmission without receiving permission from the other combined station.
• Asynchronous response mode (ARM): Used with an unbalanced configuration. The secondary may
initiate transmission without explicit permission of the primary. The primary still retains responsibility
for the line, including initialization, error recovery, and logical disconnection.
NRM is used on multi drop lines, in which a number of terminals are connected to a host computer.
The computer polls each terminal for input. NRM is also sometimes used on point-to-point links,
particularly if the link connects a terminal or other peripheral to a computer. ABM is the most widely
used of the three modes; it makes more efficient use of a full-duplex point-to-point link as there is no
polling overhead. ARM is rarely used; it is applicable to some special situations in which a secondary
may need to initiate transmission.
HDLC FRAME STRUCTURE

Dept. of Computer Science And Applications, SJCET, Palai

Page 54

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

HDLC uses synchronous transmission. All transmissions are in the form of frames, and a single frame
format suffices for all types of data and control exchanges. The following depicts the structure of the
HDLC frame. The flag, address, and control fields that precede the information field are known as a
header. The FCS and flag fields following the data or information field are referred to as a trailer.

FLAG FIELD: The flag field of an HDLC frame is an 8-bit sequence with the bit pattern 01111110
that identifies both the beginning and the end of a frame and serves as a synchronization pattern for
the receiver. In order to avoid the presence of the flag field pattern in the information, bit stuffing is
used.
ADDRESS FIELD: The second field of an HDLC frame contains the address of the secondary station
whether a frame is being transmitted by a primary or secondary station. The address field identifies
whether the frame is a command or response. If a frame contains address of the receiver, it implies
that the receiver is a secondary station and therefore, the frame is a command. If the frame contains
the address of the sender, it implies that the sender is a secondary station. Therefore the frame is a
response. A combined station acts both as primary station and secondary station during the
dialogue.Depending upon whether it is issuing a command or response, it puts the receiver‟s or its
own address in the address field.
CONTROL FIELD: The control field consists of 8 bits. It identifies the type of HDLC frame and
defines its functionality. HDLC defines three types of frames.Information frames (I-frames) carry the
data to be transmitted for the user. Supervisory frames(S-frames) don‟t have a data field and is used
for carrying acknowledgments and request for retransmissions. Unnumbered frames (U-frames) are
used for link establishment, termination and other control functions. The first one or two bits of the
control field serves to identify the frame type. In addition, it includes sequence numbers, control
features and error tracking according to the frame type.
INFORMATION FIELD: The information field is present only in I-frames and some U-frames. The
information field has variable size and can consist of any number of bits.
FRAME CHECK SEQUENCE (FCS): This field contains a 16-bit, or 32-bit cyclic redundancy check
bits which is used for error detection.
HDLC PROTOCOL OPERATION
HDLC operation consists of the exchange of I-frames, S-frames, and U-frames between
two stations. The operation of HDLC involves three phases. First, one side or another initializes the
data link so that frames may be exchanged in an orderly fashion. During this phase, the options that

Dept. of Computer Science And Applications, SJCET, Palai

Page 55

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

are to be used are agreed upon. After initialization, the two sides exchange user data and the control
information to exercise flow and error control. Finally, one of the two sides signals the termination
of the operation.

LINK ACCESS PROTOCOL-BALANCED (LAPB)
X.25 is a network interface defined for accessing packet-switched public networks. It is
commonly used for interconnecting LANs. The X.25 defines the lowest three layers of the OSI
Reference Model Physical layer, Data link Layer and Network Layer. LAPB is a bit-oriented
synchronous protocol that provides complete data transparency in a full-duplex point-to-point
operation. It is a data link layer protocol used to manage communication between data terminal
equipment (DTE) and the data circuit-terminating equipment (DCE) devices. Data terminal
equipment devices are end systems that communicate across the X.25 network. They are usually
terminals, personal computers, or network hosts, and are located on the premises of individual
subscribers. DCE devices are communications devices, such as modems and packet switches.

LAPB has been derived from HDLC and shares the same frame format, frame types, and
field functions as HDLC. It differs from HDLC in the representation of address field. The address
field can contain only one of two fixed (DTE or DCE) addresses. It supports a peer-to-peer link in
that neither end of the link plays the role of the permanent master station. A minimum of overhead is
required to ensure flow control, error detection and recovery. If data is flowing in both directions
(full duplex), the data frames themselves carry all the information required to ensure data integrity.
either of these, however, LAPB is restricted to the ABM transfer mode and is appropriate only for
combined stations.

Dept. of Computer Science And Applications, SJCET, Palai

Page 56

MODULE I

MCA-402 Computer Networks

ADMN 2011-‘14

LINKED ACCESS PROTOCOL - D CHANNEL (LAPD)
ISDN emerged as an alternative to traditional dialup networking .It is a set of
communication standards for simultaneous digital transmission of voice, video, data, and other
network services over the traditional circuits of the public switched telephone networks. It provides
a single, common interface with which to access digital communications services that are required by
varying devices, while remaining transparent to the user. ISDN standards are constructed using the
Open System Interconnection seven-layer reference model.
Linked Access Protocol (D Channel) is a Layer 2 (data link) protocol. D channel is the
data or signalling channel which is used for communications (or "signalling") between switching
equipment in the ISDN network and the ISDN equipment at your site. The LAPD handle the
handshaking (commands and responses), signalling, and control for all of the voice and data calls that
are setup through the ISDN D channel. LAPD works in the Asynchronous Balanced Mode (ABM).
This mode is totally balanced (i.e., no master/slave relationship). Each station may initialize, supervise,
recover from errors, and send frames at any time. The objective of LAPD is to provide a secure,
error-free connection between two end-points so as to reliably transport Layer 3 messages. The
control field of LAPD frame is identical to HDLC, but the address field differs.

The first Address-field byte contains the service access point identifier (SAPI), which
identifies the portal at which LAPD services are provided to Layer 3.The C/R bit indicates whether
the frame contains a command or a response. The Terminal Endpoint Identifier (TEI) field identifies
either a single terminal or multiple terminals compatible with the ISDN network. Example:
Telephones, personal computers

Dept. of Computer Science And Applications, SJCET, Palai

Page 57

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close