Upload
tendy
View
216
Download
0
Embed Size (px)
Citation preview
8/14/2019 csc4430_lecture10
1/41
CSC4430 Data Communication and Computer Networks 1
Lecture 10 (Data Link Layer) Outline
Data link layer protocols:
HDLC
PPP Ethernet
Wireless LAN
8/14/2019 csc4430_lecture10
2/41
CSC4430 Data Communication and Computer Networks 2
10.1. Data Link Layer Protocols
Data link layer protocols
HDLC (High-level Data Link Control)
Base protocol for most data link layer protocols PPP (Point-to-Point Protocol)
Most popular dial-up networking protocol
EthernetMost popular LAN protocol
IEEE 802.11 WLAN
Most popular wireless LAN protocol
HDLCPPP
LANs EthernetWLAN
8/14/2019 csc4430_lecture10
3/41
CSC4430 Data Communication and Computer Networks 3
10.1.1. High-level Data Link Control
High-level Data Link Control (HDLC):
Is a base protocol for all other bit-oriented data
link layer protocols. Supports both half-duplex and full-duplex mode.
Supports both point-to-point and multipoint.
Link layer services:Framing: uses bit-oriented framing.
Flow control: uses sliding window.
Error control: uses CRC with either go-back-n ARQor selective-reject ARQ.
Link access control: uses polling method.
MAC is not defined for multipoint configuration.
8/14/2019 csc4430_lecture10
4/41
CSC4430 Data Communication and Computer Networks 4
10.1.1. High-level Data Link Control
HDLC frame:
Flag: 01111110 (6 ones). Address: Address of the secondarystation.
11111111 = broadcast address (to all stations).
Control: Differentiate 3 types of frames.Information, supervisory, and unnumbered frames.
FCS: Frame check sequence.
Uses CRC for error-detection.
8/14/2019 csc4430_lecture10
5/41
CSC4430 Data Communication and Computer Networks 5
10.1.1. High-level Data Link Control
Bit stuffing:
Is the process of adding one extra 0 whenever
there are five consecutive 1s in the data so thatthe receiver does not mistake the data for a flag.
8/14/2019 csc4430_lecture10
6/41
CSC4430 Data Communication and Computer Networks 6
10.1.1. High-level Data Link Control
Three frame types: Information (I-frame): transports user data.
Supervisory (S-frame): transports control information.
Unnumbered (U-frame): reserved for system management.
8/14/2019 csc4430_lecture10
7/41
CSC4430 Data Communication and Computer Networks 7
10.1.1. High-level Data Link Control
Control field:
N(S) = N(R) = 3 bits means window size = 8
Uses piggybacking means combining data to besent with acknowledgement of the frame received.
Poll/final field:
Has meaning only when it is set (= 1).
Can mean poll or final depending the framesender.
8/14/2019 csc4430_lecture10
8/41
CSC4430 Data Communication and Computer Networks 8
10.1.1. High-level Data Link Control
S-frame:
Used for link access control.
Also used for ACK/NACK when the receiver doesnot have data (I-frame) to send.
8/14/2019 csc4430_lecture10
9/41
CSC4430 Data Communication and Computer Networks 9
10.1.1. High-level Data Link Control
Examples of S-frame usage in polling:
8/14/2019 csc4430_lecture10
10/41
CSC4430 Data Communication and Computer Networks 10
10.1.2. Point-to-Point Protocol
Point-to-Point Protocol (PPP):
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.
Uses a variation of HDLC. Link layer services:
Framing: uses bit-oriented framing.
Flow control: none.Error control: uses CRC for error detection, no errorcorrection.
Link access control: detect connection liveness.
8/14/2019 csc4430_lecture10
11/41
CSC4430 Data Communication and Computer Networks 11
10.1.2. Point-to-Point Protocol
PPP frame:
Most fields are similar to HDLC.
Control: does nothing
11000000 show that the frame does not containany sequence numbers and no flow and errorcontrol
Protocol: defines what is being carried in the datafield.
RFC 1700 gives a list of protocol numbers
8/14/2019 csc4430_lecture10
12/41
CSC4430 Data Communication and Computer Networks 12
10.1.2. Point-to-Point Protocol
Protocol field:
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 layerprotocols.
This allows PPP to support:
User authentication.Dynamic assignment of IP address.
8/14/2019 csc4430_lecture10
13/41
CSC4430 Data Communication and Computer Networks 13
10.1.2. Point-to-Point Protocol
Before exchanging network-layer data, datalink peers must
configure PPP link (max. frame length, userauthentication)
learn/configure network layer information
e.g. for IP, it carries IP Control Protocol (IPCP)messages to learn/configure IP address
8/14/2019 csc4430_lecture10
14/41
CSC4430 Data Communication and Computer Networks 14
10.1.2. Point-to-Point Protocol
Typical PPP connection states:
8/14/2019 csc4430_lecture10
15/41
CSC4430 Data Communication and Computer Networks 15
10.1.2. Point-to-Point Protocol
Typical PPP connection process:
Uses LCP
Uses PAP
Uses LCP
8/14/2019 csc4430_lecture10
16/41
CSC4430 Data Communication and Computer Networks 16
10.1.2. Point-to-Point Protocol
LCP: Link Control Protocol
For establishing and terminating links.
For configuring links negotiating optionsbetween the two points.
All LCP packets are carried in the data field of
PPP frames.
8/14/2019 csc4430_lecture10
17/41
CSC4430 Data Communication and Computer Networks 17
10.1.2. Point-to-Point Protocol
LCP packet:
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.
8/14/2019 csc4430_lecture10
18/41
CSC4430 Data Communication and Computer Networks 18
10.1.2. Point-to-Point Protocol
PAP: Password Authentication Protocol
A simple protocol for authenticating users.
8/14/2019 csc4430_lecture10
19/41
CSC4430 Data Communication and Computer Networks 19
10.1.2. Point-to-Point Protocol
PAP packet:
There are three types of PAP packets.
PAP packets are encapsulated in a PPP frame.
8/14/2019 csc4430_lecture10
20/41
CSC4430 Data Communication and Computer Networks 20
10.1.3. Local Area Networks
A local area network:
Is a data communication system that allows a
number ofindependent devices to communicatedirectly with each other in a limited geographicarea.
Some LAN architectures:Ethernet
Token Bus
Token Ring, FDDIWireless LAN
The data link layer of the LAN protocols are all
based on HDLC.
8/14/2019 csc4430_lecture10
21/41
CSC4430 Data Communication and Computer Networks 21
10.1.3. Local Area Networks
IEEE Project 802:
Specifies functions of the physical layer and data
link layer to interconnect various LAN protocols. Specifies the internetworking between the LAN
protocols.
8/14/2019 csc4430_lecture10
22/41
CSC4430 Data Communication and Computer Networks 22
10.1.3. Local Area Networks
IEEE 802.2 logical link control (LLC).
Common to all LAN protocols
Contains the end-user portions of the HDLC frame. LLC protocol data unit (PDU):
DSAP and SSAP: identify the protocol stacks on
the receiving and sending machinesControl: same as HDLC control field.
8/14/2019 csc4430_lecture10
23/41
CSC4430 Data Communication and Computer Networks 23
10.1.3. Local Area Networks
IEEE 802.3, 802.4, 802.5, 802.6, 802.11:
Contains the physical layer specifications.
Contains the data link layer specifications,including the framing, flow, error control to use,and physical address format.
Defines media access control to resolve thecontention for the shared media.
IEEE 802.3 (Ethernet) CSMA/CD
IEEE 802.4 (Token Bus) Token passingIEEE 802.5 (Token Ring) Token passing
IEEE 802.6 (FDDI) Token passing
IEEE 802.11 (Wireless LAN) CSMA/CA
8/14/2019 csc4430_lecture10
24/41
CSC4430 Data Communication and Computer Networks 24
10.1.3.1. Ethernet
Ethernet:
Dominant LAN technology.
Cheap HK$100 for 100 Mbps.Simpler, cheaper than token passing LANs.
Kept up with speed race: 10, 100, 1000 Mbps
Link layer services:Framing: Bit-oriented framing.
Flow control: no flow control.
Error control: CRC for error detection, no errorcorrection provide unreliable services.
Link access control: uses CSMA/CD for MACprotocol.
8/14/2019 csc4430_lecture10
25/41
CSC4430 Data Communication and Computer Networks 25
10.1.3.1. Ethernet
Ethernet frame:
Preamble: 7 bytes with pattern 10101010.
used to synchronize receiver, sender clock rates
SFD: signals the beginning of the frame.Preamble+SFD = Flag in HDLC.
Destination/source address: contains the physicaladdress of the frame destination/source
Data: LLC PDU, 46-1500 bytes.
8/14/2019 csc4430_lecture10
26/41
CSC4430 Data Communication and Computer Networks 26
10.1.3.1. Ethernet
Physical or Ethernet address:
Is a unique address encoded on its network
interface card (NIC). Its length is six bytes.
Commonly written as six pairs of hexadecimal
digits with dashes or colons.e.g. 00-B0-D0-3C-D4-A4.
On your PC, try to find out the Ethernet address
using winipcfg oripconfig -all command.
8/14/2019 csc4430_lecture10
27/41
CSC4430 Data Communication and Computer Networks 27
10.1.3.1. Ethernet
Access method: CSMA/CDA: sense channel, if idle
then {
transmit and monitor the channel;
Ifdetect 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}
8/14/2019 csc4430_lecture10
28/41
CSC4430 Data Communication and Computer Networks 28
10.1.3.1. Ethernet
Access method: CSMA/CD
Jam signal: make sure all other transmitters areaware of collision = 48 bits.
Exponential backoff:Goal: adapt retransmission attempts to estimated currentload.
heavy load: random wait will be longer.
First collision:
choose K from { 0,1 }
wait K 512 bit transmission timesAfter second collision: choose K from { 0,1, 2, 3 }
After ten or more collisions, choose K from { 0,1, 2, 3, 4,, 1023 }
8/14/2019 csc4430_lecture10
29/41
CSC4430 Data Communication and Computer Networks 29
10.1.3.1. Ethernet
Physical specifications:
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.
8/14/2019 csc4430_lecture10
30/41
CSC4430 Data Communication and Computer Networks 30
10.1.3.1. Ethernet
Example: 10Base5 (thick Ethernet or Thicknet)
Bus topology using a thick coaxial cable.
8/14/2019 csc4430_lecture10
31/41
CSC4430 Data Communication and Computer Networks 31
10.1.3.1. Ethernet
Repeaters used to connect up to multiple segments.
Repeater repeats bits it hears on one interface to itsother interfaces: physical layer device only!
To reduce collisions, total length of bus should notexceed 2500 meters (5 segments).
8/14/2019 csc4430_lecture10
32/41
CSC4430 Data Communication and Computer Networks 32
10.1.3.1. Ethernet
Example: 10Base-T (twisted-pair Ethernet).
Star topology using unshielded twisted pair (UTP).
Most popular standard.
8/14/2019 csc4430_lecture10
33/41
CSC4430 Data Communication and Computer Networks 33
10.1.3.1. Ethernet
Newer Ethernet standards:
Fast Ethernet
Operates at 100 Mbps instead of 10 Mbps Gigabit Ethernet
Operates at 1 Gbps
8/14/2019 csc4430_lecture10
34/41
CSC4430 Data Communication and Computer Networks 34
10.1.3.2. Wireless LAN
IEEE 802.11:
Defines physical layer and MAC functionalities.
Physical:Uses unlicensed RF frequency 2.4Ghz and infrared.
Allows bit rate 12 Mbps.
Link layer services:Framing: Bit-oriented framing.
Flow control: no flow control.
Error control: CRC for error detection, no errorcorrection provide unreliable services.
Link access control: uses CSMA/CA for MAC
protocol.
8/14/2019 csc4430_lecture10
35/41
CSC4430 Data Communication and Computer Networks 35
10.1.3.2. Wireless LAN
IEEE 802.11 architecture:
Basic Service Set (BSS) (a.k.a. cell) contains:
wireless hostsaccess point (AP): base station
Multiple BSSs form the distribution system (DS).
8/14/2019 csc4430_lecture10
36/41
CSC4430 Data Communication and Computer Networks 36
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 busythen binary backoff
Receiver:- if received OK
then return ACK afterSIFS
Others defer access forNAV time
units
DIFS = Distribution Inter Frame Space
SIFS = Short Inter Frame Space
NAV = Network Allocation Vector
8/14/2019 csc4430_lecture10
37/41
CSC4430 Data Communication and Computer Networks 37
10.1.3.2. Wireless LAN
Hidden terminal effect:
Due to decreasing signal strength (obstacles, signalattenuation), A and C cannot hear each other.
If they transmit at the same time to B, collisions will occur at B. Goal: to avoid collisions at B.
Use CSMA/CA: CSMA with Collision Avoidance
8/14/2019 csc4430_lecture10
38/41
CSC4430 Data Communication and Computer Networks 38
10.1.3.2. Wireless LAN
IEEE 802.11 CSMA/CA:
Explicit channel reservation sender: send short RTS
receiver: reply with short CTS
CTS reserves channel forsender, notifying (possibly
hidden) stations Avoid hidden station
collisions
RTS and CTS short: collisions less likely
end result similar to collisiondetection
RTS = Request to Send
CTS = Clear to Send
10 1 4 S
8/14/2019 csc4430_lecture10
39/41
CSC4430 Data Communication and Computer Networks 39
10.1.4. Summary
Four popular data link protocols:
HDLC, PPP, Ethernet, IEEE 802.10.
All uses bit-oriented framing. HDLC provides reliable services.
All others derive from HDLC but provide no flow
control and unreliable services. Popular MAC method: CSMA.
Carrier sensing allow high throughput even at high
load.
8/14/2019 csc4430_lecture10
40/41
8/14/2019 csc4430_lecture10
41/41
41
Next Lecture
Internetworking Devices
(Forouzan Chapter 21)