Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 11 Data Link Control (DLC) Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Similar presentations


Presentation on theme: "Chapter 11 Data Link Control (DLC) Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display."— Presentation transcript:

1 Chapter 11 Data Link Control (DLC) Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

2 Chapter 11: Outline 111.1 DLC SERVICES 111.1 DLC SERVICES 111.2 DATA-LINK LAYER PROTOCOLS 111.2 DATA-LINK LAYER PROTOCOLS 111.3 HDLC 111.3 HDLC 111.4 PPP 111.4 PPP

3 11.3 11-1 DLC SERVICES The data link control (DLC) deals with procedures for communication between two adjacent nodes.

4 11.4 11-1 DLC SERVICES Data link control functions include ● Framing, ● Flow control, and ● Error control

5 11.5 11.1 Framing (encapsulation) The data-link layer packs bits into frames so that each frame is distinguishable from another frame..

6 11.6 11.1 Framing The postal system practices a type of framing. The simple act of inserting a letter into an envelope separates one piece of information from another; the envelope serves as the delimiter.

7 11.7 11.1 Framing Framing in the data-link layer separates a message by encapsulating a sender address and a destination address into a header.

8 11.8 11.1 Framing Framing in the data-link layer separates a message by encapsulating a sender address and a destination address into a header.

9 11.9 11.1 Framing Framing techniques include ● Character oriented framing (8 bit characters) ● Bit oriented framing

10 11.10 11.1 Framing Frames may have a particular bit pattern between frames to help identify the start and end of a frame. This kind of special bit pattern is referred to as a “flag”

11 11.11 Figure 11.1: A frame in a character-oriented protocol

12 11.12 11.1 Framing Problem: the flag bit pattern could appear in the data portion of the frame. The problem is solved by stuffing (inserting) a special byte pattern known as an Escape-character into the data.

13 11.13 Figure 11.2: Byte stuffing and unstuffing

14 11.14 Figure 11.3: A frame in a bit-oriented protocol

15 Bit Stuffing Bit oriented frames face the same issue as byte-oriented frames – the flag pattern can appear in the data. This is resolved by bit stuffing.

16 Bit Stuffing A zero bit is inserted after 5-consecutive one-bits.

17 11.17 Figure 111.4: Bit stuffing and unstuffing

18 11.18 11.2 Flow and Error Control Flow control and error control were introduced in Chapter 9 The data-link layer handles flow control and error control.

19 11.19 Figure 111.5: Flow control at the data link layer

20 Example of flow control: ● A single memory slot is used to hold information for the receiver node at the data-link layer. ● When this single slot is empty, the data-link layer sends a request to the sender-node to send the next frame. Example 111.1 11.20

21 11.21 11-2 DATA-LINK LAYER PROTOCOLS Traditionally four protocols have been defined for the data-link layer to deal with flow and error control: 1.Simple, 2.Stop-and-Wait, 3.Go-Back-N, and 4.Selective-Repeat.

22 11.22 11-2 DATA-LINK LAYER PROTOCOLS 1. Simple 2.Stop-and-Wait The first two protocols are common at the data-link layer, the last two are no longer used.

23 11.23 Figure 11.6: (Optional slide) Finite State Machine Diagram

24 11.24 11.2.1 Simple Protocol Our first protocol is a simple protocol with neither flow nor error control. Assume that the receiver can immediately handle any frame it receives. (The receiver can never be overwhelmed with incoming frames. )

25 11.25 Figure 11.7: Simple protocol (no flow control)

26 11.26 Figure 11.8: Finite State Machine for the simple protocol (event, action)

27 Figure 11.9 shows an example of communication using the Simple Protocol. The sender sends frames one after another without even thinking about the receiver (no error or flow control). Example 11.2 11.27

28 11.28 Figure 11.9: Flow diagram for Example 111.2

29 11.29 111.2.2 Stop-and-Wait Protocol The Stop-and-Wait protocol uses both flow and error control. The sender sends one frame at a time and waits for an acknowledgment before sending the next one. Corrupted frames are detected with a CRC to each data frame.

30 11.30 Figure 11.10: Stop-and-wait Protocol

31 11.31 Figure 11.11: FSM for the stop-and-wait protocol (events & actions)

32 Figure 11.12 shows an example. The first frame is sent and acknowledged. The second frame is sent, but lost. After time-out, it is resent. The third frame is sent and acknowledged, but the acknowledgment is lost. The frame is resent. However, there is a problem with this scheme. The network layer at the receiver site receives two copies of the third packet, which is not right. In the next section, we will see how we can correct this problem using sequence numbers and acknowledgment numbers. Example 11.3 11.32

33 11.33 Figure 11.12: Flow diagram for Example 11.3

34 Figure 11.13 shows how adding sequence numbers and acknowledgment numbers can prevent duplicates. 1.The first frame is sent and acknowledged. 2.The second frame is sent, but lost. After time-out, it is resent. 3.The third frame is sent and acknowledged, but the acknowledgment is lost. The frame is resent. Example 11.4 11.34

35 11.35 Figure 11.13: Flow diagram for Example 11.4

36 11.3611.2.3 The simple & stop-n-wait protocols are designed for unidirectional half-duplex communication.

37 11.37 11.2.3 Piggybacking More efficient two way communication can be achieved by sending data back with each acknowledgment. This is called piggybacking.

38 11.38 11-3 High-level Data Link Control HDLC is a bit-oriented protocol for communication over point-to-point and multipoint links. HDLC implements the Stop-and-Wait protocol.

39 11.39 11-3 High-level Data Link Control HDLC is the basis for other practical protocols such as ● X.25 (old protocol) ● Some wireless protocols ● Frame relay (becoming rare)

40 11.40 11.3.1 Transfer Modes HDLC provides two common transfer modes that can be used in different configurations: ● normal response mode (NRM) and ● asynchronous balanced mode (ABM).

41 Normal Response Mode Almost never used The primary node has control of communication The secondary nodes must get approval from the primary mode before sending data.

42 11.42 Figure 11.14: Normal response mode (IBM X.25)

43 Asynchronous Balanced Mode Each node acts as a peer (both nodes can send and receive)

44 11.44 Figure 11.15: Asynchronous balanced mode (frame relay)

45 11.45 11.3.2 HDLC Framing HDLC defines three types of frames: 1. I-frames, information frames, 2. S-frames, supervisory frames, and 3. U-frames, unnumbered frames.

46 HDLC Frame Frames have up to 6 fields Stop, end flags Address Control (figure 11.17) Data The FCS section is the frame check sequence, used for error detetion.

47 11.47 Figure 11.16: Schematic of the HDLC frames

48 Control Field The control field is used for flow control and error control. P/F means either Pole or the frame is final.

49 11.49 Figure 11.17: Control field format for the different frame types

50 Figure 11.18 shows how U-frames can be used for connection establishment and connection release. Node A asks for a connection with a set asynchronous balanced mode (SABM) frame; node B gives a positive response with an unnumbered acknowledgment (UA) frame. After these two exchanges, data can be transferred between the two nodes (not shown in the figure). After data transfer, node A sends a DISC (disconnect) frame to release the connection; it is confirmed by node B responding with a UA (unnumbered acknowledgment). Example 11.5 11.50

51 11.51 Figure 111.18: Example of connection and disconnection

52 Figure 11.19 shows two exchanges using piggybacking. The first is the case where no error has occurred; the second is the case where an error has occurred and some frames are discarded. Example 11.6 11.52

53 11.53 Figure 111.19: Example of piggybacking with and without error

54 11.54 11-4 PPP A common protocol for point-to-point access is the Point-to-Point Protocol (PPP).

55 11.55 11-4 PPP Many broadband Internet users use PPP, DSL is an example.

56 11.56 111.4.1 Services The designers of PPP have included several services to make it suitable for various applications

57 11.57 111.4.2 Framing PPP uses a character-oriented (or byte-oriented) frame. Figure 111.20 shows the format of a PPP frame.

58 11.58 Figure 111.20: PPP frame format

59 11.59 11.4.3 PPP Payload field has a default maximum of 1500 bytes.

60 11.60 111.4.3 Transition Phases A PPP connection goes through phases which can be shown in a transition phase diagram (see Figure 111.21).

61 11.61 Figure 111.21: Transition phases

62 11.62 111.4.4 Multiplexing Although PPP is a link-layer protocol, it uses another set of protocols to establish the link, authenticate the parties involved, and carry the network-layer data.

63 11.63 111.4.4 Multiplexing Three sets of protocols are defined to make PPP powerful: 1.the Link Control Protocol (LCP), 2.two Authentication Protocols (APs), and 3.several Network Control Protocols (NCPs). Skip to last slide

64 11.64 Figure 111.22: Multiplexing in PPP

65 11.65 Figure 111.23: LCP packet encapsulated in a frame

66 Table 111.1 : LCP Packets 11.66

67 Table 111.2 : Common options 11.67

68 11.68 Figure 111.24: PAP packets encapsulated in a PPP frame

69 11.69 Figure 111.25: CHAP packets encapsulated in a PPP frame

70 11.70 Figure 111.26: IPCP packet encapsulated in PPP frame

71 Table 111.3 : Code values for IPCP Packets 11.71

72 11.72 Figure 111.27: IP datagram encapsulated in a PPP frame

73 11.73 Figure 111.28: Multilink PPP

74 Let us go through the phases followed by a network layer packet as it is transmitted through a PPP connection. Figure 111.29 shows the steps. For simplicity, we assume unidirectional movement of data from the user site to the system site (such as sending an e-mail through an ISP). Example 111.7 11.74

75 11.75 Figure 111.29: An example


Download ppt "Chapter 11 Data Link Control (DLC) Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display."

Similar presentations


Ads by Google