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

Lecture 10 (Data Link Layer) Outline

The document outlines different data link layer protocols including HDLC, PPP, Ethernet, and wireless LAN. It provides details on HDLC including frame format, bit stuffing, and frame types. It also describes PPP for dial-up connections and its use of LCP and PAP for link configuration and authentication. Additionally, it discusses local area networks under IEEE Project 802 and specifics of Ethernet including its frame format and use of CSMA/CD for media access control.

Uploaded by

Tendy
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
75 views

Lecture 10 (Data Link Layer) Outline

The document outlines different data link layer protocols including HDLC, PPP, Ethernet, and wireless LAN. It provides details on HDLC including frame format, bit stuffing, and frame types. It also describes PPP for dial-up connections and its use of LCP and PAP for link configuration and authentication. Additionally, it discusses local area networks under IEEE Project 802 and specifics of Ethernet including its frame format and use of CSMA/CD for media access control.

Uploaded by

Tendy
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 41

Lecture 10 (Data Link Layer) Outline

„ Data link layer protocols:


z HDLC
z PPP
z Ethernet
z Wireless LAN

CSC4430 – Data Communication and Computer Networks 1


10.1. Data Link Layer Protocols

„ Data link layer protocols


PPP
HDLC
Ethernet
LANs
WLAN
z HDLC (High-level Data Link Control)
Base protocol for most data link layer protocols
z PPP (Point-to-Point Protocol)
Most popular dial-up networking protocol
z Ethernet
Most popular LAN protocol
z IEEE 802.11 WLAN
Most popular wireless LAN protocol
CSC4430 – Data Communication and Computer Networks 2
10.1.1. High-level Data Link Control

„ High-level Data Link Control (HDLC):


z Is a base protocol for all other bit-oriented data
link layer protocols.
z Supports both half-duplex and full-duplex mode.
z Supports both point-to-point and multipoint.
z Link layer services:
Framing: uses bit-oriented framing.
Flow control: uses sliding window.
Error control: uses CRC with either go-back-n ARQ
or selective-reject ARQ.
Link access control: uses polling method.
MAC is not defined for multipoint configuration.

CSC4430 – Data Communication and Computer Networks 3


10.1.1. High-level Data Link Control

„ HDLC frame:

z Flag: 01111110 (6 ones).


z Address: Address of the secondary station.
11111111 = broadcast address (to all stations).
z Control: Differentiate 3 types of frames.
Information, supervisory, and unnumbered frames.
z FCS: Frame check sequence.
Uses CRC for error-detection.
CSC4430 – Data Communication and Computer Networks 4
10.1.1. High-level Data Link Control

„ Bit stuffing:
z Is the process of adding one extra 0 whenever
there are five consecutive 1s in the data so that
the receiver does not mistake the data for a flag.

CSC4430 – Data Communication and Computer Networks 5


10.1.1. High-level Data Link Control

„ Three frame types:


z Information (I-frame): transports user data.
z Supervisory (S-frame): transports control information.
z Unnumbered (U-frame): reserved for system management.

CSC4430 – Data Communication and Computer Networks 6


10.1.1. High-level Data Link Control

„ Control field:
z N(S) = N(R) = 3 bits – means window size = 8
z Uses piggybacking – means combining data to be
sent with acknowledgement of the frame received.
„ Poll/final field:
z Has meaning only when it is set (= 1).
z Can mean poll or final depending the frame
sender.

CSC4430 – Data Communication and Computer Networks 7


10.1.1. High-level Data Link Control

„ S-frame:
z Used for link access control.
z Also used for ACK/NACK when the receiver does
not have data (I-frame) to send.

CSC4430 – Data Communication and Computer Networks 8


10.1.1. High-level Data Link Control

„ Examples of S-frame usage in polling:

CSC4430 – Data Communication and Computer Networks 9


10.1.2. Point-to-Point Protocol

„ Point-to-Point Protocol (PPP):


z Is a protocol for configuring PPP connection and
managing data transfer in a dial-up line.
Telephone line provides the physical link.
PPP provides the data link.
z Uses a variation of HDLC.
z Link layer services:
Framing: uses bit-oriented framing.
Flow control: none.
Error control: uses CRC for error detection, no error
correction.
Link access control: detect connection liveness.
CSC4430 – Data Communication and Computer Networks 10
10.1.2. Point-to-Point Protocol

„ PPP frame:

z Most fields are similar to HDLC.


z Control: does nothing
11000000 show that the frame does not contain
any sequence numbers and no flow and error
control
z Protocol: defines what is being carried in the data
field.
RFC 1700 gives a list of protocol numbers
CSC4430 – Data Communication and Computer Networks 11
10.1.2. Point-to-Point Protocol

„ Protocol field:
z Allow to carry data of any network layer protocol
(not just IP) at the same time.
LCP packets for link establishment.
CHAP packets for user authentication.
NCP, IPX, Appletalk packets – other network layer
protocols.
z This allows PPP to support:
User authentication.
Dynamic assignment of IP address.

CSC4430 – Data Communication and Computer Networks 12


10.1.2. Point-to-Point Protocol

„ Before exchanging network-layer data, data


link peers must
z configure PPP link (max. frame length, user
authentication)
z learn/configure network layer information
e.g. for IP, it carries IP Control Protocol (IPCP)
messages to learn/configure IP address

CSC4430 – Data Communication and Computer Networks 13


10.1.2. Point-to-Point Protocol

„ Typical PPP connection states:

CSC4430 – Data Communication and Computer Networks 14


10.1.2. Point-to-Point Protocol

„ Typical PPP connection process:

Uses LCP

Uses PAP

Uses LCP
CSC4430 – Data Communication and Computer Networks 15
10.1.2. Point-to-Point Protocol

„ LCP: Link Control Protocol


z For establishing and terminating links.
z For configuring links – negotiating options
between the two points.
z All LCP packets are carried in the data field of
PPP frames.

CSC4430 – Data Communication and Computer Networks 16


10.1.2. Point-to-Point Protocol

„ LCP packet:
z Fields:
Code: defines the type of LCP packet.

ID: is used to match a request with a reply.


Length: length of the whole LCP packet.
Information: contains options that can be
negotiated between the two end points.
CSC4430 – Data Communication and Computer Networks 17
10.1.2. Point-to-Point Protocol

„ PAP: Password Authentication Protocol


z A simple protocol for authenticating users.

CSC4430 – Data Communication and Computer Networks 18


10.1.2. Point-to-Point Protocol

„ PAP packet:
z There are three types of PAP packets.
z PAP packets are encapsulated in a PPP frame.

CSC4430 – Data Communication and Computer Networks 19


10.1.3. Local Area Networks

„ A local area network:


z Is a data communication system that allows a
number of independent devices to communicate
directly with each other in a limited geographic
area.
z Some LAN architectures:
Ethernet
Token Bus
Token Ring, FDDI
Wireless LAN
z The data link layer of the LAN protocols are all
based on HDLC.
CSC4430 – Data Communication and Computer Networks 20
10.1.3. Local Area Networks

„ IEEE Project 802:


z Specifies functions of the physical layer and data
link layer to interconnect various LAN protocols.
z Specifies the internetworking between the LAN
protocols.

CSC4430 – Data Communication and Computer Networks 21


10.1.3. Local Area Networks

„ IEEE 802.2 logical link control (LLC).


z Common to all LAN protocols
z Contains the end-user portions of the HDLC frame.
z LLC protocol data unit (PDU):
DSAP and SSAP: identify the protocol stacks on
the receiving and sending machines
Control: same as HDLC control field.

CSC4430 – Data Communication and Computer Networks 22


10.1.3. Local Area Networks

„ IEEE 802.3, 802.4, 802.5, 802.6, 802.11:


z Contains the physical layer specifications.
z Contains the data link layer specifications,
including the framing, flow, error control to use,
and physical address format.
z Defines media access control to resolve the
contention for the shared media.
IEEE 802.3 (Ethernet) – CSMA/CD
IEEE 802.4 (Token Bus) – Token passing
IEEE 802.5 (Token Ring) – Token passing
IEEE 802.6 (FDDI) – Token passing
IEEE 802.11 (Wireless LAN) – CSMA/CA
CSC4430 – Data Communication and Computer Networks 23
10.1.3.1. Ethernet

„ Ethernet:
z “Dominant” LAN technology.
Cheap HK$100 for 100 Mbps.
Simpler, cheaper than token passing LANs.
Kept up with speed race: 10, 100, 1000 Mbps
z Link layer services:
Framing: Bit-oriented framing.
Flow control: no flow control.
Error control: CRC for error detection, no error
correction – provide unreliable services.
Link access control: uses CSMA/CD for MAC
protocol.

CSC4430 – Data Communication and Computer Networks 24


10.1.3.1. Ethernet

„ Ethernet frame:

z Preamble: 7 bytes with pattern 10101010.


used to synchronize receiver, sender clock rates
z SFD: signals the beginning of the frame.
Preamble+SFD = Flag in HDLC.
z Destination/source address: contains the physical
address of the frame destination/source
z Data: LLC PDU, 46-1500 bytes.

CSC4430 – Data Communication and Computer Networks 25


10.1.3.1. Ethernet

„ Physical or Ethernet address:


z Is a unique address encoded on its network
interface card (NIC).
z Its length is six bytes.
z Commonly written as six pairs of hexadecimal
digits with dashes or colons.
e.g. 00-B0-D0-3C-D4-A4.
z On your PC, try to find out the Ethernet address
using winipcfg or ipconfig -all command.

CSC4430 – Data Communication and Computer Networks 26


10.1.3.1. Ethernet

„ Access method: CSMA/CD


A: sense channel, if idle
then {
transmit and monitor the channel;
If detect another transmission
then {
abort and send jam signal;
update # collisions;
delay as required by exponential backoff algorithm;
goto A
}
else {done with the frame; set collisions to zero}
}
else {wait until ongoing transmission is over and goto A}

CSC4430 – Data Communication and Computer Networks 27


10.1.3.1. Ethernet

„ Access method: CSMA/CD


z Jam signal: make sure all other transmitters are
aware of collision = 48 bits.
z Exponential backoff:
Goal: adapt retransmission attempts to estimated current
load.
heavy load: random wait will be longer.
First collision:
choose K from { 0,1 }
wait K × 512 bit transmission times
After second collision: choose K from { 0,1, 2, 3 }

After ten or more collisions, choose K from { 0,1, 2, 3, 4,
…, 1023 }
CSC4430 – Data Communication and Computer Networks 28
10.1.3.1. Ethernet

„ Physical specifications:
z Two categories:

First number indicates the data rate in Mbps.


Support data rates between 1 to 100 Mbps.
Last number indicates the maximum cable length or
the type of cable.
CSC4430 – Data Communication and Computer Networks 29
10.1.3.1. Ethernet

„ Example: 10Base5 (thick Ethernet or Thicknet)


z Bus topology using a thick coaxial cable.

CSC4430 – Data Communication and Computer Networks 30


10.1.3.1. Ethernet

„ Repeaters used to connect up to multiple segments.


„ Repeater repeats bits it hears on one interface to its
other interfaces: physical layer device only!
„ To reduce collisions, total length of bus should not
exceed 2500 meters (5 segments).

CSC4430 – Data Communication and Computer Networks 31


10.1.3.1. Ethernet

„ Example: 10Base-T (twisted-pair Ethernet).


z Star topology using unshielded twisted pair (UTP).
z Most popular standard.

CSC4430 – Data Communication and Computer Networks 32


10.1.3.1. Ethernet

„ Newer Ethernet standards:


z Fast Ethernet
Operates at 100 Mbps instead of 10 Mbps
z Gigabit Ethernet
Operates at 1 Gbps

CSC4430 – Data Communication and Computer Networks 33


10.1.3.2. Wireless LAN

„ IEEE 802.11:
z Defines physical layer and MAC functionalities.
z Physical:
Uses unlicensed RF frequency 2.4Ghz and infrared.
Allows bit rate 1–2 Mbps.
z Link layer services:
Framing: Bit-oriented framing.
Flow control: no flow control.
Error control: CRC for error detection, no error
correction – provide unreliable services.
Link access control: uses CSMA/CA for MAC
protocol.

CSC4430 – Data Communication and Computer Networks 34


10.1.3.2. Wireless LAN

„ IEEE 802.11 architecture:


z Basic Service Set (BSS) (a.k.a. “cell”) contains:
wireless hosts
access point (AP): base station
z Multiple BSS’s form the distribution system (DS).

CSC4430 – Data Communication and Computer Networks 35


10.1.3.2. Wireless LAN

IEEE 802.11 CSMA:


„ Sender
- if sense channel idle for
longer than DIFS time unit
then transmit entire frame
(no collision detection)
- if sense channel busy
then binary backoff
„ Receiver:
- if received OK
then return ACK after SIFS DIFS = Distribution Inter Frame Space
„ Others SIFS = Short Inter Frame Space
NAV = Network Allocation Vector
z defer access for NAV time
units
CSC4430 – Data Communication and Computer Networks 36
10.1.3.2. Wireless LAN

„ Hidden terminal effect:


z Due to decreasing signal strength (obstacles, signal
attenuation), A and C cannot hear each other.
If they transmit at the same time to B, collisions will occur at B.
z Goal: to avoid collisions at B.
Use CSMA/CA: CSMA with Collision Avoidance

CSC4430 – Data Communication and Computer Networks 37


10.1.3.2. Wireless LAN

IEEE 802.11 CSMA/CA:


„ Explicit channel reservation
z sender: send short RTS
z receiver: reply with short CTS
z CTS reserves channel for
sender, notifying (possibly
hidden) stations
„ Avoid hidden station
collisions
„ RTS and CTS short:
z collisions less likely RTS = Request to Send
z end result similar to collision CTS = Clear to Send
detection

CSC4430 – Data Communication and Computer Networks 38


10.1.4. Summary

„ Four popular data link protocols:


z HDLC, PPP, Ethernet, IEEE 802.10.
z All uses bit-oriented framing.
z HDLC provides reliable services.
z All others derive from HDLC but provide no flow
control and unreliable services.
z Popular MAC method: CSMA.
Carrier sensing allow high throughput even at high
load.

CSC4430 – Data Communication and Computer Networks 39


10.1.5. Further Readings

„ Data link layer protocols:


z HDLC : Section 10.4.
z PPP : Chapter 15.
z Ethernet : Section 12.1 – 12.3.
z Wireless LAN
Ross Section 5.7
http://www.palowireless.com/i802_11/tutorials.asp

CSC4430 – Data Communication and Computer Networks 40


Next Lecture

Internetworking Devices
(Forouzan Chapter 21)

41

You might also like