Prof. Athirai Irissappane

Slides:



Advertisements
Similar presentations
CSCI-1680 Physical Layer Link Layer I Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
Advertisements

1 Chapter 2 Agenda Announcements / updates Gayle Laakman McDowell, 10/11, 4:30pm, UW2-005 GUIs / IDEs for remotely accessing uw1-320-lab Other references.
Lecture 3, 1Spring 2003, COM1337/3501CCN: Direct Link Networks Direct Link Networks Textbook: Computer Networks: A Systems Approach, L. Peterson, B. Davie,
Chapter 6 Errors, Error Detection, and Error Control
Spring 2002CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
Chapter 8 Data and Network Communication Technology
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
Fundamentals of Computer Networks ECE 478/578 Lecture #3: Encoding and Framing Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
1 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
Chapter 6: Errors, Error Detection, and Error Control
Spring 2004 EE4272 Direct Link Networks (I) Hardware Building Blocks (nodes & links) 5 Issues before Exchanging Packets  Encoding  Framing  Error Detection.
Network Data Organizational Communications and Technologies Prithvi N. Rao Carnegie Mellon University Web:
Spring 2003CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
CS 164: Slide Set 3: Chapter 2 Direct Link Networks.
Chapter 6 Errors, Error Detection, and Error Control
Chapter 8 COMMUNICATION AND COMPUTER NETWORK
Data Link Layer IS250 Spring 2010
18-Aug-154/598N: Computer Networks Overview Direct link networks –Error detection - Section 2.4 –Reliable transmission - Section 2.5.
CS 640: Introduction to Computer Networks Aditya Akella Lecture 5 - Encoding and Data Link Basics.
CSCI-1680 Physical Layer Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
CSE331: Introduction to Networks and Security Lecture 3 Fall 2002.
CSS CSS432 Point-to-Point Links Textbook Ch2.1.2 – 2.5 Professor: Munehiro Fukuda.
1 Data Link Layer Lecture 20 Imran Ahmed University of Management & Technology.
CHAPTER 2 HARDWARE BUILDING BLOCK ENCODING FRAMING ERROR DETECTION.
Lecture 6: Framing and Error Detection-Data Link Layer Functions
27-Oct-15Computer Networks1 Outline Chapter 2: Direct Link Networks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
Data and Computer Communications Chapter 6 – Digital Data Communications Techniques.
Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
Data Communications & Computer Networks, Second Edition1 Chapter 6 Errors, Error Detection, and Error Control.
1 CHAPTER 2 HARDWARE BUILDING BLOCK ENCODING FRAMING ERROR DETECTION.
Link Layer Dr. Mozafar Bag-Mohammadi Ilam University.
CSCI-1680 Physical Layer Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
Computer Networks Lecture 2: Data Link Based on slides from D. Choffnes Northeastern U. and P. Gill from StonyBrook University Revised Autumn 2015 by S.
Spring 2001CS 5851 Outline Building Blocks Shannon’s Theorem Encoding 11. Physical Layer.
9-Jan-164/598N: Computer Networks Overview Performance metrics - Section 1.5 Direct link networks –Hardware building blocks - Section 2.1 –Encoding - Section.
FUNDAMENTALS OF NETWORKING
Point-to-Point Links: Framing
Network Layer4-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction m sharing.
Serial Communications
CS4470 Computer Networking Protocols
Simple Parity Check The simplest form of error detection is the parity check used with ASCII codes, originally on asynchronous modem links Each 7 bit ASCII.
Getting Connected (Chapter 2 Part 1)
The University of Adelaide, School of Computer Science
Data Link Networks Hardware Building Blocks Nodes & Links CS380
Data Link Layer.
Advanced Computer Networks
CIS 321 Data Communications & Networking
CSCI-1680 Physical Layer Link Layer I
Introduction to electronic communication systems
Part III Datalink Layer 10.
CSS432 Point-to-Point Links Textbook Ch2.1 – 2.5
Link Layer and LANs Its not about how hard you hit... It's about how hard you can get hit and keep moving forward 5: DataLink Layer.
2. Getting connected (part 1)
Reliable transmission
Point-to-Point Links Outline Encoding Framing Error Detection
Ion Stoica September 6, 2001 EE 122: Lecture 4 Ion Stoica September 6, 2001.
Error Detection Neil Tang 9/26/2008
Data Communication.
Fundamentals of Computer Networks
Hardware Building Blocks
Switching, Packets, Frames, Parity, Checksums, and CRCs
communications system
Dr. Mozafar Bag-Mohammadi Ilam University
Home work project #1 Develop and fully debug your program on the Cushing 208 lab. Machines - planet lab machines may not have good development environment.
Data Link Layer: Overview; Error Detection
Error detection: Outline
EECS 122: EE122: Error Detection and Reliable Transmission
Data Link Layer. Position of the data-link layer.
Introduction Communication Modes Transmission Modes
Presentation transcript:

Prof. Athirai Irissappane CSS432 (Link Level Protocols) Point-to-Point Links Textbook Ch2.1 – 2.4 Prof. Athirai Irissappane http://courses.washington.edu/css432/athirai/ athirai@uw.edu CSS 432

Outline Link Level Protocols (Physical & Data Link) Issus Point-to-Point Links Multiple Access Links Wireless Links Issus Encoding, Framing, Error Detection Reliable transmission, Media Access Control CSS 432

Links Links Point-To-Point Links Wired Typically copper wire in some form (as in coaxial cable), Optical fiber (as in both commercial fiber-to-the home services and many long-distance links in the Internet’s backbone), or Wireless Air/free space (for wireless links) Point-To-Point Links CSS 432

Links Full-duplex versus Half-duplex Full Half at time t at time u In networking, the term ‘duplex’ signifies the ability for two points or devices to communicate with each other, as opposed to ‘simplex’ which refers to unidirectional communication Full-duplex communication between two components means that both can transmit and receive information between each other simultaneously. Telephones are full-duplex systems so both parties on the phone can talk and listen at the same time. In half-duplex systems, the transmission and reception of information must happen alternately. While one point is transmitting, the other must only receive. Walkie-talkie radio communication is a half-duplex system, this is characterised by saying “over” at the end of a transmission to signify that the party is ready to receive information Tranfer of info -> electromagnetic waves; v=flambda; v-> velo; f-frequency; lam-wavelength  em waves created by the vibration of an electric charge hence have frequency; synchronized oscillations of electric and magnetic fields that propagate at the speed of light through a vacuum Wavelength: dist bet pair of maxima, minima of wae Wired: Twisted pair: 4 pairs of twisted cables of copper wire; twisted to avoid em interference (shielded (less interference)/unshielded) Coaxial: single copper wire: more bandwidth and less interference Fiber optics: cable has optical fibers(glass) transferring light; information transferred by sending pulses of light No em interference; less loss Optical fiber: cylindrical guide with a core surrounded by cladding: light is transmitted through the core by total internal reflection Light should enter > than critical angle to be refected inside without leaking and thereby reaching destination: Mutimode: greater diameter; greater critical angle: multiple light modes (wave) to be propagated Modal dispersion: because the propagation velocity of the optical signal is not the same for all modes; as rays at different angles have different path lengths and therefore take different times to traverse the fiber Multi mode: short distance communication; multiple light modes to be propagated and limits the maximum length of a transmission link Led for light pulse; bandwidth low Single mode: laser for pulse; longer distance; larger bandwidth; costly A carrier system is a telecommunications system that transmits information; T-carrier is a member of the series of carrier systems developed by AT&T Bell Laboratories; DS1 is the primary digital telephone standard used in the United States and Japan and is able to transmit up to 24 multiplexed voice and data calls over telephone lines (physical/wireless/of) A Digital Signal 3 (DS3) is a digital signal level 3 T-carrier; This level of carrier can transport 28 DS1 level signals within its payload.(physical, wireless, optical) Sts-1: optical fibre; Optical Carrier transmission rates are a standardized set of specifications of transmission bandwidth for digital signals that can be carried on Synchronous Optical Networking (SONET) fiber optic networks. OC-1 is a SONET line with transmission speeds of up to 51.84 Mbit/s ; OC-3 is a network line with transmission data rate of up to 155.52 Mbit/s Data transfer method in which a continuous stream of data signals is accompanied by timing signals (generated by an electronic clock) to ensure that the transmitter and the receiver are in step (synchronized) with one another. The data is sent in blocks (called frames or packets) spaced by fixed time intervals. In contrast, asynchronous transmission works in spurts and must insert a start bit before each data character and a stop bit at its termination to inform the receiver where it begins and ends. Most network protocols (such as Ethernet, SONET, Token Ring) use synchronous transmission whereas asynchronous transmission is used commonly for communications over telephone lines. Read more: http://www.businessdictionary.com/definition/synchronous-transmission.html CSS 432

Links Electromagnetic waves propagate through a medium/free space Transmitters generate EM signals; Data is encoded in the signal CSS 432

Links Frequency Measured in hertz, rate with which the electromagnetic waves oscillate, number of cycles per unit time. Frequency on a copper cable range from 300Hz to 3300Hz; Bandwidth: width of frequency band (3300-300 = 3000 Hz) The number of crests that pass a given point within one second is described Distance between the adjacent pair of maxima or minima of a wave measured in meters is called wavelength Speed of light divided by frequency gives the wavelength. Wavelength for 300Hz wave through copper is (speed of light on a copper / frequency) 2/3 x 3 x 108 /300 = 667 x 103 meters. Modulation involves modifying the signals in terms of their frequency, amplitude, etc. CSS 432

Encoding Placing binary data on a signal is called encoding. Signals travel between signaling components; bits flow between adaptors Signals propagate over a physical medium modulate electromagnetic waves e.g., vary frequency, amplitude CSS 432

Encoding Encode binary data onto signals Consecutive 1s and 0s e.g., 0 as low signal and 1 as high signal known as Non-Return to zero (NRZ) Consecutive 1s and 0s Baseline wander: if the receiver averages signals to decide a threshold Clock recovery: both sides must be strictly synchronized Bits NRZ 1 CSS 432

Encoding Problem with NRZ Baseline wander The receiver keeps an average of the signals it has seen so far Receiver uses the average to distinguish between low and high signal When a signal is significantly low than the average, it is 0, else it is 1 Too many consecutive 0’s and 1’s cause this average to change, making it difficult to detect CSS 432

Encoding Problem with NRZ Clock recovery Both encoding, decoding is driven by a clock Clock is an internal signal that alternates from low to high, a low/high pair one clock cycle Every clock cycle, the sender transmits a bit and the receiver recovers a bit Sender and receiver must be synchronized Receiver re-synchronizes its clock when signal changes (clock recovery) Frequent transition from high to low or vice versa are necessary to enable clock recovery Clock cycle: low high pair of the clock CSS 432

Alternative Encodings Non-return to Zero Inverted (NRZI) Encode 1: make a transition from current signal Encode 0: stay at current signal to encode a zero solves the problem of consecutive 1s Signal flips every 1 is encountered. Manchester Transmit XOR of the NRZ encoded data and the clock Only 50% efficient. Used by Ethernet/Token Ring Ethernet /ˈiːθərnɛt/ is a family of computer networking technologies commonly used in local area networks (LANs) and metropolitan area networks (MANs) Token ring local area network (LAN) technology is a communications protocol for local area networks. It uses a special three-byte frame called a "token" that travels around a logical "ring" of workstations or servers. This token passing is a channel access method providing fair access for all stations, and eliminating the collisions of contention-based access methods. 1 CSS 432

Encoding Example Bits NRZ Clock Manchester NRZI 1 CSS 432

Alternative Encodings Problem with Manchester encoding Doubles the rate at which the signal transitions are made on the link Which means the receiver has half of the time to detect each pulse of the signal The rate at which the signal changes is called the link’s baud rate Bit rate is the no.of of data bits transmitted in one second; Here Bit rate is half the baud rate CSS 432

4B/5B Encoding Address inefficiency, repeated high/low signals Insert extra bits into bit stream so as to break up the long sequence of 0’s and 1’s Every 4-bits of actual data are encoded in a 5- bit code that is transmitted to the receiver 5-bit codes are selected in such a way that each one has no more than one leading 0(zero) and no more than two trailing 0’s. No pair of 5-bit codes results in more than three consecutive 0’s NRZI encoding for transmission (repeated 1’s) Achieves 80% efficient: bit rate = 80% (4/5*100) baud rate) CSS 432

Framing We are focusing on packet-switched networks, which means that blocks of data (called frames at this level), not bit streams, are exchanged between nodes. It is the network adaptor that enables the nodes to exchange frames. Bits Node A Adaptor Adaptor Node B Frame Bits flow between adaptors, frames between hosts CSS 432

Framing When node A wishes to transmit a frame to node B, it tells its adaptor to transmit a frame from the node’s memory. This results in a sequence of bits being sent over the link. The adaptor on node B then collects together the sequence of bits arriving on the link and deposits the corresponding frame in B’s memory. Recognizing exactly what set of bits constitute a frame—that is, determining where the frame begins and ends—is the central challenge faced by the adaptor CSS 432

Sentinel approach: PPP, HDLC Delineate frame (beginning sequence/end sequence) with special pattern: 01111110 problem: ending sequence appears in the payload/actual data solution: bit stuffing sender: insert 0 after five consecutive 1s receiver: delete 0 that follows five consecutive 1s Other classification: Byte Oriented (PPP), frames are collection of bytes Character stuffing instead of bit stuffing Bit Oriented (HDLC) frames are collection of bits Frame error Header Body 8 16 CRC Beginning sequence Ending BISYNC (Binary Synchronous Communication) Protocol PPP – Point-to=point : IP protocol DDCMP (Digital Data Communication Protocol) CRC – cyclic redundancy check HDLC – High level data link control CSS 432

Counter Based: DDCMP include payload length in header problem: count field corrupted (frame error) solution: Wait for the next beginning sequence Catch when CRC fails Frame error BISYNC (Binary Synchronous Communication) Protocol PPP – Point-to=point : IP protocol DDCMP (Digital Data Communication Protocol) CRC – cyclic redundancy check Accumulate bytes as count specifies: verify with CRC and detect framing error Wait till next beginning of sequence CSS 432

Error Detections Bit errors are introduced into frames Detecting Error Because of electrical interference and thermal noises Detecting Error Correction Error when the recipient detects an error Notify the sender that the message was corrupted, so the sender can send again. If the error is rare, then the retransmitted message will be error-free Using some error correct detection and correction algorithm, the receiver reconstructs the message CSS 432

Error Detections Add k bits of redundant data to an n-bit message want k << n (i.e. k is extremely small as compared to n) e.g., k = 32 and n = 12,000 (1500 bytes) in CRC-32 Extra bits are redundant They add no new information to the message Derived from the original message using some algorithm Both the sender and receiver know the algorithm Parity Bit Internet Checksum Algorithm Cyclic Redundancy Check CSS 432

Parity One dimensional Parity Two-dimensional parity 0101001 1 1101001 1011110 0001110 0110100 1011111 1111011 Parity bits byte Data One dimensional Parity adding one extra bit to a 7-bit code to balance the number of 1s in the byte. Odd parity: add 1 to get odd number of 1s in the byte Even parity: add 1 to get even number of 1s in the byte Two-dimensional parity similar calculation for each bit position across each of the bytes in the frame extra parity byte for the entire frame, in addition to a parity bit for each byte CSS 432

Internet Checksum Algorithm View message as a sequence of 16-bit integers; (00000000 00000101 00000000 00000011) Convert each 16-bit integer into a ones-complement arithmetic Sum up each integer Increment the result upon a carryout Example: 5: 0 00000000 00000101 3: 0 00000000 00000011 -5: 0 11111111 11111010 -3: 0 11111111 11111100 -5 + (-3): 1 11111111 11110110 w/ carry: 0 11111111 11110111 This corresponds to -8 Ones-complement arithmetic: a negative integer −x is represented as the complement of x; When adding numbers in ones complement arithmetic, a carryout from the most significant bit needs to be added to the result. Sender and receiver need to get the same checksum Count: number of 16bit integers Buf: their 1’s complement Int * p =&a (points to 1 value) Int* p = a (a is also a pointer; int[] as) 0x – hexa decimal integers U_short is 32 bits U_long 8 bytes: 64 bits (1111 1111 1111 1111) (1111 1111 1111 1111) : 32 bits (FFFF); F = 1111 1111 (1byte=8 bit)(lowest data handled by computer is byte) (0000 0000 0000 0000) (0000 0000 0000 0000): 32 bits (0000) FFFF0000 -> 32 bits of 1 and 32 bits of 0 Sum (32 bits) & (32bits of 1; 32 bits of 0) = 1 if sum has a carry bit Sum(32 bits) & (32 bits of 1) : get the sum bits Add 1; Return original number CSS 432

Cyclic Redundancy Check (CRC) Reduce the number of extra bits and maximize protection Represent n-bit message as n-1 degree polynomial e.g., MSG=10011010 as M(x) = x7 + x4 + x3 + x1 Let k be the degree of some divisor polynomial e.g., C(x) = x3 + x2 + 1 Create P(x) from M(x) such that P(x) % C(x) = 0 T(x) = M(x) * x^k ; P(x) = T(x) – T(x) % C(x) Transmit P(x); sender and receiver know C(x) If P(x) % C (x) =0 at receiver; no transmission error

Modulo 2 arithmetic Modulo 2   Modulo 2 multiplication is no different than for decimal numbers, except that modulo 2 addition must be used when computing the final sum. 111 *101 111 (mul 111 by 1) 000 (mul 111 by 0) 111 (mul 111 by 1) 11011 (perform XOR addition)

CRC (cont) Sender polynomial M(x) Noise polynomial E(x) 10011010000 eor 1101 1001 1000 1011 1100 101 Sender polynomial M(x) M(x) = 10011010, C(x) = 1101, thus k = 3 T(x) = M(x) * x3 = 10011010000 (<< 3) T(x) % C(x) = 101 T(x) – T(x) % C(x) = 10011010101 = P(x) Noise polynomial E(x) Receiver polynomial P(x) + E(x) E(x) = 0 implies no errors (P(x) + E(x)) % C(x) == 0 if: E(x) was zero (no error), or E(x) is exactly divisible by C(x) To retrieve M(x): P(x)/ x3, (truncate the last 3 bits) Just appended The most significant bit (MSB) is the bit in a multiple-bit binary number with the largest value. (big endian) This is usually the bit farthest to the left, or the bit transmitted first in a sequence. For example, in the binary number 1000, the MSB is 1, and in the binary number 0111, the MSB is 0. The most significant byte, also abbreviated MSB, is the byte in a multiple-byte word with the largest value. As with bits, the MSB (byte) is normally the byte farthest to the left, or the byte transmitted first in a sequence CSS 432

CRC Calculation Using Shift Register XOR C(x) = 1101 CRC x0 x1 x2 M(x) * x^k from left  

CRC Calculation Using Shift Register sender receiver M(x) * x^k CRC M(x) + CRC M(x) CRC’ P(x)% C(x) == 0 // CRC == CRC’, no errors x0 x1 x2 Example: M(x) = 10011010 C(x) = 1101 000 01011001 000 010 1 1 000 0101100 000 01 1 1 1 000 010110 000 0 1 1 101 will be transferred. 000 01011 000 1 1 000 0101 00 1 1 CSS 432

Reliable Transmission The University of Adelaide, School of Computer Science 26 May 2018 Reliable Transmission CRC is used to detect errors. Some error codes are strong enough to correct errors. The overhead is typically too high. Corrupt frames must be discarded. A link-level protocol that wants to deliver frames reliably must recover from these discarded frames. Protocols use Acknowledgements and Timeouts Chapter 2 — Instructions: Language of the Computer

Reviews Exercises in Chapter 2 Encoding (NRZ, NRZI, Manchester, and 4B/5B) Framing (Sentinel and counter-based) Error Detections (Parity, Internet checksum, and CRC) Exercises in Chapter 2 Ex. 18 (CRC + draw the shift register) Ex. 19 (CRC + draw he shift register) CSS 432