Presentation is loading. Please wait.

Presentation is loading. Please wait.

Wireless and Mobile Networks (ELEC6219) Session 4: Efficiency of a link. Data Link Protocols. Adriana Wilde and Jeff Reeve 22 January 2015.

Similar presentations


Presentation on theme: "Wireless and Mobile Networks (ELEC6219) Session 4: Efficiency of a link. Data Link Protocols. Adriana Wilde and Jeff Reeve 22 January 2015."— Presentation transcript:

1 Wireless and Mobile Networks (ELEC6219) Session 4: Efficiency of a link. Data Link Protocols. Adriana Wilde and Jeff Reeve 22 January 2015

2 2 Plan for this lecture At the end of this lecture (and related activities), students should be able to : –… apply a key theory of data communications (while planning a strategy for answering exam papers) –… consider design issues to ensure reliable delivery over an unreliable link –… reason why the data link layer adds control information as an overhead in the transmission

3 Review

4 4 2 nd review data encoding (feedback from questions at the end of last lecture) 4B/5B (4 bits encoded in 5 transition bits) These codewords are then coded using NRZ-I

5 Talking point Solve and discuss solution to Q2a from the past paper shown in OHP. –As a 7 marks’ question in a 75 marks’ exam paper, you shouldn’t spend more than 10 mins in it. –Do this in pairs (not in exam conditions )

6 Shannon’s capacity of a communication link: C=H log 2 (1+S/N) 6 A wireless link with carrier frequency 400MHz has S/N=7 and uses a modulation scheme that transmits 3 bits in 32 cycles. What is the minimum bandwidth required for the link to operate successfully? 1.12.5 Mbps 2.46.875 MHz 3.133.33 MHz 4.37.5 Mbps 5.None of the above

7 How confident are you on your answer being correct? 7 1.Very confident! 2.Quite confident, not sure about one thing or two 3.Not very confident (I guess it is OK?) 4.Help!

8 How good was your answer? 8 1.Very good! 2.Quite good, I need to be careful with a couple of things 3.Not very good 4.I had no idea!

9 Efficiency of a Link (Case study HDLC)

10 10 HDLC Frames Every frame is delimited at the start and end by the sequence 0x7E (01111110), the “flag byte” (N.B. both sequences are part of the frame) Variable length 888… 16/32 8

11 11 The payload The “Data” field is the “payload” –i.e. the information we intend to communicate to the other end of the point-to-point link All other information is discarded at the receiver Variable length 888… 16/32 8

12 12 Talking point: What size for N? Let's calculate the efficiency of the transmission in the following cases: –Sending one character per frame (N=8bits) –Sending a KB per frame (N=1024bytes) Variable length (N) 888… 16 8

13 13 Sending one character per frame (N=8 bits) Frame overhead= 8+8+8+16+8=48 bits So, if a single 8-bit character is sent per frame: Efficiency = 8 / (48 + 8) = 1/7= 14% 8888 16 8

14 14 Talking point: Sending 1024 bytes per frame What is the efficiency of the transmission in this case? N

15 15 Frame overhead= 1+1+1+2+1=6 bytes Therefore, Efficiency = 1024 / (6 + 1024) = 99.4% GOOD! So, go for a longer frame, for even higher efficiency? 111 1024 1 1 Talking point: Sending 1024 bytes per frame

16 16 Not necessarily… What if a frame must be retransmitted? So “frame size” is part of an overall system design –Depends on application –Depends on anticipated error rate –Depends on system requirements for high link utilization and time available for transmission In practice, frame sizes of 0.5KB to 4KB are typically used. GOOD! So, go for a longer frame, for even higher efficiency? Design considerations: Frame size

17 HDLC frames (the other fields)

18 18 FCS - Frame check sequence –16 bit CRC-CCITT (Cyclic Redundancy Check) based on the polynomial x 16 + x 12 + x 5 + 1 –32 bit based on the polynomial x 32 + x 26 + x 23 + x 22 + x 16 + x 12 + x 11 + x 10 + x 8 + x 7 + x 5 + x 4 + x 2 + x + 1 –Complex algorithm but hardware implementation with shift registers allow for quick, “on the fly”, calculation What about the other fields? pp.196-200 (T. 4ed) pp.219-235 (T. 5ed)

19 19 Even a 16-bit CRC will detect all burst errors up to this length, with only a 1/2 16 probability for a corrupted frame at the receiver to have the same CRC as calculated at the transmitter! Frame Check Sequence (FCS) pp.196-200 (T. 4ed) pp.219-235 (T. 5ed)

20 20 Even a 16-bit CRC will detect all burst errors up to this length, with only a 1/2 16 probability for a corrupted frame at the receiver to have the same CRC as calculated at the transmitter! (99.998% confidence) Frame Check Sequence (FCS) pp.196-200 (T. 4ed) pp.219-235 (T. 5ed)

21 21 Address and Control –An ‘address’ is only necessary when there are multiple receivers on the line – frequently HDLC is used for point-to-point links and this is then not required. –The ‘control’ information is used for sequence numbers and acknowledgements – this is the mechanism used for frame control (i.e. when a re-transmission is necessary). What about the other fields?

22 22 WHEN IS A RETRANSMISSION NECESSARY? Talking point

23 HDLC frames (the other fields)

24 24 Let’s first consider normal operation… Consider a bi-directional * link: 1.The transmitter will send a FRAME 2. … after a delay this will reach the receiver, which will process it 3. … and after a small delay (to process the frame) will send an acknowledgment (ACK) 4. … which after a delay will be received by the Tx TxRx time 1 3 4 2 * most HDLC links are bi-directional, to enable the receiver (Rx) to acknowledge successful reception of a frame sent by the transmitter (Tx)

25 25 What happens if a frame is lost? No problem! The transmitter does not wait “forever” for an ACK There is a TIMEOUT … after which the frame is retransmitted TxRx time TIMEOUT

26 26 Also works if the acknowledgment is lost! The transmitter does not wait “forever” for an ACK There is a TIMEOUT … after which the frame is retransmitted WE NOW HAVE ANOTHER PROBLEM!Ideas? TxRx time TIMEOUT

27 27 The problem now (and solution?) We now need to detect that the second frame is a duplicate and discard it. TxRx time TIMEOUT

28 28 The problem now (and solution!) We now need to detect that the second frame is a duplicate and discard it. Use a sequence number! TxRx time TIMEOUT

29 29 Sequence numbers For the “STOP-AND-WAIT” scheme, a one-bit sequence number is enough for FRAME and ACK Tx sends: FRAME '0' until ACK '1' is received, then FRAME '1' until ACK '0' is received, and so on What does Rx do? pp 206-211 (T.4e) pp 241-246 (T.5e) Note the convention: the ACK number gives the NEXT frame to send

30 30 Sequence numbers Note the convention: the ACK number gives the NEXT frame to send

31 Talking point How long should the time- out be? Ideas? 31

32 Design consideration: Timeout The goldilocks solution! (Neither too short nor too long) 32

33 Design consideration: Timeout The goldilocks solution! (Neither too short nor too long) Too short – inefficient as frames are unnecessarily retransmitted Too long – inefficient when frame lost 33

34 What now? This scheme can be improved in various ways. Several frames could be sent simultaneously but then there is more overhead in the control. 34

35 35 Checking Learning Outcomes At the end of this lecture (and related activities), students should be able to : –… apply and compare several data encoding techniques –… apply a key theory of data communications (while planning a strategy for answering exam papers) –… consider design issues to ensure reliable delivery over an unreliable link –… reason why the data link layer adds control information as an overhead in the transmission I'll see you on Wednesday at 9:00am in B54/5027


Download ppt "Wireless and Mobile Networks (ELEC6219) Session 4: Efficiency of a link. Data Link Protocols. Adriana Wilde and Jeff Reeve 22 January 2015."

Similar presentations


Ads by Google