Professional Documents
Culture Documents
Computer Communication Network (Vtu) - 18ec71 Module - 1: TH ND
Computer Communication Network (Vtu) - 18ec71 Module - 1: TH ND
MODULE - 1
Introduction: Data Communications: Components, Representations, Data Flow, Networks: Physical
Structures, Network Types: LAN, WAN, Switching, Internet.
Network Models: Protocol Layering: Scenarios, Principles, Logical Connections, TCP/IP Protocol Suite:
Layered Architecture, Layers in TCP/IP suite, Description of layers, Encapsulation and Decapsulation,
Addressing, Multiplexing and Demultiplexing, The OSI Model: OSI Versus TCP/IP.
Data-Link Layer: Introduction: Nodes and Links, Services, Categories of link, Sublayers, Link Layer
addressing: Types of addresses, ARP. Data Link Control (DLC) services: Framing, Flow and Error Control,
Data Link Layer Protocols: Simple Protocol, Stop and Wait protocol, Piggybacking.
TEXT BOOKS:
1. Data Communication and Networking, B Forouzan, 5th Ed, TMH 2006.
2. Computer Networks, James F. Kurose, Keith W. Ross: Pearson education, 2nd Edition, 2003.
3. Introduction to Data communication and Networking, Wayne Tomasi: Pearson education 2007.
Quotes:
Change is hard at first, messy in the middle and gorgeous at the last.
Forget what hurt you, but never forget what it taught you.
People change, love hurts, friends leave, things go wrong. But just remember that life goes on.
Effort is important but where to make an effort makes all the difference.
All my life I thought air was free, until I bought a bag of chips.
People won’t remember days but they remember the moments with you.
2 CN(18EC71)
Introduction:
History:
We have migrated from industrial revolution (18th century) to age of steam engine
(19th century), and to information gathering, processing and distribution (20th
century).
In computer era, we have migrated from a single computer serving all organizations
to computer networks.
The word data refers to information presented in whatever form is agreed upon by the
parties creating and using the data.
Definition: Data communications is the exchange of data between two devices via some
form of transmission medium such as a wire cable.
Data communications and networking are changing the way we live.
Computer Communication Network (CCN) deals with four major concepts. They are
1. Data communications
2. Networking
3. Protocols and standards
4. Networking models.
Networks exist so that data may be sent from one place to another which is the basic
concept of data communications.
Data communications between remote parties can be achieved through a process called
networking.
Protocols and standards are vital to the implementation of data communications and
networking.
Protocol:
Protocols refer to the set of rules and regulations that govern data communications.
The key elements of a protocol are:
Syntax:
It refers to the structure/format of the data, i.e., the order in which the data
must be presented.
Ex.: A simple protocol may 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/date.
3 CN(18EC71)
Semantics:
Semantics refers to the meaning of each section of bits. It specifies how a
particular bit pattern to be interpreted, and what action to be taken based on
the interpretation.
Ex.: does an address identify the route to be taken or is the final destination
of the message.
Timing:
Timing refers to two characteristics:
When the data should be sent and
How fast the data can be sent.
Ex.: if a sender produces a data at a rate of 1Mbps and the receiver can
process the date at a rate of only 0.5 Mbps, then the transmission will
overload the receiver and same data will be lost.
Standard:
A standard is a protocol that has been adopted by vendors and manufacturers.
There are 2 types Data Communication standards:
de facto:
Standards that have not been approved by an organized body but
have been adopted as standard through widespread use.
These are originally established by manufacturer who seeks to
define the functionality of new product/technology.
de jure:
Standards that have been legislated by an officially recognized
body.
Network models serve to organize, unify, and control the hardware and software
components of data communications and networking.
Network:
Definition: A network is a set of devices (computers, printers, mobile etc)
connected by media links.
It is a combination of hardware and software that sends data from one location to
another.
The hardware consists of the physical equipment that carries signals from one point
of the network to another.
4 CN(18EC71)
The software consists of instruction sets that make possible the services that we
expect from a network.
Computer networks are very complex object; hence it is partitioned into vertical set
of levels, each level called layer.
Perspective:
Network users: services that their applications need e.g., guarantee that each
message it sends will be delivered without error within a certain amount of time
Network designers: cost-effective design e.g., that network resources are
efficiently utilized and fairly allocated to different users
Network providers: system that is easy to administer and manage e.g., that faults
can be easily isolated and it is easy to account for usage.
Advantages of Networking:
Resources Sharing like File Sharing, Peripheral Sharing, Software Sharing with
multi-user licenses.
Shared Internet Access
Calculations Distribution
Data Communications:
Definition: “Data communications are the exchange of data between two devices via some
form of transmission medium such as a wire cable”.
To realize data communications to occur, the communicating devices must be part of a
communication system made up of a combination of hardware and software.
The effectiveness of a data communications system depends on four fundamental
characteristics:
1. Delivery:
The system must deliver data to the correct destination.
Data must be received by the intended device/user and only by that
device/user.
2. Accuracy:
The system must deliver the data accurately.
Data that have been altered in transmission and left uncorrected are
unusable.
5 CN(18EC71)
3. Timeliness:
The system must deliver data in a timely manner. Data delivered late are
useless.
In the case of video and audio, timely delivery means delivering data as they
are produced maintaining the order, and without significant delay and is
called real-time transmission.
4. Jitter:
Jitter refers to the variation in the packet arrival time.
It is the uneven delay in the delivery of audio or video packets.
Scenario: video packets are sent every 30 ms. If some of the packets arrive
with 30 ms delay and others with 40 ms delay, quality of the video gets
distracted.
Components:
A data communications system has five components
Message:
The message is the information/data to be communicated.
Basic forms of information include text, numbers, pictures, audio, and video.
Sender:
The sender is the device that sends the data message.
It can be a computer, workstation, telephone handset, video camera, and so on.
Receiver:
The receiver is the device that receives the message.
It can be a computer, workstation, telephone handset, television, and so on.
6 CN(18EC71)
Transmission medium:
The transmission medium is the physical path by which a message travels from
sender to receiver.
Ex: twisted-pair wire, coaxial cable, fiber-optic cable, and radio waves.
Protocol:
A protocol is a set of rules that govern data communications.
It represents an agreement between the communicating devices.
Without a protocol, two devices may be connected but not communicating, just as
a person speaking French cannot be understood by a person who speaks only
Japanese.
Data Representation:
All types of multimedia information are process and store within the computer in a digital
form.
1. Text:
Text contains strings of characters entered through keyboard.
Characters are represented as a bit pattern, a sequence of bits (0s or 1s).
Different sets of bit patterns have been designed to represent text symbols.
Codeword: each character represented by a unique combination of fixed number of bits.
Complete text hence, can be represented by strings of codewords.
Ex:
Unicode uses 32 bits to represent a symbol or character used in any language
in the world.
American Standard Code for Information Interchange (ASCII), developed
by United States, constitutes the first 127 characters in Unicode and is also
referred to as Basic Latin.
2. Numbers:
Numbers are also represented by bit patterns.
The number are directly converted to a binary representation to simplify mathematical
operations.
There are various types of numbering systems like decimal, hexadecimal, octal etc.
7 CN(18EC71)
3. Images:
Definition: “An image is an artifact that depicts or records visual perception”.
Images are also represented by bit patterns.
In its simplest form, an image is composed of a matrix of pixels (picture elements),
where each pixel is a small dot.
The size of the image depends on the resolution and pixel depth.
Ex: an image can be divided into 1000 pixels or 10,000 pixels.
In the second case, there is a better representation of the image (better resolution), but
more memory is needed to store the image.
After an image is divided into pixels, each pixel is assigned a bit pattern. The size and
the value of the pattern depend on the pixel depth (number bits per pixel).
For an image made of only black-and-white dots (e.g., a chessboard), a 1-bit pattern is
enough to represent a pixel.
If an image is not made of pure white and pure black pixels, we can increase the size of
the bit pattern to include gray scale.
Ex: to show four levels of gray scale, we can use 2-bit patterns. A black pixel can be
represented by 00, a dark gray pixel by 01, a light gray pixel by 10, and a white pixel by
11.
There are several methods to represent color images.
RGB:
So called because each color is made of a combination of three primary colors:
red, green, and blue.
The intensity of each color is measured, and a bit pattern is assigned to it.
Black is produced when all three primary colors Red (R), Green (G), and Blue
(B) are zero particularly useful for producing a color image on a black surface,
as is the case in display application.
This type of color representation is also called as additive color mixing.
YCM:
In this type a color is made of a combination of three other primary colors:
yellow, cyan, and magenta.
8 CN(18EC71)
White is produced, when the 3 chosen primary colors cyan (C), Magenta (M),
and Yellow (Y) are all zero these colors are particularly useful for producing a
color image on a white surface as in, printing applications.
This type of color representation is also called as subtractive color mixing.
4. Audio:
Definition1: sound within the range of human hearing.
Definition2: Audio is sound within the acoustic range available to humans.
Audio refers to the recording or broadcasting of sound or music.
It is continuous, not discrete.
We use a microphone to change voice or music to an electric signal, creates a continuous
signal.
5. Video:
Definition: Correlated sequence of images with respect to time.
Video refers to the recording or broadcasting of a picture or movie. Video can either be
produced as a continuous entity (e.g., by a TV camera), or it can be a combination of
images, each a discrete entity, arranged to convey the idea of motion.
Data Flow:
Transfer of information streams or communication between two systems associated with
an application can be in 5 modes:
1. Simplex
2. Half-duplex (Two-way alternate)
3. Duplex (Two-way simultaneous)
4. Broadcast
5. Multicast
1. Simplex:
9 CN(18EC71)
Also called duplex where both stations can transmit and receive simultaneously.
In full-duplex mode, signals going in one direction share the capacity of the link with
signals going in the other direction.
This sharing can occur in two ways:
the link must contain two physically separate transmission paths, one for sending and the
other for receiving
The capacity of the channel is divided between signals traveling in both directions.
Ex.:
1. Telephone network.
2. Two-way flow of the digitized speech and video associated with a video telephony
application.
The full-duplex mode is used when communication in both directions is required all the
time.
The capacity of the channel, however, must be divided between the two directions.
4. Broadcast:
11 CN(18EC71)
Information output by a single source node is received by all the other nodes, computers,
and others which are connected to the same network.
Ex.: broadcast of a television program over a cable network as all the television receivers
that are connected to the network receive the same set of programs.
5. Multicast:
Similar to broadcast except, information output by the source is received by only a specific
subset of the nodes that are connected to the network (multicast group).
Ex.: video conferencing involving a predefined group of terminals/computers connected to
a network exchanging integrated speech and video streams.
In half-duplex and duplex communications the bit rate associated with the flow of
information in each direction can be same or different.
1. Rate associated, with the flow of information in each direction is equal then is called
as Symmetric.
12 CN(18EC71)
2. Rate associated, with the flow of information in each direction is unequal then is
called as Asymmetric.
Ex.: Video telephone call: involves exchange of integrated digitized speech and video
stream both direction simultaneously so, symmetric duplex communications channel is
required.
Application involving browser (program) and a web server:
1. Low bit rate channel from the browser to the web server is required for request and
control purposes.
2. High bit rate channel from the server to the subscriber for the transfer of, say, and
requested file so, asymmetric half-duplex communications channel is required.
Networks:
Definition: A network is the interconnection of a set of devices capable of communication.
Here a device can be two types:
Type 1: Host/end system large computer, desktop, laptop, workstation, cellular
phone, or security system.
Type 2: connecting device
Router: connects a network to other networks.
Switch: connects devices together.
Modem (modulator-demodulator): This changes the form of data.
Transmission media can be wired or wireless to connect devices to create a network.
A link is a communications pathway that transfers data from one device to another.
Network Criteria:
1. Performance:
Performance of the network can be measured in many ways, including transit time
and response time.
Transit time: It is the amount of time required for a message to travel from
one device to another.
Response time: It is the elapsed time between an inquiry and a response.
Throughput: It is the rate of successful message delivery over a
communication channel.
13 CN(18EC71)
Delay: The delay of a network specifies how long it takes for a bit of data
to travel across the network from one node or endpoint to another.
It is often need more throughput and less delay. But, these two criteria are often
contradictory.
If we try to send more data to the network, we may increase throughput but we
increase the delay because of traffic congestion in the network.
2. Reliability:
Network reliability is measured by the frequency of failure, the time it takes a link
to recover from a failure, and the network’s robustness in a catastrophe.
3. 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.
Physical Structures:
Type of Connection:
There are two possible types of connections:
1. Point-to-Point:
2. Multipoint:
Topology:
Definition: The term topology describes the appearance of the network.
Classification: Two types of topology
1. Physical topology: The term physical topology refers to the way in which a
network is laid out physically.
2. Logical (or signal) topology: Logical (or signal) topology refers to the nature
of the paths the signals follow from node to node.
15 CN(18EC71)
In many instances, the logical topology is the same as the physical topology. But this
is not always the case.
For example, some networks are physically laid out in a star configuration, but they
operate logically as bus or ring networks.
Physical Topology:
Definition: The term physical topology refers to the way in which a network is laid out
physically.
The topology of a network is the geometric representation of the relationship of all the
links and linking devices (usually called nodes) to one another.
Various physical topologies are:
1. Mesh Topology:
In a mesh topology, every device has a dedicated point-to-point link to every other
device.
To find the number of physical links in a fully connected mesh network with n nodes,
we first consider that each node must be connected to every other node.
16 CN(18EC71)
the value of fully meshed networks is proportional to the exponent of the number of
subscribers, assuming that communicating groups of any two endpoints, up to and
including all the endpoints, is approximated by Reed's Law.
The number of connections in a full mesh is (n x (n - 1) ) / 2 duplex links where n is
number of nodes.
To accommodate that many links, every device on the network must have n – 1
input/output (I/O) ports to be connected to the other n – 1 stations as shown in the
figure.
Advantages:
Use of dedicated links guarantees that each connection can carry its own data
load, eliminating the traffic problems that can occur when links must be shared
by multiple devices.
A mesh topology is robust. If one link becomes unusable, it does not
incapacitate the entire system.
There is the advantage of privacy or security. When every message travels along
a dedicated line, only the intended recipient sees it. Physical boundaries prevent
other users from gaining access to messages.
A point-to-point links make fault identification and fault isolation easy. Traffic
can be routed to avoid links with suspected problems. This facility enables the
network manager to discover the precise location of the fault and aids in finding
its cause and solution.
Disadvantages:
Costlier as the amount of cabling and the number of I/O ports required.
As every device must be connected to every other device, installation and
reconnection are difficult.
The sheer bulk of the wiring can be greater than the available space (in walls,
ceilings, or floors) can accommodate.
The hardware required to connect each link (I/O ports and cable) can be
prohibitively expensive.
For these reasons a mesh topology is usually implemented in a limited fashion, for
example, as a backbone connecting the main computers of a hybrid network that can
include several other topologies.
17 CN(18EC71)
2. Star Topology:
In a star topology, each device has a dedicated point-to-point link only to a central
controller, usually called a hub.
The devices are not directly linked to one another. Unlike a mesh topology, a star
topology does not allow direct traffic between devices.
The controller acts as an exchange: If one device wants to send data to another, it sends
the data to the controller, which then relays the data to the other connected device as
shown in figure above.
Advantages:
A star topology is less expensive than a mesh topology. In a star, each device needs
only one link and one I/O port to connect it to any number of others. This factor
also makes it easy to install and reconfigure.
Far less cabling needs to be housed, and additions, moves, and deletions involve
only one connection: between that device and the hub.
Star topology is robust. If one link fails, only that link is affected. All other links
remain active. This factor also lends itself to easy fault identification and fault
isolation. As long as the hub is working, it can be used to monitor link problems
and bypass defective links.
18 CN(18EC71)
Disadvantage:
Dependency of the whole topology on one single point, the hub. If the hub goes
down, the whole system is dead.
Requires more cable length than a linear topology such as ring or bus.
More expensive than linear bus topologies because of the cost of the hubs, etc.
Application: The star topology is used in local-area networks (LANs), High-speed
LANs often use a star topology with a central hub.
3. Bus Topology:
A bus topology is a multipoint topology.
One long cable acts as a backbone to link all the devices in a network as shown in figure
below
Construction Mechanism:
Nodes are connected to the bus cable by drop lines and taps. A drop line is a
connection running between the device and the main cable.
A tap is a connector that either splices into the main cable or punctures the sheathing
of a cable to create a contact with the metallic core.
19 CN(18EC71)
As a signal travels along the backbone, some of its energy is transformed into heat.
Therefore, it becomes weaker and weaker as it travels farther and farther. For this
reason there is a limit on the number of taps a bus can support and on the distance
between those taps.
Advantages:
Ease of installation. Backbone cable can be laid along the most efficient path, then
connected to the nodes by drop lines of various lengths.
It is cheaper as bus topology uses less cabling than mesh or star topologies.
Disadvantages:
Entire network shuts down if there is a break in the main cable
Slow speed as only on system can transmit at a time.
Terminators are required at both ends of the backbone cable
Difficult to identify the problem if the entire network shuts down
Not meant to be used as a stand-alone solution in a large building
Application: Traditional Ethernet LANs can use a bus topology, but they are less popular
now.
4. Tree or Expanded Star:
5. Ring Topology:
Single point of failure, that means if a node goes down entire network goes down.
Switched WAN:
It is rarely seen a LAN or a WAN in isolation; they are connected to one another.
When two or more networks are connected, they make an internetwork, or internet.
Scenario: assume that an organization has two offices, one on the east coast and the other
on the west coast. Each office has a LAN that allows all employees in the office to
communicate with each other.
To make the communication between employees at different offices possible, the
management leases a point-to-point dedicated WAN from a service provider, such as a
telephone company, and connects the two LANs.
Now the company has an internetwork, or a private internet communication between
offices is now possible. Figure above shows this internet.
When a host in the west coast office sends a message to another host in the same office,
the router blocks the message, but the switch directs the message to the destination.
When a host on the west coast sends a message to a host on the east coast, router R1 routes
the packet to router R2, and the packet reaches the destination.
Figure below shows another internet with several LANs and WANs connected. One of the
WANs is a switched WAN with four switches.
26 CN(18EC71)
Switching:
An internet is a switched network in which a switch connects at least two links together.
A switch needs to forward data from a network to another network when required.
The two most common types of switched networks are:
1. Circuit-switched network
2. Packet-switched networks
Circuit-Switched Network:
In circuit switching network dedicated channel called circuit has to be established before
the call/data transfer is made between two end systems.
The channel is reserved between the users till the connection is active.
Application: It is mainly used for voice communication requiring real time services
without any much delay.
Figure below shows a very simple switched network that connects four telephones to each
end.
27 CN(18EC71)
Network: In above figure, the four telephones at each side are connected to a switch. The
switch connects a telephone set at one side to a telephone set at the other side. The thick
line connecting two switches is a high-capacity communication line that can handle four
voice communications at the same time; the capacity can be shared between all pairs of
telephone sets.
Scenario 1: Here, all telephone sets are busy; four people at one site are talking with four
people at the other site; the capacity of the thick line is fully used.
Scenario 2: Here, only one telephone set at one side is connected to a telephone set at the
other side; only one-fourth of the capacity of the thick line is used.
Inference: a circuit-switched network is efficient only when it is working at its full
capacity; most of the time, it is inefficient because it is working at partial capacity. The
reason that we need to make the capacity of the thick line four times the capacity of each
voice line is that we do not want communication to fail when all telephone sets at one side
want to be connected with all telephone sets at the other side.
Packet-Switched Network:
28 CN(18EC71)
The Internet:
Definition: A global computer network providing a variety of information and
communication facilities, consisting of interconnected homogeneous/heterogeneous
networks using standardized communication protocols.
An electronic communications network that connects computer networks and
organizational computer facilities around the world. It includes several high-
bandwidth data lines that comprise the Internet backbone. These lines are connected to
major Internet hubs that distribute data to other locations, such as web servers and ISPs.
Figure below shows a conceptual view of the Internet.
29 CN(18EC71)
The figure shows the Internet as several backbones, provider networks, and customer
networks.
At The Top Level: the backbones are large networks owned by some\ communication
companies such as Sprint, Verizon (MCI), AT&T, and NTT. The backbone networks are
connected through some complex switching systems, called peering points.
At The Second Level: there are smaller networks, called provider networks, that use the
services of the backbones for a fee. The provider networks are connected to backbones and
sometimes to other provider networks.
At The Lower Level: The customer networks are networks at the edge of the Internet that
actually use the services provided by the Internet. They pay fees to provider networks for
receiving services.
Backbones and provider networks are also called Internet Service Providers (ISPs). The
backbones are often referred to as international ISPs; the provider networks are often
referred to as national or regional ISPs.
Accessing Internet:
1. Using Telephone Networks:
Since most telephone networks have already connected themselves to the
Internet, one option for residences and small businesses to connect to the
30 CN(18EC71)
Internet is to change the voice line between the residence or business and
the telephone center to a point-to-point WAN. This can be done in two
ways:
Dial-up service: The first solution is to add to the telephone line a
modem that converts data to voice. The software installed on the
computer dials the ISP and imitates making a telephone connection.
DSL Service: Since the advent of the Internet, some telephone
companies have upgraded their telephone lines to provide higher
speed Internet services to residences or small businesses. The DSL
service also allows the line to be used simultaneously for voice and
data communication.
2. Using Cable Networks:
Now a days residents have begun using cable TV services instead of
antennas to receive TV broadcasting.
The cable companies have been upgrading their cable networks and
connecting to the Internet.
A residence or a small business can be connected to the Internet by using
this service.
It provides a higher speed connection, but the speed varies depending on the
number of neighbors that use the same cable.
3. Using Wireless Network:
Wireless connectivity has recently become increasingly popular.
A household or a small business can use a combination of wireless and
wired connections to access the Internet.
With the growing wireless WAN access, a household or a small business
can be connected to the Internet through a wireless WAN.
4. Direct Connection to the Internet:
A large organization or a large corporation can itself become a local ISP
and be connected to the Internet.
This can be done if the organization or the corporation leases a high-speed
WAN from a carrier provider and connects itself to a regional ISP.
A large university with several campuses can create an internetwork and
then connect the internetwork to the Internet.
31 CN(18EC71)
Protocol Layering:
In data communication and networking, a protocol defines the rules that both the sender
and receiver and all intermediate devices need to follow to be able to communicate
effectively.
When communication is simple, a single simple protocol is sufficient
when the communication is complex, we may need to divide the task between different
layers, in which case we need a protocol at each layer, or protocol layering.
Scenarios:
First Scenario:
Communication is simple which can occur in only one layer. Assume Mira and Tara are
neighbors with a lot of common ideas.
Communication between Mira and Tara takes place in one layer, face to face, in the same
language, as shown in figure below
The communication in the second case is mostly monolog; the professor talks most of the
time unless a student has a question, a situation in which the protocol dictates that she
should raise her hand and wait for permission to speak.
In this case, the communication is normally very formal and limited to the subject being
taught.
Second Scenario:
Assume that Tara is offered a higher-level position in her company, but needs to move to
another branch located in a city very far from Mira. The two friends still want to continue
their communication and exchange ideas because they have come up with an innovative
project to start a new business when they both retire.
They decide to continue their conversation using regular mail through the post office.
However, they do not want their ideas to be revealed by other people if the letters are
intercepted.
They agree on an encryption/decryption technique.
The sender of the letter encrypts it to make it unreadable by an intruder; the receiver of the
letter decrypts it to get the original letter.
33 CN(18EC71)
Now we can say that the communication between Mira and Tara takes place in three layers,
as shown in figure above. We assume that Tara and Mira each have three machines (or
robots) that can perform the task at each layer.
Protocol layering enables us to divide a complex task into several smaller and simpler tasks.
In figure above, they could have used only one machine to do the job of all three machines.
However, if Mira and Tara decide that the encryption/decryption done by the machine is
not enough to protect their secrecy, they would have to change the whole machine.
In the present situation, they need to change only the second layer machine; the other two
can remain the same. This is referred to as modularity. Modularity in this case means
independent layers.
A layer (module) can be defined as a black box with inputs and outputs, without concern
about how inputs are changed to outputs.
If two machines provide the same outputs when given the same inputs, they can replace
each other.
E.x:, Tara and Miura can buy the second layer machine from two different manufacturers.
As long as the two machines create the same cipher text from the same plaintext and vice
versa.
Advantages:
1. Protocol layering allows us to separate the services from the implementation. A
layer needs to be able to receive a set of services from the lower layer and to give
the services to the upper layer.
2. Communication does not always use only two end systems; there are intermediate
ystems that need only some layers, but not all layers. If we did not use protocol
layering, we would have to make each intermediate system as complex as the end
systems, which makes the whole system more expensive.
Second Principle: The second principle that we need to follow in protocol layering is that
the two objects under each layer at both sites should be identical.
Ex:
The object under layer 3 at both sites should be a plaintext letter.
The object under layer 2 at both sites should be a cipher text letter.
The object under layer 1 at both sites should be a piece of mail.
Logical Connections:
Figure illustrates logical connection between each layer as shown in figure below.
Here we have layer-to-layer communication. Mira and Tara can think that there is a logical
(imaginary) connection at each layer through which they can send the object created from
that layer.
Layered Tasks:
We use the concept of layers in our daily life.
Scenario: let us consider two friends who communicate through postal mail. The figure below
shows the steps in this task.
35 CN(18EC71)
The process of sending a letter to a friend would be complex if there were no services
available from the post office.
The task includes a sender, a receiver, and a carrier that transports the letter.
There is a hierarchy of tasks:
1. Higher Layer
2. Middle Layer and
3. Lower Layer.
Activities that take place at each layer at each side is described below:
At the Sender Site:
Higher Layer: the sender writes the letter, inserts the letter in an envelope, writes
the sender and receiver addresses, finally drops the letter in a mailbox.
Middle Layer: the letter is picked up by a letter carrier and delivered to the post
office.
Lower layer: the letter is sorted at the post office; a carrier transports the letter.
On the Way:
The letter is then on its way to the recipient.
On the way to the recipient’s local post office, the letter may actually go through a
central office.
In addition, it may be transported by trunk, train, airplane, boat, and/or a
combination of these.
At the Receiver Site:
Lower Layer: The carrier transports the letter to the post office.
Middle Layer: The letter is sorted and delivered to the recipient’s mailbox.
36 CN(18EC71)
Higher Layer: the receiver picks up the letter, opens the envelope, and reads it.
Each layer performs specific tasks and uses the services of the layer immediately
below it.
Layered networking model is advantageous because
1. Divides networking into less complex components
2. Enables programmers to specialize in a particular level
3. Allows upgrades to a specific layer without effecting other layers
4. Encourages interoperability
5. Allows for standardized interfaces
Definition:
Open System: It is a set of protocols that allows any two different systems to communicate
regardless of their underlying architecture.
1. Physical Layer
2. Data link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer and
7. Application Layer
The structure of seven layers in OSI model as shows figure below
Layered Architecture:
Layers are designed based on identifying which networking functions had related uses and
collected those functions into discrete groups that became the layers.
The OSI model allows complete interoperability between networks.
The Each layer uses the services of the layer immediately below it.
Peer-to-Peer Processes:
Definition: Process in Layer x on one machine communicates with Process in layer x on
another machine called Peer-to-Peer Processes.
This communication is governed by an agreed-upon series of rules and conventions called
protocols.
38 CN(18EC71)
These layers deal with the physical aspects of moving data from one device
to another which includes electrical specifications, physical connections,
physical addressing, transport timing and reliability.
User support layers:
Includes Session (layer5), Presentation (layer6), Application (layer7)
These layers support interoperability among unrelated software systems.
Transport layer (Layer 4):
Links the above two layers subgroups.
This layer ensures that what the lower layers have transmitted is in a form
which can be used by the upper layers.
The upper OSI layers are almost always implemented in software.
The lower layers are combination of hardware and software, except for physical layer
which is mostly hardware.
The process starts at layer 7 then moves from layer to layer in descending, sequential order.
At each layer, a header, or possibly a trailer, can be added to the data unit. Commonly, the
trailer is added only at layer 2.
When the formatted data unit passes through the physical layer (layer 1), it is changed into
a digital form i.e., electromagnetic signal and transported along a physical link.
The reverse process occurs in the receiver side and the message is again in a form
appropriate to the application and is made available to the recipient.
40 CN(18EC71)
Encapsulation:
Encapsulation is a process where the data portion of a packet at level N-1 carries the whole
packet from level N.
Ex.: A packet including header and data at layer 7 is encapsulated in the packet at level 6
and the process continues in the layer below.
1. Physical Layer:
The physical layer is concerned with transmitting raw bits over a communication channel.
It deals with the mechanical, electrical, timing interfaces of the primary connections like
cable, connectors etc. and the physical transmission medium, which lies below the
physical layer.
Synchronization of bits:
Transmitter and receiver clocks may synchronized.
Line configuration:
Deals with connection of device to the medium like point to point or multi-point
configuration.
Physical Topology:
Defines how device are connected to form network.
Ex.: Ring, Bus, Mesh, star Topology.
Transmission mode:
Defines the direction of transmission between two devices.
Ex.: Simplex, half duplex, duplex.
Note: Type ipconfig/all at command prompt to check your system’s Mac address.
Hop-to-hop delivery:
Figure below hop-to-hop (node-to-node) delivery by the data link layer
As the figure above shows, communication at the Data Link layer occurs between two
adjacent nodes. To send data from A to F, three partial deliveries are made.
First, the DLL at A sends a frame to the DLL at B (a router). Second, the data link layer
at B sends a new frame to the data link layer at E. Finally, the DLL at E sends a new
frame to the DLL at F.
Here the frames that are exchanged between the three nodes have different values in the
headers. The frame from A to B has B as the destination address and A as the source
address. The frame from B to E has E as the destination address and B as the source
address. The frame from E to F has F as the destination address and E as the source
address.
45 CN(18EC71)
3. Network Layer:
This layer is responsible for source to destination delivery of individual packet may be
across multiple networks/links.
Figure: Router
4. Transport Layer:
Responsible for process-to-process delivery of the entire message.
A process is an application program running on a host.
Transport layer ensures the whole message arrives intact and in order, overseeing both error
control and flow control at the source-to-destination level.
Figure below shows the relationship of the transport layer to the network and session layers.
5. Session Layer:
The session layer is responsible for dialog control and synchronization.
Specific responsibilities of the session layer include:
Dialog control:
The session layer allows two systems to enter into a dialog.
It allows the communication between two processes to take place in either
half-duplex full-duplex mode.
Synchronization:
The session layer allows a process to add checkpoints, or synchronization
points, to a stream of data.
Figure below shows the relationship between the presentation layer and the application and
session layers.
6. Presentation Layer:
The presentation layer is concerned with the syntax and semantics of the information
exchanged between two systems.
Specific responsibilities of the presentation layer are:
Translation:
Different computers use different encoding systems, presentation layer is
responsible for interoperability between these different encoding methods.
The presentation layer at the sender changes the information from its
sender-dependent format into a common format. The presentation layer at
the receiving machine changes the common format into its receiver-
dependent format.
Encryption:
It ensures privacy for carry sensitive information by sending the information
in other form.
Compression:
49 CN(18EC71)
7. Application Layer:
The application layer enables the user, whether human or software, to access the network.
It provides user interfaces and support for services such as electronic mail, remote file
access and transfer, shared database management, and other types of distributed
information services.
50 CN(18EC71)
Figure below shows the relationship of the application layer to the user and the presentation
layer.
2. Internet/network/IP layer:
Concerned with access to and routing data across a network for two end systems attached
to a network.
At the network layer TCP/IP supports the Internetworking Protocol.
Internetworking Protocol (IP): It is an unreliable and connectionless protocol-a best-
effort delivery service.
IP transports data in packets called datagram, each of which is transported separately.
Datagram’s can travel along different routes and can arrive out of sequence or be
duplicated.
IP does not keep track of the routes and has no facility for reordering datagram once they
arrive at their destination.
IP, in turn, uses four supporting protocols:
1. Address Resolution Protocol (ARP):
It is used to associate a logical address with a physical address.
ARP is used to find the physical address of the node when its Internet
address is known.
2. Reverse Address Resolution Protocol (RARP):
It allows a host to discover its Internet address when it knows only its
physical address.
It is used when a computer is connected to a network for the first time or
when a diskless computer is booted.
3. Internet Control Message Protocol (ICMP):
It is a mechanism used by hosts and gateways to send notification of
datagram problems back to the sender.
ICMP sends query and error reporting messages.
4. Internet Group Message Protocol (IGMP):
It is used to facilitate the simultaneous transmission of a message to a group
of recipients.
3. Transport Layer:
This layer was represented in TCP/IP by two protocols, TCP and UDP.
These protocols are responsible for delivery of a message from a process to another
process.
User Datagram Protocol (UDP):
53 CN(18EC71)
4. Application Layer:
The application layer in TCP/IP is equivalent to the combined session, presentation, and
application layers in the OSI model.
Contains the logic needed to support the various user applications.
Separate modules are required for each application.
Many protocols are defined at this layer, some of them are:
1. Hypertext Transfer Protocol (HTTP): enables the connection between a web
server and a client
2. Simple Mail Transfer Protocol (SMTP): An electronic mail (e-mail) allows users
to send mails across an internet.
3. File Transfer Protocol (FTP): Is a standard way to transfer files between different
machines. Needs FTP client program on computer.
4. Domain Naming System (DNS): Provides meaningful names like
achilles.mycorp.com for computers to replace numerical addresses like
123.45.67.89.
5. TELNET: A remote terminal emulation protocol that enables clients to log on to
remote hosts on the network.
6. Simple Network Management Protocol (SNMP): Used to remotely manage
network devices.
Decapsulation:
The term “decapsulation” refers to the process of removing headers and trailers as data
passes from lower to upper layers. This process happens on a computer that is receiving
data.
55 CN(18EC71)
In the figure below the concept of encapsulation/decapsulation for the small internet is
shown at the source and destination hosts
It is not shown the layers for the link-layer switches (at the router) because no
encapsulation/decapsulation occurs in this device.
Figure: Encapsulation/Decapsulation
4. The data-link layer takes the network-layer packet as data or payload and adds its
own header, which contains the link-layer addresses of the host or the next hop (the
router). The result is the link-layer packet, which is called a frame. The frame is
passed to the physical layer for transmission.
Addressing:
Four levels of addresses are used in an internet employing the TCP/IP protocols:
1. Physical Addressing
2. Logical Addressing
3. Port Addressing
4. Specific Addressing
57 CN(18EC71)
Each address is related to a specific layer in the TCP/IP architecture, as shown in the figure
below
1. Physical Address:
It is the lowest-level address.
The physical address, also known as the link/MAC address, is the address of a node as
defined by its LAN or WAN. It is included in the frame used by the data link layer.
A network adapter has a unique and permanent physical address.
The physical addresses have authority over the network (LAN or WAN).
58 CN(18EC71)
The size and format of these addresses vary depending on the network.
Ex., Ethernet uses a 6-byte (48-bit) physical address that is imprinted on the network
interface card (NIC). LocalTalk (Apple), however, has a 1-byte dynamic address that
changes each time the station comes up.
Scenario: In Figure a node with physical address 10 sends a frame to a node with physical
address 87, The two nodes are connected by a link (bus topology LAN). At the data link
layer, this frame contains physical (link) addresses in the header. These are the only
addresses needed. The rest of the header contains other information needed at this level.
The trailer usually contains extra bits needed for error detection. As the figure shows, the
computer with physical address 10 is the sender, and the computer with physical address
87 is the receiver. The data link layer at the sender receives data from an upper layer. It
encapsulates the data in a frame, adding a header and a trailer. The header, among other
pieces of information, carries the receiver and the sender physical (link) addresses. Note
that in most data link protocols, the destination address, 87 in this case, comes before the
source address (10 in this case).
In order to find the physical/link/MAC address of your system go to command prompt and
type ipconfig/all, the following information will be displayed as shown below
Figure: ipconfig/all
2. Logical Addresses:
Logical addresses are necessary for universal communications that are independent of
underlying physical networks.
Physical addresses are not adequate in an internetwork environment where different
networks can have different address formats.
A universal addressing system is needed in which host can be identified uniquely;
regardless of the underlying physical network hence we use logical addressing.
The logical addresses are designed for this purpose. A logical address in the Internet is
currently a 32-bit address that can uniquely define a host connected to the Internet.
No two publicly addressed and visible host on the Internet can have the same IP address.
60 CN(18EC71)
Figure: IP addresses
In order to find the logical/IP address of your system go to command prompt and type
ipconfig/all, the following information will be displayed as shown below
61 CN(18EC71)
Figure: ipconfig/all
3. Port Addresses:
Port address is transport layer ID (similar to IP in Network Layer) which identify the
application on the host.
The IP address and the physical address are necessary for a quantity of data to travel from
a source machine to the destination machine/host.
However, arrival at the destination host is not the final objective of data communications
on the Internet. A system that sends nothing but data from one computer to another is not
complete.
Today, computers are devices that can run multiple processes at the same time.
The end objective of Internet communication is a process communicating with another
process.
Ex: computer A can communicate with computer C by using TELNET. At the same time,
computer A communicates with computer B by using the File Transfer Protocol (FTP).
Thus, for these above processes to receive data simultaneously, we need a method to label
the different processes. In other words, they need addresses.
In the TCP/IP architecture, the label assigned to a process is called a port address.
A port address in TCP/IP is 16 bits in length represented by one decimal number like
753.
62 CN(18EC71)
Scenario: Figure below shows two computers communicating via the Internet. The
sending computer is running three processes at this time with port addresses A, B, and c.
The receiving computer is running two processes at this time with port addresses j and K.
Process A in the sending computer needs to communicate with process J in the receiving
computer.
Note: although physical addresses change from hop to hop, logical and port addresses
remain the same from the source to destination.
4. Specific Addresses:
Some applications have user-friendly addresses that are designed for that specific address.
Ex.:
1. e-mail address : raghudatesh@gmit.ac.in and
2. The Universal Resource Locator (URL) : www.gmit.info.
The first defines the recipient of an e-mail; the second is used to find a document on the
World Wide Web.
These addresses, however, get changed to the corresponding port and logical addresses by
the sending computer.
Services:
Services are provided for the layers above a particular layer and they are received from the
layer below it.
Ex.: The data-link layer is located between the physical and the network layer. The data
link layer provides services to the network layer; it receives services from the physical
layer.
In data link layer, the delivery of a packet is from one node to the very next node.
Figure below shows the encapsulation and decapsulation Service at the data-link layer.
Scenario: For simplicity, we have assumed that we have only one router between the
source and destination.
The datagram received by the data-link layer of the source host is encapsulated in a frame.
The frame is logically transported from the source host to the router.
The frame is decapsulated at the data-link layer of the router and encapsulated at another
frame. The new frame is logically transported from the router to the destination host.
Note that, although we have shown only two data-link layers at the router, the router
actually has three data-link layers because it is connected to three physical links.
Some of the services provided by the data link layer as:
67 CN(18EC71)
Framing:
A packet at the data-link layer is normally called a frame.
eneapsulation of data received from the network layer at the data-link layer
is normally called as a framing.
The data-link layer at each node needs to encapsulate the datagram in a
frame before sending it to the next node.
The node also needs to decapsulate the datagram from the frame received
on the logical channel.
Flow Control:
It is a technique for speed matching of transmitter and receiver.
It ensures that a transmitting station does not overflow a receiving station
with data.
Flow Control refers to a set of procedures used to restrict the amount of data
that the sender can send before waiting for acknowledgment.
The sending data-link layer at the end of a link is a producer of frames; the
receiving data-link layer at the other end of a link is a consumer.
If the rate of produced frames is higher than the rate of consumed frames,
frames at the receiving end need to be buffered while waiting to be
processed.
As it is impossible to have an unlimited buffer size at the receiving side.
There are two ways to mitigate the problem:
1. Allow the receiving data-link layer drop the frames if its buffer is
full.
2. Allow the receiving data-link layer send a feedback to the sending
data-link layer to ask it to stop or slow down.
Different data-link-layer protocols use different strategies for flow control.
Error Control:
When data-frame is transmitted, there is a probability that data-frame may
be lost in the transit or it is received corrupted.
In both cases, the receiver does not receive the correct data-frame and
sender does not know anything about any loss.
68 CN(18EC71)
In such case, both sender and receiver are equipped with some protocols
which helps them to detect transit errors such as loss of data-frame.
Hence, either the sender retransmits the data-frame or the receiver may
request to resend the previous data-frame.
Congestion Control:
Congestion control modulates traffic entry into a telecommunications
network in order to avoid congestive collapse resulting from
oversubscription. This is typically accomplished by reducing the rate of
packets and it should not be confused with flow control, which prevents the
sender from overwhelming the receiver.
Although a link may be congested with frames, which may result in frame
loss, most data-link-layer protocols do not directly use a congestion control
to alleviate congestion, although some wide-area networks do.
A state occurring in network layer when the message traffic is so heavy that
it slows down network response time.
Effects of Congestion:
As delay increases, performance decreases.
If delay increases, retransmission occurs, making situation worse
Categories of Link:
Two types of links are present:
Point to point link:
Here data-link layer that uses the whole capacity of the medium
Link is dedicated to the two devices.
Eg. two users connected by traditional homephones
Broadcast link:
Here data-link layer that uses only part of the capacity of the link
Link shared between several pair of devices.
Eg. two friends use their cellular phones, they are using a broadcast link (the air is
shared among many cell phone users).
69 CN(18EC71)
Two Sublayers:
Source and destination addresses are attached to a frame in a header part and both are
changed every time the frame moves from one link to another. This is illustrated in the
figure below.
The datagrams and frames are designed in this way described in the figure above, and all
internet users follow the design.
several questions can raised looking into the above diagram like:
If the IP address of a router does not appear in any datagram sent from a source to a
destination, why do we need to assign IP addresses to routers?
The answer is that in some protocols a router may act as a sender or receiver of a
datagram.
Why do we need more than one IP address in a router, one for each interface?
The answer is that an interface is a connection of a router to a link. An IP address
defines a point in the Internet at which a device is connected. A router with n
interfaces is connected to the Internet at n points. This is the situation of a house at
the corner of a street with two gates; each gate has the address related to the
corresponding street.
How are the source and destination IP addresses in a packet determined?
The answer is that the host would know its own IP address, which becomes the
source IP address in the packet.
71 CN(18EC71)
How are the source and destination link-layer addresses determined for each link?
Again, each hop (router or host) should know its own link-layer address. The
destination link-layer address is determined by using the Address Resolution
Protocol.
What is the size of link-layer addresses?
The answer is that it depends on the protocol used by the link. Although we have
only one IP protocol for the whole Internet, we may be using different data-link
protocols in different links.
Types of Addresses:
Link-layer protocols define three types of addresses:
1. Unicast Address:
Each host or each interface of a router is assigned a unicast address.
Unicasting means one-to-one communication.
A frame with a unicast address destination is destined only for one entity in
the link.
Ex.: The unicast link-layer addresses in the most common LAN, Ether- net,
are 48 bits (six bytes) that are presented as 12 hexadecimal digits separated
by colons:
A3:34:45:11:92:F1
2. Multicast Address:
Multicasting means one-to-many communication.
Ex.: The multicast link-layer addresses in the most common LAN, Ethernet,
are 48 bits (six bytes) that are presented as 12 hexadecimal digits separated
by colons. The second digit, however, needs to be an even number in
hexadecimal. The following shows a multicast address:
A2:34:45:11:92:F1
3. Broadcast Address:
Broadcasting means one-to-all communication.
A frame with a destination broadcast address is sent to all entities in the
link.
72 CN(18EC71)
Ex.: the broadcast link-layer addresses in the most common LAN, Ethernet,
are 48 bits, all 1s, that are presented as 12 hexadecimal digits separated by
colons. The following shows a broadcast address:
FF:FF:FF:FF:FF:FF
The response packet contains the recipient’s IP and link-layer addresses. The
packet is unicast directly to the node that sent the request packet.
Scenario: In Figure, the system on the left (A) has a packet that needs to be delivered to
another system (B) with IP address N2. In doing so:
System A needs to pass the packet to its data-link layer for the actual delivery, but
it does not know the physical address of the recipient. It uses the services of ARP
by asking the ARP protocol to send a broadcast ARP request packet to ask for the
physical address of a system with an IP address of N2.
This packet is received by every system on the physical network, but only system
B will answer it
System B sends an ARP reply packet that includes its physical address.
Now system A can send all the packets it has for this destination using the physical
address it received.
Caching:
Definition: A cache (pronounced CASH) is a place to store something temporarily
in a computing environment.
74 CN(18EC71)
When ARP is used to find out the recipient address to which the frame has to be
sent in a network, it broadcasts it instead of repeatedly performing the same task
when the frame has to be sent to the same destination in the network, it stores the
link layer address in its cache memory which can be easily accessed.
This saves the time and the processing of frames by intermediate routers.
packet format:
DLC Services:
The data link control (DLC) deals with procedures for communication between two
adjacent nodes - node-to-node communication, no matter whether the link is dedicated or
broadcast.
Data link control functions include:
Framing
Flow
Error control
All the above functions are software implemented protocols that provide smooth and
reliable transmission of frames between nodes.
Figure below Shows the data link layer functionality.
76 CN(18EC71)
Framing:
Divide the bit stream in to group of bits and attach checksum called Framing.
The data link layer, pack bits into frames, so that each frame is distinguishable from
another.
Framing in the DLL separates a message from one source to a destination , by adding a
sender address and destination address.
The destination address defines where the packet is to go; the sender address helps the
recipient acknowledge the receipt.
The whole message could be packed in one frame that is not normally done.
1. A frame can be very large, making flow and error control very inefficient. When a
message is carried in one very large frame, even a single-bit error would require the
retransmission of the whole message.
2. When a message is divided into smaller frames, a single-bit error affects only that
small frame.
Frame Size:
Frames can be of two types:
1. Fixed in size:
Size of the frame is fixed.
77 CN(18EC71)
No need for defining the boundaries of the frames; the size itself can be used as
a delimiter.
Ex: ATM wide-area network, which uses frames of fixed size called cells.
2. Variable in Size:
Size of the frame is not fixed.
Need to define the start and end of the frame and the beginning of the next.
It is used in local area networks.
Two approaches were used for this purpose:
1. Character-oriented approach
2. Bit-oriented approach
1. Say we send information other than text such as graphs, audio, and video. Any
pattern used for the flag could also be part of the information.
2. If this happens, the receiver, when it encounters this pattern in the middle of the
data, thinks it has reached the end of the frame.
3. To fix this problem, a byte-stuffing strategy was added to character-oriented
framing.
2. Byte Stuffing:
In byte stuffing (or character stuffing), a special byte is added to the data section of the
frame when there is a character with the same pattern as the flag.
The data section is stuffed with an extra byte. This byte is usually called the escape
character (ESC), which has a predefined bit pattern.
Whenever the receiver encounters the ESC character, it removes it from the data section
and treats the next character as data, not a delimiting flag.
Figure below describes the scenario
This flag can create the same type of problem we saw in the byte-oriented protocols. That
is, if the flag pattern appears in the data, we need to somehow inform the receiver that this
is not the end of the frame.
It is done by stuffing 1 single bit (instead of 1 byte) to prevent the pattern from looking like
a flag. The strategy is called bit stuffing.
Bit stuffing is the process of adding one extra 0 whenever five consecutive 1s follow a 0 in
the data, so that the receiver does not mistake the pattern 0111110 for a flag.
Scenario:
Figure below shows bit stuffing at the sender and bit removal at the receiver.
80 CN(18EC71)
Note that even if we have a 0 after five 1s, we still stuff a 0. The 0 will be removed by the
receiver.
This means that if the flag like pattern 01111110 appears in the data, it will change to
011111010 (stuffed) and is not mistaken as a flag by the receiver.
The real flag 01111110 is not stuffed by the sender and is recognized by the receiver.
Error Control:
In the data link layer, the term error control refers primarily to methods of error
detection and retransmission.
It allows the receiver to inform the sender of any frames lost or damaged in
transmission and coordinates the retransmission of those frames by the sender.
Error control in the data link layer is often implemented simply: Any time an error is
detected in an exchange, specified frames are retransmitted.
There are two methods of error control:
1. In the first method, if the frame is corrupted, it is silently discarded; if it is not
corrupted, the packet is delivered to the network layer. This method is used mostly
in wired LANs such as Ethernet.
2. In the second method, if the frame is corrupted, it is silently discarded; if it is not
corrupted, an acknowledgment is sent (for the purpose of both flow and error
control) to the sender.
Figure: FSM
83 CN(18EC71)
Noiseless Channels:
Protocols assume an ideal channel in which no frames are lost, duplicated, or corrupted.
Noiseless channels are error-free but they cannot be used in real life, but they serve as a
basis for understanding the protocols of noisy channels
Two types:
1. Simplest
2. Stop and Wait
Simplest Protocol:
Some of the assumption has been made for developing the algorithm for simplex protocol:
1. The channel is a perfect noiseless channel (error free). Hence no frames are lost,
duplicated, or corrupted.
2. No flow control and error control used.
3. It is a unidirectional protocol in which data frames are traveling in only one direction.
4. Both transmitting and receiving network layer are always ready.
5. Processing time that is small enough to be negligible.
6. Infinite buffer space is available in the transmitter and receiver.
Protocol Design: Figure below shows the design of the simplest protocol with no flow or
error control.
The data-link layer at the sender gets a packet from its network layer, makes a frame out
of it, and sends the frame.
The data-link layer at the receiver receives a frame from the link, extracts the packet from
the frame, and delivers the packet to its network layer.
The data-link layers of the sender and receiver provide transmission services for their
network layers.
In the above figure for simple protocol, the states and processes are shown through FSM
for both sending and receiving node.
Each FSM has only one state, the ready state. The sending machine remains in the ready
state until a request comes from the process in the network layer.
85 CN(18EC71)
When a event occurs, the sending machine encapsulates the message in a frame and sends
it to the receiving machine.
The receiving machine remains in the ready state until a frame arrives from the sending
machine.
When this event occurs, the receiving machine decapsulates the message out of the frame
and delivers it to the process at the network layer.
Algorithms for Simplest Protocol:
Below algorithm shows the procedure at the sender and receiver sites
Figure below shows an example of communication using this protocol. It is very simple.
The sender sends a sequence of frames without even thinking about the receiver.
To send three frames, three events occur at the sender site and three events at the receiver site.
86 CN(18EC71)
Stop-and-Wait Protocol:
The Stop-and-Wait protocol, uses both flow and error control.
In this protocol, the sender sends one frame at a time and waits for an acknowledgment
before sending the next one.
To detect corrupted frames, a CRC is needed to add for each data frame. When a frame
arrives at the receiver site, it is checked. If its CRC is incorrect, the frame is corrupted and
silently discarded.
The silence of the receiver is a signal for the sender that a frame was either corrupted or
lost.
Every time the sender sends a frame, it starts a timer. If an acknowledgment arrives before
the timer expires, the timer is stopped and the sender sends the next frame (if it has one to
send).
If the timer expires, the sender resends the previous frame, assuming that the frame was
either lost or corrupted.
This means that the sender needs to keep a copy of the frame until its acknowledgment
arrives. When the corresponding acknowledgment arrives, the sender discards the copy and
sends the next frame if it is ready.
Figure below shows the outline for the Stop-and-Wait protocol. Note that only one frame
and one acknowledgment can be in the channels at any time.
87 CN(18EC71)
Figure below shows the FSMs for our primitive Stop-and-Wait protocol
At Sender Node:
Sender States:
The sender is initially in the ready state, but it can move between the ready and
blocking state.
Ready State:
88 CN(18EC71)
When the sender is in this state, it is only waiting for a packet from the network
layer.
If a packet comes from the network layer, the sender creates a frame, saves a
copy of the frame, starts the only timer and sends the frame.
The sender then moves to the blocking state.
Blocking State:
When the sender is in this state, three events can occur:
a. If a time-out occurs, the sender resends the saved copy of the frame and
restarts the timer.
b. If a corrupted ACK arrives, it is discarded.
c. If an error-free ACK arrives, the sender stops the timer and discards the
saved copy of the frame. It then moves to the ready state.
Receiver:
The receiver is always in the ready state. Two events may occur:
a. If an error-free frame arrives, the message in the frame is delivered to the
network layer and an ACK is sent.
b. If a corrupted frame arrives, the frame is discarded.
Scenario 1:
The first frame is sent and acknowledged. The second frame is sent, but lost. After
time-out, it is resent. The third frame is sent and acknowledged, but the
acknowledgment is lost. The frame is resent.
89 CN(18EC71)
Problem with this scheme: The network layer at the receiver site receives two
copies of the third packet, which is not right.
Solution: we can correct this problem using sequence numbers and
acknowledgment numbers.
Sequence and acknowledgment numbers:
Sequence number:
Define the current number of the frame that is being transmitted.
The sequence numbers start with 0.
Binary in nature.
Acknowledgment number:
Defines the sequence number of the next frame to receive.
The acknowledgment numbers start with 1.
Binary in nature.
Scenario 2:
Figure below shows how adding sequence numbers and acknowledgment numbers
can prevent duplicates. The first frame is sent and acknowledged. The second frame
is sent, but lost. After time-out, it is resent. The third frame is sent and
acknowledged, but the acknowledgment is lost. The frame is resent.
90 CN(18EC71)
Figure: Flow diagram for Stop-and-Wait protocol with Sequence and acknowledgment numbers
Piggybacking:
In two-way communication, whenever a data frame is received, the receiver waits and does
not send the control frame (acknowledgement or ACK) back to the sender immediately.
The receiver waits until its network layer passes in the next data packet. The delayed
acknowledgement is then attached to this outgoing data frame.
Definition: The technique of temporarily delaying the acknowledgement so that it can be
hooked with next outgoing data frame is known as piggybacking.
Working Principle:
In the data frame itself, we incorporate one additional field for acknowledgment
(called ACK).
Whenever party A wants to send data to party B, it will send the data along with
this ACK field. Considering the sliding window here of size 8 bits, if A has send
frames up to 5 correctly (from B), and wants to send frames starting from frame 6,
it will send ACK6 with the data.
Three rules govern the piggybacking data transfer.
If station A wants to send both data and an acknowledgment, it keeps both
fields there.
91 CN(18EC71)
Problems:
5. If the data link layer can detect errors between hops, why do you think we need another
checking mechanism at the transport layer?
Solution:
The errors between the nodes can be detected by the data link layer control, but the error
at the node (between input port and output port) of the node cannot be detected by the data link
layer
Question Bank:
13. How many point-to-point WANs are needed to connect n LANs if each LAN should be
able to directly communicate with any other LAN?
14. When we use local telephones to talk to a friend, are we using a circuit switched network
or a packet-switched network?
15. When a resident uses a dial-up or DLS service to connect to the Internet, what is the role
of the telephone company?
93 CN(18EC71)
16. What is the first principle we discussed in this chapter for protocol layering that needs to
be followed to make the communication bidirectional?
17. Explain the difference between an Internet draft and a proposed standard.
18. Explain the difference between a required RFC and a recommended RFC.
19. Explain the difference between the duties of the IETF and IRTF.
20. What is the maximum number of characters or symbols that can be represented by
Unicode?
21. A color image uses 16 bits to represent a pixel. What is the maximum number of different
colors that can be represented?
22. Assume six devices are arranged in a mesh topology. How many cables are needed? How
many ports are needed for each device?
23. For each of the following four networks, discuss the consequences if a connection fails.
a. Five devices arranged in a mesh topology
b. Five devices arranged in a star topology (not counting the hub)
c. Five devices arranged in a bus topology
d. Five devices arranged in a ring topology
24. We have two computers connected by an Ethernet hub at home. Is this a LAN or a WAN?
Explain the reason.
25. In the ring topology, what happens if one of the stations is unplugged?
26. In the bus topology, what happens if one of the stations is unplugged?
27. Performance is inversely related to delay. When we use the Internet, which of the following
applications are more sensitive to delay?
a. Sending an e-mail
b. Copying a file
c. Surfing the Internet
28. List the layers of the Internet model.
29. Which layers in the Internet model are the network support layers?
30. Which layer in the Internet model is the user support layer?
31. What is the difference between network layer delivery and transport layer delivery?
32. What is a peer-to-peer process?
33. How does information get passed from one layer to the next in the Internet model?
34. What are headers and trailers, and how do they get added and removed?
35. What are the concerns of the physical layer in the Internet model?
36. What are the responsibilities of the data link layer in the Internet model?
37. What are the responsibilities of the network layer in the Internet model?
38. What are the responsibilities of the transport layer in the Internet model?
39. What is the difference between a port address, a logical address, and a physical address?
40. Name some services provided by the application layer in the Internet model.
41. How do the layers of the Internet model correlate to the layers of the OSI model?
42. How are OSI and ISO related to each other?
94 CN(18EC71)
43. Match the following to one or more layers of the OSI model:
44. What are the three major components of a telephone network?
45. Give some hierarchical switching levels of a telephone network.
46. What is LATA? What are intra-LATA and inter-LATA services?
47. Describe the SS7 service and its relation to the telephone network.
48. What are the two major services provided by telephone companies in the United States?
49. What is dial-up modem technology? List some of the common modem standards and their
data rates.
50. What is DSL technology? What are the services provided by the telephone companies using
DSL? Distinguish between a DSL modem and a DSLAM.
51. Compare and contrast a traditional cable network with a hybrid fiber-coaxial network.
52. How data transfer is achieved using CATV channels?
53. Distinguish between CM and CMTS.
54. Why circuit-switching was chosen for telephone networks?
55. Define end-to-end addressing in a telephone network when two parties communicate.
56. When we have an overseas telephone conversation, we sometimes experience a delay. Give
the reason?
57. Draw a bar chart to compare the different downloading data rates of common modems.
58. Draw a bar chart to compare the different downloading data rates of common DSL
technology implementations (use minimum data rates).
59. Calculate the minimum time required to download one million bytes of information using
each of the following technologies:
a. V32 modem
b. V32bis modem
c. V90 modem
60. Repeat Exercise 17 using different DSL implementations (consider the minimum rates).
61. Repeat Exercise 17 using a cable modem (consider the minimum rates).
62. What type of topology is used when customers in an area use DSL modems for data transfer
purpose?
VTU Question:
1. Show the layer representation in the TCP/IP model and the OSI model and explain. (Jan
2010, 10 M)
2. Give a brief overview of SS7 signaling. (Jan 2010, 10 M)
3. Match the following functions to the appropriate layers in the OSI model.
a. Dividing the transmitted bit stream into frames
b. Determining the route to be used through the subnet
c. Reliable process to process message delivery
95 CN(18EC71)
23. With a neat diagram explain TCP/IP reference model. How do the layers of TCP/IP model
correlate to the OSI model?(January 2014 08M , January 2016 10M)
24. Explain about IxCs with a schematic. What are point of presence?( January 2014, 06M)
25. How ADSL could achieve higher data rate over existing local loops? Explain DSLAM. (
January 2014,06M)
26. What is ADSL? Explain the operation of ADSL using discrete multitone modulation with
a neat diagram. (January 2016 10M)
27. Explain usage of existing loops, adaptive technology and discrete multitone technique in
ADSL. (July 2015, 10 M)
28. Mention the layers of TCP/IP protocol suite and give brief explanation of protocols used
in the suite. (July 2015, 10 M)