Professional Documents
Culture Documents
Professor
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.
P
TEXT BOOKS:
1. Data Communication and Networking, B Forouzan, 5th Ed, TMH 2006.
G
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.
h
Special Thanks To:
es
Faculty (Chronological): Arun A Badiger (GMIT Davengere), Lata S H (GMIT
Davengere), Dr. Manjunath N (JNNCE Shimoga), Harisha G C (GMIT Davangere),
Suresha V Sathegala (KVGCE Sullia)
h
at
BY:
RAGHUDATHESH G P
ud
Asst Prof
ECE Dept, GMIT
Davangere 577004
gh
Cell: +917411459249
Mail: datheshraghubooks@gmail.com
Ra
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.
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
P
parties creating and using the data.
Definition: Data communications are the exchange of data between two devices via some
G
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
h
1. Data communications
2. Networking
3. Protocols and standards
h es
4. Networking models.
at
Networks exist so that data may be sent from one place to another which is the basic
concept of data communications.
ud
Data communications between remote parties can be achieved through a process called
networking.
gh
Protocols and standards are vital to the implementation of data communications and
networking.
Protocol:
Ra
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.
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
P
How fast the data can be sent.
Ex.: if a sender produces a data at a rate of 1Mbps and the receiver can
G
process the date at a rate of only 0.5 Mbps, then the transmission will
overload the receiver and same data will be lost.
h
Standard:
es
A standard is a protocol that has been adopted by vendors and manufacturers.
There are 2 types Data Communication standards:
h
de facto:
Standards that have not been approved by an organized body
at
Network models serve to organize, unify, and control the hardware and software
components of data communications and networking.
Network:
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.
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
P
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
G
multi-user licenses.
Shared Internet Access
h
Calculations Distribution
Data Communications:
h es
Definition: “Data communications are the exchange of data between two devices via
at
some form of transmission medium such as a wire cable”.
To realize data communications to occur, the communicating devices must be part of a
ud
characteristics:
1. Delivery:
The system must deliver data to the correct destination.
Ra
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.
P
Components:
G
A data communications system has five components
h
h es
at
ud
Message:
gh
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.
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:
P
All types of multimedia information are process and store within the computer in a digital
G
form.
1. Text:
Text contains strings of characters entered through keyboard.
h
Characters are represented as a bit pattern, a sequence of bits (0s or 1s).
es
Different sets of bit patterns have been designed to represent text symbols.
Codeword: each character represented by a unique combination of fixed number of
h
bits. Complete text hence, can be represented by strings of codewords.
at
Ex:
Unicode uses 32 bits to represent a symbol or character used in any language
ud
in the world.
American Standard Code for Information Interchange (ASCII),
gh
developed by United States, constitutes the first 127 characters in Unicode and
is also referred to as Basic Latin.
Ra
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.
3. Images:
Definition: “An image is an artifact that depicts or records visual perception”.
Images are also represented by bit patterns.
P
enough to represent a pixel.
If an image is not made of pure white and pure black pixels, we can increase the size
G
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
h
represented by 00, a dark gray pixel by 01, a light gray pixel by 10, and a white pixel
by 11. es
There are several methods to represent color images.
h
RGB:
So called because each color is made of a combination of three primary colors:
at
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,
gh
YCM:
In this type a color is made of a combination of three other primary colors:
yellow, cyan, and magenta.
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.
Dept. of ECE raghudathesh.weebly.com Page No - 7
CCN 15ES64 Module 1 Lata S H Asst. Professor
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
P
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.
G
Data Flow:
h
Transfer of information streams or communication between two systems associated with
an application can be in 5 modes:
1. Simplex
h es
2. Half-duplex (Two-way alternate)
at
3. Duplex (Two-way simultaneous)
4. Broadcast
ud
5. Multicast
1. Simplex:
gh
Ra
P
G
h
Information flows in both directions but, alternatively.
each station can both transmit and receive, but not at the same time.
Ex.:
es
1. Walkie-talkies and CB (citizens band) radios
h
2. User making a request for some information form a remote server, which returns
at
the requested information.
The half-duplex mode is used in cases where there is no need for communication in both
ud
directions at the same time; the entire capacity of the channel can be utilized for each
direction.
gh
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.
P
2. Two-way flow of the digitized speech and video associated with a video
telephony application.
G
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.
h
4. Broadcast:
h es
at
ud
gh
Ra
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:
P
specific subset of the nodes that are connected to the network (multicast group).
Ex.: video conferencing involving a predefined group of terminals/computers connected
G
to a network exchanging integrated speech and video streams.
In half-duplex and duplex communications the bit rate associated with the flow of
h
information in each direction can be same or different.
called as Symmetric.
h es
1. Rate associated, with the flow of information in each direction is equal then is
2. Rate associated, with the flow of information in each direction is unequal then is
at
called as Asymmetric.
Ex.: Video telephone call: involves exchange of integrated digitized speech and video
ud
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.
Network Criteria:
P
1. Performance:
Performance of the network can be measured in many ways, including transit time
G
and response time.
Transit time: It is the amount of time required for a message to travel
h
from one device to another.
es
Response time: It is the elapsed time between an inquiry and a response.
Throughput: It is the rate of successful message delivery over a
h
communication channel.
Delay: The delay of a network specifies how long it takes for a bit of data
at
to travel across the network from one node or endpoint to another.
ud
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
gh
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:
P
G
h
Figure: point-to-point connection
es
A point-to-point connection provides a dedicated link between two devices.
The entire capacity of the link is reserved for transmission between those two devices.
h
Most of the point-to-point connections use an actual length of wire or cable to
at
connect the two ends, but other options, such as microwave or satellite links, are also
used.
ud
2. Multipoint:
Ra
P
called Temporally shared or Time Shared Line Configuration
G
Physical Topology:
The term physical topology refers to the way in which a network is laid out
h
physically.
es
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.
h
Various physical topologies are:
at
1. Mesh Topology:
ud
gh
Ra
In a mesh topology, every device has a dedicated point-to-point link to every other
device.
Dept. of ECE raghudathesh.weebly.com Page No - 14
CCN 15ES64 Module 1 Lata S H Asst. Professor
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.
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
P
figure.
G
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
h
shared by multiple devices.
es
A mesh topology is robust. If one link becomes unusable, it does not
incapacitate the entire system.
h
there is the advantage of privacy or security. When every message travels
at
along a dedicated line, only the intended recipient sees it. Physical boundaries
prevent other users from gaining access to messages.
ud
enables the network manager to discover the precise location of the fault and
aids in finding its cause and solution.
Disadvantages:
Ra
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.
Implementation of a mesh topology: connection of telephone regional offices in
which each regional office needs to be connected to every other regional office.
2. Star Topology:
P
G
h
h es
Figure: Star Topology
at
In a star topology, each device has a dedicated point-to-point link only to a central
ud
isolation. As long as the hub is working, it can be used to monitor link problems
and bypass defective links.
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
P
LANs often use a star topology with a central hub.
G
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
h
below
h es
at
ud
gh
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.
Ra
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.
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.
P
4. Ring Topology:
G
h
h es
at
ud
A signal is passed along the ring in one direction, from device to device, until it reaches
its destination.
Token passing is an important mechanism in ring topology where, a token contains a
piece of information which is sent along with data by the source computer.
Basically, a token is a permission packet which allows a particular node the permission to
release information over the network.
The nodes with token are the ones only allowed to send data. Other nodes have to wait
for an empty token to reach them.
A token is regularly passed from one node to another. And if a node has some
information to pass on the network, the node releases the information. If the node does
not have any data to release on the network, then it transfers the token to the next node.
Each device in the ring has a repeater. When the devices receive the signal intended for
the other node, it just regenerates the bits and passes them along as shown in figure.
Advantages:
A ring is relatively easy to install and reconfigure. Each device is linked to only
its immediate neighbors (either physically or logically). To add or delete a device
P
requires changing only two connections.
Fault isolation is simplified. Generally, in a ring a signal is circulating at all times.
G
If one device does not receive a signal within a specified period, it can issue an
alarm. The alarm alerts the network operator to the problem and its location.
Reduced chances of data collision as each node release a data packet after
h
receiving the token.
traffic
h es
Token passing makes ring topology perform better than bus topology under heavy
In a simple ring, a break in the ring (such as a disabled station) can disable the
entire network. This weakness can be solved by using a dual ring or a switch
capable of closing off the break.
gh
Single point of failure, that means if a node goes down entire network goes down.
Ra
Network Types:
One way to categorize the different types of computer network designs is by their scope
or scale.
For historical reasons, the networking industry refers to nearly every type of design as
some kind of area network.
Common examples of area network types are:
1. LAN - Local Area Network
2. WLAN - Wireless Local Area Network
3. WAN - Wide Area Network
4. MAN - Metropolitan Area Network
P
G
h
Figure: An Isolated LAN in the past and today
es
A LAN connects network devices over a relatively short distance.
A networked office building, school, or home usually contains a single LAN, though
h
sometimes one building will contain a few small LANs (perhaps one per room), and
at
occasionally a LAN will span a group of nearby buildings.
LAN’s are also typically owned, controlled, and managed by a single person or
ud
organization. They also tend to use certain connectivity technologies, primarily Ethernet
and Token Ring.
gh
Each host in a LAN has an identifier, an address, that uniquely defines the host in the
LAN.
A packet sent by a host to another host carries both the source host’s and the destination
Ra
host’s addresses.
LAN does not define the minimum or maximum number of hosts in a LAN.
Figure below shows a LAN using either a common cable or a switch
When LANs were used in isolation (which is rare today), they were designed to allow
resources to be shared between the hosts.
LANs today are connected to each other and to WANs to create communication at a
wider level.
P
2. Switched WANs.
G
1. Point-to-Point WAN:
h
h es
at
Figure: A point-to-point WAN
ud
Switched WAN:
Ra
Internetwork:
P
G
h
es
Figure: An internetwork made of two LANs and one point-to-point WAN
h
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.
at
Scenario: assume that an organization has two offices, one on the east coast and the other
ud
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
gh
P
G
h
h es
Figure: A heterogeneous network made of four WANs and three LANs
at
Switching:
An internet is a switched network in which a switch connects at least two links together.
ud
A switch needs to forward data from a network to another network when required.
The two most common types of switched networks are:
gh
1. Circuit-switched network
2. Packet-switched networks
Ra
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.
Network: In above figure, the four telephones at each side are connected to a switch. The
P
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
G
voice communications at the same time; the capacity can be shared between all pairs of
telephone sets.
h
Scenario 1: Here, all telephone sets are busy; four people at one site are talking with four
es
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
h
other side; only one-fourth of the capacity of the thick line is used.
at
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
ud
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.
gh
Packet-Switched Network:
Ra
P
Network: Figure above shows a small packet-switched network that connects four
computers at one site to four computers at the other site.
G
A router in a packet-switched network has a queue that can store and forward the packet.
Scenario 1: Assume the capacity of the thick line is only twice the capacity of the data
line connecting the computers to the routers. If only two computers (one at each site)
h
need to communicate with each other, there is no waiting for the packets.
es
Scenario 2: If packets arrive at one router when the thick line is already working at its
full capacity, the packets should be stored and forwarded in the order they arrived.
h
The two scenario show that a packet-switched network is more efficient than a circuit
at
switched network, but the packets may encounter some delays.
ud
The Internet:
An electronic communications network that connects computer networks and
gh
P
G
h
Figure: conceptual view of the Internet
es
The figure shows the Internet as several backbones, provider networks, and customer
h
networks.
at
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
ud
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
Ra
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
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
P
speed Internet services to residences or small businesses. The DSL
service also allows the line to be used simultaneously for voice and
G
data communication.
2. Using Cable Networks:
h
Now a days residents have begun using cable TV services instead of
es
antennas to receive TV broadcasting.
The cable companies have been upgrading their cable networks and
h
connecting to the Internet.
at
A residence or a small business can be connected to the Internet by using
this service.
ud
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:
P
First Scenario:
Communication is simple which can occur in only one layer. Assume Mira and Tara are
G
neighbors with a lot of common ideas.
Communication between Mira and Tara takes place in one layer, face to face, in the same
h
language, as shown in figure below
h es
at
ud
1. First, Mira and Tara know that they should greet each other when they meet.
2. Second, they know that they should confine their vocabulary to the level of their
Ra
friendship.
3. Third, each party knows that she should refrain from speaking when the other
party is speaking.
4. Fourth, each party knows that the conversation should be a dialog, not a monolog:
both should have the opportunity to talk about the issue.
5. Fifth, they should exchange some nice words when they leave.
We can see that the protocol used by Mira and Tara is different from the communication
between a professor and the students in a lecture hall.
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:
P
G
h
h es
at
ud
gh
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
Ra
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
P
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
G
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
h
about how inputs are changed to outputs.
es
If two machines provide the same outputs when given the same inputs, they can replace
each other.
h
E.x:, Tara and Miura can buy the second layer machine from two different manufacturers.
at
As long as the two machines create the same cipher text from the same plaintext and vice
versa.
ud
Advantages:
1. Protocol layering allows us to separate the services from the implementation. A
gh
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
Ra
systems 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.
Logical Connections:
Figure illustrates logical connection between each layer as shown in figure below.
P
G
h
h es
at
ud
Here we have layer-to-layer communication. Mira and Tara can think that there is a
gh
logical (imaginary) connection at each layer through which they can send the object
created from that layer.
Ra
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.
P
G
h
h es
Figure: Tasks involved in sending a letter
at
The process of sending a letter to a friend would be complex if there were no services
available from the post office.
ud
The task includes a sender, a receiver, and a carrier that transports the letter.
There is a hierarchy of tasks:
gh
1. Higher Layer
2. Middle Layer and
3. Lower Layer.
Ra
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.
P
2. Enables programmers to specialize in a particular level
3. Allows upgrades to a specific layer without effecting other layers
G
4. Encourages interoperability
5. Allows for standardized interfaces
h
Definition:
of network communications.
The purpose of the OSI model:
To show how to facilitate communication between different systems without
Ra
P
5. Session Layer
6. Presentation Layer and
G
7. Application Layer
The structure of seven layers in OSI model as shows figure below
h
h es
at
ud
gh
Ra
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.
Communication between machines is therefore a peer-to-peer process using the protocols
appropriate to a given layer, which is shown in figure below
P
G
h
h es
at
ud
gh
Ra
P
Transport layer (Layer 4):
Links the above two layers subgroups.
This layer ensures that what the lower layers have transmitted is in a form
G
which can be used by the upper layers.
The upper OSI layers are almost always implemented in software.
h
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.
Encapsulation:
Encapsulation is a process where the data portion of a packet at level N-1 carries the
whole packet from level N.
P
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.
G
Layers in the OSI Model:
h
1. Physical Layer:
The physical layer is concerned with transmitting raw bits over a communication
es
channel.
It deals with the mechanical, electrical, timing interfaces of the primary connections
h
like cable, connectors etc. and the physical transmission medium, which lies below the
at
physical layer.
ud
gh
Ra
P
configuration.
Physical Topology:
G
Defines how device are connected to form network.
Ex.: Ring, Bus, Mesh, star Topology.
Transmission mode:
h
Defines the direction of transmission between two devices.
Ex.: Simplex, half duplex, duplex.
h es
at
ud
gh
Ra
P
G
Figure: Data link layer
h
Major responsibilities of data link layer are:
es
Framing: Divides the stream of bits received from network layer into
manageable data units called frames.
Physical addressing: Adds a header to the frame to define the sender and/or
h
receiver of the frame.
at
Flow Control: If the receiver is slower than the transmitter data link imposes a
flow control mechanism to avoid overwhelming the receiver.
Error Control: Retransmission of damaged frames, recognition of duplicate
ud
frames. Error control is performed by adding a trailer to the end of the frame.
Access Control: Specifies which device has to get control over the link at any
gh
given time when two or more devices connected to the same link.
Ra
Note: Type ipconfig/all at command prompt to check your system’s Mac address.
P
G
h
h es
at
ud
gh
Ra
Hop-to-hop delivery:
Figure below hop-to-hop (node-to-node) delivery by the data link layer
P
G
h
h es
Figure: Hop-to-Hop deliveries
at
As the figure above shows, communication at the Data Link layer occurs between two
ud
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
gh
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.
3. Network Layer:
This layer is responsible for source to destination delivery of individual packet may be
across multiple networks/links.
P
Figure: Network layer
G
Other responsibilities of network layer include:
Logical addressing:
h
Physical address used in data link layer handles addressing locally i.e., within the
network. es
If the packet moves out of the network then network layer adds the header to the
packet coming from upper layer which specifies the address of the sender and the
h
receiver which are present on the different network.
at
Routing:
Various independent networks/links are interconnected to form a large
ud
Figure below shows the source to destination delivery by the network layer.
Ra
P
G
Figure: Router
h
4. Transport Layer:
Responsible for process-to-process delivery of the entire message.
es
A process is an application program running on a host.
Transport layer ensures the whole message arrives intact and in order, overseeing both
h
error control and flow control at the source-to-destination level.
at
Figure below shows the relationship of the transport layer to the network and session
layers.
ud
gh
Ra
P
A connection oriented transport layer makes a connection with the
transport layer at the destination machine first before delivering the
packets. After all the data are transferred, the connection is terminated.
G
Flow control:
Here flow control at this layer is performed end to end rather than across a
h
single link.
Error control:
The sending transport layer makes sure that the entire message arrives at
the receiving transport layer without error (damage, loss, or duplication).
at
Error correction is usually achieved through retransmission.
Figure below illustrates process-to-process delivery by the transport layer.
ud
gh
Ra
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.
P
Figure below shows the relationship between the presentation layer and the application
and session layers.
G
h
h es
at
6. Presentation Layer:
The presentation layer is concerned with the syntax and semantics of the information
gh
P
G
Figure: Presentation layer
h
h es
at
ud
gh
Ra
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.
Figure below shows the relationship of the application layer to the user and the
presentation layer.
P
Figure: Application layer
G
The major duties of the application:
Network virtual terminal: Enable to user for remote login
h
File transfer, access, and management
Mail services
Directory services
h es
TCP/IP PROTOCOL SUITE:
at
The TCPIIP protocol suite was developed prior to the OSI model.
Layers in the TCP/IP protocol suite do not exactly match those in the OSI model.
ud
The original TCP/IP protocol suite was defined as having four layers
1. Host-to-network
2. Internet
gh
3. Transport
4. Application
Comparison of TCP/IP is compared to OSI is shown below
Ra
We can say that the host-to-network layer is equivalent to the combination of the physical
and data link layers.
The internet layer is equivalent to the network layer.
The application layer is roughly doing the job of the session, presentation, and
application layers with the transport layer in TCP/IP taking care of part of the duties of
the session layer.
Thus, we assume that the TCP/IP protocol suite is made of five layers: physical, data link,
network, transport, and application.
The first four layers provide physical standards, network interfaces, internetworking, and
transport functions that correspond to the first four layers of the OSI model.
P
The three topmost layers in the OSI model, however, are represented in TCP/IP by a
single layer called the application layer.
G
TCP / IP PROTOCOL layers description:
h
h es
at
ud
gh
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.
P
ARP is used to find the physical address of the node when its Internet
address is known.
G
2. Reverse Address Resolution Protocol (RARP):
It allows a host to discover its Internet address when it knows only its
physical address.
h
It is used when a computer is connected to a network for the first time or
when a diskless computer is booted.
es
3. Internet Control Message Protocol (ICMP):
It is a mechanism used by hosts and gateways to send notification of
h
datagram problems back to the sender.
ICMP sends query and error reporting messages.
at
4. Internet Group Message Protocol (IGMP):
It is used to facilitate the simultaneous transmission of a message to a
ud
group of recipients.
3. Transport Layer:
gh
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
Ra
process.
User Datagram Protocol (UDP):
It is a process-to-process protocol that adds only port addresses, checksum error
control, and length information to the data from the upper layer.
Transmission Control Protocol (TCP):
It provides full transport-layer services to applications. It is a reliable stream
transport protocol. It gives connection-oriented: A connection must be established
between both ends services.
SCTP (Stream Control Transmission Protocol):
It provides support for newer applications such as voice over the Internet.
It is a transport layer protocol that combines the best features of UDP and TCP.
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.
P
3. File Transfer Protocol (FTP): Is a standard way to transfer files between
different machines. Needs FTP client program on computer.
G
4. Domain Naming System (DNS): Provides meaningful names like
achilles.mycorp.com for computers to replace numerical addresses like
123.45.67.89.
h
5. TELNET: A remote terminal emulation protocol that enables clients to log on to
remote hosts on the network.
network devices.
h es
6. Simple Network Management Protocol (SNMP): Used to remotely manage
layers. layers.
Supports both connectionless & Supports only connectionless communication
connection-oriented communication in in the Network layer, but both connectionless
Ra
P
Scenario:
When an email is sent using one of the favorite email program (like Outlook or
G
Thunderbird) that email is sent from the Application layer to the Transport layer.
The Transport layer encapsulates the data and adds its own header (with its own
h
information, such as which port will be used) and passes the data to the Internet
layer,
es
Internet layer again encapsulates the received data and adds its own header,
usually with information about the source and destination IP addresses. The
h
Internet layer then passes the data to the Network Access layer.
at
This layer is the only layer that adds both a header and a trailer. The data is then
sent through a physical network link.
ud
Decapsulation:
gh
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
Ra
data.
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.
P
G
h
es
Figure: Encapsulation/Decapsulation
h
at
Encapsulation at the Source Host:
At the source, we have only encapsulation.
ud
to the whole as the message. The message is passed to the transport layer.
2. The transport layer takes the message as the payload, the load that the transport
layer should take care of. It adds the transport layer header to the payload, which
Ra
4. The network layer takes the transport-layer packet as data or payload and adds its
own header to the payload. The header contains the addresses of the source and
destination hosts and some more information used for error checking of the
header, fragmentation information, and so on. The result is the network-layer
packet, called a datagram. The network layer then passes the packet to the data-
link layer.
5. 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
P
is passed to the physical layer for transmission.
G
Decapsulation and Encapsulation at the Router:
At the router, we have both decapsulation and encapsulation because the router is
h
connected to two or more links.
es
After the set of bits are delivered to the data-link layer, this layer decapsulates the
datagram from the frame and passes it to the network layer.
h
The network layer only inspects the source and destination addresses in the datagram
at
header and consults its forwarding table to find the next hop to which the datagram is to
be delivered. The contents of the datagram should not be changed by the network layer in
ud
the router unless there is a need to fragment the datagram if it is too big to be passed
through the next link.
gh
The datagram is then passed to the data-link layer of the next link.
The data-link layer of the next link encapsulates the datagram in a frame and passes it to
the physical layer for transmission.
Ra
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
Each address is related to a specific layer in the TCP/IP architecture, as shown in the
figure below
P
G
h
h es
at
ud
gh
Ra
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).
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
P
interface card (NIC). LocalTalk (Apple), however, has a 1-byte dynamic address that
changes each time the station comes up.
G
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
h
only addresses needed. The rest of the header contains other information needed at this
es
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
h
physical address 87 is the receiver. The data link layer at the sender receives data from an
at
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)
ud
addresses. Note that in most data link protocols, the destination address, 87 in this case,
comes before the source address (10 in this case).
gh
Ra
P
G
h
h es
at
ud
gh
Ra
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.
P
LANs.
Each device has a pair of addresses (logical and physical) for each connection. In this
G
case, each Computer is connected to only one link and therefore has only one pair of
addresses. Each router, however, is connected to three networks (only two are shown in
the figure). So each router has three pairs of addresses, one for each connection. The
h
physical addresses will change from hop to hop, but the logical addresses usually remain
the same.
h es
at
ud
gh
Ra
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
P
G
h
Figure: ipconfig/all
3. Port Addresses:
es
Port address is transport layer ID (similar to IP in Network Layer) which identify the
h
application on the host.
at
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.
ud
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
gh
complete.
Today, computers are devices that can run multiple processes at the same time.
Ra
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.
P
G
h
h es
at
Figure: Port addresses
ud
2. Registered ports.
3. Dynamic/private ports.
In your machine Port number is seen as below
Ra
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
P
by the sending computer.
G
Multiplexing and Demultiplexing:
Multiplexing in this case means that a protocol at a layer can encapsulate a packet from several
h
next-higher layer protocols (one at a time); demultiplexing means that a protocol can decapsulate
es
and deliver a packet to several next-higher layer protocols (one at a time).
Since the TCP/IP protocol suite uses several protocols at some layers, multiplexing is at
h
the source and demultiplexing at the destination.
at
Figure below shows the concept of multiplexing and demultiplexing at the three upper
layers.
ud
gh
Ra
P
such as ARP
G
h
h es
at
ud
gh
Ra
P
2. Flow
3. Error control
G
All the above functions are software implemented protocols that provide smooth and
reliable transmission of frames between nodes.
h
Nodes and Links:
es
Communication at the data-link layer is node-to-node.
A data unit from one point in the Internet needs to pass through many networks (LANs
h
and WANs) to reach another point.
at
Hosts and routers (all devices) are called nodes and the networks in between are referred
as links.
ud
gh
Ra
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.
P
G
h
h es
at
ud
Scenario: For simplicity, we have assumed that we have only one router between the
source and destination.
Ra
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:
Framing:
A packet at the data-link layer is normally called a frame.
P
with data.
Flow Control refers to a set of procedures used to restrict the amount of
G
data that the sender can send before waiting for acknowledgment.
h
The sending data-link layer at the end of a link is a producer of frames; the
es
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,
h
frames at the receiving end need to be buffered while waiting to be
at
processed.
As it is impossible to have an unlimited buffer size at the receiving side.
ud
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.
P
A state occurring in network layer when the message traffic is so heavy
that it slows down network response time.
G
Effects of Congestion:
As delay increases, performance decreases.
h
If delay increases, retransmission occurs, making situation worse
Categories of Link:
h es
Two types of links are present:
at
Point to point link:
Here data-link layer that uses the whole capacity of the medium
ud
Here data-link layer that uses only part of the capacity of the link
Link shared between several pair of devices.
Ra
Eg. two friends use their cellular phones, they are using a broadcast link (the air is
shared among many cell phone users).
Two Sublayers:
P
broadcast links.
G
Link Layer Addressing:
As the data is transmitted over the internet through internetwork, it is not sufficient if we
h
use the IP addresses given to the packet as the source and destination addresses as they
through.
h es
define two ends but cannot define the links through which the datagram has to pass
IP addresses in the data gram should not be changed, i.e., source and destination
at
addresses due to several reasons because of which we define link layer addresses.
A link-layer address is sometimes called a link address, sometimes a physical address,
ud
layer.
IP addresses and link layer addresses are not in the same order:
IP addresses, the source address comes before the destination address
Ra
Link layer addresses, the destination address comes before the source.
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.
P
G
Figure: IP addresses and link-layer addresses in a small internet
h
es
The datagrams and frames are designed in this way described in the figure above, and all
internet users follow the design.
h
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
at
destination, why do we need to assign IP addresses to routers?
ud
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?
gh
Types of Addresses:
Link-layer protocols define three types of addresses:
1. Unicast Address:
P
Each host or each interface of a router is assigned a unicast address.
Unicasting means one-to-one communication.
G
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-
h
net, are 48 bits (six bytes) that are presented as 12 hexadecimal digits
separated by colons:
h es A3:34:45:11:92:F1
2. Multicast Address:
at
Multicasting means one-to-many communication.
Ex.: The multicast link-layer addresses in the most common LAN,
ud
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
gh
P
G
h
Figure: Position of ARP in TCP/IP protocol suite
includes the link-layer and IP addresses of the sender and the IP address of
the receiver.
Because the sender does not know the link-layer address of the receiver, the
gh
query is broadcast over the link using the link-layer broadcast address.
Every host or router on the network receives and processes the ARP request
Ra
packet, but only the intended recipient recognizes its IP address and sends
back an ARP response packet.
2. ARP reply:
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.
P
G
h
Figure: ARP Operation
es
Scenario: In Figure, the system on the left (A) has a packet that needs to be delivered to
h
another system (B) with IP address N2. In doing so:
at
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
ud
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.
gh
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.
Ra
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.
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:
P
G
Figure: ARP packet
h
The above figure shows the format of ARP packet:
The hardware type field defines the type of the link-layer protocol; Ethernet is
given the type 1.
es
The protocol type field defines the network-layer protocol: IPv4 protocol is
h
(0800)16.
at
The source hardware and source protocol addresses are variable-length fields
defining the link-layer and network-layer addresses of the sender.
ud
The destination hardware address and destination protocol address fields define
the receiver link-layer and network-layer addresses.
gh
Ex.: A host with IP address N1 and MAC address L1 has a packet to send to
another host with IP address N2 and physical address L2 (which is unknown to
the first host). The two hosts are on the same network. Figure below shows the
Ra
P
G
h
Figure: Example of ARP
DLC Services:
h es
The data link control (DLC) deals with procedures for communication between two
at
adjacent nodes - node-to-node communication, no matter whether the link is dedicated or
broadcast.
ud
Flow
Error control
All the above functions are software implemented protocols that provide smooth and
Ra
P
G
Figure: Data Link Layer
h
Framing:
es
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
h
another.
Framing in the DLL separates a message from one source to a destination , by adding a
at
sender address and destination address.
ud
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.
gh
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
Ra
Frame Size:
Frames can be of two types:
1. Fixed in size:
Size of the frame is fixed.
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:
P
1. Character-oriented approach
2. Bit-oriented approach
G
1. Character-Oriented Framing Approach:
Here data to be carried are 8-bit characters from a coding system such as ASCII.
h
The header carries the source and destination addresses and other control information.
es
Trailer carries error detection or error correction redundant bits, are also multiples of 8
bits.
h
To separate one frame from the next, an 8-bit (1-byte) flag is added at the beginning and
at
the end of a frame.
The flag composed of protocol-dependent special characters, signals at the start or end of
ud
2. Byte Stuffing:
P
In byte stuffing (or character stuffing), a special byte is added to the data section of the
G
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.
h
Whenever the receiver encounters the ESC character, it removes it from the data section
P
G
h
es
Figure: A Frame in a Bit-Oriented Protocol
This flag can create the same type of problem we saw in the byte-oriented protocols. That
h
is, if the flag pattern appears in the data, we need to somehow inform the receiver that
at
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
ud
in the data, so that the receiver does not mistake the pattern 0111110 for a flag.
Scenario:
Ra
Figure below shows bit stuffing at the sender and bit removal at the receiver.
P
G
Figure: Bit stuffing and unstuffing
Note that even if we have a 0 after five 1s, we still stuff a 0. The 0 will be removed by the
h
receiver.
es
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.
h
The real flag 01111110 is not stuffed by the sender and is recognized by the receiver.
at
The most important responsibilities of the data link layer are flow control and error
control.
gh
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.
Flow control is the regulation of the sender’s data rate so that the receiver buffer does
not become overwhelmed.
Two types of flow control:
1. Feedback based
2. Rate based flow control
Error Control:
In the data link layer, the term error control refers primarily to methods of error
P
detection and retransmission.
It allows the receiver to inform the sender of any frames lost or damaged in
G
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.
h
There are two methods of error control:
es
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
h
mostly in wired LANs such as Ethernet.
at
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
ud
The data link protocols are normally implemented in software by using one of the
common programming languages.
Ra
Figure below shows Taxonomy of protocols are used in data link layer
For the sake of discussion we consider all data link protocols are unidirectional but in
actual implementation they are bi-directional.
The behavior of a data-link-layer protocol can be better shown as a finite state machine
(FSM).
An FSM is thought of as a machine with a finite number of states.
The machine is always in one of the states until an event occurs. Each event is associated
with two reactions: defining the list (possibly empty) of actions to be performed and
determining the next state (which can be the same as the current state).
P
One of the states must be defined as the initial state, the state in which the machine starts
when it turns on.
G
The figure below shows a machine with three states. There are only three possible events
and three possible actions.
SATE I: The machine starts in state I. If event 1 occurs, the machine performs actions 1
h
and 2 and moves to state II.
es
STATE II: When the machine is in state II, twoevents may occur. If event 1 occurs, the
machine performs action 3 and remains in the same state, state II. If event 3 occurs, the
h
machine performs no action, but move to state I.
at
ud
gh
Ra
Figure: FSM
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
P
Simplest Protocol:
Some of the assumption has been made for developing the algorithm for simplex
G
protocol:
1. The channel is a perfect noiseless channel (error free). Hence no frames are lost,
h
duplicated, or corrupted.
2. No flow control and error control used.
es
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.
h
5. Processing time that is small enough to be negligible.
at
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
ud
error control.
gh
Ra
The data-link layer at the sender gets a packet from its network layer, makes a frame out
of it, and sends the frame.
P
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.
G
The data-link layers of the sender and receiver provide transmission services for their
network layers.
h
es
Finite State Machine For Simple Protocol (FSM):
h
at
ud
gh
Ra
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.
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
P
G
h
es
Algorithm: Sender-site algorithm for the simplest protocol
h
at
ud
gh
Ra
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.
P
G
Figure: Flow Diagram
h
Stop-and-Wait Protocol:
es
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
h
before sending the next one.
at
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
ud
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
Ra
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.
Figure below shows the FSMs for our primitive Stop-and-Wait protocol
P
G
h
h es
at
ud
gh
Ra
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:
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
P
saved copy of the frame. It then moves to the ready state.
G
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
h
network layer and an ACK is sent.
Scenario 1:
h es
b. If a corrupted frame arrives, the frame is discarded.
The first frame is sent and acknowledged. The second frame is sent, but lost.
at
After time-out, it is resent. The third frame is sent and acknowledged, but the
acknowledgment is lost. The frame is resent.
ud
gh
Ra
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.
Acknowledgment number:
P
Defines the sequence number of the next frame to receive.
G
the acknowledgment numbers start with 1.
Scenario 2:
Figure below shows how adding sequence numbers and acknowledgment
h
numbers can prevent duplicates. The first frame is sent and acknowledged. The
es
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.
h
at
ud
gh
Ra
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.
P
Working Principle:
Piggybacking data is a bit different from Sliding Window Protocol used in
G
the OSI model. 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
h
this ACK field. Considering the sliding window here of size 8 bits, if A has send
es
frames up to 5 correctly (from B), and wants to send frames starting from frame 6,
it will send ACK6 with the data.
h
Three rules govern the piggybacking data transfer.
at
If station A wants to send both data and an acknowledgment, it keeps both
fields there.
ud
If station A wants to send just the data, then the last acknowledgment field
is sent along with the data. Station B simply ignores this duplicate ACK
frame upon receiving.
Ra
Advantages:
Better use of available channel bandwidth.
The disadvantages of piggybacking are:
Additional complexity.
If the data link layer waits too long before transmitting the acknowledgement,
then retransmission of frame would take place.
Problems:
P
b. Route selection - Network Layer
c. Defines frames - Data Link Layer
G
d. Provides user services such as e-mail and file transfer- Application layer
e. Transmission of bit stream across physical medium - Physical Layer
h
3. Match the following to one or more layers of the OSl model:
a. Communicates directly with user's application program- Transport Layer
es
b. Error correction and retransmission - Transport Layer
c. Mechanical, electrical, and functional interface - Physical Layer
h
d. Responsibility for carrying frames between adjacent nodes - Data Link Layer
at
4. Match the following to one or more layers of the OSI model:
a. Format and code conversion services - Presentation Layer
ud
5. If the data link layer can detect errors between hops, why do you think we need another
Ra
6. 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
d. ADSL modem
e. Cable modem
Solution:
a. V.32 modem:
It has data rate of 9600bps
Minimum time required to down load = Size of Data / Data Rate
= (10,00,000 / 9,600) Χ 8
= 834 seconds
= 13 min 54 sec
P
b. V.32 bis modem:
It has data rate of 14,400 bps
Minimum time required to down load = Size of Data / Data Rate
G
= (10,00,000 / 14,400) Χ 8
= 556 seconds
h
= 9 min 16 sec
c. V.90 modem:
It has data rate of 56,000 bps es
Minimum time required to down load = Size of Data / Data Rate
h
= (10,00,000 / 56,000) Χ 8
= 143 seconds
at
= 2 min 23 sec
d. ADSL modem:
ud
= 0.596 seconds
e. Cable TV modem:
Ra
Question Bank:
P
5. Categorize the four basic topologies in terms of line configuration.
6. What is the difference between half-duplex and full-duplex transmission modes?
G
7. Name the four basic network topologies, and cite an advantage of each type.
8. For n devices in a network, what is the number of cable links required for a mesh, ring,
bus, and star topology?
h
9. What are some of the factors that determine whether a communication system is a LAN
or WAN?
12. In a LAN with a link-layer switch, Host 1 wants to send a message to Host 3. Since
communication is through the link-layer switch, does the switch need to have an address?
at
Explain.
ud
gh
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?
Ra
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?
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
P
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?
G
27. Performance is inversely related to delay. When we use the Internet, which of the
following applications are more sensitive to delay?
h
a. Sending an e-mail
b. Copying a file
c. Surfing the Internet
h es
at
ud
gh
Ra
7. What are headers and trailers, and how do they get added and removed?
8. What are the concerns of the physical layer in the Internet model?
9. What are the responsibilities of the data link layer in the Internet model?
10. What are the responsibilities of the network layer in the Internet model?
11. What are the responsibilities of the transport layer in the Internet model?
12. What is the difference between a port address, a logical address, and a physical address?
13. Name some services provided by the application layer in the Internet model.
14. How do the layers of the Internet model correlate to the layers of the OSI model?
15. How are OSI and ISO related to each other?
16. Match the following to one or more layers of the OSI model:
P
17. What are the three major components of a telephone network?
18. Give some hierarchical switching levels of a telephone network.
19. What is LATA? What are intra-LATA and inter-LATA services?
G
20. Describe the SS7 service and its relation to the telephone network.
21. What are the two major services provided by telephone companies in the United States?
h
22. What is dial-up modem technology? List some of the common modem standards and
their data rates.
es
23. What is DSL technology? What are the services provided by the telephone companies
using DSL? Distinguish between a DSL modem and a DSLAM.
h
24. Compare and contrast a traditional cable network with a hybrid fiber-coaxial network.
25. How data transfer is achieved using CATV channels?
at
26. Distinguish between CM and CMTS.
27. Why circuit-switching was chosen for telephone networks?
ud
28. Define end-to-end addressing in a telephone network when two parties communicate.
29. When we have an overseas telephone conversation, we sometimes experience a delay.
Give the reason?
gh
30. Draw a bar chart to compare the different downloading data rates of common modems.
31. Draw a bar chart to compare the different downloading data rates of common DSL
technology implementations (use minimum data rates).
Ra
32. 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
33. Repeat Exercise 17 using different DSL implementations (consider the minimum rates).
34. Repeat Exercise 17 using a cable modem (consider the minimum rates).
35. What type of topology is used when customers in an area use DSL modems for data
transfer purpose?
VTU Question:
Dept. of ECE raghudathesh.weebly.com Page No - 92
CCN 15ES64 Module 1 Lata S H Asst. Professor
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
d. Format and code conversion services
e. Accessing the World Wide Web (Jan 2010, 10 M)
P
4. Explain OSI model, with a neat diagram. Consider a source, destination machine and
some intermediate nodes for discussion. (June 2010, 10 M)
5. How addresses employed (used) in internet employing TCP/IP protocol can be classified?
G
6. (June 2010, 02 M)
7. What is DSL technology? List different DSL’s available. Discuss salient feature of
h
ASDL. (June 2010, 08 M)
8. What are the levels of addresses that are used in internet, employing the TCP/IP
protocols? (December 2010, 10 M) es
9. What are different types of services provided by telephone networks? (December 2010,
h
10 M)
10. Name the major components of a telephone network. (December 2010 04 M, January
at
2016 04 M)
11. With a neat diagram, explain the TCP/IP reference model, giving a brief description of
ud
18. Describe the SS7 service and its relation to the telephone network. (December 2012, 05
M)
19. Distinguish between a DSL modem and a DSLAM. (December 2012, 05 M)
20. Explain briefly with relevant examples, the 4 levels of address that are used in an internet
employing the TCP/IP Protocols. (July 2013, 10 M)
21. Briefly describe the function of physical layer and data link layer. (July 2013, 06 M)
22. Explain the operation of ADSL using Discrete Multitone Technique indicating the
different channels with diagram. (July 2013, 04 M)
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)
P
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)
G
26. What is ADSL? Explain the operation of ADSL using discrete multitone modulation with
a neat diagram. (January 2016 10M)
h
27. Explain usage of existing loops, adaptive technology and discrete multitone technique in
ADSL. (July 2015, 10 M)