0% found this document useful (0 votes)
8 views

Cs601 Notes

nice

Uploaded by

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

Cs601 Notes

nice

Uploaded by

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

Switching:

A network is a set of connected devices

Problem of how to connect multiple devices to make one-to-one communication possible

The solution is Switching

Switched network consists of a series of switches


Taxonomy of Switched Network

Three Methods of Switching


Three Methods:

Circuit Switching

Packet Switching

Message switching

The first two are commonly used today

The third has been phased out in general communications


Circuit-switched Networks
A set of switches connected by physical links

A connection between two stations is a dedicated path made of one or more links

Each connection uses only one dedicated channel on each link

Each link is normally divided into n channels by using FDM or TDM

A set of switches connected by physical links


Example:

As a trivial example, let us use a circuit-switched network to connect eight telephones in a small area.
Communication is through 4-kHz voice channels. We assume that each link uses FDM to connect a
maximum of two voice channels. The bandwidth of each link is then 8 kHz.

As another example, consider a circuit-switched network that connects computers in two remote
offices of a private company. The offices are connected using a T-1 line leased from a communication
service provider. There are two 4 × 8 (4 inputs and 8 outputs) switches in this network.

Three Phases in a Circuit Switched Network:

The actual communication in a circuit-switched network requires 3 phases:

Connection Setup
Data Transfer
Connection Teardown
Efficiency of a Circuit-Switched Network

Not as efficient as packet switching because resources are allocated during the entire duration of the
connection and these resources are unavailable to other connections

In a telephone network, people normally terminate the communication when they have finished their
conversation

Data Network is an issue


Delay in a Circuit-Switched Network

Circuit switched networks have low efficiency but minimal delay

Data is not delayed at each switch; the resources are allocated for the duration of the connection

Packet Switching

If the message is going to pass through a packet-switched network, it needs to be divided into packets
of fixed or variable size

The size of the packet is determined by the network and the governing protocol

Datagram Networks

Each packet is treated independently of all others.

Even if a packet is part of a multi-packet transmission, the network treats it as though it existed alone

Packets are referred to as datagrams


Virtual-Circuit Networks
A virtual-circuit network is a cross between a circuit-switched network and a datagram network
Structure Of A Circuit Switch
Circuit switching today can use either of two technologies:

The Space-Division switch


The Time-Division switch
Time-Division Switch
Uses TDM inside a switch

Most popular technology is Time-Slot Interchange (TSI)

Data-Link Layer

Communication at the Data-Link Layer


In the above example:

 The data-link layer on Alice’s computer communicates with the data-link layer
at router R2.
 The data-link layer at router R2 communicates with the data-link layer at
router R4, and so on.
 Finally, the data-link layer at router R7 communicates with the data-link layer
at Bob’s computer.

Only one data-link layer is involved at the source or the destination, but two data-
link layers are involved at each router. The reason is that Alice’s and Bob’s
computers are each connected to a single network, but each router takes input
from one network and sends output to another network.

Nodes and Links

 Communication at the data-link layer is node-to-node:


Communication at the data-link layer occurs between two directly connected
nodes in a network.

 A data unit from one point on the Internet needs to pass through many
networks (LANs and WANs) to reach another point.
 We refer to the two end hosts and the routers as nodes and the networks
in between as links.
 Nodes are devices such as computers or network elements that send, receive,
or process data.
 Links are the communication pathways that connect these nodes, enabling the
transfer of data between them.

The first node is the source host; the last node is the destination host.

The other four nodes are four routers.

The first, the third, and the fifth links represent the three LANs; the second and the
fourth links represent the two WANs.

Services provided by Data-Link Layer

 Data-Link Layer is located between the physical and the network layers.
 Data-Link Layer provides services to Network Layer and receives services
from Physical layer.
 Framing: is the process of structuring data for transmission by adding start
and stop bits, headers, or other delimiters. It helps to set the boundaries of a
data frame, enabling the receiver to identify and extract the transmitted
information accurately.
 Encapsulation: involves wrapping data in a specific format or protocol before
transmission. This process adds headers and trailers to the original data,
creating a packet for efficient routing and delivery.
 Decapsulation: is the reverse process where the recipient removes the added
headers and trailers to retrieve the original data from the received packet.
 Flow Control: control is the regulation of data transmission between devices
to prevent congestion and ensure efficient and reliable information exchange.
 Error Control: Error control in data communication involves implementing
techniques to detect and correct errors that may occur during the transmission
of data. These techniques ensure data integrity and reliability. Common error
control methods include checksums, parity bits, and more advanced
techniques like cyclic redundancy check (CRC).
 Congestion Control: involves managing and preventing network congestion
to maintain optimal performance. It utilizes techniques such as traffic shaping,
prioritization, and flow control to regulate data flow and prevent network
saturation, ensuring efficient and reliable data transmission.

A Communication with only Three Nodes

In the above diagram router is source of communication between


the source and destination.

 The datagram received by the data-link layer of the source host is encapsulated
in a frame.
 The frame is logically transported from the source host to the router.
 The frame is decapsulated at the data-link layer of the router and encapsulated
at another frame.
 The new frame is logically transported from the router to the destination host.

Note that, router has separate data link layer for every interface connecting to the
physical link.

Services provided by Data-Link Layer

Flow control

 Flow control is a mechanism used to manage the rate of data transmission


between two devices to prevent congestion or data loss. It ensures that a fast
sender does not overwhelm a slower receiver.
 Flow control can be implemented through techniques such
as buffering, acknowledgement signals, and windowing.
o Buffers temporarily store data during transmission, allowing the
sender and receiver to operate at different speeds.
o Acknowledgement signals inform the sender about the successful
receipt of data, enabling it to adjust its transmission rate accordingly.
o Windowing involves specifying the number of unacknowledged
packets that can be in transit at any given time, controlling the flow of
data between sender and receiver.
 Flow control is crucial for optimizing data transfer reliability and efficiency
in communication networks.
Error Control:

Error control in data communication involves implementing techniques to detect and


correct errors that may occur during the transmission of data. These techniques ensure
data integrity and reliability. Common error control methods
include checksums, parity bits, and ore advanced techniques like cyclic redundancy
check (CRC).

Congestion Control:

Involves managing and preventing network congestion to maintain optimal


performance. It utilizes techniques such as traffic shaping, prioritization, and flow
control to regulate data flow and prevent network saturation, ensuring efficient and
reliable data transmission.

Two Categories of Links

We can have the following two types of links:

Point-to-point link:

Point-to-point link is a dedicated communication channel that connects two specific


devices, allowing data to be transferred directly between them without the need for
any intermediary devices or shared infrastructure.

Broadcast link:

Broadcast link is a network connection that allows data to be sent from one sender to
multiple receivers simultaneously. It's like a radio broadcast where one station sends
signals that many people can tune into and receive at the same time. In a broadcast
link, information is shared widely to all connected devices on the network.

Two Sublayers of Data-Link Layer

We can divide the data-link layer into two sublayers:

Data Link Control (DLC):

Data Link Control (DLC) is a sublayer of the Data Link Layer.

 It manages the reliable and efficient transfer of data frames between devices
on a network, providing error detection and correction, flow control,
and addressing.
 DLC ensures that data is transmitted accurately and in the correct order over
the physical layer.

Media Access Control (MAC):

Media Access Control (MAC) is typically implemented in the data link layer of the
OSI model and used to manage access to a shared communication medium.
 It is responsible for assigning unique addresses to network devices and
controlling their access to the communication channel, ensuring that data is
transmitted efficiently and without collisions.
 MAC addresses are hardware-based and serve as unique identifiers for devices
on a network.
 The MAC protocol is typically implemented in the data link layer of the OSI
model and plays a crucial role in facilitating reliable and orderly
communication within a network.

Dividing the data-link layer into two sublayers

Why LINK-LAYER ADDRESSING?

 Each datagram on the Internet, from the same source host to the same
destination host, may take a different path.
 We need to remember that the IP addresses in a datagram should not be
changed. If the destination IP address in a datagram changes, the packet never
reaches its destination.
 We cannot make a datagram reach its destination using only IP addresses on
the Internet. For that purpose, we need another addressing mechanism in a
connectionless internetwork: the link-layer addresses of the two nodes. A
link-layer address is sometimes called a link address, sometimes a physical
address, and sometimes a MAC address.
 Since a link is controlled at the data-link layer, the addresses need to belong
to the data-link layer.
 When a datagram passes from the network layer to the data-link layer, the
datagram will be encapsulated in a frame and two data-link addresses are
added to the frame header.
 These two addresses are changed every time the frame moves from one link
to another.

IP addresses & Link-Layer Addresses


In the above figure:

 We have three links and two routers.


 We also have shown only two hosts: Alice (source) and Bob (destination).
 For each host, we have shown two addresses, the IP addresses (N) and
the link-layer addresses (L).
 Note that a router has as many pairs of addresses as the number of links the
router is connected to.
 Each frame carries the same datagram with the same source and
destination addresses (N1 and N8), but the link-layer addresses of
the frame change from link to link.
 In link 1, the link-layer addresses are L1 and L2.
 In link 2, they are L4 and L5.
 In link 3, they are L7 and L8.
 Note that the IP addresses and the link-layer addresses are not in the same
order.
 For IP addresses, the source address comes before the destination address;
for link-layer addresses, the destination address comes before the source.

Why Link Layer Addressing -2

IP addresses & Link-Layer Addresses


Why do we need more than one IP address in a router, one for each interface?

 The answer is that an interface is a connection of a router to a link.


 We will see that an IP address defines a point on the Internet at which a device
is connected.
 A router with n interfaces is connected to the Internet at n points.
 This is the situation of a house at the corner of a street with two
gates; each gate has the address related to the corresponding street.

How are the source and destination IP addresses in a packet determined?

 The answer is that the host should know its own IP address, which becomes
the source IP address in the packet.
 The application layer uses the services of DNS to find the destination address
of the packet and passes it to the network layer to be inserted in the packet.

How are the source and destination link-layer addresses determined for each
link?

Again, each hop (router or host) should know its own link-layer address.

The destination link-layer address is determined by using the Address Resolution


Protocol.

Three Types of addresses

Unicast:

 A unicast address refers to a unique identifier assigned to a single network


interface or device.
 It allows communication between a specific sender and a specific receiver in a
network, ensuring that the data is delivered only to the intended destination.
 Unicast link-layer addresses in the most common LAN, Ethernet, are 48 bits
(six bytes) that are presented as 12 hexadecimal digits separated by colons.

Example

Multicast:

 A multicast address in data communication is a destination address used for


communication where a single sender can transmit data to multiple receivers
simultaneously.
 It is a unique identifier that represents a group of devices interested in
receiving the same data.
 Multicast communication enables efficient distribution of information to a
specific group rather than broadcasting to all devices on the network.
 Multicast link-layer addresses in the most common LAN, Ethernet, are 48 bits
(six bytes) that are presented as 12 hexadecimal digits separated by colons.
 The second digit, however, needs to be an even number in hexadecimal.

Example
Broadcast:

 Broadcast address is a special address that allows a message to be sent to all


devices within a network.
 It is typically the highest address in the network range and is used to transmit
data to all devices simultaneously.
 Broadcast link-layer addresses in the most common LAN, Ethernet, are 48
bits, all 1s, that are presented as 12 hexadecimal digits separated by colons.

Example

Address Resolution Protocol (ARP) -1

 Anytime a node has an IP packet to send to another node in a link, it has the IP
address of the receiving node.
 However, the IP address of the next node is not helpful in moving a frame
through a link; we need the link-layer address of the next node.
 This is the time when the Address Resolution Protocol (ARP) becomes
helpful.
 ARP maps an IP address to a logical-link address.
 ARP accepts an IP address from the IP protocol, maps the address to the
corresponding link-layer address, and passes it to the data-link layer.
 Anytime a host or a router needs to find the link-layer address of another host
or router in its network, it sends an ARP request packet.
 The packet 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
query is broadcast over the link using the link-layer broadcast address.

Address Resolution Protocol (ARP):

 Address Resolution Protocol (ARP) is a protocol used to map an IP address to


a physical (MAC) address in a local network.
 It enables devices to discover each other's hardware address, facilitating
proper communication within the network.

Position of ARP in TCP/IP protocol suite

Address Resolution Protocol (ARP) -2

Every host or router on the network receives and processes the ARP request
packet, but only the intended recipient recognizes its IP address and sends back
an ARP response packet.

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.
 The system on the left (A) has a packet that needs to be delivered to another
system (B) with IP address N2.
 System A needs to pass the packet to its data-link layer for the actual delivery,
but it does not know the physical address of the recipient.
 It uses the services of ARP by asking the ARP protocol to send a broadcast
ARP request packet to ask for the physical address of a system with an IP
address of N2.
 This packet is received by every system on the physical network, but
only system B will answer it. System B sends an ARP reply packet that
includes its physical address.
 Now system A can send all the packets it has for this destination using the
physical address it received.

ARP (Address Resolution Protocol) caching:

 Refers to the temporary storage of mappings between IP addresses and


corresponding MAC addresses in a device's memory.
 This caching mechanism helps optimize network performance by reducing the
need for frequent ARP broadcasts.
 When a device needs to communicate with another on the same network,
it checks its ARP cache to find the MAC address associated with the
destination IP address.
 If the mapping is not found or has expired, the device initiates an ARP
request to obtain the correct mapping.

Address Resolution Protocol (ARP) -3

ARP Packet
In the format of an ARP packet, the names of the fields are self-explanatory.

 The hardware type field defines the type of the link-layer protocol; Ethernet
is given the type 1.
 The protocol type field defines the network-layer protocol: IPv4 protocol is
(0800)16.
 The source hardware and source protocol addresses are variable-length
fields defining the link-layer and network-layer addresses of the sender.
 The destination hardware address and destination protocol address fields
define the receiver link-layer and network-layer addresses.
 An ARP packet is encapsulated directly into a data-link frame.
 The frame needs to have a field to show that the payload belongs to the ARP
and not to the network-layer datagram.

The internet for our example

Assume Alice needs to send a datagram to Bob, who is three nodes away on the
Internet.

Flow of packets at Alice site


 The network layer knows it’s given NA, NB, and the packet, but it needs to
find the link-layer address of the next node.
 The network layer consults its routing table and tries to find which router is
next (the default router in this case) for the destination NB.
 The routing table gives N1, but the network layer needs to find the link-
layer address of router R1.
 It uses its ARP to find the link-layer address L1.
 The network layer can now pass the datagram with the link-layer address
to the data-link layer.
 The data-link layer knows its own link-layer address, LA.
 It creates the frame and passes it to the physical layer, where the address is
converted to signals and sent through the media.

Flow of activities at router R1


Router R1, as we know, has only three lower layers.

 The packet received needs to go up through these three layers and come down.
 At arrival, the physical layer of the left link creates the frame and passes it to
the data-link layer.
 The data-link layer decapsulates the datagram and passes it to the network
layer.
 The network layer examines the network-layer address of the datagram and
finds that the datagram needs to be delivered to the device with IP address
NB.
 The network layer consults its routing table to find out which is the next
node (router) in the path to NB.
 The forwarding table returns to N3.
 The IP address of router R2 is in the same link as R1.
 The network layer now uses the ARP to find the link-layer address of this
router, which comes up as L3.
 The network layer passes the datagram and L3 to the data-link layer belonging
to the link at the right side.
 The link layer encapsulates the datagram, adds L3 and L2 (its own link-layer
address), and passes the frame to the physical layer.
 The physical layer encodes the bits to signals and sends them through the
medium to R2.

Flow of activities at router R2


Activities at router R2 are almost the same as in R1

Activities at Bob’s site

Now let us see what happens at Bob’s site, how the signals at Bob’s site are changed
to a message.

 At Bob’s site there are no more addresses or mapping needed.


 The signal received from the link is changed to a frame.
 The frame is passed to the data-link layer, which decapsulates the datagram
and passes it to the network layer.
 The network layer decapsulates the message and passes it to the transport
layer.
Types of Errors -1

Data transmission suffers unpredictable changes because of interference.

Single-bit error means that only 1 bit of a given data unit (such as a byte, character,
or packet) is changed from 1 to 0 or from 0 to 1.

Burst Error means that 2 or more bits in the data unit have changed from 1 to 0 or
from 0 to 1.

Whenever bits flow from one point to another, they are subject
to unpredictable changes because of interference. This interference can change
the shape of the signal.

The term single-bit error means that only 1 bit of a given data unit (such as a byte,
character, or packet) is changed from 1 to 0 or from 0 to 1.

The term burst error means that 2 or more bits in the data unit have changed from 1
to 0 or from 0 to 1.

Types of Errors -1

Data transmission suffers unpredictable changes because of interference.

Single-bit error means that only 1 bit of a given data unit (such as a byte, character,
or packet) is changed from 1 to 0 or from 0 to 1.

Burst Error means that 2 or more bits in the data unit have changed from 1 to 0 or
from 0 to 1.
Whenever bits flow from one point to another, they are subject
to unpredictable changes because of interference. This interference can change
the shape of the signal.

The term single-bit error means that only 1 bit of a given data unit (such as a byte,
character, or packet) is changed from 1 to 0 or from 0 to 1.

The term burst error means that 2 or more bits in the data unit have changed from 1
to 0 or from 0 to 1.

Types of Errors -2
 The number of bits affected depends on the data rate and duration of noise.
 If we are sending data at 1 kbps, a noise of 1/100 second can affect 10 bits.
 If we are sending data at 1 Mbps, the same noise can affect 10,000 bits.

Redundancy

 The central concept in detecting or correcting errors is redundancy.


 To be able to detect or correct errors, we need to send some extra bits with our
data.
 These redundant bits are added by the sender and removed by the receiver.
 Their presence allows the receiver to detect or correct corrupted bits.

Detection versus Correction

 Correction is more difficult than detection.


 In error detection, we are only looking to see if any error has occurred (Yes
or No)
 We are not interested in the number of corrupted bits in Detection.
 Single-bit error is the same as a Burst error.
 In Error Correction, we need to know:

o The exact number of bits that are corrupted and,


o Their location in the message

The number of errors and the size of the message are important factors.

If we need to correct a single error in an 8-bit data unit, we need to consider eight
possible error locations.
If we need to correct two errors in a data unit of the same size, we need to consider
28 (permutation of 8 by 2) possibilities.

You can imagine the receiver’s difficulty in finding 10 errors in a data unit of 1000
bits.

Coding

 Redundancy is achieved through various coding schemes. Sender adds


redundant bits through a process that creates a relationship between redundant
bits and the actual data bits.
 The receiver checks the relationships between the two sets of bits to detect
errors.
 The ratio of redundant bits to data bits and the robustness of the process are
important factors in any coding scheme.

Types of Coding Schemes

We concentrate on block coding; convolution coding is more complex and beyond the
scope of this book.

Block Coding

 We divide our message into blocks, each of ‘k’ bits, called data words.
 We add ‘r’ redundant bits to each block to make the length ‘n = k + r’
 The resulting ‘n-bit’ blocks are called codewords.

BLOCK CODING in Error Detection

If the following two conditions are met, the receiver can detect a change in the
original code word:

 The receiver has (or can find) a list of valid codewords.


 The original code word has changed to an invalid one.

Process of Error Detection in Block Coding


The above figure shows the role of block coding in error detection.

 The sender creates code-words out of data words by using a generator that
applies the rules and procedures of encoding (discussed later).
 Each code word sent to the receiver may change during transmission.
 If the received code word is the same as one of the valid codewords, the word
is accepted; the corresponding data word is extracted for use.
 If the received code word is not valid, it is discarded.
 However, if the code word is corrupted during transmission but the received
word still matches a valid code word, the error remains undetected.

Block Coding:

 We divide our message into blocks, each of ‘k’ bits, called data words.
 We add ‘r’ redundant bits to each block to make the length ‘n = k + r’
 The resulting ‘n-bit’ blocks are called codewords.

Example
In the above example, assume the sender encodes the data word 01 as 011 and sends it
to the receiver.

Consider the following cases:

Case:1

1. The receiver receives 011. It is a valid code word. The receiver extracts the data
word 01 from it.

Case:2

2. The code word is corrupted during transmission, and 111 is


received (the leftmost bit is corrupted). This is not a valid code word and
is discarded.

Case:3

3. The code word is corrupted during transmission, and 000 is received (the right
two bits are

corrupted). This is a valid code word. The receiver incorrectly extracts the data
word 00.

Two corrupted bits have made the error undetectable.

Hamming Distance

 The Hamming Distance between two words of the same size is the number of
differences between the corresponding bits.
 We show Hamming Distance between two words x and y is d(x,y)
 The humming distance between received code word and sent code word is a
number of bits corrupted during transmission.

Example

Let us find the Hamming distance between two pairs of words.

1. The Hamming distance d(000, 011) is 2 because (000 ⊕ 011) is 011 (two 1s).

2. The Hamming distance d(10101, 11110) is 3 because (10101 ⊕ 11110) is 01011


(three 1s)

If the Hamming distance between the sent and the received code word is not zero, the
code word has been corrupted during transmission.

The Hamming distance can easily be found if we apply the XOR operation (⊕) on the
two words and count the number of 1s in the result.

Note that the Hamming distance is a value greater than or equal to zero.

Minimum Hamming distance is a concept used to measure the similarity between two
sequences, often represented as binary strings. Imagine comparing two binary sequences of
equal length, bit by bit.

The Hamming distance is the count of differing bits between these sequences. The minimum
Hamming distance specifically refers to the smallest number of bit changes needed to make
the two sequences identical.
For example, if we have binary strings '10101' and '10011,' the Hamming distance is 2, but the
minimum Hamming distance is 2, as changing two bits is the smallest modification required
for them to match. This concept finds applications in various fields, including error detection
in computer systems and DNA sequence analysis.

Linear Block Codes:

Linear block codes are a specific subset of block codes that possess the additive property you
described. In linear block codes, the exclusive OR (XOR) of two valid codewords results in
another valid codeword. This property is a fundamental characteristic of linear block codes
and is closely related to their algebraic structure.

A parity check code is a simple error-detecting code used in digital communication.

 It involves adding a single parity bit to a data message, ensuring the total number of
bits with a value of 1 is either even (even parity) or odd (odd parity).
 This allows the detection of single-bit errors during transmission.
 Even parity makes the total 1s even, while odd parity makes it odd. The receiver
checks the parity of the received message, and a mismatch indicates a single-bit error.
 Parity checks cannot correct errors but serve as a basic error-detection method.
Cyclic codes are a class of linear block codes with a specific algebraic property related to
cyclic shifts. These codes exhibit a remarkable structure where, if a codeword is valid, any
cyclic shift (rotation) of that codeword is also a valid codeword.

 This property simplifies the encoding and decoding processes and makes cyclic codes
particularly useful in various communication systems.
 If 1011000 is a codeword and we cyclically left-shift, then 0110001 is also a
codeword

Cyclic Redundancy Check (CRC)

 Subset of Cyclic Codes


 Cyclic redundancy check (CRC) is used in networks such as LANs and WANs

Cyclic Redundancy Check (CRC):

 CRC codes, commonly used in error detection in network communication and


storage systems, are a specific type of cyclic code.
 CRC codes use polynomial division to generate a check sequence, and their
cyclic properties allow them to detect burst errors effectively.
Advantages of Cyclic Codes:

 Good performance in detection:

o Single-bit errors
o Double errors
o Odd number of errors
o Burst errors

 Easy Implementation
 Fast Implementation

A checksum is a value derived from the digital data of a message or file, used to verify the integrity of the data during
transmission or storage.

 The checksum is calculated using a specific algorithm and is typically a fixed-size string of characters or a numerical
value.

 Error-detection technique that can be applied to a message of any length


 Checksum mostly used at the network and transport layer rather than the data-link layer
If packets of data get corrupted or lost during real-time multimedia transmission, just asking
for them again (retransmission) is not helpful because it can cause delays. Instead, we want to
fix errors or recreate the missing data right away. Various methods for doing this are called
Forward Error Correction techniques.

Using Hamming Distance

 For error detection, we definitely need more distance


 It can be shown that to correct ‘t’ errors, we need to have:

dmin = 2t + 1

 If we want to correct 10 bits in a packet, we need to make the minimum hamming


distance 21 bits
 A lot of redundant bits need to be sent with the data
 Another way to achieve FEC in multimedia is to allow some small chunks to be
missing at the receiver
 We cannot afford to let all the chunks belonging to the same packet be missing;
however, we can afford to let one chunk be missing in each packet

Combining Hamming Distance & Interleaving

 Hamming distance and interleaving can be combined


 We can first create n-bit packets that can correct t-bit errors
 Then we interleave m rows and send the bits column by column
 Possible to correct burst errors up to m × t bits of errors

 The data link control (DLC) deals with procedures for communication between two
adjacent nodes no matter whether the link is dedicated or broadcast
 Data link control functions include framing, flow control and error control
 Data Link Control (DLC) Services
 The data link control (DLC) deals with procedures for communication between two adjacent
nodes no matter whether the link is dedicated or broadcast

 Data link control functions include framing, flow control and error control

 Data-Link layer needs to pack bits into frames, so that each frame is distinguishable
from another
 Our postal system practices a type of framing
 Framing separates a message by adding a sender address and a destination address
 The destination address defines where the packet is to go; the sender address helps
the recipient acknowledge the receipt

Frame Size:

 Why not one BIG Frame?


 Frames can be of:

o Fixed Size
 Size acts as a boundary/delimiter
o Variable Size
 How to define Beginning and End of a Frame?

Frame Size:

 Why not one BIG Frame?


 Frames can be of:
o Fixed Size
 Size acts as a boundary/delimiter
o Variable Size

How to define Beginning and End of a Frame?

Connection Oriented Framing:

 Data to be carried are 8-bit characters

Byte Stuffing in Connection-Oriented Framing:

 Connection-oriented Framing used text characters as flags


 Nowadays any character used for flag can also be a part of the data
 In order to avoid confusing the receiver, we use Byte Stuffing

Several Issues:

 One or more escape characters followed by a byte with same pattern as a


flag?
 Unicode (16/32 bit) vs. 8-bit characters

 Data is stuffed with a pre-defined Escape Character (byte) when there is a character
with same pattern as a flag



You might also like