Wireless and Mobile Networks (ELEC6219) Session 4: Efficiency of a link. Data Link Protocols. Adriana Wilde and Jeff Reeve 22 January 2015 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 2 Review 2nd 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 4 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 ) Shannon’s capacity of a communication link: C=H log (1+S/N) 2 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? 58% 1. 12.5 Mbps 2. 46.875 MHz 3. 133.33 MHz 4. 37.5 Mbps 5. None of the above 21% 9% 9% 3% 1 2 3 4 5 6 How confident are you on your answer being correct? 1. Very confident! 2. Quite confident, not sure about one thing or two 3. Not very confident (I guess it is OK?) 4. Help! 43% 27% 17% 13% 1 2 3 4 7 How good was your answer? 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! 57% 19% 19% 5% 1 2 3 4 8 Efficiency of a Link (Case study HDLC) 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) 8 8 8 … 16/32 8 Variable length 10 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 8 8 8 … 16/32 8 Variable length 11 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) 8 8 8 … 16 8 Variable length (N) 12 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% 8 8 8 8 16 8 13 Talking point: Sending 1024 bytes per frame • What is the efficiency of the transmission in this case? N 14 Talking point: Sending 1024 bytes per frame • Frame overhead= 1+1+1+2+1=6 bytes • Therefore, Efficiency = 1024 / (6 + 1024) = 99.4% 1 1 1 1024 1 1 GOOD! So, go for a longer frame, for even higher efficiency? 15 Design considerations: Frame size • 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. 16 HDLC frames (the other fields) What about the other fields? • FCS - Frame check sequence – 16 bit CRC-CCITT (Cyclic Redundancy Check) based on the polynomial x16 + x12 + x5 + 1 – 32 bit based on the polynomial x32+ x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7 + x5 + x4 + x2 + x + 1 – Complex algorithm but hardware implementation with shift registers allow for quick, “on the fly”, calculation pp.196-200 (T. 4ed) pp.219-235 (T. 5ed) 18 Frame Check Sequence (FCS) Even a 16-bit CRC will detect all burst errors up to this length, with only a 1/216 probability for a corrupted frame at the receiver to have the same CRC as calculated at the transmitter! pp.196-200 (T. 4ed) pp.219-235 (T. 5ed) 19 Frame Check Sequence (FCS) Even a 16-bit CRC will detect all burst errors up to this length, with only a 1/216 probability for a corrupted frame at the receiver to have the same CRC as calculated at the transmitter! (99.998% confidence) pp.196-200 (T. 4ed) pp.219-235 (T. 5ed) 20 What about the other fields? • 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). 21 Talking point • WHEN IS A RETRANSMISSION NECESSARY? 22 HDLC frames (the other fields) Let’s first consider normal operation… Consider a bi-directional* link: time 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 Tx Rx 1 2 3 4 * most HDLC links are bi-directional, to enable the receiver (Rx) to acknowledge successful 24 reception of a frame sent by the transmitter (Tx) What happens if a frame is lost? No problem! time Tx Rx The transmitter does not wait “forever” TIMEOUT for an ACK There is a TIMEOUT … after which the frame is retransmitted 25 Also works if the acknowledgment is lost! time Tx Rx The transmitter does not wait “forever” TIMEOUT for an ACK There is a TIMEOUT … after which the frame is retransmitted WE NOW HAVE ANOTHER PROBLEM! Ideas? 26 The problem now (and solution?) We now need to detect that the second frame is a duplicate and discard it. time Tx Rx TIMEOUT 27 The problem now (and solution!) We now need to detect that the second frame is a duplicate and discard it. time Tx Rx TIMEOUT Use a sequence number! 28 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 29 Sequence numbers Note the convention: the ACK number gives the NEXT frame to send 30 Talking point • How long should the timeout be? • Ideas? 31 Design consideration: Timeout • The goldilocks solution! (Neither too short nor too long) 32 Design consideration: Timeout • The goldilocks solution! (Neither too short nor too long) • Too short – inefficient as frames are unnecessarily retransmitte • Too long – inefficient when frame lost 33 What now? • This scheme can be improved in various ways. • Several frames could be sent simultaneously but then there is m in the control. 34 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 35
© Copyright 2026 Paperzz