Professional Documents
Culture Documents
Contents Types of services provided by DLL protocols 7 Flow control functions Flow control protocols Stop-and-Wait protocols Sliding window protocols 19 Go-back-n Selective Repeat/Reject Performance comparison HDLC 24 Internet DLL protocols 27
1
9 11 12 21 23
compression/ expansion Session to transport mapping Error recovery Routing Error control Flow control
Layer and flow control Connection control Data link establishment Access to transm. media
Link layer
Physical layer
Framing: considers frame format/ length issues (incl. error detection/correction implementation Flow control: SAW, Sliding Window Error control: correction, detection, recovery (ARQ: SAW, GBN, SR)
DLL Services
Types of DLL services:
Unacknowledged connectionless service
frames are sent independently (connectionless) no recovering of the lost/damaged frames (unack.) for reliable links or upper levels recovery architecture
Connection-oriented services
correct and in-order frame delivery
DLL Services
Services provided to the network layer by the data link layer are:
data-link-connection; data-link-connection-endpoint-identifiers; sequencing; error notification; flow control; quality of service parameters.
5
Terminology
Flow Control
Simplex: Signal flows always in one direction (e.g., computer - to - printer) Half Duplex: Alternating one-way. Signal flows in both directions not simultaneously but alternatively. Full Duplex: Signal flow is in both directions simultaneously
Logical Connectivity:
Peer-to-Peer: Either station can initiate a call Primary-Secondary: Only the Primary may initiate a call. There is no Secondary-to-Secondary calls initiated separately.
Connection Phases: Apply to both logical connectivity types: Peer - to - Peer, Primary - Secondary
Connection Establishment: Determines which station transmits, which receives, and whether the receiver is ready to receive. Data Transfer: Data are transferred in one or more acknowledgment blocks Connection Termination: Terminates the logical connection, physical connection upon which that logical connection was based may remain connected
13/1
Flow Control
Flow Control (Physical Connectivity Possibilities)
Point-to-Point (P-P) Logical Connectivity: Can use either Peer-to-Peer or Primary-Secondary depending on whether a Primary station has been designated or not Addressing: No addressing is required. Multipoint Logical Connectivity
Peer-to-Peer: Uses contest access methods Primary-Secondary: Uses Poll (The primary request data from the secondary) and Select (The primary has data to send to the secondary)
Addressing:
Peer-to-Peer: Two addresses required (transmitter and receiver) Primary-Secondary: One address needed, to identify 8 the secondary
DLL
PackBuff
free channel Event-Driven Control (some SAW: for asynchronous transmission, multiple service, half-duplex error-free channel Event-Driven Control with Timeouts (SAW, PAR/ARQ, sliding window: for asynchronous transmission, multiple service, full-duplex channel with losses/errors
9
FromNL
TrmTimer
ToNL
RcvCount
ToPhL
FromPhL
FrameBuff
Physical Layer
Physical bit transfer (signaling)
Applicable mechanisms:
piggybacking employs the outgoing traffic for carrying frame receive acknowledgements; timeout control over the delayed acknowledgments in case of no outgoing data frames. pipelining: sequential frame transmission upon the new Network Layers requests prior to acknowledgement for the frames already sent. Outstanding frames form so called sender window.
10
Stop-And-Wait Protocols
SAW Protocol (Idle ARQ)
Algorithm
Send frame Wait for an ACK before sending the next frame ( good for half duplex links) 0>U>1 U depends on the channel length D:
3/12
13/5
Channel Utilization, U:
U = Tfr/Tt
Bit Error Rate BER: BER = nerr/nt
(1)
where Tfr is the frame transmission time and Tt is the total transmission time including Tfr, Tp (propagation delay), TACK (acknowledgement generation, propagation and transmission) , Tproc (frame processing time). Approximation for error-free channel (BER-->0):
channel bit rate [b/S] Tt = Tfr + 2 Tp (2) Tp = (D/2)10-8 [S] (by signal speed = 2.108m/S in copper) a = Tp / Tfr = (sfr/Drb)c [non-dimensional] (3) relative channel length [with respect to the frame duration]
(4)
11
13/2
EM-waves speed
cont.
Frames are buffered in seq_number order at the sender for possible retransmission Frames are buffered in seq_number order at the receiver for delivery to the Network Layer when Selective Repeat error handling is applied
Sliding window protocols guarantee the number and the order of the transmitted frames thus simulating connection-oriented transmission SW and RW can differ in the limits and window-size Important performance and robust parameters are the maximal sender/receiver window size wS/R and the timeouts in context to the actual throughput and the frame round-trip transit 13 time.
Sender Window
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 Transmitted frames zone Trailing edge shrinks as frames are sent Leading edge expands as ACKs are received
Receiver Window
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 Acknowledged frames zone Trailing edge shrinks as frames are received Leading edge expands as ACKs are sent
14
1 0 7 6 5 4 3 2 1 0
Sliding windows
A Sender
6 5 4 3 2 1 0
B Rec-er
Step 2.
1 0
A 7 Sender
6 5 4 3
6 5 4 3 2 1 0
B Rec-er
15
B Rec-er
2 1 0
Step 4.
1 0
B transmits acknowledge for frames 0-2 which causes receiver window to expand back
Ack3
6 5 4 3 6 5 4 3
A 8 Sender
B Rec-er
16
Ack3
A 7 Sender 6
5 4 3
1 0 7 6 5 4 3
B Rec-er
Step 6.
A has transmitted frame 3 and then frames 4, 5 and 6; B processed frame 3, 4, 5 and 6 and transmits Ack4
A Sender
4 3 2 1 0 7 6
1 0 8 7 6 5
Ack4 B Rec-er
4 3
17
A 2 Sender
1 0 7
Ack4
2 1 0 7 6
B Rec-er
5
Step 8.
4
A window expands with a position upon the receiving of the Ack4; B processes frames 5 and 6
Ack4
2 1 0 7 2 1 0 7
A 3 Sender
B Rec-er
18
Sender window size wS n (but still wS L-1) Receiver window size wR= 1
Sender may send multiple frames up to wS Receiver buffers only one received frame. It cannot receive frames out of order. Frames are passed in order to the NL. Damaged Frame:
13/6
B detects error in frame (i): B sends REJ(i). When A receives REJ(i) it must resend (i) and all subsequent frames. B does not detect frame (i) (frame is lost) and A already sent (i+1): B receives (i+1) out of order and sends REJ(i) Frame (i) is lost and A does not send anything after frame (i): A timeouts and resend (i). 19 cont ...
13/6
wS is greater than the number of frames that can fit into the
channel; peer A can transmit frames without pausing 20
3/15b
wS = wR - the receiver buffers all the received frame. It can receive frames out of order and only NACKed frames are retransmitted. Frames are passed in order to the NL. Channel utilization (only by BER-->0!) is the same as for GBN ARQ. Performance
More complex than GBN: wS buffers/timers both at the transmitter and receiver More efficient than GBN for noisy channels
21
12
16
20
24
wS
22
wS 2a+1 wS 2a+1
23
13/10
Bit-oriented protocol - with bit stuffing Applies sliding window algorithms (GBN or SR) HDLC-defined station types:
primary (link establishment and control - issues commands) secondary (controlled by primary - issues responses) combined
Link configuration: balanced (P-P only)/unbalanced (P-P and multi-P operations; obsolete - terminal complexes)
24
13/8
26
Internet DLL
Internet P-P architectures:
leased lines to the Internet communication subnets 3/26 dial-up lines to time-sharing shell account or router
27
Internet DLL
PPP (Point-to-Point Protocol) - RFC 1661; provides 3 mechanisms
Framing Method providing also error control. A Link Control Protocol (LCP) which brings line up, tests it, negotiates options, and brings lines down in the end. Negotiation of the NL options (independence of the network protocol being used). The method used is to have a different NCP (Network Control Protocol) for each network layer used.
3/28
Dead - no physical layer present Establish a Physical Connection: (The users PC first calls the providers router via a modem Authenticate - Establish a Link Connection: (PPP next sends a series of LCP packets to configure the data link layer.)
LCP provides a mechanism (proposal - acceptance/rejection between 28 the two sides) to negotiate link options
Internet DLL
Authenticate - Establish a Link Connection: (PPP next sends a series of LCP packets to configure the data link layer.)
LCP provides a mechanism (proposal - acceptance/rejection between the two sides) to negotiate link options Options may include
setting the maximum payload size for data frames enabling authentication to be conducted choosing a protocol to use LCP also allows for testing of the line (Echo - types)
Network - Establishes the Network Connection: (PPP next sends a series of NCP packets to configure the network layer.)
Typically this is the TCP/IP protocol stack (so an IP address is needed) Each Internet provider manages a block of addresses, (one of which is dynamically assigned at login time).
Open - The PC is now an internet host (and is permitted to send and receive IP packets.) Terminate - Procedure is reversed at the end of the session Disestablish Network Connection - release IP address Disestablish the Data Link Connection - release the logical connection Disestablish Physical Connection - release the TP line
29
Internet DLL
Similar to HDLC (except it is based on eight-bit word size - character stuffing is used) Preamble - HDLC flag byte (0111 1110) (Character stuffed if it occurs within the frame) Address Field - All 1s Control Field - used to indicate that PPP is using unnumbered frames. (I.e., no seq-nums, ACKs -therefore is an unreliable CLS) Protocol - used to indicate which Data Link or Network Layer Protocol is being used. Payload (variable length) Checksum (2 or 4 bytes)
30
31
32
33
34
35
36
37
38
Sender
Receiver
39
40
41
42
43