0% found this document useful (0 votes)
39 views185 pages

Unit 1 and 2

This document provides an overview of 5 units that make up a course on data communication networks. Unit I covers network fundamentals including categories of networks, communication models, data transmission concepts, protocol architectures like OSI and TCP/IP, LAN topologies, and transmission media. Subsequent units will cover the data link layer, network layer, transport layer, and applications. The first unit provides background information needed to understand the basic building blocks and functions of data communication networks.

Uploaded by

Vaibhav Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views185 pages

Unit 1 and 2

This document provides an overview of 5 units that make up a course on data communication networks. Unit I covers network fundamentals including categories of networks, communication models, data transmission concepts, protocol architectures like OSI and TCP/IP, LAN topologies, and transmission media. Subsequent units will cover the data link layer, network layer, transport layer, and applications. The first unit provides background information needed to understand the basic building blocks and functions of data communication networks.

Uploaded by

Vaibhav Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 185

DATA COMMUNICATION

NETWORKS
OBJECTIVES
• To and
basic
understand
• To and
understand require for
components d dat
• communication
To analyze the function and a
.

• To Acquire knowledge of various


developed for internet.
UNIT I NETWORK FUNDAMENTALS
Introduction to Networks – Categories of
Networks -Communication model –Data
transmission concepts and terminology –
Protocol architecture – Protocols – OSI –
TCP/IP – LAN Topology - Transmission
media.
UNIT II DATA LINK LAYER

Data link control – Error Detection – VRC


– LRC – CRC – Checksum – Error
Correction – Hamming Codes – MAC –
Ethernet, Token ring , Token Bus –
Wireless LAN - Bluetooth – Bridges.
UNIT III
NETWORK LAYER
Network layer – Switching concepts –
Circuit switching – Packet switching – IP
Addressing –IPV4, IPV6 – Routing
Protocols – Distance Vector – Link State.
UNIT IV
TRANSPORT LAYER
Transport layer – service – Connection
establishment – Flow control –
Transmission control protocol –
Congestion control and avoidance – User
datagram protocol - Transport for Real
Time Applications (RTP).
UNIT V APPLICATIONS
Applications - DNS – E-Mail Protocols –
WWW – SNMP – SMTP - Security –
Threats and Services- Cryptography -DES-
RSA- Web security -SSL .
UNIT – I

NETWORK FUNDAMENTALS
OVERVIEW
• Introduction to Networks
• Categories of Networks
• Communication Model
• Data Transmission Concepts and Terminology
• Protocol Architecture
• Protocols
• OSI
• TCP/IP
• LAN Topology
• Transmission Media
Introduction to Networks
• A Network: A group of devices that
can communicate with each other over links.
• Each device is called a host. Each host has
a unique address.
• Network is a connection between two or
more devices.
• Which is connected by a communication
links.
• A node can be computer, printer or any
other devices which is capable of sending
and receiving information at each other.
Example:
INTERNET
• An internet:

each host has an


address of the form n/h where n is the
network number and h is the number of the
host on network n.
Uses of Network
• It is Used for

i) Business Application
ii) Home Application
iii) Mobile Users
iv) E-Mail
Categories or Types of Network
• There are Three Types:
1. LAN - Local Area Network
2. MAN - Metropolitan Area Network
3. WAN – Wide Area Network
1. LAN - Local Area Network
A LAN is Designed by Local Area Connections such
as:
i) within Building
ii) within office
iii) within Campus
iv) within Specific Place
Advantages :
1) Sharing of Files.
2) Sharing of Programs.
3) Communication Exchange.

Disadvantages :
4) Reliability.
5) Capacity.
6) High Cost.
2. MAN - Metropolitan Area Network
A Metropolitan Area Network (MAN) is a
network that interconnects users with
computer resources in a geographic area or
region larger than that covered by even a
large local area network (LAN) but smaller
than the area covered by a wide area
network (WAN).
• MAN supports up to 150 Kilometers Distance.
• Example:
 Telephone Network
 Cable TV
Advantages :
1) High Bandwidth.
2) It support Large number of Clients.
3) Reduce the Errors.

Disadvantages :
4) Large Space Requirements.
5) Slower Data Access.
6) High Cost.
3. WAN – Wide Area Network
• WAN Provide a Long Distance Transmission of Data.
• By Using WAN Exchange the Information from
one country to another country.
Components of Network
- Which gives the Request.
- Which gives the Response.
- It Indicates Modulator / Demodulator.
- Which identifies the Path between Client
& Server.
- Which
overcomes the Traffic
problems.
Communication Model
• Data communications are exchange of
data between two devices via some
transmission medium.
• It should be done in two ways
i) Local - It takes LAN Connection.
ii)Remote - It takes Long distance like
MAN & WAN.
• Data should be Transferred in the form of
0’s and 1’s
Transmissio
Source Destination
n Medium

1)Delivery - The System must deliver the data


to the correct Destination.
2)Accuracy - The System must deliver the data
at Accurate way.
3)Timeline - The System must deliver the data at Exact
Time.

4) Jitter - It refers to the variable in the

Jitter refers to the variation in the packet arrival time. It is


the uneven delay in the delivery of audio or video packets.

i) Sender
ii) Receiver iv) Message
iii) Medium v) Protocol
5. 5.
Protocol 4.
Protocol
Step : 1 Message
Step : 1
Step : 2 Step : 2

1. Sender 3. Medium 2.
Receiver
: It is a device , that Sends
the information to the Receiver.
: It is a device , that Receives the
information from the Sender.
: It is the physical path
between Sender to Receiver.
: This is the passing
Informations.
: It is a set of rules and regulations
that “ Governed “ from data communication.
• Data Transmission occurs between sender and
receiver over some Transmission Medium or
Transmission Media.
• Transmission Media may be classified into Two
Types :
i) Guided Media [Wired Technology]
ii) Unguided Media [Wireless Technology]
i) Guided Media (Wired Network)
• In Guided Media Signals are Passed in a “
same physical path”
• Example:
i) Twisted pair Cable
ii) Coaxial Cable
iii) Fiber Optic Cable
ii) Unguided Media (Wireless Network)
• In Unguided Media Signals are Passed in
the form of “ Electromagnetic Waves”
• Example :
i) Mobile phones
ii) Satellite microwave
iii) Infrared
It Provides
a dedicated links between two devices.
• For example, a wired system that connects two
computers together can be thought of a point-
to-point link.
It is a link between
two or more devices. It is also known as Multi-
Point configuration. The networks having
multipoint configuration are called
Transmission Mode
 It refers to the direction of information flow
between two devices.
 Data flow is the flow of data between
2 points.

The direction of the data flow can
be described as
 Simplex Mode
 Half-Duplex Mode
 Full-Duplex Mode
 Simplex: Data flows in only one direction on
the data communication line (medium).

Examples are Radio and Television broadcasts.


 Half-Duplex: Data flows in both directions
but only one direction at a time on the data
communication line.
Ex. Conversation on walkie-talkies.
 Full-Duplex: Data flows in both directions
simultaneously. Modems are configured to flow
data in both directions.
Ex. Phone Conversation
Data Flow

Figure 1.2 Data flow (simplex, half-duplex, and full-


Protocol
• It is aArchitecture
layered structure ofH/W and S/W
that
supports exchange of data b/w systems
• It supports distributed applications(E-
Mail,
File Transfer)
• Each layer of protocol architecture
provides some set of rules
• There are 2 widely used
protocol architecture
 TCP/IP Architecture
 OSI Model
Protocol
• Protocol is a set of rules that govern
data communication
• It represents what is communicated, when
it is communicated and how it is
communicated.
• There are 3 key elements
 Syntax
 Semantics
 Timing
Syntax
• It represents structure, Format of data
the order in which it is presented
Data may contain:
• First 8 bit -> Sender Address
• Second 8 bit -> Receiver Address
• Remaining bits-> message stream
SEMANTICS

• It refers the meaning of each section of bit

TIMING

• It refers when data sent and how fast it is


sent (Says Characteristics)
• Ex:100Mbps
• It provides model for the development
of product regardless of individual
manufacturer
• It falls in 2 categories
De Facto standard

• Not officially adopted but used


widespread
• It has 2 categories
• Proprietary->Wholly owned by company
• Non-Proprietary->Group or communiy
developed for public
De Jure Standard
• A Standard Legislated by an officially
recognized body

Standard Organizations:
• International Standard Organization
• ANSI: American National Standards
Institute
• IEEE
• It defines the Physical (or)
Logical arrangement of Links in a
Network.
• Topology refers to the layout of connected
devices in a network.
• The Topology of the Network is
Geometric Representation of the
relationship between all Communication
links.
Physical Topology

The term physical topology refers to the way in which a network is laid out physically.: two or more devices connect to a link;
two or more links form a topology. The topologyof a network is the geometric representation of the relationship of all the links
and linking devices (usually called nodes) to one another. There are four basic topologies possible: mesh, star, bus, and ring.
Mesh:
In a mesh topology, every device has a dedicated point-to-point link to every other device. The term dedicated means that the
link carries traffic only between the two devices it connects.
Advantages Of Mesh Topology :
 The use of dedicated links guarantees that each connection can carry
its own data load, thus Eliminates the traffic problems that can occur
when links must be shared by multiple devices.
 Second, a mesh topology is robust. If one link becomes unusable, it
does not incapacitate the entire system.
 Third, there is the advantage of privacy or security. When every
message travels along a dedicated line, only the intended recipient sees
it.
Disadvantages Of Mesh Topology : One practical example of a mesh topology is the
 The amount of cabling and the number of I/O ports required. connection of telephone regional
 The sheer bulk of the wiring can be greater than the available space. offices in which each regional office needs to be
 The hardware required to connect each link (I/O ports and cable) can connected to every other regional office.
be prohibitively expensive.
Physical Topology
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.
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.
Advantages Of Star Topology :
 Less Expensive
 Low cabling required
 robustness. If one link fails, only that link is affected.

Disadvantages Of StarTopology :
One big disadvantage of a star topology is the dependency of the
whole topology on one single point, the hub. If the hub goes down,
the whole system is dead.

The star topology is used in local-area networks (LANs),


Bus Topology
Bus Topology:
Bus topology is multipoint. One long cable acts as a backbone to link all the devices in a network.
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. 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 Of Bus
Topology :
 Ease of installation
 Low cabling required

Disadvantages Of Bus Topology :


 difficult reconnection and fault isolation
 fault or break in the bus cable stops all transmission, even between devices on the same side of the problem
 A bus is usually designed to be optimally efficient at installation. It can therefore be difficult to add new devices.
 Signal reflection at the taps can cause degradation in quality. This degradation can be controlled by limiting the number and
spacing of devices connected to a given length of cable. Adding new devices may therefore require modification or
replacement of the backbone.
Ring Topology
Ring Topology:
In a ring topology, each device has a dedicated point-to-point connection with only the two devices on either side of it. A signal
is passed along the ring in one direction, from device to device, until it reaches its destination. Each device in the ring
incorporates a repeater. When a device receives a signal intended for another device, its repeater regenerates the bits and passes
them along
Advantages Of Ring Topology :
 easy to install and reconfigure
 fault isolation is simplified.
 To add or delete a device
requires changing only two
connections

Disadvantages Of Ring Topology :


In a simple ring, a break in the ring (such as a disabled station) can disable the entire network.
The OSI Model
• An ISO (International standard Organization) that
covers all aspects of network communications is the
Open System Interconnection (OSI) model.
• An open system is a model that allows any two
different systems to communicate regardless of their
underlying architecture (hardware or software).
• The OSI model is not a protocol; it is model for
understanding and designing a network architecture
that is flexible, robust and interoperable.
• The OSI model is a layered framework for the
design of network systems that allows for
communication across all types of computer
systems.
• The OSI model is built of seven ordered layers:
1. (Layer 1) Physical layer
2. (Layer 2) Data link layer
3. (Layer 3) Network layer
4. (Layer 4) Transport layer
5. (Layer 5) Session layer
6. (Layer 6) Presentation layer
7. (Layer 7) Application layer
Peer-to-Peer Process
• Within a single machine, each layer calls upon services of
the layer just below it.
• Layer 3, for example, uses the services provided by layer
2 and provides services for layer 4.
• Between machines, layer x on one machine communicates
with layer x on another machine, by using a protocol
(this is Peer-to-Peer Process).
• Communication between machines is therefore a peer-to-
peer process using protocols appropriate to a given
layer.
Interfaces between
• Layers
There is an interface between each pair
of adjacent layers. This interface
defines what
information and services a layer provide
must for the layer above it.
Functions of Layers
1. Physical Layer
The physical layer is responsible for transmitting
individual bits from one node to the next.
Physical layer
The physical layer is concerned with the following:
• Physical characteristics of interfaces and
media: It define the type of transmission media
• Representation of the bits: the physical layer
data consist of a stream of bits(0,1). The
transmitted bits must be encoded into signals –
electrical or optical. The physical layer defines
the type of encoding.
• Data rate: The physical layer defines the
transmission rate, the number of bits sent each
second.
Physical Layer
• Line configuration: the physical layer is
concerned with the connection of
devices to the medium.
• Physical topology – Ring, star
• Transmission Mode - Simplex,
Half duplex Full Duplex
2. Data Link
• It is responsibleLayer
for node-to-node delivery of
data.
Functions of the Data Link Layer:
• Framing. The data link layer divides the stream of bits
received from the network layer into data units called
frames.

• Physical addressing. If frames are to be distributed to


different systems on the network, the data link layer
adds a header to the frame to define the physical
address of the sender (source address) and/or receiver
(destination address) of the frame.

• If the frame is intended for a system outside the


sender’s network, the receiver address is the address of
the device that connects one network to the next.
• Flow Control. If the rate at which the data are absorbed by
the receiver is less than the rate produced in the sender, the
data link layer imposes a flow control mechanism to
prevent overwhelming the receiver.
• Error control. The data link layer adds reliability to the
physical layer by adding mechanisms to detect and
retransmit damaged or lost frames. control
Error
normally achieved through a trailer to the end of the isframe.

• Access Control. When two or more devices are connected


to the same link, data link layer protocols are necessary to
determine which device has control over the link at any
time.
3. Network
Layer
•The Network layer is responsible for the source-to-
destination
delivery of a packet possible across
multiple networks.
•It converts Frames into packets.

•If two systems are connected to the same link,


there is usually no need for a network layer.
However, if the two systems are attached to different
networks, there is often a need for the network layer
to accomplish source-to-destination delivery.
Network
Functions: Layer
•Logical addressing-Physical addressing (May change) handle
addressing problem locally
•If packet pass the network boundary, we need another
addressing
called logical addressing (Never change)
•Routing - Route the packet to final destination

The network layer is responsible for the delivery of packets from the
original
source to the final destination.
4. Transport
Layer
• The transport layer is responsible for process-to-process
or end-end delivery of the entire message.
• The network layer oversees host-to-destination delivery of
individual packets, it does not recognize any relationship
between those packets.
• The transport layer ensures that the whole message arrives
intact and in order, overseeing both error control and flow
control at the process-to-process level.
Transport
layer

The transport layer is responsible for delivery of a message


from one process to another.
Functions of the Transport layer

Service point addressing:


Computer often run several processes (running programs)
at the same time. Process-to-process delivery means
delivery from a specific process on one computer to a
specific process on the other.
• The transport layer header include a type of address
called port address.
• The network layer gets each packet to the correct
computer; the transport layer gets the entire message to the
correct process on that computer.
Cont..
,
• Segmentation and reassembly: a message is divided
into transmittable segments, each having a sequence
number. These numbers enable the transport layer to
reassemble the message correctly upon arrival at the
destination.
• Connection control: The transport layer can be either
connectionless or connection-oriented.
• A connectionless transport layer treats each segment as an
independent packet and delivers it to the transport layer at
the destination machine.
• 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.
Functions of the transport layer
• Flow control: the transport layer performs a flow control
end to end. The data link layer performs flow control
across a single link.
• Error control: the transport layer performs error control
end to end. The data link layer performs control across a
single link.
• Congestion control concerns controlling traffic entry into
a telecommunication networks so as to avoid congestive
collapse by attempting to avoid oversubscription of any of
the processing or link capabilities of the intermediate
nodes and networks and taking resource reducing steps,
such as reducing the rate of sending packets. It should not
be confused with flow control, which prevents the sender
from overwhelming the receiver.
5. Session Layer
• The session layer is responsible for dialog
control and synchronization.
Functions of Session Layer

• Decision Control:- Half duplex,


Full Duplex
• Synchronization: Adding checkpoints
to stream data.
• Ex: System sending 2000 pages.
• Add check point after each 100th page.
• So in case of failure no need to sent
whole page.
6. Presentation Layer
• It is concerned with the syntax and
semantics of the information exchanged
b/w 2 devices.
Functions of Presentation Layer
• Translation: Interoperability b/w
different encoding formats.
• Encryption: Converting plain to cipher
text and vice versa.
• Compression: Reducing number of bits
in multimedia data when transmitting.
7. Application
layer
The application layer is responsible for
providing services to the user.
Functions of Application Layer

• It provides user access to


network.
• X.500-Directory service.
•• X.400-Message
FTAM- Filehandling service.
Access
Transfer management. and
• Network Virtual Terminal.

Transmission Control Protocol /
Internetworking Protocol is used in the
internet and is developed prior to the OSI
model.
• It would not match exactly with OSI
model
• It is divided into layers.
TCP/IP
protocol
• It contains relatively independent protocols that
can mixed and matched with depend on needs of
the system.
• TCP/IP protocol suite is made of five layers:
physical, data link, network, transport, and
application.
• Physical and Data Link Layers
At the physical and data link layers, TCPIIP does not
define any specific protocol. It supports all the
standard and proprietary protocols. A network in a
TCPIIP internetwork can be a local-area network or a
wide-area network.
Network Layer
At the network layer (or, more accurately, the
internetwork layer), TCP/IP supports
the Internetworking Protocol. IP, in turn, uses four
supporting protocols: ARP, RARP, ICMP, and IGMP.
Address Resolution Protocol
The Address Resolution Protocol (ARP) is used to
associate a logical address with a
physical address. On a typical physical network, such
as a LAN, each device on a link is identified by a
physical or station address, usually imprinted on the
network interface card (NIC)
Reverse Address Resolution Protocol
The Reverse Address Resolution Protocol (RARP) allows a
host to discover its Internet
address when it knows only its physical address
Internet Control Message Protocol
The Internet Control Message Protocol (ICMP) 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
Internet Group Message Protocol
The Internet Group Message Protocol (IGMP) is used to
facilitate the simultaneous
transmission of a message to a group of recipients
Transport Layer
Traditionally the transport layer was represented in TCP/IP by two
protocols: TCP and UDP. IP is a host-to-host protocol, meaning that it
can deliver a packet from one physical device to another. UDP and TCP
are transport level protocols responsible for delivery of a message from
a process (running program) to another process.
User Datagram Protocol
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
At the sending end of each transmission, TCP divides a stream of data
into smaller units called segments. Each segment includes a sequence
number for reordering after receipt, together with an acknowledgment
number for the segments received. Segments are carried across the
internet inside of IP datagrams. At the receiving end, TCP collects each
datagram as it comes in and reorders the transmission based on sequence
numbers.
ADDRESSING
Physical Addresses
The physical address, also known as the link 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. It is the
lowest-level address.

Logical Addresses
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 hosts on the Internet can have
the same IP address
Port Addresses
The label assigned to a process is called a port address. A port address in TCPIIP is 16 bits in
length. 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. For
example, 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). For these
processes to receive data simultaneously, we need a method to label the different processes
Specific Addresses
Some applications have user-friendly addresses that are designed for that specific address.
Examples include the e-mail address (for example, [email protected]) and the Universal
Resource Locator (URL) (for example, www.mhhe.com). The first defines the recipient of
an e-mail the second is used to find a document on the World Wide Web.
Line coding review
 Line coding is the process of converting digital data to digital signals
 At the sender, digital data are encoded into a digital signal; at the receiver, the digital data are
recreated by decoding the digital signal.
 A data element is the smallest entity that can represent a piece of information: this is the
bit. In digital data communications, a signal element carries data elements. A signal
element is the shortest unit (timewise) of a digital signal.
 The data rate defines the number of data elements (bits) sent in Is. The unit is bits per second
(bps). The signal rate is the number of signal elements sent in Is. The unit is the baud.

S =c *N* -1/r baud

where N is the data rate (bps); c is the case factor, which varies for each case; S is the
number of signal elements; and r is the previously defined factor
Line coding review
Unipolar Scheme
In a unipolar scheme, all the signal levels are on one side of the time axis, either above or below.
NRZ (Non-Return-to-Zero):
positive voltage defines bit I and the zero voltage defines bit O.

Polar Schemes
In polar schemes, the voltages are on the both sides of the time axis
NRZ-L (NRZ-Level), the level of the voltage determines the value of the bit. In the second variation, NRZ-I
(NRZ-Invert), the change or lack of change in the level of the voltage determines the value of the bit. If
there is no change, the bit is 0; if there is a change, the bit is 1.
Return to Zero (RZ)
In RZ, the signal changes not between bits but during the bit

Manchester and Differential Manchester The idea of RZ


(transition at the middle of the bit) and
the idea of NRZ-L are combined into the Manchester
scheme.
In Manchester encoding, the duration of the bit is
divided into two halves. The voltage remains at
one level during the first half and moves to the other
level in the second half.
The transition at the middle of the bit provides
synchronization. Differential Manchester, on the
other hand, combines the ideas of RZ and NRZ-I. There
is always a transition at the middle of the
bit, but the bit values are determined at the beginning of
the bit. If the next bit is 0, there is a
transition; if the next bit is 1, there is none
UNIT II DATA LINK LAYER

Data link control – Error Detection – VRC


– LRC – CRC – Checksum – Error
Correction – Hamming Codes – MAC –
Ethernet, Token ring , Token Bus –
Wireless LAN - Bluetooth – Bridges.
The physical path between transmitter and
receiver.
• Repeaters or amplifiers may be used to
extend the length of the medium.
• Communication of electromagnetic waves is
guided or unguided.
Twisted-pair cable
UTP and
STP
Coaxial Cable
BNC connectors
•To connect coaxial cable to devices, it is necessary to use coaxial
connectors. The most common type of connector is the Bayone-Neill-
Concelman, or BNC, connectors.

Applications include cable TV networks, and some traditional


Ethernet LANs like 10Base-2, or 10-Base5.
Optical fibers
Propagation Modes (Types of Optical Fiber )
Propagation
Modes
Error Detection
OVERVIEW
• VRC
• LRC
• CRC
• Checksum
• Error Correction
• Hamming Codes
• Framing,
• Flow and Error Control
Protocols,
• Noiseless Channel and Noisy
Channel Protocol,
• HDLC
• Point-to-Point Protocol
Error
Detection
Error Detection
Even number of ones
–add 0
Odd number of ones
– add 1

Can detect all single-bit errors. Can detect burst errors only if the total
number of errors in each data unit is odd.
• Increases the likelihood of detecting burst errors.
• n bits LRC can detect a burst error of n bits.
• Errors may be undetected if:
• Have even number of errors in that position.
Polynomials
A better way to understand cyclic codes and how they can be analyzed is to
represent
them as polynomials
A pattern of Os and 1s can be represented as a polynomial with
coefficients of 0 and
1. The power of each term shows the position of the bit; the
coefficient shows the value
of the bit.
Error Correction
Redundancy
Bits
Hamming Codes
• Hamming codes can be applied to the data units of any length
and uses the relationship between data and redundancy bits
• Parity Bits are always paced at 2r values.
20 21 22

1 2 3 4 5 6 7
P1 P2 d1 P3 d2 d3 d4
Calculation of Parity bit (Assume even Parity)
Example :
Let a data word is 1001101 (1,3,5,7,9,11) = (P1,1,0,1,1,1) p1=0
m=7 (2,3,6,7,10,11) = (p2,0,1,0,1) p2=1
Let us suppose if we take redundancy bits be 3
2r>= r+m+1 (4,5,6,18) = (P3,,0,0,1) p3=1
then 8 not >= 3+7+1 (8,9,10, 11) = (P4,1,0,1) p4=0
Let us suppose if we take redundancy bits be 4
2r>= r+m+1
then 16 >= 4+7+1
Means 4 parity bits are required so that the total
length of code word is
n=r+m
n=1
10 2 3 4 5 6 7 8 9 10 11
20 21 22 23
p1 p2 1 p3 0 0 1 p4 1 0 1
0 1 1 1 0 0 1 0 1 0 1

The code to be transmitted


Hamming Distance
• The Hamming distance between two words (of the same size) is the number of differences between the corresponding bits.
We show the Hamming distance between two words x and y as d(x, y).
• The Hamming distance can easily be found if we apply the XOR operation on the two words and count the number of Is in
the result. Note that the Hamming distance is a value greater than zero.
 The Hamming distance between two words is the number of differences between corresponding bits.

e.g The Hamming distance d(OOO, 011) is 2 because 000 XOR 011 is 011 (two Is).
Minimum Hamming Distance
The minimum Hamming distance is the smallest Hamming distance between all possible pairs in a set of words.
Minimum Distance for Error Detection
If our code is to detect up to s errors, the minimum distance between the valid
codes must be s + 1, so that the received codeword does not match a valid
codeword. In other words, if the minimum distance between all valid codewords
is s + 1, the received codeword cannot be erroneously mistaken for another
Codeword.

Minimum Distance for Error Correction

To guarantee correction of up to t errors in all cases, the minimum Hamming distance in a block
code must be dmin == 2t +1
FRAMING
• Data transmission in the physical layer means moving bits in the form of a signal from the source to the destination.
• The physical layer provides bit synchronization to ensure that the sender and receiver use the same bit durations and
timing.
• The data link layer, on the other hand, needs to pack bits into frames, so that each frame is distinguishable from another.
Types of Framing

Framing can be of two types, fixed sized framing and variable sized framing.

Fixed-sized Framing
Here the size of the frame is fixed and so the frame length acts as delimiter of the
frame. Consequently, it does not require additional boundary bits to identify the
start and end of the frame.
Example − ATM cells.

Variable – Sized Framing


Here, the size of each frame to be transmitted may be different. So additional
mechanisms are kept to mark the end of one frame and the beginning of the next
frame.
It is used in local area networks.
Three methods of framing
1. Byte Count
This method uses a field in the header to specify the number of bytes in the frame.
The problem is that if there is bit flip on the header the count will change leading to
error.
2. Flag byte with byte Stuffing :
Offers the same byte called as flag byte, Used in starting as well end of the delimiter
Two consecutive flag bytes indicated the end of one frame and the start of the next.

Problem may be same that flag may merge with the data specially
photographs or songs
3. Flags bits with bit stuffing :
Each frame begins and end with a special bit pattern 01111110 or 0*7E in hexadecimal . This
pattern ins a flag byte. Whenever the sender’s data link layer encounters five consecutive 1s
in the data it automatically stuff a 0 bit in the outgoing bit stream.
Flow Control
Flow control coordinates the amount of data that can be sent before receiving acknowledgement
It is one of the most important functions of data link layer.
Flow control is a set of procedures that tells the sender how much data it can transmit before it
must wait for an acknowledgement from the receiver.
Receiver has a limited speed at which it can process incoming data and a limited amount of
memory in which to store incoming data.
Receiver must inform the sender before the limits are reached and request that the transmitter to
send fewer frames or stop temporarily.
Since the rate of processing is often slower than the rate of transmission, receiver has a block of
memory (buffer) for storing incoming data until they are processed.
Error Control
Error control includes both error detection and error correction.
It allows the receiver to inform the sender if a frame is lost or damaged during transmission and
coordinates the retransmission of those frames by the sender.
Error control in the data link layer is based on automatic repeat request (ARQ). Whenever an error
is detected, specified frames are retransmitted.

Error and Flow Control Mechanisms


Stop-and-Wait
Go-Back-N ARQ
Selective-Repeat ARQ
Stop-and-Wait Automatic Repeat Request (ARQ)

• Simplest among all protocols, the sender (say station A)


transmits a frame and then waits till it receives positive
acknowledgement (ACK) or negative acknowledgement
(NACK) from the receiver (say station B).
• Station B sends an ACK if the frame is received correctly,
otherwise it sends NACK.
• Station A sends a new frame after receiving ACK;
otherwise it retransmits the old frame, if it receives a
NACK.
• There are three cases obtain during transmission: Lost
Frame, Lost ACK, Delayed frame
• To tackle the problem of a lost or damaged frame, the
sender is equipped with a timer. In case of a lost ACK, the
sender transmits the old frame.
• Automatic repeat request error management mechanism is
provided by logical link control sublayer
Stop-and-Wait ARQ(Automatic Repeat Request) lost frame
When a receiver receives a damaged frame, it discards it and keeps its value of R.
After the timer at the sender expires, another copy of frame 1 is sent.
Stop-and-Wait, lost ACK frame
If the sender receives a damaged ACK, it
discards it.
When the timer of the sender expires, the
sender retransmits frame 1.
Receiver has already received frame 1 and
expecting to receive frame 0 (R=0).
Therefore it discards the second copy of
frame 1.
Stop-and-Wait, delayed ACK frame
The ACK can be delayed at the receiver or
due to some problem It is received after
the timer for frame 0 has expired.
Sender retransmitted a copy of frame 0.
However, R =1 means receiver expects to
see frame 1. Receiver discards the
duplicate frame 0.
Sender receives 2 ACKs, it discards the
second ACK.
Disadvantage of Stop-and-Wait
In stop-and-wait, at any point in time, there is only one frame that is sent
and waiting to be acknowledged.
This is not a good use of transmission medium.
To improve efficiency, multiple frames should be in transition while waiting
for ACK.
Two protocols use the above concepts-
Go-back-N ARQ
Selective Repeat ARQ
Disadvantage of Stop-and-Wait

In stop-and-wait, at any point in time, there is only one frame that is sent
and waiting to be acknowledged.
This is not a good use of transmission medium.
To improve efficiency, multiple frames should be in transition while waiting
for ACK.
Two protocols use the above concepts-
Go-back-N ARQ
Selective Repeat ARQ
Piggybacking
• A method to combine a data frame with
ACK.
• Station A and B both have data to send.
Instead of sending separately, station A
sends a data frame that includes an
ACK.
• Station B does the same thing.
Piggybacking saves bandwidth.
Go-Back-N ARQ

• The most popular ARQ protocol is the go-back-N ARQ, where the sender sends
the frames continuously without waiting for acknowledgement.
• As the receiver receives the frames, it keeps on sending ACKs or a NACK, in case
a frame is incorrectly received. When the sender receives a NACK, it retransmits
the frame in error plus all the succeeding frames. Receiver sends positive ACK if
a frame arrived safe and in order.
• If the frames are damaged/out of order, receiver is silent and discard all
subsequent frames until it receives the one it is expecting.
Go-Back-N ARQ

• The silence of the receiver causes the timer of the unacknowledged frame to
expire.
• Then the sender resends all frames, beginning with the one with the expired
timer.
• For example, suppose the sender has sent frame 6, but the timer for frame 3
expires (i.e. frame 3 has not been acknowledged), then the sender goes back
and sends frames 3, 4, 5, 6 again. Thus it is called Go-Back-N-ARQ
• The receiver does not have to acknowledge each frame received, it can send one
cumulative ACK for several frames.
Sequence Numbers
Frames from a sender are numbered sequentially.
We need to set a limit since we need to include the sequence
number of each frame in the header.
If the header of the frame allows m bits for sequence number, the
sequence numbers range from 0 to 2 m – 1. for m = 3, sequence
numbers are:0, 1, 2, 3, 4, 5, 6, 7.
We can repeat the sequence number.
Sequence numbers are:
0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, …
SlidingWindow
Sender can send several frames
before
needing an
◦acknowledgement.
The link can carry several frames at
◦Advantages:
Its capacity can be used
once.
efficiently.
Sliding window
ARQ
Selective Repeat ARQ, sender and receiver windows
•Go-Back-N ARQ simplifies the process at the receiver site. Receiver only keeps track
of only one variable, and there is no need to buffer out-of-order frames, they are
simply discarded.
•However, Go-Back-N ARQ protocol is inefficient for noisy link. It bandwidth
inefficient and slows down the transmission.
•In Selective Repeat ARQ, only the damaged frame is resent. More bandwidth
efficient but more complex processing at receiver.
•It defines a negative ACK (NAK) to report the sequence number of a damaged frame
before the timer expires.
Selective Repeat ARQ, lost frame
•Frames 0 and 1 are accepted when
received because they are in the
range specified by the receiver
window. Same for frame 3.
•Receiver sends a NAK2 to show that
frame 2 has not been received and
then sender resends only frame 2
and it is accepted as it is in the range
of the window.
HDLC

• HDLC is a bit-oriented protocol.


• It was developed by the International Organization for Standardization ISO.
• Supports both half-duplex and full-duplex communication lines, point-to-point
and multi-point networks, and switched or non-switched channels.
• HDLC supports several modes of operation, including a simple sliding-window
mode for reliable delivery.
HDLC Overview

Defines three types of stations


Primary
Secondary
Combined
Defines three types of data transfer mode
Normal Response mode
Asynchronous Response mode
Asynchronous Balanced mode
Three types of frames
Unnumbered
information
Supervisory
The three stations are :
Primary station
Has the responsibility of controlling the operation of data flow the link.
Handles error recovery
Frames issued by the primary station are called commands.
Secondary station,
Operates under the control of the primary station.
Frames issued by a secondary station are called responses.
The primary station maintains a separate logical link with each secondary station.
Combined station,
Acts as both as primary and secondary station.
Does not rely on other for sending data
Unbalanced Configuration
Balanced Configuration
Symmetric Configuration
Symmetric Configuration
The modes of data transfer operations are
Normal Response Mode, the station configuration is unbalanced.
We have one primary station and multiple secondary stations.
A primary station can send commands; a secondary station can only respond. The NRM is used for both point-to-
point and multiple-point links
Asynchronous Balanced Mode
• In asynchronous balanced mode (ABM), the configuration is balanced.
• The link is point-to-point, and each station can function as a primary and a
secondary (acting as peers),
There are three different classes of frames used in HDLC
Unnumbered frames, used in link setup and disconnection, and hence do not contain ACK.It is for system
management .
Information frames, which carry actual information. Such frames can piggyback ACK in case of ABM
Supervisory frames, which are used for error and flow control purposes and hence contain send and receive
sequence numbers
Frame Format Description:

• Flag field: The flag field of an HDLC frame is an 8-bit sequence with the bit pattern
01111110 that identifies both the beginning and the end of a frame and serves as a
synchronization pattern for the receiver.

• Address field: The second field of an HDLC frame contains the address of the secondary
station. If a primary station created the frame, it contains to address. If a secondary
creates the frame, it contains from address.
Control field:

• The control field determines the type of frame and defines its functionality.
• The control field is a 1- or 2-byte segment of the frame used for flow and error
control.
• The interpretation of bits in this field depends on the frame type.
Control Field for I-Frames
I-frames are designed to carry user data from the network used piggybacking too.
The first bit defines the type. If the first bit of the control field is 0, this means the
frame is an I-frame. The next 3 bits, called N(S) (no of frame to be sent), define the
sequence number of the frame. The last 3 bits, called N(R)(sequence no of next frame
to be send), correspond to the acknowledgment number when piggybacking is used.
The single bit between N(S) and N(R) is called the P/F bit. The P/F field is a single bit
with a dual purpose. It has meaning only when it is set (bit = 1) and can mean poll or
final. It means poll when the frame is sent by a primary station to a secondary . It
means final when the frame is sent by a secondary to a primary .
Control field for Supervisory frames

• If the first 2 bits of the control field is 10, this means the frame is an S-frame. The
last 3 bits, called N(R), corresponds to the acknowledgment number (ACK) or
negative acknowledgment number (NAK) depending on the type of S-frame.
• The 2 bits called code is used to define the type of S-frame itself. With 2 bits, we
can have four types of S-frames, as described below:

a) Receive ready (RR): If the value of the code subfield is 00, it is an RR S-frame. RR
frame acknowledges the receipt of a safe and sound frame or group of frames.
b) Receive not ready (RNR): If the value of the code subfield is 10, it is an RNR S-
frame. It acknowledges the receipt of a frame or group of frames, and it announces
that the receiver is busy and cannot receive more frames.
c) Reject (REJ): If the value of the code subfield is 01, it is a REJ S-frame. It is a NAK
that can be used in Go-Back-N ARQ to improve the efficiency of the process by
informing the sender, before the sender time expires, that the last frame is lost or
damaged.
d) Selective reject (SREJ): If the value of the code subfield is 11, it is an SREJ S-
frame. This is a NAK frame used in Selective Repeat ARQ. The value of N(R) is the
negative acknowledgment number.
Control field for U -frame :
codes are divided into two sections: a 2-bit prefix before the P/F bit and a 3-bit
suffix after the P/F bit. Together, these two segments (5 bits) can be used to create
up to 32 different types ofU-frames
Point - to - Point Protocol (PPP)

Point - to - Point Protocol (PPP) is a communication protocol of the data link


layer that is used to transmit multiprotocol data between two directly connected
(point-to-point) computers. It is a byte - oriented protocol that is widely used in
broadband communications having heavy loads and high speeds. Since it is a
data link layer protocol, data is transmitted in frames. It is also known as RFC
1661.
PPP provides several services:
1. PPP defines the format of the frame to be exchanged between devices.
2. PPP defines how two devices can negotiate the establishment of the link and the
exchange of data.
3. PPP defines how network layer data are encapsulated in the data link frame.
4. PPP defines how two devices can authenticate each other.
5. PPP provides multiple network layer services supporting a variety of network
layer
protocols.
6. PPP provides connections over multiple links.
7. PPP provides network address configuration. This is particularly useful when a
home
user needs a temporary network address to connect to the Internet.
Components of PPP
Point - to - Point Protocol is a layered protocol having three components −

Encapsulation Component − It encapsulates the datagram so that it can be transmitted over the specified
physical layer.

Link Control Protocol (LCP) − It is responsible for establishing, configuring, testing, maintaining and
terminating links for transmission. It also imparts negotiation for set up of options and use of features by the
two endpoints of the links.

Authentication Protocols (AP) − These protocols authenticate endpoints for use of services. The two
authentication protocols of PPP are −

o Password Authentication Protocol (PAP)

o Challenge Handshake Authentication Protocol (CHAP)


• PPP uses the High-Level Data-Link Control (HDLC) protocol as the basis to encapsulate its data during
transmission.
• PPP uses the Link Control Protocol (LCP) to establish, test, and configure the data link connection.
• Various network control protocols (NCPs) are used to configure the different communications protocols.
This system enables the use of different protocols, such as TCP/IP and IPX, over the same line
simultaneously.
 Network Control Protocols (NCPs) − These protocols are used for negotiating the
parameters and facilities for the network layer. For every higher-layer protocol supported
by PPP, one NCP is there. Some of the NCPs of PPP are −

o Internet Protocol Control Protocol (IPCP)

o OSI Network Layer Control Protocol (OSINLCP)

o Internetwork Packet Exchange Control Protocol (IPXCP)

o DECnet Phase IV Control Protocol (DNCP)

o NetBIOS Frames Control Protocol (NBFCP)

o IPv6 Control Protocol (IPV6CP)


PPP Frame
PPP is a byte - oriented protocol where each field of the frame is composed of one or more
bytes. The fields of a PPP frame are −

Flag − 1 byte that marks the beginning and the end of the frame. The bit pattern of the flag is
01111110.

Address − 1 byte which is set to 11111111 in case of broadcast.

Control − 1 byte set to a constant value of 11000000.

Protocol − 1 or 2 bytes that define the type of data contained in the payload field.

Payload − This carries the data from the network layer. The maximum length of the payload
field is 1500 bytes. However, this may be negotiated between the endpoints of communication.

FCS − It is a 2 byte or 4 bytes frame check sequence for error detection. The standard code
used is CRC (cyclic redundancy code)
Byte Stuffing in PPP Frame − Byte stuffing is used is PPP payload field
whenever the flag sequence appears in the message, so that the receiver does not
consider it as the end of the frame. The escape byte, 01111101, is stuffed before
every byte that contains the same byte as the flag byte or the escape byte. The
receiver on receiving the message removes the escape byte before passing it onto
the network layer.
Differences Between High-level Data Link Control (HDLC)
and Point-to-Point Protocol (PPP)
S.NO HDLC PPP

1. HDLC stands for High-level Data Link Control. PPP stands for Point-to-Point Protocol.

2. HDLC is a bit oriented protocol. PPP is a byte oriented protocol.

HDLC is implemented by Point-to-point configuration

3. and also multi-point configurations. PPP is implemented by Point-to-Point configuration only.

4. Dynamic addressing is not offered by HDLC. While in this Dynamic addressing is offered.

5. HDLC is used in synchronous media. PPP is used in synchronous media as well as asynchronous media.

6. HDLC is not compatible with non-Cisco devices. PPP is compatible with non-Cisco devices.

7. HDLC does not provide link authentication. While PPP provide link authentication using various protocols.

8. HDLC is more costly comparatively. While PPP is comparatively less costly.

You might also like