SlideShare a Scribd company logo
1 of 134
Download to read offline
CS8591 – Computer Networks
Unit II – Data Link Layer & Media Access
KAVIYA P, AP/IT
KAMARAJ COLLEGE OF ENGINEERING & TECHNOLOGY
UNIT II – Data Link Layer & Media Access
Introduction – Link-Layer Addressing – DLC Services – Data-
Link Layer Protocols – HDLC – PPP – Media Access Control –
Wired LANs: Ethernet – Wireless LANs – Introduction – IEEE
802.11, Bluetooth – Connecting Devices.
9/21/2020 KAVIYA P, AP/IT, KCET 2
Introduction – Data Link Layer
• The Internet is a combination of
networks glued together by
connecting devices (routers or
switches).
• If a packet is to travel from a host to
another host, it needs to pass
through these networks.
• Communication at the data-link
layer is made up of five separate
logical connections between the
data-link layers in the path.
9/21/2020 KAVIYA P, AP/IT, KCET 3
Figure: Communication at the data-link layer
Introduction – Data Link Layer
Nodes and Links
• 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
and WANs) to reach another point.
• LANs and WANs are connected by routers.
• The two end hosts and the routers are referred as nodes and the networks in between as
links.
• 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.
9/21/2020 KAVIYA P, AP/IT, KCET 4
Introduction – Data Link Layer
Data Link Layer Services
• The data-link layer is located between the physical and the network layers.
• The data-link layer provides services to the network layer; it receives services from the
physical layer.
9/21/2020 KAVIYA P, AP/IT, KCET 5
Figure: A communication with only three nodes
Introduction – Data Link Layer
Data Link Layer Services
• The encapsulation and decapsulation at the data-link layer.
• Assume that there is only one router between the source and destination.
• The datagram received by the data-link layer of the source host is encapsulated in a
frame.
• The frame is logically transported from the source host to the router.
• The frame is decapsulated at the data-link layer of the router and encapsulated at
another frame.
• The new frame is logically transported from the router to the destination host.
• The network shows only two data-link layers at the router, the router actually has three
data-link layers because it is connected to three physical links.
9/21/2020 KAVIYA P, AP/IT, KCET 6
Introduction – Data Link Layer
Data Link Layer Services
1. Framing
• A packet at the data-link layer is normally called a frame.
• The data-link layer at each node needs to encapsulate the datagram (packet received
from the network layer) in a frame before sending it to the next node.
• The node also needs to decapsulate the datagram from the frame received on the
logical channel.
9/21/2020 KAVIYA P, AP/IT, KCET 7
Introduction – Data Link Layer
Data Link Layer Services
2. Flow Control
• The sending data-link layer at the end of a link is a producer of frames.
• The receiving data-link layer at the other end of a link is a consumer.
• If the rate of produced frames is higher than the rate of consumed frames, frames
at the receiving end need to be buffered while waiting to be consumed (processed).
• Definitely, we cannot have an unlimited buffer size at the receiving side.
• There are two choices.
– Drop the frames if its buffer is full.
– Send a feedback to the sending data-link layer to ask it to stop or slow down.
• Different data-link-layer protocols use different strategies for flow control.
9/21/2020 KAVIYA P, AP/IT, KCET 8
Introduction – Data Link Layer
Data Link Layer Services
3. Error Control
• At the sending node, a frame in a data-link layer needs to be changed to bits,
transformed to electromagnetic signals, and transmitted through the transmission media.
• At the receiving node, electromagnetic signals are received, transformed to bits, and put
together to create a frame.
• Electromagnetic signals are susceptible to error, a frame is susceptible to error.
• The error needs to be detected.
• After detection, it needs to be either corrected at the receiver node or discarded and
retransmitted by the sending node.
4. Congestion Control
• 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.
9/21/2020 KAVIYA P, AP/IT, KCET 9
Introduction – Data Link Layer
Two categories of Links
• Two nodes are physically connected by a transmission medium such as cable or air.
• The data-link layer controls how the medium is used.
• It can be either a point-to-point link or a broadcast link.
• In a point-to-point link, the link is dedicated to the two devices.
• In a broadcast link, the link is shared between several pairs of devices.
9/21/2020 KAVIYA P, AP/IT, KCET 10
Introduction – Data Link Layer
Two Sublayers
• The data-link layer is divided into two sublayers: data link control (DLC) and media
access control (MAC).
• The data link control sublayer deals with all issues common to both point-to-point
and broadcast links.
• The media access control sublayer deals only with issues specific to broadcast links.
9/21/2020 KAVIYA P, AP/IT, KCET 11
Figure: Dividing the data-link layer into two sublayers
Link Layer Addressing
• IP addresses as the identifiers at the network layer that define the exact points in the
Internet where the source and destination hosts are connected.
• In a connectionless internetwork such as the Internet we cannot make a datagram
reach its destination using only IP addresses.
• The reason is that each datagram in the Internet, from the same source host to the
same destination host, may take a different path.
• The source and destination IP addresses define the two ends but cannot define which
links the datagram should pass through.
• Another addressing mechanism is needed 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.
9/21/2020 KAVIYA P, AP/IT, KCET 12
Link Layer Addressing
• 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.
9/21/2020 KAVIYA P, AP/IT, KCET 13
Figure: IP addresses and link-layer addresses in a small internet
Link Layer Addressing
Three Types of Addresses
• Some link-layer protocols define three types of addresses: unicast, multicast, and
broadcast.
• Unicast Address: Each host or each interface of a router is assigned a unicast address.
Unicasting means one-to-one communication. A frame with a unicast address
destination is destined only for one entity in the link. Example: A3:34:45:11:92:F1
• Multicast Address: One-to-many communication. However, the jurisdiction is local
(inside the link). Example: A2:34:45:11:92:F1 (The second digit, however, needs to
be an even number in hexadecimal.)
• Broadcast Address: One-to-all communication. A frame with a destination broadcast
address is sent to all entities in the link. Example: FF:FF:FF:FF:FF:FF (Ethernet)
9/21/2020 KAVIYA P, AP/IT, KCET 14
Link Layer Addressing
Address Resolution Protocol (ARP)
• Anytime a node has an IP datagram 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.
• There is a need of link-layer address of the next node.
• Address Resolution Protocol (ARP) used to find link-layer address.
• It belongs to the network layer & it 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.
9/21/2020 KAVIYA P, AP/IT, KCET 15
Link Layer Addressing
Address Resolution Protocol (ARP)
• The goal of ARP is to enable each host on a network to build up a mapping between IP
addresses and Physical addresses or Link address.
• The set of mappings or table stored in the host is called as ARP cache or ARP table.
• If a host want to send an IP datagram to a host on the same physical network.
– It first checks for a mapping in a cache.
– If no mapping is found, it invokes the ARP operation
9/21/2020 KAVIYA P, AP/IT, KCET 16
Link Layer Addressing
Address Resolution Protocol (ARP)
9/21/2020 KAVIYA P, AP/IT, KCET 17
Figure: ARP operation
Link Layer Addressing
Address Resolution Protocol (ARP) Operation
• 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.
• 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.
9/21/2020 KAVIYA P, AP/IT, KCET 18
Link Layer Addressing
Address Resolution Protocol (ARP) Packet Format
• Hardware Type (16 bits): Specifies the type of physical network (eg. 1 – for Ethernet)
• Protocol Type (16 bits): Specifies the higher layer protocol. (Value is 2048 for IP)
• HLen (8 bits) - Hardware Address Length: Specifies the length of the link layer address
(Physical Address)
9/21/2020 KAVIYA P, AP/IT, KCET 19
Link Layer Addressing
Address Resolution Protocol (ARP) Packet Format
• PLen (8 bits) - Protocol Address Length: Specifies the length of the higher layer
protocol address (IP Address)
• Operation or Opcode (16 bits): Specifies whether this is a request or a response.
• Sender Hardware Address (48 bits): Specifies the link level layer or physical address of
the sender.
• Sender Protocol Address (32 bits): Specifies the higher layer address (IP Address) of the
sender.
• Target Hardware Address (48 bits): Specifies the link level layer or physical address of
the target host.
• Target Protocol Address (32 bits): Specifies the higher layer address (IP Address) of the
target host.
9/21/2020 KAVIYA P, AP/IT, KCET 20
Link Layer Addressing
ARP Example
Problem: 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 shows the ARP request and response messages.
9/21/2020 KAVIYA P, AP/IT, KCET 21
Link Layer Addressing
ARP Example
Solution
9/21/2020 KAVIYA P, AP/IT, KCET 22
Error Detection & Error Correction
Types of Errors
• Whenever bits flow from one point to another, they are subject to unpredictable changes
because of interference.
• Single-bit Error: 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: 2 or more bits in the data unit have changed from 1 to 0 or from 0 to 1.
9/21/2020 KAVIYA P, AP/IT, KCET 23
Error Detection & Error Correction
Redundancy
• The central concept in detecting or correcting errors is redundancy.
• To be able to detect or correct errors, some extra bits is need to send with 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
• Error Detection: If any error has occurred. The answer is a simple yes or no. Not even
interested in the number of corrupted bits.
• Error Correction: To know the exact number of bits that are corrupted and their location
in the message. The number of errors and the size of the message are important factors.
9/21/2020 KAVIYA P, AP/IT, KCET 24
Error Detection & Error Correction
Coding
• Redundancy is achieved through various coding schemes.
• The sender adds redundant bits through a process that creates a relationship between the
redundant bits and the actual data bits.
• The receiver checks the relationships between the two sets of bits to detect errors.
• Coding schemes are divided into two broad categories: Block Coding and Convolution
Coding.
9/21/2020 KAVIYA P, AP/IT, KCET 25
Error Control
Error Detection Error Correction
Two Dimensional Parity
Checksum
Cyclic Redundant Check (CRC)
Hamming Code
Error Detection & Error Correction
Error Detection
• Two approaches when the recipient detects an error:
– Notify the sender that the message was corrupted, so the sender can send again, if the
error is rare, then the retransmitted message will be error-free.
– Using some error detection and correction algorithm, the receiver reconstructs the
message.
• Common technique for detecting transmission error
– CRC (Cyclic Redundancy Check)
• Used in HDLC, DDCMP, CSMA/CD
– Other approaches
• Two Dimensional Parity (used in BISYNC)
• Checksum (used in IP)
9/21/2020 KAVIYA P, AP/IT, KCET 26
Error Detection & Error Correction
Basic Idea of Error Detection
• To add redundant information to a frame that can be used to determine error
• Imagine (Extreme Case)
– Transmitting two complete copies of data
» Identical  No error (or) Differ  Error
» Poor Scheme ???
• n bit message, n bit redundant information
• Error can go undetected
• In general, we can provide strong error detection technique
– k redundant bits, n bits message, k << n
– In Ethernet, a frame carrying up to 12,000 bits of data requires only 32-bit CRC.
9/21/2020 KAVIYA P, AP/IT, KCET 27
Error Detection & Error Correction
1. Two-Dimensional Parity
• It is based on “simple” (one-dimensional) parity, which usually involves adding one extra
bit to a 7-bit code to balance the number of 1s in the byte.
• For example,
– Odd parity sets the eighth bit to 1 if needed to give an odd number of 1s in the byte.
– Even parity sets the eighth bit to 1 if needed to give an even number of 1s in the byte.
• Two-dimensional parity does a similar calculation for each bit position across each of the
bytes contained in the frame.
• This results in an extra parity byte for the entire frame, in addition to a parity bit for each
byte.
• Two-dimensional parity catches all 1, 2, and 3 bit errors and most 4 bit errors.
9/21/2020 KAVIYA P, AP/IT, KCET 28
Error Detection & Error Correction
1. Two-Dimensional Parity
9/21/2020 KAVIYA P, AP/IT, KCET 29
Error Detection & Error Correction
2. Checksum
9/21/2020 KAVIYA P, AP/IT, KCET 30
Error Detection & Error Correction
2. Checksum
• Add up all the words that are transmitted and then transmit the result of that sum.
– The result is called the checksum.
• The receiver performs the same calculation on the received data and compares the result
with the received checksum.
• If any transmitted data, including the checksum itself, is corrupted, then the results will
not match, so the receiver knows that an error occurred.
• Consider the data being checksummed as a sequence of 16-bit integers.
• Add them together using 16-bit ones complement arithmetic and then take the ones
complement of the result. That 16-bit number is the checksum.
• In 1‟s complement arithmetic, a negative integer −x is represented as the complement of x;
– Each bit of x is inverted.
9/21/2020 KAVIYA P, AP/IT, KCET 31
Error Detection & Error Correction
2. Checksum
• When adding numbers in 1‟s complement arithmetic, a carryout from the most significant
bit needs to be added to the result (Wrapping).
Sender Side:
 The message is divided into 16-bit words.
 The value of the checksum word is set to 0.
 All words including the checksum are added using 1's complement addition.
 The sum is complemented and becomes the checksum.
 The checksum is sent with the data.
Receiver Side:
 The message (including checksum) is divided into 16-bit words.
 All words are added using 1's complement addition.
 The sum is complemented and becomes the new checksum.
 If the value of checksum is 0, the message is accepted; otherwise, it is rejected.
9/21/2020 KAVIYA P, AP/IT, KCET 32
Error Detection & Error Correction
2. Checksum - Example
Frame Data: 01101101 10010011 01101101
n=8
Sender Side:
Calculating Checksum,
01101101
10010011
01101101
---------------------------
01101101 --------1‟s Compliment-- 10010010---------------------------
Checksum = 10010010
So data transmitted over the link is: 01101101 10010011 01101101 10010010
9/21/2020 KAVIYA P, AP/IT, KCET 33
Error Detection & Error Correction
2. Checksum - Example
Receiver Side: (without Error)
Received Data: 01101101 10010011 01101101 10010010
Calculating Sum,
01101101
10010011
01101101
10010010
---------------------------
1111111 ----> All 1‟s So accepted (No error)---------------------------
Receiver Side: (with Error)
Received Data: 11101101 10010011 10010010
11101101
10010011
01101101
10010010
---------------------------
01111111---> Not all 1‟s. So not accepted (Contains Error)
9/21/2020 KAVIYA P, AP/IT, KCET 34
Error Detection & Error Correction
3. Cyclic Redundancy Check (CRC)
• CRC uses small number of redundant bits to detect errors.
• 32 bit CRC provides strong protection against common bit errors in messages that are
1000 bytes long.
• In CRC method, message is represented as a polynomial. n+1 bit message can be
represented by an „n‟ degree polynomial.
• Example: 10011010 is represented as
1*X7 + 0*X6 + 0*X5 + 1*X4 + 1*X3 + 0*X2 + 1*X1 + 0*X0 = X7 + X4 + X3 + X
• Let M(x) is a message polynomial and C(x) is a generator polynomial. Both sender and
receiver have to agree on divisor polynomial C(x).
9/21/2020 KAVIYA P, AP/IT, KCET 35
Error Detection & Error Correction
3. Cyclic Redundancy Check (CRC)
9/21/2020 KAVIYA P, AP/IT, KCET 36
Error Detection & Error Correction
3. Cyclic Redundancy Check (CRC)
Sender Side:
• Message M(x) has k bits; the code word P(x) has n bits.
• The size of the message M(x) is augmented by adding (n – k) 0‟s to the right-hand side.
• This message is called as zero extended message. i.e., T(x) = M(x) + E(x).
– T(x) – Augmented Message
• Sender uses (n – k + 1) size divisor C(x) to divide (Modulo 2 division) the augmented data
T(x). (i.e.) Sender computes T(x) / C(x).
• The remainder will be added to the augmented message T(x). The result of n - bits are
called as code word P(x).
9/21/2020 KAVIYA P, AP/IT, KCET 37
Error Detection & Error Correction
3. Cyclic Redundancy Check (CRC)
Receiver side:
• Receiver divide the received message P(x) with the same divisor C(x).
– If the remainder is zero – No error in the message (Accepted)
– Otherwise, error in the message (Rejected)
Example:
Sender:
• M(x) = X7 + X4 + X3 + X (i.e.) 10011010
• C(x) = X3+X2+1 (i.e.) 1101
9/21/2020 KAVIYA P, AP/IT, KCET 38
Therefore, Code word P(x) = 10011010101
Error Detection & Error Correction
3. Cyclic Redundancy Check (CRC)
9/21/2020 KAVIYA P, AP/IT, KCET 39
Receiver: (Without Error)
Received Data P(x) = 10011010101
Receiver: (With Error)
Received Data P(x) = 10011011101
Error Detection & Error Correction
• In general, it is possible to prove that the following types of errors can be detected by a
C(x) with the stated properties
– All single-bit errors, as long as the xk and x0 terms have nonzero coefficients.
– All double-bit errors, as long as C(x) has a factor with at least three terms.
– Any odd number of errors, as long as C(x) contains the factor (x+1).
– Any “burst” error (i.e., sequence of consecutive error bits) for which the length of the
burst is less than k bits. (Most burst errors of larger than k bits can also be detected.)
• Six generator polynomials that have become international standards are:
– CRC-8 = x8+x2+x+1 and CRC-10 = x10+x9+x5+x4+x+1
– CRC-12 = x12+x11+x3+x2+x+1 and CRC-16 = x16+x15+x2+1
– CRC-CCITT = x16+x12+x5+1
– CRC-32 = x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1
9/21/2020 KAVIYA P, AP/IT, KCET 40
Error Detection & Error Correction
Error Correction – Hamming Code
• Hamming code is used to correct a single bit error. (Some hamming code can detect
more than single error).
• No. of redundancy bits added can be determined using 2r >= (m + r +1)
Where, m – No. of bits in Message r – No. of Redundancy bits
9/21/2020 KAVIYA P, AP/IT, KCET 41
Error Detection & Error Correction
Error Correction – Hamming Code
9/21/2020 KAVIYA P, AP/IT, KCET 42
Error Detection & Error Correction
Error Correction – Hamming Code
9/21/2020 KAVIYA P, AP/IT, KCET 43
Error Detection & Error Correction
Error Correction – Hamming Code
Example:
Sender Side:
Data: 1001101
9/21/2020 KAVIYA P, AP/IT, KCET 44
Error Detection & Error Correction
Error Correction – Hamming Code
Receiver Side:
• Single bit error is detected
in receiver side.
9/21/2020 KAVIYA P, AP/IT, KCET 45
Error Detection 
DLC Services
• Data link control (DLC) deals with procedures for communication between two adjacent
nodes (i.e) node-to-node communication.
• No matter whether the link is dedicated or broadcast.
• Data link control functions include framing and flow and error control.
9/21/2020 KAVIYA P, AP/IT, KCET 46
DLC Services
1. Framing
• Data link layer translates a stream of bits from the physical layer into the larger aggregate
(or) discrete unit called frames.
• Framing in the data-link layer separates a message from one source to a destination 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.
• The hardware present in the data link layer is network adaptor. It enables the nodes to
exchange frames.
9/21/2020 KAVIYA P, AP/IT, KCET 47
DLC Services
1. Framing – Frame Size
• Frames can be of fixed or variable size.
• In fixed-size framing, there is no need for defining the boundaries of the frames; the size
itself can be used as a delimiter.
• In variable-size framing, need a way to define the end of one frame and the beginning of
the next.
• Two approaches were used for this purpose:
– Character-oriented approach and
– Bit-oriented approach.
9/21/2020 KAVIYA P, AP/IT, KCET 48
DLC Services
1. Framing – Character-Oriented (or Byte-Oriented) Framing
• Data to be carried are 8-bit characters from a coding system such as ASCII.
• The header, which normally carries the source and destination addresses and other control
information.
• The trailer, which carries error detection redundant bits, are also multiples of 8 bits.
• To separate one frame from the next, an 8-bit (1-byte) flag is added at the beginning and
the end of a frame.
• The flag, composed of protocol-dependent special characters, signals the start or end of a
frame.
9/21/2020 KAVIYA P, AP/IT, KCET 49
A Frame - Character-Oriented Protocol
DLC Services
1. Framing – Character-Oriented (or Byte-Oriented) Framing
• Any character used for the flag could also be part of the information.
• If this happens, the receiver, when it encounters this pattern in the middle of the data,
thinks it has reached the end of the frame.
• To fix this problem, a byte-stuffing strategy was added to character-oriented framing.
• In byte stuffing (or character stuffing), a special byte is added to the data section of the
frame when there is a character with the same pattern as the flag.
• The data section is stuffed with an extra byte. This byte is usually called the escape
character (ESC) and has a predefined bit pattern.
• Whenever the receiver encounters the ESC character, it removes it from the data section
and treats the next character as data, not as a delimiting flag.
9/21/2020 KAVIYA P, AP/IT, KCET 50
DLC Services
1. Framing – Character-Oriented (or Byte-Oriented) Framing
• Byte Stuffing: The process of adding one extra byte whenever there is a flag or escape
character in the text.
9/21/2020 KAVIYA P, AP/IT, KCET 51
Byte Stuffing and Unstuffing
DLC Services
1. Framing – Bit-Oriented Framing
• The data section of a frame is a sequence of bits to be interpreted by the upper layer as
text, graphic, audio, video, and so on.
• However, in addition to headers (and possible railers), a delimiter is needed to separate
one frame from the other.
• Most protocols use a special 8-bit pattern flag, 01111110, as the delimiter to define the
beginning and the end of the frame.
9/21/2020 KAVIYA P, AP/IT, KCET 52
A Frame - Bit-Oriented Protocol
DLC Services
1. Framing – Bit-Oriented Framing
• If the flag pattern appears in the data, it is needed to inform the receiver that this is not the
end of the frame.
• In bit stuffing, if a 0 and five consecutive 1 bits are encountered, an extra 0 is added.
• This extra stuffed bit is eventually removed from the data by the receiver.
• Bit Stuffing: The process of adding one extra 0 whenever five consecutive 1s follow a 0
in the data, so that the receiver does not mistake the pattern 0111110 for a flag.
9/21/2020 KAVIYA P, AP/IT, KCET 53
Bit Stuffing and Unstuffing
DLC Services
2. Flow and Error Control
• One of the responsibilities of the data-link control sublayer is flow and error control at the
data-link layer.
Flow Control
• Whenever an entity produces items and another entity consumes them, there should be a
balance between production and consumption rates.
• The data-link layer at the sending node tries to push frames toward the data-link layer at
the receiving node.
• If the receiving node cannot process and deliver the packet to its network at the same rate
that the frames arrive, it becomes overwhelmed with frames.
• Flow control in this case can be feedback from the receiving node to the sending node to
stop or slow down pushing frames..
9/21/2020 KAVIYA P, AP/IT, KCET 54
DLC Services
2. Flow and Error Control
Flow Control
• One solution is to use two buffers; one at the sending data-link layer and the other at the
receiving data-link layer.
• A buffer is a set of memory locations that can hold packets at the sender and receiver.
Error Control
• The physical layer is not fully reliable, error control is implemented at the data-link
layer to prevent the receiving node from delivering corrupted packets to its network layer.
• If the frame is corrupted, it is silently discarded; if it is not corrupted, the packet is
delivered to the network layer.
• If the frame is corrupted, it is silently discarded; if it is not corrupted, an acknowledgment
is sent to the sender.
9/21/2020 KAVIYA P, AP/IT, KCET 55
DLC Services
2. Connectionless and Connection-Oriented
• A DLC protocol can be either connectionless or connection-oriented.
Connectionless Protocol
• Frames are sent from one node to the next without any relationship between the frames. Each frame
is independent.
• It does not mean that there is no physical connection between the nodes; it means that there is no
connection between frames.
• The frames are not numbered and there is no sense of ordering.
Connection-Oriented Protocol
• A logical connection should first be established between the two nodes (setup phase). is sent to the
sender.
• After all frames that are somehow related to each other are transmitted (transfer phase), the logical
connection is terminated (teardown phase).
• The frames are numbered and sent in order.
9/21/2020 KAVIYA P, AP/IT, KCET 56
Data-Link Layer Protocols
Flow Control
• Specifies how much data the sender can transmit before receiving permission or
acknowledgement to continue from the receiver.
9/21/2020 KAVIYA P, AP/IT, KCET 57
Flow Control
Sliding
Window
Stop and Wait
Data-Link Layer Protocols
1. Stop and Wait
• Sender sends one frame at a time stops until it receives the
confirmation (Acknowledgement) from the receiver and
then sends the next frame.
• Acknowledgement: Small control frame that a protocol
(receiver side) sends back to the sender saying that it has
received an earlier frame.
• Control frame: Frame with header only. (No data is in
control frame)
• Timeout period may vary for different frame transmission.
• Advantage: Simplicity
• Disadvantage: Inefficiency i.e., it allows sender to have
only one outstanding frame on the link.
9/21/2020 KAVIYA P, AP/IT, KCET 58
Data-Link Layer Protocols
2. Sliding Window
• Sender can transmit several frames
continuously before needing an ACK.
• If ACK received by the sender before continuous
transmission is finished, sender can transmit.
• An ACK can acknowledge the correct receipt of
multiple frames at a receiver (cumulative ACK).
• Sender assigns a frame number to each frame.
Frames are numbered “modulo n”. (i.e., 0 to n-1,
0, 1, 2 …n-1)
9/21/2020 KAVIYA P, AP/IT, KCET 59
Fig. Timeline for Sliding Window
Data-Link Layer Protocols
2. Sliding Window
• Sender maintains three variables,
 Sender Window Size (SWS)
 Last ACK Received (LAR) – frame number of the last acknowledgement received.
 Last Frame Sent (LFS) – frame number of the last frame sent.
9/21/2020 KAVIYA P, AP/IT, KCET 60
LFS – LAR ≤ SWS
Moves to the right frame by
frame, when a frame is sent
Moves to the right, the size
of several frames at a time,
when an ACK is received
Data-Link Layer Protocols
2. Sliding Window
• When an acknowledgement received, the sender moves LAR to the right, thereby allowing
the sender to transmit another frame.
• Sender has to buffer the frame up to SWS frames for retransmission purpose.
9/21/2020 KAVIYA P, AP/IT, KCET 61
Data-Link Layer Protocols
2. Sliding Window
• Receiver maintains three variables,
 Receiver Window Size (RWS) – upper bound on the number of out of order frames
that the receiver is willing to accept.
 Largest Acceptable Frame (LAF) – frame number of the largest acceptable frame.
 Last Frame Received (LFR) – frame number of the last frame received.
9/21/2020 KAVIYA P, AP/IT, KCET 62
LAF – LFR ≤ RWS
Moves to the right frame by
frame, when a frame is
received
Moves to the right the size of
the several frames at a time,
when an ACK is sent.
Data-Link Layer Protocols
2. Sliding Window
• When a frame with sequence
number SeqNum arrives,
• If SeqNum ≤ LFR or SeqNum >
LAF
– Discard it (the frame is outside
the receiver window)
• If LFR < SeqNum ≤ LAF
– Accept it
• Now the receiver needs to decide
whether or not to send an ACK
9/21/2020 KAVIYA P, AP/IT, KCET 63
Data-Link Layer Protocols
3. Automatic Repeat Request (ARQ)
• Retransmission of lost or damaged frame is referred as Automatic Repeat Request.
• Retransmission taken place,
– When error occurs in frame, receiver sends an NAK (Negative Acknowledgement)
explicitly to the sender.
– When the sender‟s timer expires (due to error frame, frame lost or ACK lost), it
triggers the retransmission.
– Timeout – the expected delay for sender to receive ACK for the frame
9/21/2020 KAVIYA P, AP/IT, KCET 64
Selective Repeat ARQ
Sliding Window ARQStop and Wait ARQ
ARQ
Go-Back - N ARQ
Data-Link Layer Protocols
3.1 Stop and Wait ARQ
• Extension of stop and wait protocol.
• Receiver sends an ACK if frame is correctly received. Sender waits for an ACK before
transmitting the next frame.
• Retransmission,
– If sender does not receive anything before timeout period expires (due to frame lost or
ACK lost), it retransmits the frame.
– Suppose if sender receives the NAK (error in frame or damaged frame), it retransmits
that error frame.
9/21/2020 KAVIYA P, AP/IT, KCET 65
Data-Link Layer Protocols
3.1 Stop and Wait ARQ
9/21/2020 KAVIYA P, AP/IT, KCET 66
Data-Link Layer Protocols
3.2 Sliding Window ARQ
• Two approaches,
1. Go-Back – N ARQ 2. Selective Repeat ARQ
3.2.1 Go-Back – N ARQ
• Go-Back – N uses sliding window flow control protocol.
• If no errors occur the operations are similar to sliding window.
• A station may send multiple frames as allowed by the window.
• Retransmission
– Receiver sends a NAK „i‟ if frame „i‟ contains error (or) frame „i‟ was lost (i.e., out of
order frame). After that receiver discards all frames until the error frame (or) lost
frame was correctly retransmitted.
– If sender receives the NAK for frame „i‟ it will retransmit frame „i‟ and all frames i+1,
i+2… which have been sent, but not been acknowledged.
9/21/2020 KAVIYA P, AP/IT, KCET 67
Data-Link Layer Protocols
3.2 Sliding Window ARQ
3.2.1 Go-Back – N ARQ
9/21/2020 KAVIYA P, AP/IT, KCET 68
Data-Link Layer Protocols
3.2 Sliding Window ARQ
3.2.1 Selective Repeat ARQ
• Here sender only retransmits frames for which NAK is received.
• Advantage over Go-Back – N: Fewer retransmissions
• Disadvantages:
– More complex at sender and receiver.
– Each frame must be acknowledged individually (no cumulative acknowledgement).
– Receiver may receive out of sequence frames.
9/21/2020 KAVIYA P, AP/IT, KCET 69
Data-Link Layer Protocols
3.2 Sliding Window ARQ
3.2.2 Selective Repeat ARQ
9/21/2020 KAVIYA P, AP/IT, KCET 70
High-Level Data Link Control (HDLC)
• It is a bit-oriented protocol for communication over point-to-point and multipoint links.
• It implements the Stop-and-Wait protocol.
• HDLC defines three types of frames: information frames (I-frames), supervisory
frames (S-frames), and unnumbered frames (U-frames).
• Each type of frame serves as an envelope for the transmission of a different type of
message.
• Iframes are used to data-link user data and control information relating to user data
(piggybacking).
• S-frames are used only to transport control information.
• U-frames are reserved for system management.
• Information carried by U-frames is intended for managing the link itself.
9/21/2020 KAVIYA P, AP/IT, KCET 71
High-Level Data Link Control (HDLC)
• Flag field: Contains synchronization pattern 01111110, which identifies both the
beginning and the end of a frame.
• Address field: Contains the address of the secondary station. The address field can be one
byte or several bytes long, depending on the needs of the network.
• Control field: One or two bytes used for flow and error control.
• Information field: Contains the user‟s data from the network layer or management
information. Its length can vary from one network to another.
• FCS field: The frame check sequence (FCS) is the HDLC error detection field. It can
contain either a 2- or 4-byte CRC.
9/21/2020 KAVIYA P, AP/IT, KCET 72
High-Level Data Link Control (HDLC)
Bit Stuffing
Sending side:
• On the sending side, any time five consecutive 1‟s have been transmitted from the body of the
message (i.e. excluding when the sender is trying to send the distinguished 01111110 sequence)
– The sender inserts „0‟ before transmitting the next bit.
Receiving side:
• On the receiving side, Five consecutive 1‟s and look at the next bit
• 0 - Stuffed, so discard it
• 1 - Either End of the frame marker (or) Error has been introduced in the bit stream
• Look at the next bit
If 0 ( 01111110 )  End of the frame marker
If 1 ( 01111111 )  Error, discard the whole frame
• The receiver needs to wait for next 01111110 before it can start receiving again.
9/21/2020 KAVIYA P, AP/IT, KCET 73
Point-to-Point Protocol (PPP)
Services Provided by PPP
• Defines the format of the frame to be exchanged between devices.
• Authentication is also provided in the protocol, but it is optional.
• The new version Multilink PPP, provides connections over multiple links.
• It provides network address configuration.
Services not provided by PPP
• Does not provide flow control.
• It has a very simple mechanism for error control. A CRC field is used to detect errors.
• Lack of error control and sequence numbering may cause a packet to be received out of
order.
• Does not provide a sophisticated addressing mechanism to handle frames in a multipoint
configuration.
9/21/2020 KAVIYA P, AP/IT, KCET 74
Point-to-Point Protocol (PPP)
Framing
• It also uses the “Character Stuffing”.
• Flag: Special start of text character denoted as Flag 0 1 1 1 1 1 1 0
• Address, Control: default values
• Address – 11111111 (Broadcast Address)
• Control – 11000000 (imitating unnumbered frames in HDLC)
• Protocol: Defines what is being carried in the data field; either user data or other
information.
• Payload: Frame data (default size is 1500 bytes)
• FCS: The frame check sequence (FCS) is simply a 2-byte or 4-byte standard CRC.
9/21/2020 KAVIYA P, AP/IT, KCET 75
Point-to-Point Protocol (PPP)
Byte Stuffing in PPP
• Whenever the flag value appears in the data section of the frame, escape byte (01111101)
stuffed into the data to tell the receiver that the next byte is not a flag.
Protocols used by PPP
• LCP (Link Control Protocol)
• AP (Authentication Protocol)
• NCP (Network Control Protocol)
9/21/2020 KAVIYA P, AP/IT, KCET 76
Point-to-Point Protocol (PPP)
LCP (Link Control Protocol)
• Responsible for establishing, maintaining, configuring & terminating the links.
• All LCP packets are carried in the payload of the PPP frame with protocol field set to
“C021” in hexadecimal.
• Code: Defines the type of the LCP packet. There are 11 types of LCP packet is available.
• These 11 types of LCP packets are categorized into three category.
• First category: Comprising the first four packet types (0×01 - 0×04) used for
link configuration during link establishment.
• Second Category: Comprising packet types 0×05, 0×06 for the termination of
the link.
• Third Category: Comprising last five packet types (0×07 - 0×11) used for link
monitoring and debugging.
• Id: Value that matches the request and reply.
• Length: Defines the total length of the LCP packet.
• Information: Optional information.
9/21/2020 KAVIYA P, AP/IT, KCET 77
Point-to-Point Protocol (PPP)
AP (Authentication Protocol)
• PPP is mainly designed for dial up links, where the user identity verification is necessary
• Authentication: Validating the identity of a user.
• PPP uses two authentication protocols,
• PAP (Password Authentication Protocol)
• CHAP (Challenge Handshake Authentication Protocol)
NCP (Network Control Protocol)
• IPCP (Internet Protocol Control Protocol) is used as a network control protocol.
• IPCP defines 7 types of packets distinguished by the code values.
9/21/2020 KAVIYA P, AP/IT, KCET 78
Media Access Control (MAC)
• When nodes or stations are connected and use a common link, called a multipoint or
broadcast link.
• Multiple-access protocol is needed to coordinate access to the link.
9/21/2020 KAVIYA P, AP/IT, KCET 79
Media Access Control (MAC)
1. Random Access (or) Contention
• Each station has the right to the medium without being controlled by any other station.
• If more than one station tries to send, there is an access conflict – collision – and the
frames will be either destroyed or modified.
• To avoid access conflict or to resolve it when it happens, each station follows a procedure
that answers the following questions:
– When can the station access the medium?
– What can the station do if the medium is busy?
– How can the station determine the success or failure of the transmission?
– What can the station do if there is an access conflict?
9/21/2020 KAVIYA P, AP/IT, KCET 80
Media Access Control (MAC)
1.1 ALOHA (PURE ALOHA)
• When a station sends a frame, it expects the receiver to send an acknowledgment.
• If the acknowledgment does not arrive after a time-out period, the station assumes that
the frame (or the acknowledgment) has been destroyed and resends the frame.
• A collision involves two or more stations. If all these stations try to resend their frames
after the time-out, the frames will collide again.
• Pure ALOHA dictates that when the time-out period passes, each station waits a random
amount of time before resending its frame.
• The randomness will help avoid more collisions. We call this time the backoff time TB.
• After a maximum number of retransmission attempts Kmax, a station must give up and try
later.
9/21/2020 KAVIYA P, AP/IT, KCET 81
Media Access Control (MAC)
1.1 ALOHA (PURE ALOHA)
9/21/2020 KAVIYA P, AP/IT, KCET 82
Media Access Control (MAC)
1.2 Slotted ALOHA
• In slotted ALOHA, the entire time is divided into slots of Tfr seconds and force the station
to send only at the beginning of the time slot.
• A station is allowed to send only at the beginning of the synchronized time slot, if a station
misses this moment, it must wait until the beginning of the next time slot.
• There is still the possibility of collision if two stations try to send at the beginning of the
same time slot.
9/21/2020 KAVIYA P, AP/IT, KCET 83
Media Access Control (MAC)
1.3 Carrier Sense Multiple Access (CSMA)
• CSMA - One improvement to the basic Aloha is sensing the carrier before accessing the
medium.
• Sensing the carrier and accessing the medium only if the carrier is idle decreases the
probability of a collision.
• Here hidden terminals cannot be detected, so, if a hidden terminal transmits at the same
time as another sender, a collision might occur at the receiver.
• Persistence Methods: What should a station do if the channel is busy? What should a
station do if the channel is idle? Three methods have been devised to answer these
questions: the 1-persistent method, the nonpersistent method, and the p-persistent
method.
9/21/2020 KAVIYA P, AP/IT, KCET 84
Media Access Control (MAC)
1.3 Carrier Sense Multiple Access (CSMA)
• 1-Persistent : Simple and straightforward. In this method, after the station finds the line
idle, it sends its frame immediately (with probability 1). This method has the highest
chance of collision because two or more stations may find the line idle and send their
frames immediately..
• Non-Persistent: Stations sense the carrier and start sending immediately if the medium is
idle. If the medium is busy, the station pauses a random amount of time before sensing the
medium again and repeating this pattern. This approach reduces the chance of collision.
However, this method reduces the efficiency of the network because the medium
remains idle when there may be stations with frames to send.
9/21/2020 KAVIYA P, AP/IT, KCET 85
Media Access Control (MAC)
1.3 Carrier Sense Multiple Access (CSMA)
• p-Persistent: It reduces the chance of collision and improves efficiency. In this method,
after the station finds the line idle it follows these steps:
1. With probability p, the station sends its frame.
2. With probability q = 1 − p, the station waits for the beginning of the next time
slot and checks the line again.
a. If the line is idle, it goes to step 1.
b. If the line is busy, it acts as though a collision has occurred and uses the
back-off procedure.
9/21/2020 KAVIYA P, AP/IT, KCET 86
Media Access Control (MAC)
1.4 Carrier Sense Multiple Access with Collision Detection (CSMA/CD)
• CSMA/CD multi-access control protocol.
1. Each station listens before it transmits.
2. If the channel is busy, it waits until the channel goes idle, and then it transmits.
3. If the channel is idle it transmits immediately. Continue sensing.
4. If collision is detected, transmit a brief jamming signal, then cease transmission, wait
for a random time, and retransmit.
• Collision detection is not by waiting for
an ACK
9/21/2020 KAVIYA P, AP/IT, KCET 87
Media Access Control (MAC)
1.5 Carrier Sense Multiple Access with
Collision Avoidance (CSMA/CA)
• Collisions are avoided through the use
of CSMA/CA‟s three strategies: the
interframe space, the contention
window, and acknowledgments.
9/21/2020 KAVIYA P, AP/IT, KCET 88
Media Access Control (MAC)
2. Controlled Access
• The stations consult one another to find which station has the right to send.
• A station cannot send unless it has been authorized by other stations.
2.1 Reservation
• A station needs to make a reservation before sending data. Time is divided into intervals.
• In each interval, a reservation frame precedes the data frames sent in that interval.
• If there are N stations in the system, there are exactly N reservation minislots in the
reservation frame.
• Each minislot belongs to a station. When a station needs to send a data frame, it makes a
reservation in its own minislot.
• The stations that have made reservations can send their data frames after the reservation
frame.
9/21/2020 KAVIYA P, AP/IT, KCET 89
Media Access Control (MAC)
2.2 Polling
• One device is designated as a primary station and the other devices are secondary
stations.
• All data exchanges must be made through the primary device.
• The primary device controls the link; the secondary devices follow its instructions.
• The primary device to determine which device is allowed to use the channel at a given
time.
• This method uses poll and select functions to prevent collisions.
• Drawback: If the primary station fails, the system goes down.
9/21/2020 KAVIYA P, AP/IT, KCET 90
Media Access Control (MAC)
2.2 Polling
Select Function
• It is used whenever the primary device has something to send.
• If the primary is neither sending nor receiving data, it knows the link is available.
• The primary must alert the secondary to the upcoming transmission and wait for an
acknowledgment of the secondary‟s ready status.
• Before sending data, the primary creates and transmits a select (SEL) frame, one field
of which includes the address of the intended secondary.
Poll Function
• When the primary is ready to receive data, it must ask (poll) each device in turn if it
has anything to send.
• When the first secondary is approached, it responds either with a NAK frame if it has
nothing to send or with data (in the form of a data frame) if it does.
• If the response is negative (a NAK frame), then the primary polls the next secondary in the
same manner until it finds one with data to send.
• When the response is positive (a data frame), the primary reads the frame and returns
an acknowledgment (ACK frame), verifying its receipt.
9/21/2020 KAVIYA P, AP/IT, KCET 91
Media Access Control (MAC)
2.3 Token Passing
• The stations in a network are organized in a logical ring.
• In this method, a special packet called a token circulates through the ring.
• The possession of the token gives the station the right to access the channel and send its
data.
• When the station has no more data to send, it releases the token, passing it to the next
logical station in the ring.
• Stations must be limited in the time they can have possession of the token.
• The token must be monitored to ensure it has not been lost or destroyed.
• Function of token management is to assign priorities to the stations and to the types of
data being transmitted.
• Token management is needed to make low-priority stations release the token to high-
priority stations.
9/21/2020 KAVIYA P, AP/IT, KCET 92
Media Access Control (MAC)
2.3 Token Passing
• In a token-passing network, stations do not have to be physically connected in a ring;
the ring can be a logical one.
9/21/2020 KAVIYA P, AP/IT, KCET 93
Media Access Control (MAC)
3. Channelization
• Channelization (or channel partition) is a multiple-access method in which the available
bandwidth of a link is shared in time, frequency, or through code, among different
stations.
3.1 Frequency Division Multiple Access (FDMA)
• In FDMA, the available bandwidth is divided into frequency bands.
• Each station is allocated a band to send its data. (i.e.) Each band is reserved for a
specific station, and it belongs to the station all the time.
• Each station also uses a bandpass filter to confine the transmitter frequencies.
• To prevent station interferences, the allocated bands are separated from one another by
small guard bands.
9/21/2020 KAVIYA P, AP/IT, KCET 94
Media Access Control (MAC)
3. Channelization
3.2 Time Division Multiple Access (TDMA)
• In TDMA, the stations share the bandwidth of the channel in time.
• Each station is allocated a time slot during which it can send data.
• Each station transmits its data in its assigned time slot.
• The main problem with TDMA lies in achieving synchronization between the different
stations.
• Each station needs to know the beginning of its slot and the location of its slot.
• To compensate for the delays, we can insert guard times.
9/21/2020 KAVIYA P, AP/IT, KCET 95
Media Access Control (MAC)
3. Channelization
3.3 Code Division Multiple Access (CDMA)
• In CDMA, multiple users use the same frequency at the same time and no time
scheduling is applied.
• Multiple users are allotted different codes that consists of sequences of 0 and 1 to access
the same channel.
• The signals can be distinguished from each other by means of a special coding schemes.
• This is done with the help of a frequency spreading code known as the m-bit pseudo-
noise (PN) code sequence.
• Using m bits, 2m-1 different codes can be obtained.
• From these codes, each user will use only one code.
• A code for a user should be orthogonal to the codes assigned to other nodes.
9/21/2020 KAVIYA P, AP/IT, KCET 96
Wired LANs: Ethernet
IEEE 802.3 – Ethernet
• Uses CSMA/CD technology. So Ethernet is a multiple access network. i.e., set of nodes
send and receive frames over a shared link.
– CSMA/CD (Carrier sense Multiple Access / Collision Detect),
• Carrier sense – All nodes can distinguish between an idle and a busy line.
• Collision Detect – Node listens as it transmit and can therefore detect when a
frame it is transmitting has collided with a frame transmitted by another node.
• Uses ALOHA as the root protocol.
• Digital Equipment Corporation and Intel joined Xerox to define 10Mbps Ethernet standard
in 1978.
• This standard formed the basis for IEEE standard 802.3.
• It provides Connectionless and Unreliable Service.
9/21/2020 KAVIYA P, AP/IT, KCET 97
Wired LANs: Ethernet
IEEE 802.3 – Ethernet Evolution
9/21/2020 KAVIYA P, AP/IT, KCET 98
Fast Ethernet
100 Base T4
4 pairs of UTP
100 Base X
100 Base Tx
2 pairs of UTP or STP
100 Base Tx
2 optical fibers
Wired LANs: Ethernet
IEEE 802.3 – Ethernet Physical Properties
• Initially Ethernet was implemented on a coaxial cable up to 500m.
• This cable is similar to the type used for cable TV except that it typically has an
impedance of 50 ohms instead of cable TV‟s 75 ohms.
• Hosts connect to an Ethernet segment by tapping into it.
Transceiver
• Small device directly attached to the tap that detects when the
line is idle and drives signal when the host is transmitting.
• It also receives incoming signal.
• The transceiver is connected to an Ethernet adaptor which is plugged into the host.
• Protocol is implemented on the adaptor.
9/21/2020 KAVIYA P, AP/IT, KCET 99
Wired LANs: Ethernet
IEEE 802.3 – Ethernet Physical Properties
Repeater
• Multiple Ethernet segments can be joined together by a repeater.
• It forwards a digital signal.
• No more than four repeaters may be positioned between any pair of hosts.
– Ethernet has a total reach of only 2500m.
• Any signal placed on the Ethernet by a host is broadcast over the entire network.
– Signal is propagated in both directions.
– Repeaters forward the signal on all outgoing segments.
– Terminators attached to the end of each segment absorb the signals.
• Ethernet uses Manchester encoding scheme.
9/21/2020 KAVIYA P, AP/IT, KCET 100
Wired LANs: Ethernet
IEEE 802.3 – Ethernet Frame
• Preamble: Allows the receiver to synchronize with signal (sequence of alternating 0s & 1s).
• Start Frame Delimiter (SFD): Signals the beginning of the frame.
• Destination address (DA): Contains the link layer address of the destination station or stations to
receive the packet.
• Source address (SA): Contains the link-layer address of the sender of the packet.
• Type: Defines the upper-layer protocol whose packet is encapsulated in the frame. This protocol can
be IP, ARP, OSPF, and so on.
• Data: It is a minimum of 46 and a maximum of 1500 bytes.
• CRC: Contains error detection information.
9/21/2020 KAVIYA P, AP/IT, KCET 101
Wired LANs: Ethernet
IEEE 802.3 – Ethernet Addressing
• Each station on an Ethernet network (such as a PC, workstation, or printer) has its own
network interface card (NIC).
• The NIC fits inside the station and provides the station with a link-layer address.
• The Ethernet address is 6 bytes (48 bits), normally written in hexadecimal notation, with
a colon between the bytes.
• For example, the following shows an Ethernet MAC address: 4A:30:10:21:10:1A
9/21/2020 KAVIYA P, AP/IT, KCET 102
Wired LANs: Ethernet
IEEE 802.3 – Ethernet Access Method
• When the adaptor has a frame to send & line is idle, it transmits the frame immediately.
– The upper bound of 1500bytes in the message means that the adaptor can occupy the
line for a fixed length of time.
• When the adaptor has a frame to send and the line is busy, it waits for the line to go idle
then transmits immediately.
• Ethernet is said to be 1 – persistent protocol, because an adaptor with the frame to send
transmits with probability 1 whenever a busy line goes idle.
• Since there is no centralized control, it is possible for two or more adaptors to begin
transmitting at the same time.
– Either because both found the line to be idle.
– Or, both been waiting for a busy line to become idle.
• When this happens, the two or more frames are said to be collide on the network.
9/21/2020 KAVIYA P, AP/IT, KCET 103
Wired LANs: Ethernet
IEEE 802.3 – Ethernet Collision Detection
• Since Ethernet supports collision detection, so each sender is able to determine that a collision
in progress.
• At the moment an adaptor detects that, its frame is colliding with another,
– Transmitter will send a 32 bit jamming sequence with 64-bit preamble (totally 96 bits)
– This 96 bit frame is called as runt frame.
Worst-Case Scenario, (Two nodes are at opposite ends of the Ethernet)
• To know, the frame it just sent did not collide with another frame, the transmitter may need to
send as many as 512 bits.
• 512 bits (64 bytes)  14 bytes of header + 46 bytes of data + 4 bytes of CRC
Why 512 bits & Why its length is limited to 2500m?
• The farther apart two nodes are, the longer it takes for a frame sent by one to reach the other and
the network is vulnerable to collision during this time.
9/21/2020 KAVIYA P, AP/IT, KCET 104
Wired LANs: Ethernet
IEEE 802.3 – Ethernet Collision Detection
• „A‟ begins transmitting frame at time „t‟.
• The first bit of A‟s frame arrives at „B‟ at time t + d,
where d is one link latency.
• Suppose an instant before host A‟s frame arrives, host
B begins to transmit its own frame.
• B‟s frame will immediately collide with A‟s frame
and this frame collision will be detected by host B.
• Host B will send the 32 bit jamming sequence.
• Host A will not know that the collision occurred until
B‟s frame reaches it, which will happen at t + (2*d)
• Host A must continue to transmit until this time in
order to detect collision.
9/21/2020 KAVIYA P, AP/IT, KCET 105
Figure:
a) A sends a frame at time t;
b) A‟s frame arrives at B at time t + d;
c) B begins transmitting at time t + d
and collides with A‟s frame;
d) B‟s runt (32-bit) frame arrives at A
at time t + 2d.
Wired LANs: Ethernet
IEEE 802.3 – Ethernet Collision Detection
• Determined delay in the maximally configured Ethernet (2500m long) is 51.2 s. i.e.,
delay on 10Mbps Ethernet corresponds to 512 bits.
• By limiting the maximum length of the Ethernet to 2500m we can limit the Ethernet‟s
maximum latency to 51.2 s (fairly small value). So the access algorithm works
efficiently.
Exponential Back-off
• Once an adaptor has detected a collision & stopped its transmission, it waits a certain
amount of time and tries again.
• Each time the adaptor tries to transmit but fails, it doubles the amount of time it waits
before trying again.
• This strategy of doubling the delay interval between each retransmission attempt is
known as exponential back-off.
9/21/2020 KAVIYA P, AP/IT, KCET 106
Wired LANs: Ethernet
IEEE 802.3 – Ethernet Collision Detection
• The adaptor first delays either 0 or 51.2 s selected at random.
• If this effort fails, it then waits 0, 51.2s, 102.4s, 153.6s… before trying again.
i.e., k * 51.2s, when k= 0,1,2,3….
• After the third collision, it waits k * 51.2s, k=0… 23 – 1
• In general, the algorithm randomly selects a „k‟ between 0 and 2n – 1 & waits for
k* 51.2s where „n‟ is the number of collisions experienced so far.
9/21/2020 KAVIYA P, AP/IT, KCET 107
Wired LANs: Ethernet
IEEE 802.3 – Ethernet
Advantages
• Ethernets are easy to administer & maintain.
• There are no switches that can fail & no routing and configuration tables that have to be
kept up to date.
• Easy to add a new host to the network.
• Inexpensive (i.e., Cable is cheap).
Disadvantages
• Ethernets work best under lightly loaded conditions.
• Most Ethernets are used in conservative way.
• Most Ethernets are far shorter than 2500m with a round trip delay of closer to 5s than
51.2s.
9/21/2020 KAVIYA P, AP/IT, KCET 108
Wireless LANs: Introduction
Architectural Comparison
Medium
• In a wired LAN, we use wires to connect hosts.
• In a wireless LAN, the medium is air, the signal is generally broadcast. When hosts in a
wireless LAN communicate with each other, they are sharing the same medium.
Hosts
• In a wired LAN, a host is always connected to its network at a point with a fixed link
layer address related to its network interface card (NIC).
• A host can move from one point in the Internet to another point. In this case, its link-
layer address remains the same, but its network-layer address will change.
• In a wireless LAN, a host is not physically connected to the network; it can move freely
and can use the services provided by the network.
9/21/2020 KAVIYA P, AP/IT, KCET 109
Wireless LANs: Introduction
Architectural Comparison
Isolated LANs
• A wired isolated LAN is a set of hosts connected via a link-layer switch (Ethernet).
• A wireless isolated LAN, called an ad hoc network, is a set of hosts that communicate
freely with each other. The concept of a link-layer switch does not exist in wireless
LANs.
9/21/2020 KAVIYA P, AP/IT, KCET 110
Wireless LANs: Introduction
Architectural Comparison
Connection to Other Networks
• A wired LAN can be connected to another network or an internetwork such as the
Internet using a router.
• A wireless LAN may be connected to a wired infrastructure network, to a wireless
infrastructure network, or to another wireless LAN.
• The wireless LAN is referred to as an infrastructure network, and the connection to the
wired infrastructure, such as the Internet, is done via a device called an access point (AP).
• Communication between the AP and the wireless host occurs in a wireless environment;
communication between the AP and the infrastructure occurs in a wired environment.
9/21/2020 KAVIYA P, AP/IT, KCET 111
Wireless LANs: Introduction
Architectural Comparison
Moving between Environments
• A wired LAN or a wireless LAN operates only in the lower two layers of the TCP/IP
protocol suite.
• The link-layer addresses will change (because of changing NICs), but the network-
layer addresses (IP addresses) will remain the same; we are moving from wired links to
wireless links.
9/21/2020 KAVIYA P, AP/IT, KCET 112
Wireless LANs: Introduction
Characteristics
• Attenuation: The strength of electromagnetic signals decreases rapidly because the
signal disperses in all directions; only a small portion of it reaches the receiver.
• Interference: A receiver may receive signals not only from the intended sender, but
also from other senders if they are using the same frequency band.
• Multipath Propagation: A receiver may receive more than one signal from the same
sender because electromagnetic waves can be reflected back from obstacles such as
walls, the ground, or objects. This makes the signal less recognizable.
• Error: With the above characteristics of a wireless network, errors and error detection are
more serious issues in a wireless network. The error level is measured as signal-to-noise
ratio (SNR). If SNR is high, it means that the signal is stronger than the noise. When SNR
is low, it means that the signal is corrupted by the noise and the data cannot be recovered.
9/21/2020 KAVIYA P, AP/IT, KCET 113
Wireless LANs: Introduction
Access Control
Hidden terminals
• A sends to B, C cannot hear A.
• C wants to send to B, C senses a “free” medium (Carrier Sense fails).
• Collision at B, A cannot receive the collision (Collision Detection fails).
• C is “hidden” from A.
Exposed terminals
• B sends to A, C wants to send to another terminal (not A or B).
• C senses the carrier and detects that the carrier is busy.
• C postponed its transmission until it detects the medium become idle.
• But A is outside radio range of C, waiting is not necessary (unnecessary delay).
• C is “exposed” to B.
9/21/2020 KAVIYA P, AP/IT, KCET 114
Wireless LANs: Introduction
Access Control
• How a wireless host can get access to the shared medium (air).
• The CSMA/CD algorithm does not work in wireless LANs for three reasons:
1. To detect a collision, a host needs to send and receive at the same time (duplex
mode). Wireless hosts can only send or receive at one time (do not have enough
battery power).
2. Because of the hidden station problem, a station may not be aware of another
station‟s transmission due to some obstacles or range problems, collision may occur
but not be detected.
3. The distance between stations can be great. Signal fading could prevent a station at
one end from hearing a collision at the other end.
• To overcome the above three problems, Carrier Sense Multiple Access with Collision
Avoidance (CSMA/CA) was invented for wireless LANs.
9/21/2020 KAVIYA P, AP/IT, KCET 115
Wireless LANs: IEEE 802.11
IEEE 802.11 Architecture
• The standard defines two kinds of services: the basic service set (BSS) and the extended
service set (ESS).
Basic Service Set (BSS)
• It is the building blocks of a wireless LAN.
• It is made of stationary or mobile wireless stations and an optional central base station,
known as the access point (AP).
• The BSS without an AP is a stand-alone network and cannot send data to other BSSs. It is
called an ad hoc architecture.
• Stations can form a network without the need of an AP; they can locate one another and
agree to be part of a BSS.
• A BSS with an AP is sometimes referred to as an infrastructure BSS.
9/21/2020 KAVIYA P, AP/IT, KCET 116
Wireless LANs: IEEE 802.11
IEEE 802.11 Architecture
Extended Service Set (ESS)
• It is made up of two or more BSSs with APs.
• The BSSs are connected through a distribution system, which is a wired or a wireless
network.
• The distribution system connects the APs in the BSSs.
• IEEE 802.11 does not restrict the distribution system; it can be any IEEE LAN such as an
Ethernet.
• The ESS uses two types of stations: mobile and stationary.
• The mobile stations are normal stations inside a BSS.
• The stationary stations are AP stations that are part of a wired LAN.
9/21/2020 KAVIYA P, AP/IT, KCET 117
Wireless LANs: IEEE 802.11
IEEE 802.11 Architecture
Extended Service Set (ESS)
• When BSSs are connected, the stations within reach of one another can communicate
without the use of an AP.
• However, communication between a station in a BSS and the outside BSS occurs via the
AP.
9/21/2020 KAVIYA P, AP/IT, KCET 118
Wireless LANs: IEEE 802.11
IEEE 802.11 Architecture
Station Types
• IEEE 802.11 defines three types of stations based on their mobility in a wireless LAN:
no-transition, BSS-transition, and ESS-transition mobility.
• A station with no-transition mobility is either stationary (not moving) or moving only
inside a BSS.
• A station with BSS-transition mobility can move from one BSS to another, but the
movement is confined inside one ESS.
• A station with ESS-transition mobility can move from one ESS to another.
• IEEE 802.11 does not guarantee that communication is continuous during the move.
9/21/2020 KAVIYA P, AP/IT, KCET 119
Wireless LANs: IEEE 802.11
IEEE 802.11 MAC Sublayer
• IEEE 802.11 defines two MAC sublayers: the distributed coordination function (DCF)
and point coordination function (PCF).
9/21/2020 KAVIYA P, AP/IT, KCET 120
Wireless LANs: IEEE 802.11
IEEE 802.11 MAC Sublayer – Distributed Coordination Function (DCF)
• DCF uses CSMA/CA as the access method.
Frame Exchange Time Line
1. Before sending a frame, the source station senses the medium by checking the energy level at the
carrier frequency.
a. The channel uses a persistence strategy with back-off until the channel is idle.
b. After the station is found to be idle, the station waits for a period of time called the
distributed interframe space (DIFS); then the station sends a control frame called the request
to send (RTS).
2. After receiving the RTS and waiting a period of time called the short interframe space (SIFS), the
destination station sends a control frame, called the clear to send (CTS), to the source station. This
control frame indicates that the destination station is ready to receive data.
3. The source station sends data after waiting an amount of time equal to SIFS.
4. The destination station, after waiting an amount of time equal to SIFS, sends an acknowledgment
to show that the frame has been received.
9/21/2020 KAVIYA P, AP/IT, KCET 121
Wireless LANs: IEEE 802.11
IEEE 802.11 MAC Sublayer – Distributed Coordination Function (DCF)
Frame Exchange Time Line
• Network Allocation Vector (NAV): Shows how much time must pass before these stations are
allowed to check the channel for idleness.
• Collision During Handshaking: What happens if there is a collision during the time when RTS or
CTS control frames are in transition, often called the handshaking period? – back-off strategy is
employed, and the sender tries again.
• Hidden-Station Problem: Solution is the use of the handshake frames (RTS and CTS).
9/21/2020 KAVIYA P, AP/IT, KCET 122
Wireless LANs: IEEE 802.11
IEEE 802.11 MAC Sublayer – Point Coordination Function (PCF)
• The point coordination function (PCF) is an optional access method that can be
implemented in an infrastructure network.
• It is implemented on top of the DCF.
• It is used mostly for time-sensitive transmission.
• PCF has a centralized, contention-free polling access method.
• The AP performs polling for stations that are capable of being polled.
• The stations are polled one after another, sending any data they have to the AP.
• To give priority to PCF over DCF, another interframe space, PIFS, has been defined.
• PIFS (PCF IFS) is shorter than DIFS.
• Due to the priority of PCF over DCF, stations that only use DCF may not gain access to
the medium.
9/21/2020 KAVIYA P, AP/IT, KCET 123
Wireless LANs: IEEE 802.11
IEEE 802.11 MAC Sublayer – Point Coordination Function (PCF)
• To prevent this, a repetition interval has been designed to cover both contention-free PCF
and contention-based DCF traffic.
• The repetition interval, which is repeated continuously, starts with a special control
frame, called a beacon frame.
• When the stations hear the beacon frame, they start their NAV for the duration of the
contention-free period of the repetition interval.
9/21/2020 KAVIYA P, AP/IT, KCET 124
Wireless LANs: IEEE 802.11
IEEE 802.11 Frame Format
• Frame control: The first 2 bytes serve several purposes.
• Duration/ID: The value indicating the period of time in which the medium is occupied.
• Address 1 to 4: The four address fields contain standard IEEE 802 MAC addresses.
• Sequence control: Due to the acknowledgement mechanism frames may be duplicated.
Therefore a sequence number is used to filter duplicates.
• Data: The MAC frame may contain arbitrary data (max. 2,312 byte), which is transferred
transparently from a sender to the receiver(s).
• Checksum (CRC): A 32 bit checksum is used to protect the frame.
9/21/2020 KAVIYA P, AP/IT, KCET 125
Wireless LANs: IEEE 802.11
IEEE 802.11 Frame Types
• A wireless LAN defined by IEEE 802.11 has three categories of frames: management
frames, control frames, and data frames.
• Management Frames: Used for the initial communication between stations and access
points.
• Control Frames: Used for accessing the channel and acknowledging frames.
• Data Frames: Used for carrying data and control information.
• For control frames the value of the type field is 01.
9/21/2020 KAVIYA P, AP/IT, KCET 126
Bluetooth: IEEE 802.15
• It is a wireless LAN technology designed to connect devices of different functions such
as telephones, notebooks, computers, cameras and printers when they are at a short
distance from each other.
• A Bluetooth LAN is an ad hoc network, which means that the network is formed
spontaneously.
• Bluetooth was originally started as a project by the Ericsson Company.
• Bluetooth technology is the implementation of a protocol defined by the IEEE 802.15
standard.
• The standard defines a wireless personal-area network (PAN) operable in an area the
size of a room or a hall.
Bluetooth Devices
• A Bluetooth device has a built-in short-range radio transmitter.
• The current data rate is 1 Mbps with a 2.4-GHz bandwidth.
9/21/2020 KAVIYA P, AP/IT, KCET 127
Bluetooth: IEEE 802.15
Bluetooth Architecture
• Bluetooth defines two types of networks: piconet and scatternet.
Piconets
• It can have up to eight stations, one of which is called the primary; the rest are called
secondaries.
• All the secondary stations synchronize their clocks and hopping sequence with the
primary.
• A piconet can have only one primary station.
• The communication between the primary and secondary stations can be one-to-one or
one-to-many.
• A piconet can have a maximum of seven secondaries, additional secondaries can be in the
parked state.
9/21/2020 KAVIYA P, AP/IT, KCET 128
Bluetooth: IEEE 802.15
Bluetooth Architecture – Piconets
• A secondary in a parked state is synchronized with the primary, but cannot take part in
communication until it is moved from the parked state to the active state.
Scatternet
• Piconets can be combined to form what is called a scatternet.
• A secondary station in one piconet can be the primary in another piconet.
• This station can receive messages from the primary in the first piconet (as a secondary)
and, acting as a primary, deliver them to secondaries in the second piconet.
• A station can be a member of two piconets.
9/21/2020 KAVIYA P, AP/IT, KCET 129
Bluetooth: IEEE 802.15
Bluetooth Layers
• Logical Link Control and Adaptation Protocol (L2CAP): Equivalent to LLC. It has
specific duties: multiplexing, segmentation and reassembly, quality of service (QoS), and
group management.
• Baseband Layer: Equivalent to MAC. Description of basic connection establishment,
packet formats and timing.
• Links: Two types of links can be created between a primary and a secondary.
– SCO: Synchronous Connection-Oriented (SCO) Link (Real-time Audio – 64 kbps)
– ACL: Asynchronous Connectionless Link (ACL) (721 kbps)
• Radio: Specification of the air interface. (i.e.) frequencies, modulation, and transmit
power.
9/21/2020 KAVIYA P, AP/IT, KCET 130
Bluetooth: IEEE 802.15
Bluetooth Frame Format
• Access code: Contains synchronization bits and the identifier of the primary to distinguish
the frame of one piconet from that of another.
• Header: Repeated 18-bit pattern. Each pattern has the following subfields:
– Address: Can define up to seven secondaries (1 to 7).
– Type: Defines the type of data coming from the upper layers.
– F: Flow control. (1 – Buffer is full)
– A: Acknowledgment. (Uses Stop and Wait ARQ)
– S: Holds a sequence number.
– HEC: A checksum to detect errors in each 18-bit header section.
• Payload: Can be 0 to 2740 bits long. It contains data or control information coming from
the upper layers.
9/21/2020 KAVIYA P, AP/IT, KCET 131
Connecting Devices
• Connecting devices to connect hosts together to make a network or to connect networks
together to make an internet.
• Three kinds of connecting devices: hubs, link-layer switches, and routers.
1. Hubs
• A device that operates only in the physical layer.
• A repeater has no filtering capability.
• They do not have a link-layer address and they do not check the link-layer address of the
received frame.
• A repeater receives a signal and, before it becomes too weak or corrupted, regenerates
and retimes the original bit pattern.
• The repeater then sends the refreshed signal.
9/21/2020 KAVIYA P, AP/IT, KCET 132
Connecting Devices
2. Link Layer Switches
• A link-layer switch (or switch) operates in both the physical and the data-link layers.
• As a physical-layer device, it regenerates the signal it receives.
• As a link-layer device, the link-layer switch can check the MAC addresses (source and
destination) contained in the frame.
• It has a table used in filtering decisions.
• It does not change the link-layer (MAC) addresses in a frame.
• Advantages
– Collision Elimination and Connecting heterogenous Devices
9/21/2020 KAVIYA P, AP/IT, KCET 133
Connecting Devices
3. Routers
• It is a three-layer (physical, data-link, and network) device.
• A router can connect networks. Two networks connected by a router become an
internetwork or an internet.
• Three major differences between a router and a repeater or a switch:
– A router has a physical and logical (IP) address for each of its interfaces.
– A router acts only on those packets in which the link-layer destination address
matches the address of the interface at which the packet arrives.
– A router changes the link-layer address of the packet (both source and destination)
when it forwards the packet.
9/21/2020 KAVIYA P, AP/IT, KCET 134

More Related Content

What's hot

Transmission media
Transmission mediaTransmission media
Transmission mediakinish kumar
 
Overview of Spanning Tree Protocol (STP & RSTP)
Overview of Spanning Tree Protocol (STP & RSTP)Overview of Spanning Tree Protocol (STP & RSTP)
Overview of Spanning Tree Protocol (STP & RSTP)Peter R. Egli
 
Asynchronous transfer mode (atm) in computer network
Asynchronous transfer mode (atm) in computer networkAsynchronous transfer mode (atm) in computer network
Asynchronous transfer mode (atm) in computer networkMH Shihab
 
Directed diffusion for wireless sensor networking
Directed diffusion for wireless sensor networkingDirected diffusion for wireless sensor networking
Directed diffusion for wireless sensor networkingHabibur Rahman
 
Multiprotocol label switching (mpls) - Networkshop44
Multiprotocol label switching (mpls)  - Networkshop44Multiprotocol label switching (mpls)  - Networkshop44
Multiprotocol label switching (mpls) - Networkshop44Jisc
 
Wireless routing protocols
Wireless routing protocolsWireless routing protocols
Wireless routing protocolsbarodia_1437
 
Computer networks unit iii
Computer networks    unit iiiComputer networks    unit iii
Computer networks unit iiiJAIGANESH SEKAR
 
Cs8591 Computer Networks - UNIT V
Cs8591 Computer Networks - UNIT VCs8591 Computer Networks - UNIT V
Cs8591 Computer Networks - UNIT Vpkaviya
 
ENCAPSULATION AND TUNNELING
ENCAPSULATION AND TUNNELINGENCAPSULATION AND TUNNELING
ENCAPSULATION AND TUNNELINGMohammad Adil
 
Spanning tree protocol
Spanning tree protocolSpanning tree protocol
Spanning tree protocolMuuluu
 
Media Access Control (MAC Layer)
Media Access Control (MAC Layer)Media Access Control (MAC Layer)
Media Access Control (MAC Layer)Meenakshi Paul
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocolsFabMinds
 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSComputer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSDr. SELVAGANESAN S
 

What's hot (20)

Transmission media
Transmission mediaTransmission media
Transmission media
 
Overview of Spanning Tree Protocol (STP & RSTP)
Overview of Spanning Tree Protocol (STP & RSTP)Overview of Spanning Tree Protocol (STP & RSTP)
Overview of Spanning Tree Protocol (STP & RSTP)
 
Asynchronous transfer mode (atm) in computer network
Asynchronous transfer mode (atm) in computer networkAsynchronous transfer mode (atm) in computer network
Asynchronous transfer mode (atm) in computer network
 
Directed diffusion for wireless sensor networking
Directed diffusion for wireless sensor networkingDirected diffusion for wireless sensor networking
Directed diffusion for wireless sensor networking
 
Multiprotocol label switching (mpls) - Networkshop44
Multiprotocol label switching (mpls)  - Networkshop44Multiprotocol label switching (mpls)  - Networkshop44
Multiprotocol label switching (mpls) - Networkshop44
 
Wireless routing protocols
Wireless routing protocolsWireless routing protocols
Wireless routing protocols
 
MPLS VPN
MPLS VPNMPLS VPN
MPLS VPN
 
Computer networks unit iii
Computer networks    unit iiiComputer networks    unit iii
Computer networks unit iii
 
Cs8591 Computer Networks - UNIT V
Cs8591 Computer Networks - UNIT VCs8591 Computer Networks - UNIT V
Cs8591 Computer Networks - UNIT V
 
Lan technologies
Lan technologiesLan technologies
Lan technologies
 
IPv4
IPv4IPv4
IPv4
 
ENCAPSULATION AND TUNNELING
ENCAPSULATION AND TUNNELINGENCAPSULATION AND TUNNELING
ENCAPSULATION AND TUNNELING
 
Dynamic routing
Dynamic routingDynamic routing
Dynamic routing
 
Spanning tree protocol
Spanning tree protocolSpanning tree protocol
Spanning tree protocol
 
Media Access Control (MAC Layer)
Media Access Control (MAC Layer)Media Access Control (MAC Layer)
Media Access Control (MAC Layer)
 
Icmp
IcmpIcmp
Icmp
 
Error correction, ARQ, FEC
Error correction, ARQ, FECError correction, ARQ, FEC
Error correction, ARQ, FEC
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocols
 
Routing Protocols
Routing ProtocolsRouting Protocols
Routing Protocols
 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSComputer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
 

Similar to CS8591 Computer Networks - Unit II

Introduction to data link layer
Introduction to data link layerIntroduction to data link layer
Introduction to data link layerswarna sudha
 
Module 1 comunication network 18EC71_U1_S7_Pr-.pptx
Module 1 comunication network 18EC71_U1_S7_Pr-.pptxModule 1 comunication network 18EC71_U1_S7_Pr-.pptx
Module 1 comunication network 18EC71_U1_S7_Pr-.pptxRakeshR458516
 
CS8591 Computer Networks - Unit III
CS8591 Computer Networks - Unit IIICS8591 Computer Networks - Unit III
CS8591 Computer Networks - Unit IIIpkaviya
 
Presentation of computer network on data link layer
Presentation of computer network on data link layerPresentation of computer network on data link layer
Presentation of computer network on data link layersumit gyawali
 
CN Unit 2 - cs8591.pptx
CN Unit 2 - cs8591.pptxCN Unit 2 - cs8591.pptx
CN Unit 2 - cs8591.pptxPondinesh2
 
IDC lectureA - Network Layer & IP Addressing with Cisco Notes.ppt
IDC lectureA - Network Layer & IP Addressing with Cisco Notes.pptIDC lectureA - Network Layer & IP Addressing with Cisco Notes.ppt
IDC lectureA - Network Layer & IP Addressing with Cisco Notes.pptJayaprasanna4
 
Module_3_Part_3.pptx
Module_3_Part_3.pptxModule_3_Part_3.pptx
Module_3_Part_3.pptxKPDDRAVIDIAN
 
Networking essentials lect1
Networking essentials lect1Networking essentials lect1
Networking essentials lect1Roman Brovko
 
CN Unit 2 PPT.pptx
CN Unit 2 PPT.pptxCN Unit 2 PPT.pptx
CN Unit 2 PPT.pptxifetananth06
 
destination. The network layer must know the topology of the subnet and choos...
destination. The network layer must know the topology of the subnet and choos...destination. The network layer must know the topology of the subnet and choos...
destination. The network layer must know the topology of the subnet and choos...Ashish Gupta
 
CS8591 Computer Networks - Unit I
CS8591 Computer Networks - Unit ICS8591 Computer Networks - Unit I
CS8591 Computer Networks - Unit Ipkaviya
 

Similar to CS8591 Computer Networks - Unit II (20)

Introduction to data link layer
Introduction to data link layerIntroduction to data link layer
Introduction to data link layer
 
Module 1 comunication network 18EC71_U1_S7_Pr-.pptx
Module 1 comunication network 18EC71_U1_S7_Pr-.pptxModule 1 comunication network 18EC71_U1_S7_Pr-.pptx
Module 1 comunication network 18EC71_U1_S7_Pr-.pptx
 
CS8591 Computer Networks - Unit III
CS8591 Computer Networks - Unit IIICS8591 Computer Networks - Unit III
CS8591 Computer Networks - Unit III
 
MODULE-2_CCN.pptx
MODULE-2_CCN.pptxMODULE-2_CCN.pptx
MODULE-2_CCN.pptx
 
Presentation of computer network on data link layer
Presentation of computer network on data link layerPresentation of computer network on data link layer
Presentation of computer network on data link layer
 
CN Unit 2 - cs8591.pptx
CN Unit 2 - cs8591.pptxCN Unit 2 - cs8591.pptx
CN Unit 2 - cs8591.pptx
 
IDC lectureA - Network Layer & IP Addressing with Cisco Notes.ppt
IDC lectureA - Network Layer & IP Addressing with Cisco Notes.pptIDC lectureA - Network Layer & IP Addressing with Cisco Notes.ppt
IDC lectureA - Network Layer & IP Addressing with Cisco Notes.ppt
 
Unit 2 ppt 3.ppt
Unit 2 ppt 3.pptUnit 2 ppt 3.ppt
Unit 2 ppt 3.ppt
 
Unit 4 - Network Layer
Unit 4 - Network LayerUnit 4 - Network Layer
Unit 4 - Network Layer
 
Module_3_Part_3.pptx
Module_3_Part_3.pptxModule_3_Part_3.pptx
Module_3_Part_3.pptx
 
Networking essentials lect1
Networking essentials lect1Networking essentials lect1
Networking essentials lect1
 
unit2-210710110327.pptx
unit2-210710110327.pptxunit2-210710110327.pptx
unit2-210710110327.pptx
 
MODULE-3_CCN.pptx
MODULE-3_CCN.pptxMODULE-3_CCN.pptx
MODULE-3_CCN.pptx
 
CN Unit 2 PPT.pptx
CN Unit 2 PPT.pptxCN Unit 2 PPT.pptx
CN Unit 2 PPT.pptx
 
Networking devices
Networking devicesNetworking devices
Networking devices
 
lecture 2.pptx
lecture 2.pptxlecture 2.pptx
lecture 2.pptx
 
Network_Layer.ppt
Network_Layer.pptNetwork_Layer.ppt
Network_Layer.ppt
 
destination. The network layer must know the topology of the subnet and choos...
destination. The network layer must know the topology of the subnet and choos...destination. The network layer must know the topology of the subnet and choos...
destination. The network layer must know the topology of the subnet and choos...
 
Dc2 t1
Dc2 t1Dc2 t1
Dc2 t1
 
CS8591 Computer Networks - Unit I
CS8591 Computer Networks - Unit ICS8591 Computer Networks - Unit I
CS8591 Computer Networks - Unit I
 

More from pkaviya

IT2255 Web Essentials - Unit V Servlets and Database Connectivity
IT2255 Web Essentials - Unit V Servlets and Database ConnectivityIT2255 Web Essentials - Unit V Servlets and Database Connectivity
IT2255 Web Essentials - Unit V Servlets and Database Connectivitypkaviya
 
IT2255 Web Essentials - Unit IV Server-Side Processing and Scripting - PHP.pdf
IT2255 Web Essentials - Unit IV Server-Side Processing and Scripting - PHP.pdfIT2255 Web Essentials - Unit IV Server-Side Processing and Scripting - PHP.pdf
IT2255 Web Essentials - Unit IV Server-Side Processing and Scripting - PHP.pdfpkaviya
 
IT2255 Web Essentials - Unit III Client-Side Processing and Scripting
IT2255 Web Essentials - Unit III Client-Side Processing and ScriptingIT2255 Web Essentials - Unit III Client-Side Processing and Scripting
IT2255 Web Essentials - Unit III Client-Side Processing and Scriptingpkaviya
 
IT2255 Web Essentials - Unit II Web Designing
IT2255 Web Essentials - Unit II  Web DesigningIT2255 Web Essentials - Unit II  Web Designing
IT2255 Web Essentials - Unit II Web Designingpkaviya
 
IT2255 Web Essentials - Unit I Website Basics
IT2255 Web Essentials - Unit I  Website BasicsIT2255 Web Essentials - Unit I  Website Basics
IT2255 Web Essentials - Unit I Website Basicspkaviya
 
BT2252 - ETBT - UNIT 3 - Enzyme Immobilization.pdf
BT2252 - ETBT - UNIT 3 - Enzyme Immobilization.pdfBT2252 - ETBT - UNIT 3 - Enzyme Immobilization.pdf
BT2252 - ETBT - UNIT 3 - Enzyme Immobilization.pdfpkaviya
 
OIT552 Cloud Computing Material
OIT552 Cloud Computing MaterialOIT552 Cloud Computing Material
OIT552 Cloud Computing Materialpkaviya
 
OIT552 Cloud Computing - Question Bank
OIT552 Cloud Computing - Question BankOIT552 Cloud Computing - Question Bank
OIT552 Cloud Computing - Question Bankpkaviya
 
CS8791 Cloud Computing - Question Bank
CS8791 Cloud Computing - Question BankCS8791 Cloud Computing - Question Bank
CS8791 Cloud Computing - Question Bankpkaviya
 
CS8592 Object Oriented Analysis & Design - UNIT V
CS8592 Object Oriented Analysis & Design - UNIT V CS8592 Object Oriented Analysis & Design - UNIT V
CS8592 Object Oriented Analysis & Design - UNIT V pkaviya
 
CS8592 Object Oriented Analysis & Design - UNIT IV
CS8592 Object Oriented Analysis & Design - UNIT IV CS8592 Object Oriented Analysis & Design - UNIT IV
CS8592 Object Oriented Analysis & Design - UNIT IV pkaviya
 
CS8592 Object Oriented Analysis & Design - UNIT III
CS8592 Object Oriented Analysis & Design - UNIT III CS8592 Object Oriented Analysis & Design - UNIT III
CS8592 Object Oriented Analysis & Design - UNIT III pkaviya
 
CS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT IICS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT IIpkaviya
 
CS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT ICS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT Ipkaviya
 
CS8591 Computer Networks - Unit IV
CS8591 Computer Networks - Unit IVCS8591 Computer Networks - Unit IV
CS8591 Computer Networks - Unit IVpkaviya
 
IT8602 Mobile Communication - Unit V
IT8602 Mobile Communication - Unit V IT8602 Mobile Communication - Unit V
IT8602 Mobile Communication - Unit V pkaviya
 
IT8602 - Mobile Communication Unit IV
IT8602 - Mobile Communication   Unit IV IT8602 - Mobile Communication   Unit IV
IT8602 - Mobile Communication Unit IV pkaviya
 
IT8602 Mobile Communication - Unit III
IT8602 Mobile Communication  - Unit IIIIT8602 Mobile Communication  - Unit III
IT8602 Mobile Communication - Unit IIIpkaviya
 
IT8602 Mobile Communication Unit II
IT8602 Mobile Communication   Unit II IT8602 Mobile Communication   Unit II
IT8602 Mobile Communication Unit II pkaviya
 
IT8602 Mobile Communication Question Bank
IT8602 Mobile Communication Question BankIT8602 Mobile Communication Question Bank
IT8602 Mobile Communication Question Bankpkaviya
 

More from pkaviya (20)

IT2255 Web Essentials - Unit V Servlets and Database Connectivity
IT2255 Web Essentials - Unit V Servlets and Database ConnectivityIT2255 Web Essentials - Unit V Servlets and Database Connectivity
IT2255 Web Essentials - Unit V Servlets and Database Connectivity
 
IT2255 Web Essentials - Unit IV Server-Side Processing and Scripting - PHP.pdf
IT2255 Web Essentials - Unit IV Server-Side Processing and Scripting - PHP.pdfIT2255 Web Essentials - Unit IV Server-Side Processing and Scripting - PHP.pdf
IT2255 Web Essentials - Unit IV Server-Side Processing and Scripting - PHP.pdf
 
IT2255 Web Essentials - Unit III Client-Side Processing and Scripting
IT2255 Web Essentials - Unit III Client-Side Processing and ScriptingIT2255 Web Essentials - Unit III Client-Side Processing and Scripting
IT2255 Web Essentials - Unit III Client-Side Processing and Scripting
 
IT2255 Web Essentials - Unit II Web Designing
IT2255 Web Essentials - Unit II  Web DesigningIT2255 Web Essentials - Unit II  Web Designing
IT2255 Web Essentials - Unit II Web Designing
 
IT2255 Web Essentials - Unit I Website Basics
IT2255 Web Essentials - Unit I  Website BasicsIT2255 Web Essentials - Unit I  Website Basics
IT2255 Web Essentials - Unit I Website Basics
 
BT2252 - ETBT - UNIT 3 - Enzyme Immobilization.pdf
BT2252 - ETBT - UNIT 3 - Enzyme Immobilization.pdfBT2252 - ETBT - UNIT 3 - Enzyme Immobilization.pdf
BT2252 - ETBT - UNIT 3 - Enzyme Immobilization.pdf
 
OIT552 Cloud Computing Material
OIT552 Cloud Computing MaterialOIT552 Cloud Computing Material
OIT552 Cloud Computing Material
 
OIT552 Cloud Computing - Question Bank
OIT552 Cloud Computing - Question BankOIT552 Cloud Computing - Question Bank
OIT552 Cloud Computing - Question Bank
 
CS8791 Cloud Computing - Question Bank
CS8791 Cloud Computing - Question BankCS8791 Cloud Computing - Question Bank
CS8791 Cloud Computing - Question Bank
 
CS8592 Object Oriented Analysis & Design - UNIT V
CS8592 Object Oriented Analysis & Design - UNIT V CS8592 Object Oriented Analysis & Design - UNIT V
CS8592 Object Oriented Analysis & Design - UNIT V
 
CS8592 Object Oriented Analysis & Design - UNIT IV
CS8592 Object Oriented Analysis & Design - UNIT IV CS8592 Object Oriented Analysis & Design - UNIT IV
CS8592 Object Oriented Analysis & Design - UNIT IV
 
CS8592 Object Oriented Analysis & Design - UNIT III
CS8592 Object Oriented Analysis & Design - UNIT III CS8592 Object Oriented Analysis & Design - UNIT III
CS8592 Object Oriented Analysis & Design - UNIT III
 
CS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT IICS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT II
 
CS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT ICS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT I
 
CS8591 Computer Networks - Unit IV
CS8591 Computer Networks - Unit IVCS8591 Computer Networks - Unit IV
CS8591 Computer Networks - Unit IV
 
IT8602 Mobile Communication - Unit V
IT8602 Mobile Communication - Unit V IT8602 Mobile Communication - Unit V
IT8602 Mobile Communication - Unit V
 
IT8602 - Mobile Communication Unit IV
IT8602 - Mobile Communication   Unit IV IT8602 - Mobile Communication   Unit IV
IT8602 - Mobile Communication Unit IV
 
IT8602 Mobile Communication - Unit III
IT8602 Mobile Communication  - Unit IIIIT8602 Mobile Communication  - Unit III
IT8602 Mobile Communication - Unit III
 
IT8602 Mobile Communication Unit II
IT8602 Mobile Communication   Unit II IT8602 Mobile Communication   Unit II
IT8602 Mobile Communication Unit II
 
IT8602 Mobile Communication Question Bank
IT8602 Mobile Communication Question BankIT8602 Mobile Communication Question Bank
IT8602 Mobile Communication Question Bank
 

Recently uploaded

Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxAnaBeatriceAblay2
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 

Recently uploaded (20)

Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 

CS8591 Computer Networks - Unit II

  • 1. CS8591 – Computer Networks Unit II – Data Link Layer & Media Access KAVIYA P, AP/IT KAMARAJ COLLEGE OF ENGINEERING & TECHNOLOGY
  • 2. UNIT II – Data Link Layer & Media Access Introduction – Link-Layer Addressing – DLC Services – Data- Link Layer Protocols – HDLC – PPP – Media Access Control – Wired LANs: Ethernet – Wireless LANs – Introduction – IEEE 802.11, Bluetooth – Connecting Devices. 9/21/2020 KAVIYA P, AP/IT, KCET 2
  • 3. Introduction – Data Link Layer • The Internet is a combination of networks glued together by connecting devices (routers or switches). • If a packet is to travel from a host to another host, it needs to pass through these networks. • Communication at the data-link layer is made up of five separate logical connections between the data-link layers in the path. 9/21/2020 KAVIYA P, AP/IT, KCET 3 Figure: Communication at the data-link layer
  • 4. Introduction – Data Link Layer Nodes and Links • 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 and WANs) to reach another point. • LANs and WANs are connected by routers. • The two end hosts and the routers are referred as nodes and the networks in between as links. • 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. 9/21/2020 KAVIYA P, AP/IT, KCET 4
  • 5. Introduction – Data Link Layer Data Link Layer Services • The data-link layer is located between the physical and the network layers. • The data-link layer provides services to the network layer; it receives services from the physical layer. 9/21/2020 KAVIYA P, AP/IT, KCET 5 Figure: A communication with only three nodes
  • 6. Introduction – Data Link Layer Data Link Layer Services • The encapsulation and decapsulation at the data-link layer. • Assume that there is only one router between the source and destination. • The datagram received by the data-link layer of the source host is encapsulated in a frame. • The frame is logically transported from the source host to the router. • The frame is decapsulated at the data-link layer of the router and encapsulated at another frame. • The new frame is logically transported from the router to the destination host. • The network shows only two data-link layers at the router, the router actually has three data-link layers because it is connected to three physical links. 9/21/2020 KAVIYA P, AP/IT, KCET 6
  • 7. Introduction – Data Link Layer Data Link Layer Services 1. Framing • A packet at the data-link layer is normally called a frame. • The data-link layer at each node needs to encapsulate the datagram (packet received from the network layer) in a frame before sending it to the next node. • The node also needs to decapsulate the datagram from the frame received on the logical channel. 9/21/2020 KAVIYA P, AP/IT, KCET 7
  • 8. Introduction – Data Link Layer Data Link Layer Services 2. Flow Control • The sending data-link layer at the end of a link is a producer of frames. • The receiving data-link layer at the other end of a link is a consumer. • If the rate of produced frames is higher than the rate of consumed frames, frames at the receiving end need to be buffered while waiting to be consumed (processed). • Definitely, we cannot have an unlimited buffer size at the receiving side. • There are two choices. – Drop the frames if its buffer is full. – Send a feedback to the sending data-link layer to ask it to stop or slow down. • Different data-link-layer protocols use different strategies for flow control. 9/21/2020 KAVIYA P, AP/IT, KCET 8
  • 9. Introduction – Data Link Layer Data Link Layer Services 3. Error Control • At the sending node, a frame in a data-link layer needs to be changed to bits, transformed to electromagnetic signals, and transmitted through the transmission media. • At the receiving node, electromagnetic signals are received, transformed to bits, and put together to create a frame. • Electromagnetic signals are susceptible to error, a frame is susceptible to error. • The error needs to be detected. • After detection, it needs to be either corrected at the receiver node or discarded and retransmitted by the sending node. 4. Congestion Control • 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. 9/21/2020 KAVIYA P, AP/IT, KCET 9
  • 10. Introduction – Data Link Layer Two categories of Links • Two nodes are physically connected by a transmission medium such as cable or air. • The data-link layer controls how the medium is used. • It can be either a point-to-point link or a broadcast link. • In a point-to-point link, the link is dedicated to the two devices. • In a broadcast link, the link is shared between several pairs of devices. 9/21/2020 KAVIYA P, AP/IT, KCET 10
  • 11. Introduction – Data Link Layer Two Sublayers • The data-link layer is divided into two sublayers: data link control (DLC) and media access control (MAC). • The data link control sublayer deals with all issues common to both point-to-point and broadcast links. • The media access control sublayer deals only with issues specific to broadcast links. 9/21/2020 KAVIYA P, AP/IT, KCET 11 Figure: Dividing the data-link layer into two sublayers
  • 12. Link Layer Addressing • IP addresses as the identifiers at the network layer that define the exact points in the Internet where the source and destination hosts are connected. • In a connectionless internetwork such as the Internet we cannot make a datagram reach its destination using only IP addresses. • The reason is that each datagram in the Internet, from the same source host to the same destination host, may take a different path. • The source and destination IP addresses define the two ends but cannot define which links the datagram should pass through. • Another addressing mechanism is needed 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. 9/21/2020 KAVIYA P, AP/IT, KCET 12
  • 13. Link Layer Addressing • 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. 9/21/2020 KAVIYA P, AP/IT, KCET 13 Figure: IP addresses and link-layer addresses in a small internet
  • 14. Link Layer Addressing Three Types of Addresses • Some link-layer protocols define three types of addresses: unicast, multicast, and broadcast. • Unicast Address: Each host or each interface of a router is assigned a unicast address. Unicasting means one-to-one communication. A frame with a unicast address destination is destined only for one entity in the link. Example: A3:34:45:11:92:F1 • Multicast Address: One-to-many communication. However, the jurisdiction is local (inside the link). Example: A2:34:45:11:92:F1 (The second digit, however, needs to be an even number in hexadecimal.) • Broadcast Address: One-to-all communication. A frame with a destination broadcast address is sent to all entities in the link. Example: FF:FF:FF:FF:FF:FF (Ethernet) 9/21/2020 KAVIYA P, AP/IT, KCET 14
  • 15. Link Layer Addressing Address Resolution Protocol (ARP) • Anytime a node has an IP datagram 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. • There is a need of link-layer address of the next node. • Address Resolution Protocol (ARP) used to find link-layer address. • It belongs to the network layer & it 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. 9/21/2020 KAVIYA P, AP/IT, KCET 15
  • 16. Link Layer Addressing Address Resolution Protocol (ARP) • The goal of ARP is to enable each host on a network to build up a mapping between IP addresses and Physical addresses or Link address. • The set of mappings or table stored in the host is called as ARP cache or ARP table. • If a host want to send an IP datagram to a host on the same physical network. – It first checks for a mapping in a cache. – If no mapping is found, it invokes the ARP operation 9/21/2020 KAVIYA P, AP/IT, KCET 16
  • 17. Link Layer Addressing Address Resolution Protocol (ARP) 9/21/2020 KAVIYA P, AP/IT, KCET 17 Figure: ARP operation
  • 18. Link Layer Addressing Address Resolution Protocol (ARP) Operation • 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. • 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. 9/21/2020 KAVIYA P, AP/IT, KCET 18
  • 19. Link Layer Addressing Address Resolution Protocol (ARP) Packet Format • Hardware Type (16 bits): Specifies the type of physical network (eg. 1 – for Ethernet) • Protocol Type (16 bits): Specifies the higher layer protocol. (Value is 2048 for IP) • HLen (8 bits) - Hardware Address Length: Specifies the length of the link layer address (Physical Address) 9/21/2020 KAVIYA P, AP/IT, KCET 19
  • 20. Link Layer Addressing Address Resolution Protocol (ARP) Packet Format • PLen (8 bits) - Protocol Address Length: Specifies the length of the higher layer protocol address (IP Address) • Operation or Opcode (16 bits): Specifies whether this is a request or a response. • Sender Hardware Address (48 bits): Specifies the link level layer or physical address of the sender. • Sender Protocol Address (32 bits): Specifies the higher layer address (IP Address) of the sender. • Target Hardware Address (48 bits): Specifies the link level layer or physical address of the target host. • Target Protocol Address (32 bits): Specifies the higher layer address (IP Address) of the target host. 9/21/2020 KAVIYA P, AP/IT, KCET 20
  • 21. Link Layer Addressing ARP Example Problem: 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 shows the ARP request and response messages. 9/21/2020 KAVIYA P, AP/IT, KCET 21
  • 22. Link Layer Addressing ARP Example Solution 9/21/2020 KAVIYA P, AP/IT, KCET 22
  • 23. Error Detection & Error Correction Types of Errors • Whenever bits flow from one point to another, they are subject to unpredictable changes because of interference. • Single-bit Error: 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: 2 or more bits in the data unit have changed from 1 to 0 or from 0 to 1. 9/21/2020 KAVIYA P, AP/IT, KCET 23
  • 24. Error Detection & Error Correction Redundancy • The central concept in detecting or correcting errors is redundancy. • To be able to detect or correct errors, some extra bits is need to send with 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 • Error Detection: If any error has occurred. The answer is a simple yes or no. Not even interested in the number of corrupted bits. • Error Correction: To know the exact number of bits that are corrupted and their location in the message. The number of errors and the size of the message are important factors. 9/21/2020 KAVIYA P, AP/IT, KCET 24
  • 25. Error Detection & Error Correction Coding • Redundancy is achieved through various coding schemes. • The sender adds redundant bits through a process that creates a relationship between the redundant bits and the actual data bits. • The receiver checks the relationships between the two sets of bits to detect errors. • Coding schemes are divided into two broad categories: Block Coding and Convolution Coding. 9/21/2020 KAVIYA P, AP/IT, KCET 25 Error Control Error Detection Error Correction Two Dimensional Parity Checksum Cyclic Redundant Check (CRC) Hamming Code
  • 26. Error Detection & Error Correction Error Detection • Two approaches when the recipient detects an error: – Notify the sender that the message was corrupted, so the sender can send again, if the error is rare, then the retransmitted message will be error-free. – Using some error detection and correction algorithm, the receiver reconstructs the message. • Common technique for detecting transmission error – CRC (Cyclic Redundancy Check) • Used in HDLC, DDCMP, CSMA/CD – Other approaches • Two Dimensional Parity (used in BISYNC) • Checksum (used in IP) 9/21/2020 KAVIYA P, AP/IT, KCET 26
  • 27. Error Detection & Error Correction Basic Idea of Error Detection • To add redundant information to a frame that can be used to determine error • Imagine (Extreme Case) – Transmitting two complete copies of data » Identical  No error (or) Differ  Error » Poor Scheme ??? • n bit message, n bit redundant information • Error can go undetected • In general, we can provide strong error detection technique – k redundant bits, n bits message, k << n – In Ethernet, a frame carrying up to 12,000 bits of data requires only 32-bit CRC. 9/21/2020 KAVIYA P, AP/IT, KCET 27
  • 28. Error Detection & Error Correction 1. Two-Dimensional Parity • It is based on “simple” (one-dimensional) parity, which usually involves adding one extra bit to a 7-bit code to balance the number of 1s in the byte. • For example, – Odd parity sets the eighth bit to 1 if needed to give an odd number of 1s in the byte. – Even parity sets the eighth bit to 1 if needed to give an even number of 1s in the byte. • Two-dimensional parity does a similar calculation for each bit position across each of the bytes contained in the frame. • This results in an extra parity byte for the entire frame, in addition to a parity bit for each byte. • Two-dimensional parity catches all 1, 2, and 3 bit errors and most 4 bit errors. 9/21/2020 KAVIYA P, AP/IT, KCET 28
  • 29. Error Detection & Error Correction 1. Two-Dimensional Parity 9/21/2020 KAVIYA P, AP/IT, KCET 29
  • 30. Error Detection & Error Correction 2. Checksum 9/21/2020 KAVIYA P, AP/IT, KCET 30
  • 31. Error Detection & Error Correction 2. Checksum • Add up all the words that are transmitted and then transmit the result of that sum. – The result is called the checksum. • The receiver performs the same calculation on the received data and compares the result with the received checksum. • If any transmitted data, including the checksum itself, is corrupted, then the results will not match, so the receiver knows that an error occurred. • Consider the data being checksummed as a sequence of 16-bit integers. • Add them together using 16-bit ones complement arithmetic and then take the ones complement of the result. That 16-bit number is the checksum. • In 1‟s complement arithmetic, a negative integer −x is represented as the complement of x; – Each bit of x is inverted. 9/21/2020 KAVIYA P, AP/IT, KCET 31
  • 32. Error Detection & Error Correction 2. Checksum • When adding numbers in 1‟s complement arithmetic, a carryout from the most significant bit needs to be added to the result (Wrapping). Sender Side:  The message is divided into 16-bit words.  The value of the checksum word is set to 0.  All words including the checksum are added using 1's complement addition.  The sum is complemented and becomes the checksum.  The checksum is sent with the data. Receiver Side:  The message (including checksum) is divided into 16-bit words.  All words are added using 1's complement addition.  The sum is complemented and becomes the new checksum.  If the value of checksum is 0, the message is accepted; otherwise, it is rejected. 9/21/2020 KAVIYA P, AP/IT, KCET 32
  • 33. Error Detection & Error Correction 2. Checksum - Example Frame Data: 01101101 10010011 01101101 n=8 Sender Side: Calculating Checksum, 01101101 10010011 01101101 --------------------------- 01101101 --------1‟s Compliment-- 10010010--------------------------- Checksum = 10010010 So data transmitted over the link is: 01101101 10010011 01101101 10010010 9/21/2020 KAVIYA P, AP/IT, KCET 33
  • 34. Error Detection & Error Correction 2. Checksum - Example Receiver Side: (without Error) Received Data: 01101101 10010011 01101101 10010010 Calculating Sum, 01101101 10010011 01101101 10010010 --------------------------- 1111111 ----> All 1‟s So accepted (No error)--------------------------- Receiver Side: (with Error) Received Data: 11101101 10010011 10010010 11101101 10010011 01101101 10010010 --------------------------- 01111111---> Not all 1‟s. So not accepted (Contains Error) 9/21/2020 KAVIYA P, AP/IT, KCET 34
  • 35. Error Detection & Error Correction 3. Cyclic Redundancy Check (CRC) • CRC uses small number of redundant bits to detect errors. • 32 bit CRC provides strong protection against common bit errors in messages that are 1000 bytes long. • In CRC method, message is represented as a polynomial. n+1 bit message can be represented by an „n‟ degree polynomial. • Example: 10011010 is represented as 1*X7 + 0*X6 + 0*X5 + 1*X4 + 1*X3 + 0*X2 + 1*X1 + 0*X0 = X7 + X4 + X3 + X • Let M(x) is a message polynomial and C(x) is a generator polynomial. Both sender and receiver have to agree on divisor polynomial C(x). 9/21/2020 KAVIYA P, AP/IT, KCET 35
  • 36. Error Detection & Error Correction 3. Cyclic Redundancy Check (CRC) 9/21/2020 KAVIYA P, AP/IT, KCET 36
  • 37. Error Detection & Error Correction 3. Cyclic Redundancy Check (CRC) Sender Side: • Message M(x) has k bits; the code word P(x) has n bits. • The size of the message M(x) is augmented by adding (n – k) 0‟s to the right-hand side. • This message is called as zero extended message. i.e., T(x) = M(x) + E(x). – T(x) – Augmented Message • Sender uses (n – k + 1) size divisor C(x) to divide (Modulo 2 division) the augmented data T(x). (i.e.) Sender computes T(x) / C(x). • The remainder will be added to the augmented message T(x). The result of n - bits are called as code word P(x). 9/21/2020 KAVIYA P, AP/IT, KCET 37
  • 38. Error Detection & Error Correction 3. Cyclic Redundancy Check (CRC) Receiver side: • Receiver divide the received message P(x) with the same divisor C(x). – If the remainder is zero – No error in the message (Accepted) – Otherwise, error in the message (Rejected) Example: Sender: • M(x) = X7 + X4 + X3 + X (i.e.) 10011010 • C(x) = X3+X2+1 (i.e.) 1101 9/21/2020 KAVIYA P, AP/IT, KCET 38 Therefore, Code word P(x) = 10011010101
  • 39. Error Detection & Error Correction 3. Cyclic Redundancy Check (CRC) 9/21/2020 KAVIYA P, AP/IT, KCET 39 Receiver: (Without Error) Received Data P(x) = 10011010101 Receiver: (With Error) Received Data P(x) = 10011011101
  • 40. Error Detection & Error Correction • In general, it is possible to prove that the following types of errors can be detected by a C(x) with the stated properties – All single-bit errors, as long as the xk and x0 terms have nonzero coefficients. – All double-bit errors, as long as C(x) has a factor with at least three terms. – Any odd number of errors, as long as C(x) contains the factor (x+1). – Any “burst” error (i.e., sequence of consecutive error bits) for which the length of the burst is less than k bits. (Most burst errors of larger than k bits can also be detected.) • Six generator polynomials that have become international standards are: – CRC-8 = x8+x2+x+1 and CRC-10 = x10+x9+x5+x4+x+1 – CRC-12 = x12+x11+x3+x2+x+1 and CRC-16 = x16+x15+x2+1 – CRC-CCITT = x16+x12+x5+1 – CRC-32 = x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1 9/21/2020 KAVIYA P, AP/IT, KCET 40
  • 41. Error Detection & Error Correction Error Correction – Hamming Code • Hamming code is used to correct a single bit error. (Some hamming code can detect more than single error). • No. of redundancy bits added can be determined using 2r >= (m + r +1) Where, m – No. of bits in Message r – No. of Redundancy bits 9/21/2020 KAVIYA P, AP/IT, KCET 41
  • 42. Error Detection & Error Correction Error Correction – Hamming Code 9/21/2020 KAVIYA P, AP/IT, KCET 42
  • 43. Error Detection & Error Correction Error Correction – Hamming Code 9/21/2020 KAVIYA P, AP/IT, KCET 43
  • 44. Error Detection & Error Correction Error Correction – Hamming Code Example: Sender Side: Data: 1001101 9/21/2020 KAVIYA P, AP/IT, KCET 44
  • 45. Error Detection & Error Correction Error Correction – Hamming Code Receiver Side: • Single bit error is detected in receiver side. 9/21/2020 KAVIYA P, AP/IT, KCET 45 Error Detection 
  • 46. DLC Services • Data link control (DLC) deals with procedures for communication between two adjacent nodes (i.e) node-to-node communication. • No matter whether the link is dedicated or broadcast. • Data link control functions include framing and flow and error control. 9/21/2020 KAVIYA P, AP/IT, KCET 46
  • 47. DLC Services 1. Framing • Data link layer translates a stream of bits from the physical layer into the larger aggregate (or) discrete unit called frames. • Framing in the data-link layer separates a message from one source to a destination 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. • The hardware present in the data link layer is network adaptor. It enables the nodes to exchange frames. 9/21/2020 KAVIYA P, AP/IT, KCET 47
  • 48. DLC Services 1. Framing – Frame Size • Frames can be of fixed or variable size. • In fixed-size framing, there is no need for defining the boundaries of the frames; the size itself can be used as a delimiter. • In variable-size framing, need a way to define the end of one frame and the beginning of the next. • Two approaches were used for this purpose: – Character-oriented approach and – Bit-oriented approach. 9/21/2020 KAVIYA P, AP/IT, KCET 48
  • 49. DLC Services 1. Framing – Character-Oriented (or Byte-Oriented) Framing • Data to be carried are 8-bit characters from a coding system such as ASCII. • The header, which normally carries the source and destination addresses and other control information. • The trailer, which carries error detection redundant bits, are also multiples of 8 bits. • To separate one frame from the next, an 8-bit (1-byte) flag is added at the beginning and the end of a frame. • The flag, composed of protocol-dependent special characters, signals the start or end of a frame. 9/21/2020 KAVIYA P, AP/IT, KCET 49 A Frame - Character-Oriented Protocol
  • 50. DLC Services 1. Framing – Character-Oriented (or Byte-Oriented) Framing • Any character used for the flag could also be part of the information. • If this happens, the receiver, when it encounters this pattern in the middle of the data, thinks it has reached the end of the frame. • To fix this problem, a byte-stuffing strategy was added to character-oriented framing. • In byte stuffing (or character stuffing), a special byte is added to the data section of the frame when there is a character with the same pattern as the flag. • The data section is stuffed with an extra byte. This byte is usually called the escape character (ESC) and has a predefined bit pattern. • Whenever the receiver encounters the ESC character, it removes it from the data section and treats the next character as data, not as a delimiting flag. 9/21/2020 KAVIYA P, AP/IT, KCET 50
  • 51. DLC Services 1. Framing – Character-Oriented (or Byte-Oriented) Framing • Byte Stuffing: The process of adding one extra byte whenever there is a flag or escape character in the text. 9/21/2020 KAVIYA P, AP/IT, KCET 51 Byte Stuffing and Unstuffing
  • 52. DLC Services 1. Framing – Bit-Oriented Framing • The data section of a frame is a sequence of bits to be interpreted by the upper layer as text, graphic, audio, video, and so on. • However, in addition to headers (and possible railers), a delimiter is needed to separate one frame from the other. • Most protocols use a special 8-bit pattern flag, 01111110, as the delimiter to define the beginning and the end of the frame. 9/21/2020 KAVIYA P, AP/IT, KCET 52 A Frame - Bit-Oriented Protocol
  • 53. DLC Services 1. Framing – Bit-Oriented Framing • If the flag pattern appears in the data, it is needed to inform the receiver that this is not the end of the frame. • In bit stuffing, if a 0 and five consecutive 1 bits are encountered, an extra 0 is added. • This extra stuffed bit is eventually removed from the data by the receiver. • Bit Stuffing: The process of adding one extra 0 whenever five consecutive 1s follow a 0 in the data, so that the receiver does not mistake the pattern 0111110 for a flag. 9/21/2020 KAVIYA P, AP/IT, KCET 53 Bit Stuffing and Unstuffing
  • 54. DLC Services 2. Flow and Error Control • One of the responsibilities of the data-link control sublayer is flow and error control at the data-link layer. Flow Control • Whenever an entity produces items and another entity consumes them, there should be a balance between production and consumption rates. • The data-link layer at the sending node tries to push frames toward the data-link layer at the receiving node. • If the receiving node cannot process and deliver the packet to its network at the same rate that the frames arrive, it becomes overwhelmed with frames. • Flow control in this case can be feedback from the receiving node to the sending node to stop or slow down pushing frames.. 9/21/2020 KAVIYA P, AP/IT, KCET 54
  • 55. DLC Services 2. Flow and Error Control Flow Control • One solution is to use two buffers; one at the sending data-link layer and the other at the receiving data-link layer. • A buffer is a set of memory locations that can hold packets at the sender and receiver. Error Control • The physical layer is not fully reliable, error control is implemented at the data-link layer to prevent the receiving node from delivering corrupted packets to its network layer. • If the frame is corrupted, it is silently discarded; if it is not corrupted, the packet is delivered to the network layer. • If the frame is corrupted, it is silently discarded; if it is not corrupted, an acknowledgment is sent to the sender. 9/21/2020 KAVIYA P, AP/IT, KCET 55
  • 56. DLC Services 2. Connectionless and Connection-Oriented • A DLC protocol can be either connectionless or connection-oriented. Connectionless Protocol • Frames are sent from one node to the next without any relationship between the frames. Each frame is independent. • It does not mean that there is no physical connection between the nodes; it means that there is no connection between frames. • The frames are not numbered and there is no sense of ordering. Connection-Oriented Protocol • A logical connection should first be established between the two nodes (setup phase). is sent to the sender. • After all frames that are somehow related to each other are transmitted (transfer phase), the logical connection is terminated (teardown phase). • The frames are numbered and sent in order. 9/21/2020 KAVIYA P, AP/IT, KCET 56
  • 57. Data-Link Layer Protocols Flow Control • Specifies how much data the sender can transmit before receiving permission or acknowledgement to continue from the receiver. 9/21/2020 KAVIYA P, AP/IT, KCET 57 Flow Control Sliding Window Stop and Wait
  • 58. Data-Link Layer Protocols 1. Stop and Wait • Sender sends one frame at a time stops until it receives the confirmation (Acknowledgement) from the receiver and then sends the next frame. • Acknowledgement: Small control frame that a protocol (receiver side) sends back to the sender saying that it has received an earlier frame. • Control frame: Frame with header only. (No data is in control frame) • Timeout period may vary for different frame transmission. • Advantage: Simplicity • Disadvantage: Inefficiency i.e., it allows sender to have only one outstanding frame on the link. 9/21/2020 KAVIYA P, AP/IT, KCET 58
  • 59. Data-Link Layer Protocols 2. Sliding Window • Sender can transmit several frames continuously before needing an ACK. • If ACK received by the sender before continuous transmission is finished, sender can transmit. • An ACK can acknowledge the correct receipt of multiple frames at a receiver (cumulative ACK). • Sender assigns a frame number to each frame. Frames are numbered “modulo n”. (i.e., 0 to n-1, 0, 1, 2 …n-1) 9/21/2020 KAVIYA P, AP/IT, KCET 59 Fig. Timeline for Sliding Window
  • 60. Data-Link Layer Protocols 2. Sliding Window • Sender maintains three variables,  Sender Window Size (SWS)  Last ACK Received (LAR) – frame number of the last acknowledgement received.  Last Frame Sent (LFS) – frame number of the last frame sent. 9/21/2020 KAVIYA P, AP/IT, KCET 60 LFS – LAR ≤ SWS Moves to the right frame by frame, when a frame is sent Moves to the right, the size of several frames at a time, when an ACK is received
  • 61. Data-Link Layer Protocols 2. Sliding Window • When an acknowledgement received, the sender moves LAR to the right, thereby allowing the sender to transmit another frame. • Sender has to buffer the frame up to SWS frames for retransmission purpose. 9/21/2020 KAVIYA P, AP/IT, KCET 61
  • 62. Data-Link Layer Protocols 2. Sliding Window • Receiver maintains three variables,  Receiver Window Size (RWS) – upper bound on the number of out of order frames that the receiver is willing to accept.  Largest Acceptable Frame (LAF) – frame number of the largest acceptable frame.  Last Frame Received (LFR) – frame number of the last frame received. 9/21/2020 KAVIYA P, AP/IT, KCET 62 LAF – LFR ≤ RWS Moves to the right frame by frame, when a frame is received Moves to the right the size of the several frames at a time, when an ACK is sent.
  • 63. Data-Link Layer Protocols 2. Sliding Window • When a frame with sequence number SeqNum arrives, • If SeqNum ≤ LFR or SeqNum > LAF – Discard it (the frame is outside the receiver window) • If LFR < SeqNum ≤ LAF – Accept it • Now the receiver needs to decide whether or not to send an ACK 9/21/2020 KAVIYA P, AP/IT, KCET 63
  • 64. Data-Link Layer Protocols 3. Automatic Repeat Request (ARQ) • Retransmission of lost or damaged frame is referred as Automatic Repeat Request. • Retransmission taken place, – When error occurs in frame, receiver sends an NAK (Negative Acknowledgement) explicitly to the sender. – When the sender‟s timer expires (due to error frame, frame lost or ACK lost), it triggers the retransmission. – Timeout – the expected delay for sender to receive ACK for the frame 9/21/2020 KAVIYA P, AP/IT, KCET 64 Selective Repeat ARQ Sliding Window ARQStop and Wait ARQ ARQ Go-Back - N ARQ
  • 65. Data-Link Layer Protocols 3.1 Stop and Wait ARQ • Extension of stop and wait protocol. • Receiver sends an ACK if frame is correctly received. Sender waits for an ACK before transmitting the next frame. • Retransmission, – If sender does not receive anything before timeout period expires (due to frame lost or ACK lost), it retransmits the frame. – Suppose if sender receives the NAK (error in frame or damaged frame), it retransmits that error frame. 9/21/2020 KAVIYA P, AP/IT, KCET 65
  • 66. Data-Link Layer Protocols 3.1 Stop and Wait ARQ 9/21/2020 KAVIYA P, AP/IT, KCET 66
  • 67. Data-Link Layer Protocols 3.2 Sliding Window ARQ • Two approaches, 1. Go-Back – N ARQ 2. Selective Repeat ARQ 3.2.1 Go-Back – N ARQ • Go-Back – N uses sliding window flow control protocol. • If no errors occur the operations are similar to sliding window. • A station may send multiple frames as allowed by the window. • Retransmission – Receiver sends a NAK „i‟ if frame „i‟ contains error (or) frame „i‟ was lost (i.e., out of order frame). After that receiver discards all frames until the error frame (or) lost frame was correctly retransmitted. – If sender receives the NAK for frame „i‟ it will retransmit frame „i‟ and all frames i+1, i+2… which have been sent, but not been acknowledged. 9/21/2020 KAVIYA P, AP/IT, KCET 67
  • 68. Data-Link Layer Protocols 3.2 Sliding Window ARQ 3.2.1 Go-Back – N ARQ 9/21/2020 KAVIYA P, AP/IT, KCET 68
  • 69. Data-Link Layer Protocols 3.2 Sliding Window ARQ 3.2.1 Selective Repeat ARQ • Here sender only retransmits frames for which NAK is received. • Advantage over Go-Back – N: Fewer retransmissions • Disadvantages: – More complex at sender and receiver. – Each frame must be acknowledged individually (no cumulative acknowledgement). – Receiver may receive out of sequence frames. 9/21/2020 KAVIYA P, AP/IT, KCET 69
  • 70. Data-Link Layer Protocols 3.2 Sliding Window ARQ 3.2.2 Selective Repeat ARQ 9/21/2020 KAVIYA P, AP/IT, KCET 70
  • 71. High-Level Data Link Control (HDLC) • It is a bit-oriented protocol for communication over point-to-point and multipoint links. • It implements the Stop-and-Wait protocol. • HDLC defines three types of frames: information frames (I-frames), supervisory frames (S-frames), and unnumbered frames (U-frames). • Each type of frame serves as an envelope for the transmission of a different type of message. • Iframes are used to data-link user data and control information relating to user data (piggybacking). • S-frames are used only to transport control information. • U-frames are reserved for system management. • Information carried by U-frames is intended for managing the link itself. 9/21/2020 KAVIYA P, AP/IT, KCET 71
  • 72. High-Level Data Link Control (HDLC) • Flag field: Contains synchronization pattern 01111110, which identifies both the beginning and the end of a frame. • Address field: Contains the address of the secondary station. The address field can be one byte or several bytes long, depending on the needs of the network. • Control field: One or two bytes used for flow and error control. • Information field: Contains the user‟s data from the network layer or management information. Its length can vary from one network to another. • FCS field: The frame check sequence (FCS) is the HDLC error detection field. It can contain either a 2- or 4-byte CRC. 9/21/2020 KAVIYA P, AP/IT, KCET 72
  • 73. High-Level Data Link Control (HDLC) Bit Stuffing Sending side: • On the sending side, any time five consecutive 1‟s have been transmitted from the body of the message (i.e. excluding when the sender is trying to send the distinguished 01111110 sequence) – The sender inserts „0‟ before transmitting the next bit. Receiving side: • On the receiving side, Five consecutive 1‟s and look at the next bit • 0 - Stuffed, so discard it • 1 - Either End of the frame marker (or) Error has been introduced in the bit stream • Look at the next bit If 0 ( 01111110 )  End of the frame marker If 1 ( 01111111 )  Error, discard the whole frame • The receiver needs to wait for next 01111110 before it can start receiving again. 9/21/2020 KAVIYA P, AP/IT, KCET 73
  • 74. Point-to-Point Protocol (PPP) Services Provided by PPP • Defines the format of the frame to be exchanged between devices. • Authentication is also provided in the protocol, but it is optional. • The new version Multilink PPP, provides connections over multiple links. • It provides network address configuration. Services not provided by PPP • Does not provide flow control. • It has a very simple mechanism for error control. A CRC field is used to detect errors. • Lack of error control and sequence numbering may cause a packet to be received out of order. • Does not provide a sophisticated addressing mechanism to handle frames in a multipoint configuration. 9/21/2020 KAVIYA P, AP/IT, KCET 74
  • 75. Point-to-Point Protocol (PPP) Framing • It also uses the “Character Stuffing”. • Flag: Special start of text character denoted as Flag 0 1 1 1 1 1 1 0 • Address, Control: default values • Address – 11111111 (Broadcast Address) • Control – 11000000 (imitating unnumbered frames in HDLC) • Protocol: Defines what is being carried in the data field; either user data or other information. • Payload: Frame data (default size is 1500 bytes) • FCS: The frame check sequence (FCS) is simply a 2-byte or 4-byte standard CRC. 9/21/2020 KAVIYA P, AP/IT, KCET 75
  • 76. Point-to-Point Protocol (PPP) Byte Stuffing in PPP • Whenever the flag value appears in the data section of the frame, escape byte (01111101) stuffed into the data to tell the receiver that the next byte is not a flag. Protocols used by PPP • LCP (Link Control Protocol) • AP (Authentication Protocol) • NCP (Network Control Protocol) 9/21/2020 KAVIYA P, AP/IT, KCET 76
  • 77. Point-to-Point Protocol (PPP) LCP (Link Control Protocol) • Responsible for establishing, maintaining, configuring & terminating the links. • All LCP packets are carried in the payload of the PPP frame with protocol field set to “C021” in hexadecimal. • Code: Defines the type of the LCP packet. There are 11 types of LCP packet is available. • These 11 types of LCP packets are categorized into three category. • First category: Comprising the first four packet types (0×01 - 0×04) used for link configuration during link establishment. • Second Category: Comprising packet types 0×05, 0×06 for the termination of the link. • Third Category: Comprising last five packet types (0×07 - 0×11) used for link monitoring and debugging. • Id: Value that matches the request and reply. • Length: Defines the total length of the LCP packet. • Information: Optional information. 9/21/2020 KAVIYA P, AP/IT, KCET 77
  • 78. Point-to-Point Protocol (PPP) AP (Authentication Protocol) • PPP is mainly designed for dial up links, where the user identity verification is necessary • Authentication: Validating the identity of a user. • PPP uses two authentication protocols, • PAP (Password Authentication Protocol) • CHAP (Challenge Handshake Authentication Protocol) NCP (Network Control Protocol) • IPCP (Internet Protocol Control Protocol) is used as a network control protocol. • IPCP defines 7 types of packets distinguished by the code values. 9/21/2020 KAVIYA P, AP/IT, KCET 78
  • 79. Media Access Control (MAC) • When nodes or stations are connected and use a common link, called a multipoint or broadcast link. • Multiple-access protocol is needed to coordinate access to the link. 9/21/2020 KAVIYA P, AP/IT, KCET 79
  • 80. Media Access Control (MAC) 1. Random Access (or) Contention • Each station has the right to the medium without being controlled by any other station. • If more than one station tries to send, there is an access conflict – collision – and the frames will be either destroyed or modified. • To avoid access conflict or to resolve it when it happens, each station follows a procedure that answers the following questions: – When can the station access the medium? – What can the station do if the medium is busy? – How can the station determine the success or failure of the transmission? – What can the station do if there is an access conflict? 9/21/2020 KAVIYA P, AP/IT, KCET 80
  • 81. Media Access Control (MAC) 1.1 ALOHA (PURE ALOHA) • When a station sends a frame, it expects the receiver to send an acknowledgment. • If the acknowledgment does not arrive after a time-out period, the station assumes that the frame (or the acknowledgment) has been destroyed and resends the frame. • A collision involves two or more stations. If all these stations try to resend their frames after the time-out, the frames will collide again. • Pure ALOHA dictates that when the time-out period passes, each station waits a random amount of time before resending its frame. • The randomness will help avoid more collisions. We call this time the backoff time TB. • After a maximum number of retransmission attempts Kmax, a station must give up and try later. 9/21/2020 KAVIYA P, AP/IT, KCET 81
  • 82. Media Access Control (MAC) 1.1 ALOHA (PURE ALOHA) 9/21/2020 KAVIYA P, AP/IT, KCET 82
  • 83. Media Access Control (MAC) 1.2 Slotted ALOHA • In slotted ALOHA, the entire time is divided into slots of Tfr seconds and force the station to send only at the beginning of the time slot. • A station is allowed to send only at the beginning of the synchronized time slot, if a station misses this moment, it must wait until the beginning of the next time slot. • There is still the possibility of collision if two stations try to send at the beginning of the same time slot. 9/21/2020 KAVIYA P, AP/IT, KCET 83
  • 84. Media Access Control (MAC) 1.3 Carrier Sense Multiple Access (CSMA) • CSMA - One improvement to the basic Aloha is sensing the carrier before accessing the medium. • Sensing the carrier and accessing the medium only if the carrier is idle decreases the probability of a collision. • Here hidden terminals cannot be detected, so, if a hidden terminal transmits at the same time as another sender, a collision might occur at the receiver. • Persistence Methods: What should a station do if the channel is busy? What should a station do if the channel is idle? Three methods have been devised to answer these questions: the 1-persistent method, the nonpersistent method, and the p-persistent method. 9/21/2020 KAVIYA P, AP/IT, KCET 84
  • 85. Media Access Control (MAC) 1.3 Carrier Sense Multiple Access (CSMA) • 1-Persistent : Simple and straightforward. In this method, after the station finds the line idle, it sends its frame immediately (with probability 1). This method has the highest chance of collision because two or more stations may find the line idle and send their frames immediately.. • Non-Persistent: Stations sense the carrier and start sending immediately if the medium is idle. If the medium is busy, the station pauses a random amount of time before sensing the medium again and repeating this pattern. This approach reduces the chance of collision. However, this method reduces the efficiency of the network because the medium remains idle when there may be stations with frames to send. 9/21/2020 KAVIYA P, AP/IT, KCET 85
  • 86. Media Access Control (MAC) 1.3 Carrier Sense Multiple Access (CSMA) • p-Persistent: It reduces the chance of collision and improves efficiency. In this method, after the station finds the line idle it follows these steps: 1. With probability p, the station sends its frame. 2. With probability q = 1 − p, the station waits for the beginning of the next time slot and checks the line again. a. If the line is idle, it goes to step 1. b. If the line is busy, it acts as though a collision has occurred and uses the back-off procedure. 9/21/2020 KAVIYA P, AP/IT, KCET 86
  • 87. Media Access Control (MAC) 1.4 Carrier Sense Multiple Access with Collision Detection (CSMA/CD) • CSMA/CD multi-access control protocol. 1. Each station listens before it transmits. 2. If the channel is busy, it waits until the channel goes idle, and then it transmits. 3. If the channel is idle it transmits immediately. Continue sensing. 4. If collision is detected, transmit a brief jamming signal, then cease transmission, wait for a random time, and retransmit. • Collision detection is not by waiting for an ACK 9/21/2020 KAVIYA P, AP/IT, KCET 87
  • 88. Media Access Control (MAC) 1.5 Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) • Collisions are avoided through the use of CSMA/CA‟s three strategies: the interframe space, the contention window, and acknowledgments. 9/21/2020 KAVIYA P, AP/IT, KCET 88
  • 89. Media Access Control (MAC) 2. Controlled Access • The stations consult one another to find which station has the right to send. • A station cannot send unless it has been authorized by other stations. 2.1 Reservation • A station needs to make a reservation before sending data. Time is divided into intervals. • In each interval, a reservation frame precedes the data frames sent in that interval. • If there are N stations in the system, there are exactly N reservation minislots in the reservation frame. • Each minislot belongs to a station. When a station needs to send a data frame, it makes a reservation in its own minislot. • The stations that have made reservations can send their data frames after the reservation frame. 9/21/2020 KAVIYA P, AP/IT, KCET 89
  • 90. Media Access Control (MAC) 2.2 Polling • One device is designated as a primary station and the other devices are secondary stations. • All data exchanges must be made through the primary device. • The primary device controls the link; the secondary devices follow its instructions. • The primary device to determine which device is allowed to use the channel at a given time. • This method uses poll and select functions to prevent collisions. • Drawback: If the primary station fails, the system goes down. 9/21/2020 KAVIYA P, AP/IT, KCET 90
  • 91. Media Access Control (MAC) 2.2 Polling Select Function • It is used whenever the primary device has something to send. • If the primary is neither sending nor receiving data, it knows the link is available. • The primary must alert the secondary to the upcoming transmission and wait for an acknowledgment of the secondary‟s ready status. • Before sending data, the primary creates and transmits a select (SEL) frame, one field of which includes the address of the intended secondary. Poll Function • When the primary is ready to receive data, it must ask (poll) each device in turn if it has anything to send. • When the first secondary is approached, it responds either with a NAK frame if it has nothing to send or with data (in the form of a data frame) if it does. • If the response is negative (a NAK frame), then the primary polls the next secondary in the same manner until it finds one with data to send. • When the response is positive (a data frame), the primary reads the frame and returns an acknowledgment (ACK frame), verifying its receipt. 9/21/2020 KAVIYA P, AP/IT, KCET 91
  • 92. Media Access Control (MAC) 2.3 Token Passing • The stations in a network are organized in a logical ring. • In this method, a special packet called a token circulates through the ring. • The possession of the token gives the station the right to access the channel and send its data. • When the station has no more data to send, it releases the token, passing it to the next logical station in the ring. • Stations must be limited in the time they can have possession of the token. • The token must be monitored to ensure it has not been lost or destroyed. • Function of token management is to assign priorities to the stations and to the types of data being transmitted. • Token management is needed to make low-priority stations release the token to high- priority stations. 9/21/2020 KAVIYA P, AP/IT, KCET 92
  • 93. Media Access Control (MAC) 2.3 Token Passing • In a token-passing network, stations do not have to be physically connected in a ring; the ring can be a logical one. 9/21/2020 KAVIYA P, AP/IT, KCET 93
  • 94. Media Access Control (MAC) 3. Channelization • Channelization (or channel partition) is a multiple-access method in which the available bandwidth of a link is shared in time, frequency, or through code, among different stations. 3.1 Frequency Division Multiple Access (FDMA) • In FDMA, the available bandwidth is divided into frequency bands. • Each station is allocated a band to send its data. (i.e.) Each band is reserved for a specific station, and it belongs to the station all the time. • Each station also uses a bandpass filter to confine the transmitter frequencies. • To prevent station interferences, the allocated bands are separated from one another by small guard bands. 9/21/2020 KAVIYA P, AP/IT, KCET 94
  • 95. Media Access Control (MAC) 3. Channelization 3.2 Time Division Multiple Access (TDMA) • In TDMA, the stations share the bandwidth of the channel in time. • Each station is allocated a time slot during which it can send data. • Each station transmits its data in its assigned time slot. • The main problem with TDMA lies in achieving synchronization between the different stations. • Each station needs to know the beginning of its slot and the location of its slot. • To compensate for the delays, we can insert guard times. 9/21/2020 KAVIYA P, AP/IT, KCET 95
  • 96. Media Access Control (MAC) 3. Channelization 3.3 Code Division Multiple Access (CDMA) • In CDMA, multiple users use the same frequency at the same time and no time scheduling is applied. • Multiple users are allotted different codes that consists of sequences of 0 and 1 to access the same channel. • The signals can be distinguished from each other by means of a special coding schemes. • This is done with the help of a frequency spreading code known as the m-bit pseudo- noise (PN) code sequence. • Using m bits, 2m-1 different codes can be obtained. • From these codes, each user will use only one code. • A code for a user should be orthogonal to the codes assigned to other nodes. 9/21/2020 KAVIYA P, AP/IT, KCET 96
  • 97. Wired LANs: Ethernet IEEE 802.3 – Ethernet • Uses CSMA/CD technology. So Ethernet is a multiple access network. i.e., set of nodes send and receive frames over a shared link. – CSMA/CD (Carrier sense Multiple Access / Collision Detect), • Carrier sense – All nodes can distinguish between an idle and a busy line. • Collision Detect – Node listens as it transmit and can therefore detect when a frame it is transmitting has collided with a frame transmitted by another node. • Uses ALOHA as the root protocol. • Digital Equipment Corporation and Intel joined Xerox to define 10Mbps Ethernet standard in 1978. • This standard formed the basis for IEEE standard 802.3. • It provides Connectionless and Unreliable Service. 9/21/2020 KAVIYA P, AP/IT, KCET 97
  • 98. Wired LANs: Ethernet IEEE 802.3 – Ethernet Evolution 9/21/2020 KAVIYA P, AP/IT, KCET 98 Fast Ethernet 100 Base T4 4 pairs of UTP 100 Base X 100 Base Tx 2 pairs of UTP or STP 100 Base Tx 2 optical fibers
  • 99. Wired LANs: Ethernet IEEE 802.3 – Ethernet Physical Properties • Initially Ethernet was implemented on a coaxial cable up to 500m. • This cable is similar to the type used for cable TV except that it typically has an impedance of 50 ohms instead of cable TV‟s 75 ohms. • Hosts connect to an Ethernet segment by tapping into it. Transceiver • Small device directly attached to the tap that detects when the line is idle and drives signal when the host is transmitting. • It also receives incoming signal. • The transceiver is connected to an Ethernet adaptor which is plugged into the host. • Protocol is implemented on the adaptor. 9/21/2020 KAVIYA P, AP/IT, KCET 99
  • 100. Wired LANs: Ethernet IEEE 802.3 – Ethernet Physical Properties Repeater • Multiple Ethernet segments can be joined together by a repeater. • It forwards a digital signal. • No more than four repeaters may be positioned between any pair of hosts. – Ethernet has a total reach of only 2500m. • Any signal placed on the Ethernet by a host is broadcast over the entire network. – Signal is propagated in both directions. – Repeaters forward the signal on all outgoing segments. – Terminators attached to the end of each segment absorb the signals. • Ethernet uses Manchester encoding scheme. 9/21/2020 KAVIYA P, AP/IT, KCET 100
  • 101. Wired LANs: Ethernet IEEE 802.3 – Ethernet Frame • Preamble: Allows the receiver to synchronize with signal (sequence of alternating 0s & 1s). • Start Frame Delimiter (SFD): Signals the beginning of the frame. • Destination address (DA): Contains the link layer address of the destination station or stations to receive the packet. • Source address (SA): Contains the link-layer address of the sender of the packet. • Type: Defines the upper-layer protocol whose packet is encapsulated in the frame. This protocol can be IP, ARP, OSPF, and so on. • Data: It is a minimum of 46 and a maximum of 1500 bytes. • CRC: Contains error detection information. 9/21/2020 KAVIYA P, AP/IT, KCET 101
  • 102. Wired LANs: Ethernet IEEE 802.3 – Ethernet Addressing • Each station on an Ethernet network (such as a PC, workstation, or printer) has its own network interface card (NIC). • The NIC fits inside the station and provides the station with a link-layer address. • The Ethernet address is 6 bytes (48 bits), normally written in hexadecimal notation, with a colon between the bytes. • For example, the following shows an Ethernet MAC address: 4A:30:10:21:10:1A 9/21/2020 KAVIYA P, AP/IT, KCET 102
  • 103. Wired LANs: Ethernet IEEE 802.3 – Ethernet Access Method • When the adaptor has a frame to send & line is idle, it transmits the frame immediately. – The upper bound of 1500bytes in the message means that the adaptor can occupy the line for a fixed length of time. • When the adaptor has a frame to send and the line is busy, it waits for the line to go idle then transmits immediately. • Ethernet is said to be 1 – persistent protocol, because an adaptor with the frame to send transmits with probability 1 whenever a busy line goes idle. • Since there is no centralized control, it is possible for two or more adaptors to begin transmitting at the same time. – Either because both found the line to be idle. – Or, both been waiting for a busy line to become idle. • When this happens, the two or more frames are said to be collide on the network. 9/21/2020 KAVIYA P, AP/IT, KCET 103
  • 104. Wired LANs: Ethernet IEEE 802.3 – Ethernet Collision Detection • Since Ethernet supports collision detection, so each sender is able to determine that a collision in progress. • At the moment an adaptor detects that, its frame is colliding with another, – Transmitter will send a 32 bit jamming sequence with 64-bit preamble (totally 96 bits) – This 96 bit frame is called as runt frame. Worst-Case Scenario, (Two nodes are at opposite ends of the Ethernet) • To know, the frame it just sent did not collide with another frame, the transmitter may need to send as many as 512 bits. • 512 bits (64 bytes)  14 bytes of header + 46 bytes of data + 4 bytes of CRC Why 512 bits & Why its length is limited to 2500m? • The farther apart two nodes are, the longer it takes for a frame sent by one to reach the other and the network is vulnerable to collision during this time. 9/21/2020 KAVIYA P, AP/IT, KCET 104
  • 105. Wired LANs: Ethernet IEEE 802.3 – Ethernet Collision Detection • „A‟ begins transmitting frame at time „t‟. • The first bit of A‟s frame arrives at „B‟ at time t + d, where d is one link latency. • Suppose an instant before host A‟s frame arrives, host B begins to transmit its own frame. • B‟s frame will immediately collide with A‟s frame and this frame collision will be detected by host B. • Host B will send the 32 bit jamming sequence. • Host A will not know that the collision occurred until B‟s frame reaches it, which will happen at t + (2*d) • Host A must continue to transmit until this time in order to detect collision. 9/21/2020 KAVIYA P, AP/IT, KCET 105 Figure: a) A sends a frame at time t; b) A‟s frame arrives at B at time t + d; c) B begins transmitting at time t + d and collides with A‟s frame; d) B‟s runt (32-bit) frame arrives at A at time t + 2d.
  • 106. Wired LANs: Ethernet IEEE 802.3 – Ethernet Collision Detection • Determined delay in the maximally configured Ethernet (2500m long) is 51.2 s. i.e., delay on 10Mbps Ethernet corresponds to 512 bits. • By limiting the maximum length of the Ethernet to 2500m we can limit the Ethernet‟s maximum latency to 51.2 s (fairly small value). So the access algorithm works efficiently. Exponential Back-off • Once an adaptor has detected a collision & stopped its transmission, it waits a certain amount of time and tries again. • Each time the adaptor tries to transmit but fails, it doubles the amount of time it waits before trying again. • This strategy of doubling the delay interval between each retransmission attempt is known as exponential back-off. 9/21/2020 KAVIYA P, AP/IT, KCET 106
  • 107. Wired LANs: Ethernet IEEE 802.3 – Ethernet Collision Detection • The adaptor first delays either 0 or 51.2 s selected at random. • If this effort fails, it then waits 0, 51.2s, 102.4s, 153.6s… before trying again. i.e., k * 51.2s, when k= 0,1,2,3…. • After the third collision, it waits k * 51.2s, k=0… 23 – 1 • In general, the algorithm randomly selects a „k‟ between 0 and 2n – 1 & waits for k* 51.2s where „n‟ is the number of collisions experienced so far. 9/21/2020 KAVIYA P, AP/IT, KCET 107
  • 108. Wired LANs: Ethernet IEEE 802.3 – Ethernet Advantages • Ethernets are easy to administer & maintain. • There are no switches that can fail & no routing and configuration tables that have to be kept up to date. • Easy to add a new host to the network. • Inexpensive (i.e., Cable is cheap). Disadvantages • Ethernets work best under lightly loaded conditions. • Most Ethernets are used in conservative way. • Most Ethernets are far shorter than 2500m with a round trip delay of closer to 5s than 51.2s. 9/21/2020 KAVIYA P, AP/IT, KCET 108
  • 109. Wireless LANs: Introduction Architectural Comparison Medium • In a wired LAN, we use wires to connect hosts. • In a wireless LAN, the medium is air, the signal is generally broadcast. When hosts in a wireless LAN communicate with each other, they are sharing the same medium. Hosts • In a wired LAN, a host is always connected to its network at a point with a fixed link layer address related to its network interface card (NIC). • A host can move from one point in the Internet to another point. In this case, its link- layer address remains the same, but its network-layer address will change. • In a wireless LAN, a host is not physically connected to the network; it can move freely and can use the services provided by the network. 9/21/2020 KAVIYA P, AP/IT, KCET 109
  • 110. Wireless LANs: Introduction Architectural Comparison Isolated LANs • A wired isolated LAN is a set of hosts connected via a link-layer switch (Ethernet). • A wireless isolated LAN, called an ad hoc network, is a set of hosts that communicate freely with each other. The concept of a link-layer switch does not exist in wireless LANs. 9/21/2020 KAVIYA P, AP/IT, KCET 110
  • 111. Wireless LANs: Introduction Architectural Comparison Connection to Other Networks • A wired LAN can be connected to another network or an internetwork such as the Internet using a router. • A wireless LAN may be connected to a wired infrastructure network, to a wireless infrastructure network, or to another wireless LAN. • The wireless LAN is referred to as an infrastructure network, and the connection to the wired infrastructure, such as the Internet, is done via a device called an access point (AP). • Communication between the AP and the wireless host occurs in a wireless environment; communication between the AP and the infrastructure occurs in a wired environment. 9/21/2020 KAVIYA P, AP/IT, KCET 111
  • 112. Wireless LANs: Introduction Architectural Comparison Moving between Environments • A wired LAN or a wireless LAN operates only in the lower two layers of the TCP/IP protocol suite. • The link-layer addresses will change (because of changing NICs), but the network- layer addresses (IP addresses) will remain the same; we are moving from wired links to wireless links. 9/21/2020 KAVIYA P, AP/IT, KCET 112
  • 113. Wireless LANs: Introduction Characteristics • Attenuation: The strength of electromagnetic signals decreases rapidly because the signal disperses in all directions; only a small portion of it reaches the receiver. • Interference: A receiver may receive signals not only from the intended sender, but also from other senders if they are using the same frequency band. • Multipath Propagation: A receiver may receive more than one signal from the same sender because electromagnetic waves can be reflected back from obstacles such as walls, the ground, or objects. This makes the signal less recognizable. • Error: With the above characteristics of a wireless network, errors and error detection are more serious issues in a wireless network. The error level is measured as signal-to-noise ratio (SNR). If SNR is high, it means that the signal is stronger than the noise. When SNR is low, it means that the signal is corrupted by the noise and the data cannot be recovered. 9/21/2020 KAVIYA P, AP/IT, KCET 113
  • 114. Wireless LANs: Introduction Access Control Hidden terminals • A sends to B, C cannot hear A. • C wants to send to B, C senses a “free” medium (Carrier Sense fails). • Collision at B, A cannot receive the collision (Collision Detection fails). • C is “hidden” from A. Exposed terminals • B sends to A, C wants to send to another terminal (not A or B). • C senses the carrier and detects that the carrier is busy. • C postponed its transmission until it detects the medium become idle. • But A is outside radio range of C, waiting is not necessary (unnecessary delay). • C is “exposed” to B. 9/21/2020 KAVIYA P, AP/IT, KCET 114
  • 115. Wireless LANs: Introduction Access Control • How a wireless host can get access to the shared medium (air). • The CSMA/CD algorithm does not work in wireless LANs for three reasons: 1. To detect a collision, a host needs to send and receive at the same time (duplex mode). Wireless hosts can only send or receive at one time (do not have enough battery power). 2. Because of the hidden station problem, a station may not be aware of another station‟s transmission due to some obstacles or range problems, collision may occur but not be detected. 3. The distance between stations can be great. Signal fading could prevent a station at one end from hearing a collision at the other end. • To overcome the above three problems, Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) was invented for wireless LANs. 9/21/2020 KAVIYA P, AP/IT, KCET 115
  • 116. Wireless LANs: IEEE 802.11 IEEE 802.11 Architecture • The standard defines two kinds of services: the basic service set (BSS) and the extended service set (ESS). Basic Service Set (BSS) • It is the building blocks of a wireless LAN. • It is made of stationary or mobile wireless stations and an optional central base station, known as the access point (AP). • The BSS without an AP is a stand-alone network and cannot send data to other BSSs. It is called an ad hoc architecture. • Stations can form a network without the need of an AP; they can locate one another and agree to be part of a BSS. • A BSS with an AP is sometimes referred to as an infrastructure BSS. 9/21/2020 KAVIYA P, AP/IT, KCET 116
  • 117. Wireless LANs: IEEE 802.11 IEEE 802.11 Architecture Extended Service Set (ESS) • It is made up of two or more BSSs with APs. • The BSSs are connected through a distribution system, which is a wired or a wireless network. • The distribution system connects the APs in the BSSs. • IEEE 802.11 does not restrict the distribution system; it can be any IEEE LAN such as an Ethernet. • The ESS uses two types of stations: mobile and stationary. • The mobile stations are normal stations inside a BSS. • The stationary stations are AP stations that are part of a wired LAN. 9/21/2020 KAVIYA P, AP/IT, KCET 117
  • 118. Wireless LANs: IEEE 802.11 IEEE 802.11 Architecture Extended Service Set (ESS) • When BSSs are connected, the stations within reach of one another can communicate without the use of an AP. • However, communication between a station in a BSS and the outside BSS occurs via the AP. 9/21/2020 KAVIYA P, AP/IT, KCET 118
  • 119. Wireless LANs: IEEE 802.11 IEEE 802.11 Architecture Station Types • IEEE 802.11 defines three types of stations based on their mobility in a wireless LAN: no-transition, BSS-transition, and ESS-transition mobility. • A station with no-transition mobility is either stationary (not moving) or moving only inside a BSS. • A station with BSS-transition mobility can move from one BSS to another, but the movement is confined inside one ESS. • A station with ESS-transition mobility can move from one ESS to another. • IEEE 802.11 does not guarantee that communication is continuous during the move. 9/21/2020 KAVIYA P, AP/IT, KCET 119
  • 120. Wireless LANs: IEEE 802.11 IEEE 802.11 MAC Sublayer • IEEE 802.11 defines two MAC sublayers: the distributed coordination function (DCF) and point coordination function (PCF). 9/21/2020 KAVIYA P, AP/IT, KCET 120
  • 121. Wireless LANs: IEEE 802.11 IEEE 802.11 MAC Sublayer – Distributed Coordination Function (DCF) • DCF uses CSMA/CA as the access method. Frame Exchange Time Line 1. Before sending a frame, the source station senses the medium by checking the energy level at the carrier frequency. a. The channel uses a persistence strategy with back-off until the channel is idle. b. After the station is found to be idle, the station waits for a period of time called the distributed interframe space (DIFS); then the station sends a control frame called the request to send (RTS). 2. After receiving the RTS and waiting a period of time called the short interframe space (SIFS), the destination station sends a control frame, called the clear to send (CTS), to the source station. This control frame indicates that the destination station is ready to receive data. 3. The source station sends data after waiting an amount of time equal to SIFS. 4. The destination station, after waiting an amount of time equal to SIFS, sends an acknowledgment to show that the frame has been received. 9/21/2020 KAVIYA P, AP/IT, KCET 121
  • 122. Wireless LANs: IEEE 802.11 IEEE 802.11 MAC Sublayer – Distributed Coordination Function (DCF) Frame Exchange Time Line • Network Allocation Vector (NAV): Shows how much time must pass before these stations are allowed to check the channel for idleness. • Collision During Handshaking: What happens if there is a collision during the time when RTS or CTS control frames are in transition, often called the handshaking period? – back-off strategy is employed, and the sender tries again. • Hidden-Station Problem: Solution is the use of the handshake frames (RTS and CTS). 9/21/2020 KAVIYA P, AP/IT, KCET 122
  • 123. Wireless LANs: IEEE 802.11 IEEE 802.11 MAC Sublayer – Point Coordination Function (PCF) • The point coordination function (PCF) is an optional access method that can be implemented in an infrastructure network. • It is implemented on top of the DCF. • It is used mostly for time-sensitive transmission. • PCF has a centralized, contention-free polling access method. • The AP performs polling for stations that are capable of being polled. • The stations are polled one after another, sending any data they have to the AP. • To give priority to PCF over DCF, another interframe space, PIFS, has been defined. • PIFS (PCF IFS) is shorter than DIFS. • Due to the priority of PCF over DCF, stations that only use DCF may not gain access to the medium. 9/21/2020 KAVIYA P, AP/IT, KCET 123
  • 124. Wireless LANs: IEEE 802.11 IEEE 802.11 MAC Sublayer – Point Coordination Function (PCF) • To prevent this, a repetition interval has been designed to cover both contention-free PCF and contention-based DCF traffic. • The repetition interval, which is repeated continuously, starts with a special control frame, called a beacon frame. • When the stations hear the beacon frame, they start their NAV for the duration of the contention-free period of the repetition interval. 9/21/2020 KAVIYA P, AP/IT, KCET 124
  • 125. Wireless LANs: IEEE 802.11 IEEE 802.11 Frame Format • Frame control: The first 2 bytes serve several purposes. • Duration/ID: The value indicating the period of time in which the medium is occupied. • Address 1 to 4: The four address fields contain standard IEEE 802 MAC addresses. • Sequence control: Due to the acknowledgement mechanism frames may be duplicated. Therefore a sequence number is used to filter duplicates. • Data: The MAC frame may contain arbitrary data (max. 2,312 byte), which is transferred transparently from a sender to the receiver(s). • Checksum (CRC): A 32 bit checksum is used to protect the frame. 9/21/2020 KAVIYA P, AP/IT, KCET 125
  • 126. Wireless LANs: IEEE 802.11 IEEE 802.11 Frame Types • A wireless LAN defined by IEEE 802.11 has three categories of frames: management frames, control frames, and data frames. • Management Frames: Used for the initial communication between stations and access points. • Control Frames: Used for accessing the channel and acknowledging frames. • Data Frames: Used for carrying data and control information. • For control frames the value of the type field is 01. 9/21/2020 KAVIYA P, AP/IT, KCET 126
  • 127. Bluetooth: IEEE 802.15 • It is a wireless LAN technology designed to connect devices of different functions such as telephones, notebooks, computers, cameras and printers when they are at a short distance from each other. • A Bluetooth LAN is an ad hoc network, which means that the network is formed spontaneously. • Bluetooth was originally started as a project by the Ericsson Company. • Bluetooth technology is the implementation of a protocol defined by the IEEE 802.15 standard. • The standard defines a wireless personal-area network (PAN) operable in an area the size of a room or a hall. Bluetooth Devices • A Bluetooth device has a built-in short-range radio transmitter. • The current data rate is 1 Mbps with a 2.4-GHz bandwidth. 9/21/2020 KAVIYA P, AP/IT, KCET 127
  • 128. Bluetooth: IEEE 802.15 Bluetooth Architecture • Bluetooth defines two types of networks: piconet and scatternet. Piconets • It can have up to eight stations, one of which is called the primary; the rest are called secondaries. • All the secondary stations synchronize their clocks and hopping sequence with the primary. • A piconet can have only one primary station. • The communication between the primary and secondary stations can be one-to-one or one-to-many. • A piconet can have a maximum of seven secondaries, additional secondaries can be in the parked state. 9/21/2020 KAVIYA P, AP/IT, KCET 128
  • 129. Bluetooth: IEEE 802.15 Bluetooth Architecture – Piconets • A secondary in a parked state is synchronized with the primary, but cannot take part in communication until it is moved from the parked state to the active state. Scatternet • Piconets can be combined to form what is called a scatternet. • A secondary station in one piconet can be the primary in another piconet. • This station can receive messages from the primary in the first piconet (as a secondary) and, acting as a primary, deliver them to secondaries in the second piconet. • A station can be a member of two piconets. 9/21/2020 KAVIYA P, AP/IT, KCET 129
  • 130. Bluetooth: IEEE 802.15 Bluetooth Layers • Logical Link Control and Adaptation Protocol (L2CAP): Equivalent to LLC. It has specific duties: multiplexing, segmentation and reassembly, quality of service (QoS), and group management. • Baseband Layer: Equivalent to MAC. Description of basic connection establishment, packet formats and timing. • Links: Two types of links can be created between a primary and a secondary. – SCO: Synchronous Connection-Oriented (SCO) Link (Real-time Audio – 64 kbps) – ACL: Asynchronous Connectionless Link (ACL) (721 kbps) • Radio: Specification of the air interface. (i.e.) frequencies, modulation, and transmit power. 9/21/2020 KAVIYA P, AP/IT, KCET 130
  • 131. Bluetooth: IEEE 802.15 Bluetooth Frame Format • Access code: Contains synchronization bits and the identifier of the primary to distinguish the frame of one piconet from that of another. • Header: Repeated 18-bit pattern. Each pattern has the following subfields: – Address: Can define up to seven secondaries (1 to 7). – Type: Defines the type of data coming from the upper layers. – F: Flow control. (1 – Buffer is full) – A: Acknowledgment. (Uses Stop and Wait ARQ) – S: Holds a sequence number. – HEC: A checksum to detect errors in each 18-bit header section. • Payload: Can be 0 to 2740 bits long. It contains data or control information coming from the upper layers. 9/21/2020 KAVIYA P, AP/IT, KCET 131
  • 132. Connecting Devices • Connecting devices to connect hosts together to make a network or to connect networks together to make an internet. • Three kinds of connecting devices: hubs, link-layer switches, and routers. 1. Hubs • A device that operates only in the physical layer. • A repeater has no filtering capability. • They do not have a link-layer address and they do not check the link-layer address of the received frame. • A repeater receives a signal and, before it becomes too weak or corrupted, regenerates and retimes the original bit pattern. • The repeater then sends the refreshed signal. 9/21/2020 KAVIYA P, AP/IT, KCET 132
  • 133. Connecting Devices 2. Link Layer Switches • A link-layer switch (or switch) operates in both the physical and the data-link layers. • As a physical-layer device, it regenerates the signal it receives. • As a link-layer device, the link-layer switch can check the MAC addresses (source and destination) contained in the frame. • It has a table used in filtering decisions. • It does not change the link-layer (MAC) addresses in a frame. • Advantages – Collision Elimination and Connecting heterogenous Devices 9/21/2020 KAVIYA P, AP/IT, KCET 133
  • 134. Connecting Devices 3. Routers • It is a three-layer (physical, data-link, and network) device. • A router can connect networks. Two networks connected by a router become an internetwork or an internet. • Three major differences between a router and a repeater or a switch: – A router has a physical and logical (IP) address for each of its interfaces. – A router acts only on those packets in which the link-layer destination address matches the address of the interface at which the packet arrives. – A router changes the link-layer address of the packet (both source and destination) when it forwards the packet. 9/21/2020 KAVIYA P, AP/IT, KCET 134