Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Wireless and Mobile Networks (ELEC6219) Session 2: Data Communication Fundamentals 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 : – …discuss the need for layered models for network architecture – …be able to compare and contrast two layered models – …explain how data can be encoded and consider how errors can be detected or corrected – … identify key theories of data communications 2 Review Talking point • Together – Discuss the need for layered models for network architecture – Compare and contrast two layered models – (ISO OSI is DEAD! – why do we study it then?) https://secure.ecs.soton.ac.uk/noteswiki/w/ELEC6113-1213 4 Talking point • Together, – Discuss the need for layered models for network architecture p.26-30 (T. 4ed) p.51-55 (T. 5ed) – Compare and contrast two layered models p.44-46 (T. 4ed) p.71-73 (T. 5ed) – (ISO OSI is DEAD! – why do we study it then?) p.46-49 (T. 4ed) p.73-76 (T. 5ed) 5 Protocols Protocol Layers p.26-30 (T. 4ed) p.51-55 (T. 5ed) • Protocol layering is the main structuring method used to divide up network functionality. • Each protocol instance talks virtually to its peer • Each layer communicates only by using the one below • Lower layer services are accessed by an interface • At bottom, messages are carried by the medium 7 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Protocol Layers (II) • Example: the philosopher-translatorsecretary architecture • Each protocol at different layers serves a different purpose p.29 (T. 4ed) p.54 (T. 5ed) 8 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Protocol Layers (III) • Each lower layer adds its own header (with control information) to the message to transmit, and removes it on reception of it p.29-30 (T. 4e) p.54-55 (T. 5e) 9 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Protocol Layers (IV) • Each lower layer adds its own header (with control information) to the message to transmit, and removes it on reception of it p.29-30 (T. 4e) p.54-55 (T. 5e) 10 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Protocol Layers (IV) • Each lower layer adds its own header (with control information) to the message to transmit, and removes it on reception of it p.29-30 (T. 4e) p.54-55 (T. 5e) 11 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Data Encoding Data Communications Fundamentals • We wish to communicate from A to B. – How? A B – By courier (e.g. magnetic media), optically (light and fiber optics), electrically, electromagnetic waves, radio, microwaves, satellite… many alternatives! p.91 (Tanenbaum 4th ed) p.116 (Tanenbaum 5th ed) 13 How? • Electrical options: – vary the voltage (the most important mechanism) – vary the current (sometimes used in ‘noisy’ environments) – vary the frequency (e.g. dial-up modems) – vary the phase • EM wave options: – open space “wireless” • … many alternatives! 14 Data Communications Fundamentals • Let’s consider the electrical options A B – Consider a point-to-point electrical connection between A and B – Usually only one wire is used to carry data – there is always a return path 15 Data Communications Fundamentals • THIS IS SERIAL DATA TRANSMISSION A B – Consider a point-to-point electrical connection between A and B – Usually only one wire is used to carry data – there is always a return path 16 Case study: RS-232-C • This is a very simple protocol used to transfer a single character (8 bits) between computers or between a computer terminal and a computer. • It was supposed to be obsolete in the early 1970's, but it is only now fading into obsolescence. • Until very recently every computer every made would always contain at least one RS-232-C interface (modern laptops often do not provide the facility). 17 Data encoding • Many alternatives to encode/decode Data voltage data • NRZ (Non-Return-to-Zero) – Used widely, particularly in the RS-232-C interface – the simplest encoding possible – Data ‘0’: negative voltage – Data ‘1’: positive voltage p.145-150 (5e) – note that in some literature this is NO voltage. True for fibre optics, where light=1, no light=0. 18 Talking Point • NRZ – Problems? 19 Talking Point • NRZ – Problems? – How are the receiver sampling times synchronized with the bit timing used for encoding at the transmitter? 20 Talking Point • NRZ – Problems? – How are the receiver sampling times synchronized with the bit timing used for encoding at the transmitter? • RS-232-C uses a very simple mechanism: all communication starts with a ‘1' (known as a ‘start bit’- the idle state is a ‘0'). Per byte, 10 bits are transmitted. • Both Tx and Rx know the expected sampling speed (it must be arranged previously), hence the Rx can sample at the correct time. However in practice there will be a skew, so a +/- 5% tolerance between the two clocks is required. 21 Talking Point • NRZ – Problems? – How are the receiver sampling times synchronized with the bit timing used for encoding at the transmitter? – How could we use NRZ to send a data message longer than 8 bits? 22 A Better Alternative • Manchester coding – Phase encoding, allows clock recovery • Data ‘0’: voltage changes from low to high • Data ‘1’: voltage changes from high to low – Guaranteed transition at the middle of every bit period – Disadvantage? 23 Other Alternatives • Manchester coding – Phase encoding, allows clock recovery • Data ‘0’: voltage changes from low to high • Data ‘1’: voltage changes from high to low – Guaranteed transition at the middle of every bit period – Disadvantage? 24 Other Alternatives • NRZ Inverted – Similar to NRZ – Data ‘0’: no transition – Data ‘1’: transition – Disadvantage? • 4B/5B – 4 bits encoded in 5 transition bits such that patterns with no/few transition bits are avoided – Disadvantage? p.285 (4e) p.310 (5e) 25 Talking Point • We want reliable communication… what do we do about data errors? 26 Talking Point • We want reliable communication… what do we do about data errors? – Unavoidable – Error detection is always an overhead – Reduces bandwidth available for data – Error correction can be used – … but retransmitting on errors is often just fine! 27 Key Data Transmission Theories Shannon Data Capacity • Maximum bitrate = H log2 (1 + S/N) bits per second where – H is bandwidth in Hz – S is the total signal power in watts – N is the total noise power in watts • Therefore, a noiseless channel would have an unbounded data capacity! • In practice, there is always some noise 29 Shannon Data Capacity • Maximum bitrate = H log2 (1 + S/N) bits per second where – H is bandwidth in Hz – S is the total signal power in watts – N is the total noise power in watts power = f(voltage)2 • Therefore, a noiseless channel would have an unbounded data capacity! • In practice, there is always some noise 30 Nyquist limit • maximum bitrate = 2H log2 V bits per second where: ‘V’ is the number of discrete levels used for encoding – If received data is bandwidth limited to H Hz (i.e. data channel has this bandwidth), the filtered signal can be reconstructed using only 2H samples per second. – (Faster sampling is pointless: all higher frequency components have already been filtered out.) 31 Checking Learning Outcomes • At the end of this lecture (and related activities), students should be able to : – …discuss the need for layered models for network architecture – …be able to compare and contrast two layered models …explain how data can be encoded and consider how errors can be detected or corrected – … identify key theories of data communications 32