Presentation is loading. Please wait.

Presentation is loading. Please wait.

Wireless and Mobile Networks (ELEC6219) Session 3: Theories of Data Communications. Data Link Layer. Adriana Wilde and Jeff Reeve 22 January 2015.

Similar presentations


Presentation on theme: "Wireless and Mobile Networks (ELEC6219) Session 3: Theories of Data Communications. Data Link Layer. Adriana Wilde and Jeff Reeve 22 January 2015."— Presentation transcript:

1 Wireless and Mobile Networks (ELEC6219) Session 3: Theories of Data Communications. Data Link Layer. 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 and compare several data encoding techniques –… 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 How well do you think you can compare data encoding techniques? 4 1.Very well! 2.Quite well 3.Not very well 4.Help!

5 5 Review data encoding NRZ – Data ‘0’: negative voltage – Data ‘1’: positive voltage Manchester coding (original convention) – Data ‘0’: negative voltage changes from low to high – Data ‘1’: positive voltage changes from high to low NRZ-I – Data ‘0’: no transition – Data ‘1’: transition 4B/5B – 4 bits encoded in 5 transition bits (feedback from questions at the end of last lecture)

6 6 Review data encoding NRZ – Data ‘0’: negative voltage – Data ‘1’: positive voltage Manchester coding (original convention) – Data ‘0’: negative voltage changes from low to high – Data ‘1’: positive voltage changes from high to low NRZ-I – Data ‘0’: no transition – Data ‘1’: transition 4B/5B – 4 bits encoded in 5 transition bits (feedback from questions at the end of last lecture)

7 7 Review data encoding (feedback from questions at the end of last lecture) CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall, 2011 p.275 (T. 4ed) p.146 (T. 5ed)

8 Talking point 8 Assuming NRZ-I encoding was used for the waveform below, what is the original bit sequence? A.10001011 B.01110100 C.11001110 D.00110011 E.None of the above

9 Talking point 9 Assuming Manchester encoding was used for the waveform below, what is the original bit sequence? A.11001110 B.00110001 C.1010010110101001 D.0101101001010110 E.None of the above

10 Are you now able to compare data encoding techniques? 10 1.Yes, very well! 2.Quite well 3.Not very well 4.Help!

11 Data Link Layer

12 12 Data Link Layer What is the data link layer for? What does it offer? What does it require? p.26-30 (T. 4ed) p.51-55 (T. 5ed) CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

13 13 Services offered by the Data Link Layer What is the data link layer for? What does it offer? What does it require? p.184 -187 (T. 4ed) pp.214-216 (T. 5ed)

14 14 Services offered by the Data Link Layer What is the data link layer for? What does it offer? What does it require? –This layer transforms a raw transmission facility into a line “free of errors” to the next layer –To achieve that, it makes the sender break up the data into sequential frames, which are acknowledged by the receiver –By doing so, it regulates the flow of data so that slow receivers are not swamped by fast senders p.184 -187 (T. 4ed) pp.214-216 (T. 5ed)

15 15 Services offered by the Data Link Layer They can vary from protocol to protocol There are 3 possibilities: –Unacknowledged connectionless service –Acknowledged connectionless service –Acknowledged connection-oriented service pp.185-186 (T. 4ed) pp.215-216 (T. 5ed)

16 16 Services offered by the Data Link Layer They can vary from protocol to protocol There are 3 possibilities: –Unacknowledged connectionless service (Appropriate when the error rate is very low, e.g. Ethernet) –Acknowledged connectionless service (Next step in reliability, e.g. 802.11 (WiFi) –Acknowledged connection-oriented service (Appropriate over long, unreliable links, e.g. satellite channels or long distance telephone circuit) pp.185-186 (T. 4ed) pp.215-216 (T. 5ed)

17 17 Framing Breaks up the bit stream (the payload) into discrete frames and adds control information There are 4 methods: –Byte count –Flag bytes with byte stuffing –Flag bits with bit stuffing –Physical layer coding violations pp.187-191 (T. 4ed) pp.217-220 (T. 5ed)

18 18 Framing Breaks up the bit stream (the payload) into discrete frames and adds control information There are 4 methods: –Byte count –Flag bytes with byte stuffing –Flag bits with bit stuffing –Physical layer coding violations (e.g. using “unassigned” codes from the 4B/5B encoding for frame delimiters) p.191 (T. 4ed) p. 220 (T. 5ed)

19 Frame begins with a count of the number of bytes in it –Simple, but difficult to resynchronize after an error Framing – Byte count 19 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall, 2011 pp.188-189 (T. 4ed) pp.217-218 (T. 5ed)

20 Special flag bytes delimit frames; occurrences of flags in the data must be stuffed (escaped) – Longer, but easy to resynchronize after error Framing – Byte stuffing 20 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall, 2011 pp.188-189 (T. 4ed) pp.217-218 (T. 5ed)

21 Special flag bytes delimit frames; occurrences of flags in the data must be stuffed (escaped) – Longer, but easy to resynchronize after error Framing – Byte stuffing 21 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall, 2011 pp.188-189 (T. 4ed) pp.217-218 (T. 5ed)

22 Stuffing is done at the bit level: –Frame flag has six consecutive 1s (not shown) –On transmit, after five 1s in the data, a 0 is stuffed On receive, a 0 after five 1s is deleted Side effect (as in byte stuffing) is that the size of the frame depends on the data being sent! Framing – Bit stuffing 22 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall, 2011 pp.188-189 (T. 4ed) pp.217-218 (T. 5ed) Transmitted bits with stuffing Data bits

23 Standards: A case study “The nice thing about standards is that you have so many to choose from. Furthermore, if you do not like any of them, you can just wait for next year's model” Andrew S. Tanenbaum pp.235 (T. 4ed)

24 24 Case Study: HDLC High-Level Data Link Control –Precursor of the PPP - Point-to-Point Protocol –Originally an IBM protocol: SDLC (Synchronous Data Link Control) –Consider the frame overhead and the efficiency in the HDLC pp.234-237 HDLC / pp.238-242 PPP (T.4e) pp.219 HDLC / pp.266-267 PPP (T.5e)

25 25 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

26 26 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

27 27 Talking point What if the flag byte occurs within the payload? pp.190 (T. 4ed) pp.219 (T. 5ed)

28 28 (Bit stuffing!) If the flag byte occurs within the payload: –When there are 5 consecutive “1” bits in the data, a “0” is stuffed automatically –When the receiver sees 5 consecutive incoming “1” bits : If followed by “0”, this is removed (it was data) If followed by “1”, this must be a flag byte! pp.190 (T. 4ed) pp.219 (T. 5ed)

29 29 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

30 30 Checking Learning Outcomes At the end of this lecture (and related activities), students should be able to : –… apply and compare several data encoding techniques –… 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


Download ppt "Wireless and Mobile Networks (ELEC6219) Session 3: Theories of Data Communications. Data Link Layer. Adriana Wilde and Jeff Reeve 22 January 2015."

Similar presentations


Ads by Google