Presentation is loading. Please wait.

Presentation is loading. Please wait.

635.412 Class #2 1 Chapter 6 – Logical Link Control (LLC)

Similar presentations


Presentation on theme: "635.412 Class #2 1 Chapter 6 – Logical Link Control (LLC)"— Presentation transcript:

1 635.412 Class #2 1 Chapter 6 – Logical Link Control (LLC)

2 635.412 Spring 2005 Class 2: More Basics 2 Logical Link Control (LLC) Logical Link Control Services n Introduction – The primary purpose of this sublayer is to provide a means of transferring data across one or more MAC- controlled links – LLC Services n LLC services are provided to higher layers across LLC service access points (LSAPs) n These services are specified in terms of service primitives (aka – commands or functions) n Three forms of services are specified in the IEEE 802 standard: – Unacknowledged connectionless service – Connection-mode service – Acknowledged connectionless service

3 635.412 Spring 2005 Class 2: More Basics 3 Logical Link Control (LLC) Logical Link Control Services n Unacknowledged Connectionless Service – Provides a datagram service with no acknowledgements, error-control, or flow control – This service type supports individual, multicast, and broadcast addressing – Only two primitives are defined: the request primitive (DL-UNITDATA-request) for upper layers to pass data to the LLC sublayer for transmission and the indication (DL-UNITDATA-indication) primitive to pass received data up to the upper layer – A priority can be specified in the primitive, but it is only passed down to the MAC sublayer for implementation

4 635.412 Spring 2005 Class 2: More Basics 4 Logical Link Control (LLC) Logical Link Control Services n Connection-Mode Service – Creates a logical connection for data transfer (DL- CONNECT-request, indication, response, confirm). – This service type provides flow control, sequencing of data, and error indication and recovery – Like the Unacknowledged Connectionless service a priority for the connection can be specified, but it is up to the MAC sublayer to actually implement it – Four primitives defined for connection setup (CONNECT- request, indication, response, and confirm) n Example of successful connection setup n Rejection of a connection setup – Two primitives defined for data transfer (DATA-request & indication) n No acknowledgements are given to each data frame; delivery is ‘guaranteed’ (errors are indicated by a reset or disconnect)

5 635.412 Spring 2005 Class 2: More Basics 5 Logical Link Control (LLC) Logical Link Control Services n Connection-Mode Service (continued) – Two primitives defined for connection teardown (DISCONNEC- request & indication) – Four primitives defined to reset the data flow (RESE-request, indication, response, confirm) or allow error recovery to occur. – Two primitives defined for flow control (CONNECTION- FLOWCONTROL- request, indication, response, & confirm) which can limit the amount of data passed across the LSAP – Examples of Connection-Mode service primitives:

6 635.412 Spring 2005 Class 2: More Basics 6 Logical Link Control (LLC) Logical Link Control Services

7 635.412 Spring 2005 Class 2: More Basics 7 Logical Link Control (LLC) Logical Link Control Services n Acknowledged Connectionless Service – Defines a service where successfully transferred data is acknowledged without the latency & overhead of connection management – Actually includes two related but independent services: a guaranteed delivery service (DL-DATA-ACK-request, indication, status) and a poll (DL-REPLY-request, indication, status-indication) with a guaranteed response n Guaranteed delivery service has three defined primitives – Two (request & indication) for data transmission & delivery – The final primitive (status indication) provides the acknowledgement – The service class parameter is really only useful with the 802.4 MAC specification (Token Bus) n Poll with guaranteed response uses two sets of primitives – Two primitives allow data to be passed to the LLC sublayer to be transmitted when requested by another station – Three primitives allow the actual transfer of the data

8 635.412 Spring 2005 Class 2: More Basics 8 Logical Link Control (LLC) Logical Link Control Protocols n Introduction to LLC Protocols – The protocol specifications define the format of data frames and how these frames are transferred between LLC peers – LLC Types and Classes n Three types of operation are defined with LLC – Type 1 operation supports unacknowledged connectionless service – Type 2 operation supports connection-mode service – Type 3 operation supports acknowledged connectionless service n A station can support multiple types of operation, but at minimum a station must support Type 1 operation – This assures all stations have a lowest common denominator service for management operation

9 635.412 Spring 2005 Class 2: More Basics 9 Logical Link Control (LLC) Logical Link Control Protocol Data Units n LLC Protocol Data Unit Format – All three operational types use the same four-field format: n The DSAP field (8 bits): 7 bits contain the address and the last bit specifies whether it is an individual or group address n The SSAP field (8 bits): 7 bits contain the address and the last bit specifies whether it is a command or response PDU n The control field specifies PDU type along with control functions – This field can be either 8 or 16 bits long – PDUs can be commands, responses, or both – In the context of the IEEE 802 LLC specification, a PDU is a command if a response if expected (whether solicited or unsolicited) – The P/F (Poll/Final) bit in a command PDU specifies whether a response is required – in a response it is set if the PDU was sent in response to a command n And of course, the information field containing the payload!

10 635.412 Spring 2005 Class 2: More Basics 10 Logical Link Control (LLC) Logical Link Control Protocol Data Units n The Control field format is different for each of the three types of PDUs: Information, Unnumbered, & Supervisory – Information PDUs carry user data with sequence & acknowledgement numbers – Supervisory PDUs provide error and flow control; three are currently defined (RR, RNR, and REJ) – Unnumbered PDUs provide various control functions like connection setup

11 635.412 Spring 2005 Class 2: More Basics 11 Logical Link Control (LLC) Logical Link Control Protocol Operation n The LLC protocol has three different operational modes, each supporting one of the LLC services n Type 1 Operation – Provides the unacknowledged connectionless service – The UI (Unnumbered Information) PDU is used to carry user data – There is error detection and discard at the MAC sublayer, but no acknowledgement, error control, or flow control – Two management PDUs are supported: XID and TEST n The XID is used to allow the LLC peers to exchange window size and the types of operation each peer supports (allows negotiation of Type 2/3 operation if supported by both ends) n The TEST PDU is used for loopback testing; in response to a TEST PDU the receiver should issue a TEST PDU to the sender ASAP

12 635.412 Spring 2005 Class 2: More Basics 12 Logical Link Control (LLC) Logical Link Control Protocol Operation n Type 2 Operation – Provides the connection-mode service – Three phases are necessary for Type 2 Operation: connection establishment, data transfer, and connection teardown n Connection Establishment takes place when a LLC peer issues a SABM or SABME PDU to request a connection – The destination accepts the connection by returning a UA (Unnumbered acknowledgement) PDU or rejects it by returning a DM (Disconnected Mode) PDU – After a successful setup the connection is always uniquely referenced by the pair of SAPs n Data Transfer accomplished using I (Information) PDUs – I PDU contains sequence numbers for flow and error control; N(R) contains sequence number of next PDU expected

13 635.412 Spring 2005 Class 2: More Basics 13 Logical Link Control (LLC) Logical Link Control Protocol Operation n Type 2 Operation (Continued) – Data transfer n S (Supervisory) PDUs used during data transfer for flow and error control when piggybacking is not possible – RR (Receiver Ready) carries acknowledgement & allows more user data – RNR (Receiver Not Ready) carries an acknowledgement but stops further data transfer – REJ initiates Go-Back-N ARQ n Connection reset is possible by basically going through connection establishment again for a particular DSAP/SSAP pair – Connection Teardown n LLC peer initiating disconnect sends DM (Disconnected Mode) PDU n Upon receipt of a DM PDU the other LLC peer transmits a UA PDU n No assumptions made about outstanding unacknowledged PDUs

14 635.412 Spring 2005 Class 2: More Basics 14 Logical Link Control (LLC) Logical Link Control Protocol Operation n Examples of Type 2 Operation [Figure 6.3]

15 635.412 Spring 2005 Class 2: More Basics 15 Logical Link Control (LLC) Logical Link Control Protocol Operation

16 635.412 Spring 2005 Class 2: More Basics 16 Logical Link Control (LLC) Logical Link Control Protocol Operation n Type 3 Operation – The AC (Acknowledged Connectionless) PDU is used to both send data and acknowledge its receipt n A one bit sequence number is used and one PDU can be outstanding at any time n For the acknowledged connectionless data service the UA does not contain data when it is used as an acknowledgement n For the polled service the AC response PDU contains data if some was waiting; otherwise it does not and signals a failure to successfully poll

17 635.412 Spring 2005 Class 2: More Basics 17 Logical Link Control (LLC) Appendix: Protocol Specification n Service Primitives and Parameters – To help in the design of communications reference models it is common to modularize the specification of the layers by separating it into two parts: n The services provided by a layer to its next higher layer n The protocol between peer entities on different systems – The services between adjacent layers in the reference model are defined in terms of service primitives and their associated parameters – Four basic primitives are defined in the standards: request, indication, response, and confirm n In a confirmed service all four primitives are used n In an unconfirmed service only the request and indication primitives are used

18 635.412 Spring 2005 Class 2: More Basics 18 Logical Link Control (LLC) Appendix: Flow Control Mechanisms n Flow Control – Flow control is a process for assuring that a transmitting station does not overwhelm a receiving (or maybe intermediate) station with data – Link-to-link versus end-to-end flow control – Stop-and-Wait Flow Control n The simplest form of flow control; only one PDU can be outstanding (not acknowledged) at an instant in time n The destination can stop the flow of data by withholding the acknowledgement n The beauty of this flow control technique is the simplicity of its implementation n This technique can be very inefficient for most packet data applications (on links where the bit length is much longer than the PDU length the link will be idle most of the time)

19 635.412 Spring 2005 Class 2: More Basics 19 Logical Link Control (LLC) Appendix: Flow Control Model

20 635.412 Spring 2005 Class 2: More Basics 20 Logical Link Control (LLC) Appendix: Flow Control Mechanisms n Sliding-Window Flow Control – Allows multiple PDUs to be in transit simultaneously, improving link efficiency at the expense of system complexity – Sequence numbers are used, with the transmitter maintaining a list of sequence numbers it is allowed to send & the receiver tracking the sequence numbers it is prepared to receive – Windows must be maintained for each direction of communication – each station requires send and receive windows for each connection it is involved in – Piggybacking of acknowledgements is used to improve efficiency – A Receiver Not Ready (RNR) message allows the receiver to effectively close the window (reduce its size to zero) – The Receiver Ready (RR) is used to open the window again when necessary

21 635.412 Spring 2005 Class 2: More Basics 21 Logical Link Control (LLC) Appendix: Flow Control Mechanisms n Examples of sliding window operation

22 635.412 Spring 2005 Class 2: More Basics 22 Sliding Window Operation

23 635.412 Spring 2005 Class 2: More Basics 23 Logical Link Control (LLC) Appendix: Error Control Mechanisms n Error Control – Error control in the context of the data link layer refers to mechanisms for detecting & correcting errors in the transmission of PDUs – Errors manifest themselves in two ways: lost or damaged PDUs – Error control at the data link layer is commonly implemented through a mechanism called Automatic Repeat Request (ARQ) n Effectively turns an unreliable link into a reliable one n Based on the flow control functions outlined in Appendix 6B n Includes the following functions: – Error detection – Positive acknowledgement – Retransmission after timeout – Negative acknowledgement and retransmission – Another way of handling errors is Forward Error Correction

24 635.412 Spring 2005 Class 2: More Basics 24 Logical Link Control (LLC) Appendix: Error Control Mechanisms n Stop-and-Wait ARQ – Based on stop-and-wait flow control; used in the LLC standard for acknowledged connectionless service – The source uses a retransmission timer and will transmit the PDU if an acknowledgement is not received before the timer expires – Sequence numbers must be used to distinguish multiple copies of the same PDU; this can happen if an ACK is damaged – Example of operation [Figure 6.9]

25 635.412 Spring 2005 Class 2: More Basics 25 Logical Link Control (LLC) Appendix: Error Control Mechanisms n Go-Back-N ARQ – Not as simple as stop-and-wait but more bandwidth efficient – Based on sliding window flow control; used in the LLC standard for connection-mode service – The receiver will discard a damaged PDU & all future incoming PDUs until a correct copy is received (hence the name) – Acknowledgements are cumulative; covering all previously received PDUs – Like stop-and-wait a retransmission timer and sequence numbers are necessary for this mechanism – This technique must account for the following situations: n Damaged data PDU n Damaged RR PDU n Damaged REJ PDU

26 635.412 Spring 2005 Class 2: More Basics 26 Logical Link Control (LLC) Appendix: Error Control Mechanisms n Go-Back-N ARQ Example of Operation [Figure 6.10]

27 635.412 Spring 2005 Class 2: More Basics 27 Performance of Stop & Wait ARQ n Time to send a frame and get back an Acknowledgement: Tf = Tprop + Ttrans(f) + Tproc + Tprop + Ttrans(ack) n Where Tprop = Distance/Velocity = D/V. This is the propagation time from the sender to the receiver n Tproc = processing delay of the frame at the receiver. Should be quite small with today's micro processors n Then equation 1 simplifies to: Tf = 2Tprop + Ttrans(f) n Link utilisation, U, is thus: U = Ttrans(f)/(2Tprop + Ttrans(f)) n Let a = Tprop/Ttrans(f). “a” is an important parameter to the bandwidth*delay product a = (D/V)/(L/R) = R*D/V*L n Then, U = 1/(1 + 2a). For a stop and wait protocol n How do we modify the formula for U when we have bidirectional data flow?

28 635.412 Spring 2005 Class 2: More Basics 28 Link Utilization for Stop-and-Wait ARQ n Assuming error-free stop-and-wait ARQ: T ≈ T frame + 2T prop Transmission throughput = 1/T = 1/(T frame + 2T prop ) frames/sec n The link data rate = 1/T frame frames/sec n Thus, the link utilization is given as: Where d = distance between stations and V = velocity of signal propagation L = length of frame in bits and R = data rate on link in bits per sec n Bit length of the link ::= Rd/V n Ratio of link bit length to the length of frame ::= n If T prop large relative to T frame  throughput reduced – Propagation delay is long relative to transmission time – Link is mostly idle  low utilization  inefficient n Problem is that only one frame is in transit at a time n Stop-and-Wait rarely used because of inefficiency

29 635.412 Spring 2005 Class 2: More Basics 29

30 635.412 Spring 2005 Class 2: More Basics 30 ARQ protocol Utilization

31 635.412 Spring 2005 Class 2: More Basics 31 ARQ protocol Utilization Example: Window Size < 2a + 1

32 635.412 Spring 2005 Class 2: More Basics 32 ARQ protocol Utilization Example: Window Size > 2a + 1

33 635.412 Spring 2005 Class 2: More Basics 33

34 635.412 Spring 2005 Class 2: More Basics 34

35 635.412 Spring 2005 Class 2: More Basics 35

36 635.412 Spring 2005 Class 2: More Basics 36

37 635.412 Spring 2005 Class 2: More Basics 37

38 635.412 Spring 2005 Class 2: More Basics 38 ARQ Link Utilization (p=10 -3 ) Source: Communication Networks by Leon-Garcia 1998

39 635.412 Spring 2005 Class 2: More Basics 39 ARQ Protocol Throughput (p=10 -3 ) Source: Communication Networks by Leon-Garcia 1998

40 635.412 Spring 2005 Class 2: More Basics 40 Transmission efficiency bits for header & CRC Effect of frame overhead Effect of ACK frame Effect of Delay-Bandwidth Product Effective transmission rate: Transmission efficiency:

41 635.412 Spring 2005 Class 2: More Basics 41 ARQ Protocol Transmission Efficiencies Source: Communication Networks by Leon-Garcia 1998


Download ppt "635.412 Class #2 1 Chapter 6 – Logical Link Control (LLC)"

Similar presentations


Ads by Google