1 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.

Slides:



Advertisements
Similar presentations
EE 4272Spring, 2003 Chapter 7 Data Link Control Objectives: Effective & reliable data communication between two directly connected transmitting-receiving.
Advertisements

Lecture 3, 1Spring 2003, COM1337/3501CCN: Direct Link Networks Direct Link Networks Textbook: Computer Networks: A Systems Approach, L. Peterson, B. Davie,
Spring 2002CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao
1 Shared Access Networks Outline Bus (Ethernet) Token ring (FDDI) Wireless (802.11)
ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson.
CSE331: Introduction to Networks and Security Lecture 5 Fall 2002.
CSS 4321 CSS432 Shared Access Networks Textbook Ch2.6, 2.7, and Professor: Munehiro Fukuda.
EE 122: Error detection and reliable transmission Ion Stoica September 16, 2002.
1 Computer Networks Local Area Networks. 2 A LAN is a network: –provides Connectivity of computers, mainframes, storage devices, etc. –spans limited geographical.
1 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
1 Hardware Building Blocks Five Issues –Encoding –Framing –Error Detection –Reliable delivery –Access Mediation Direct Link Networks.
Spring 2002CS 4611 Shared Access Networks Outline Bus (Ethernet) Token ring (FDDI) Wireless (802.11)
Spring 2004 EE4272 Direct Link Networks (I) Hardware Building Blocks (nodes & links) 5 Issues before Exchanging Packets  Encoding  Framing  Error Detection.
EE 4272Spring, 2003 Chapter 14 LAN Systems Ethernet (CSMA/CD)  ALOHA  Slotted ALOHA  CSMA  CSMA/CD Token Ring /FDDI Fiber Channel  Fiber Channel Protocol.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
Spring 2003CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
Spring 2003CS 4611 Shared Access Networks Outline Bus (Ethernet) Token ring (FDDI) Wireless (802.11)
Error Detection and Reliable Transmission EECS 122: Lecture 24 Department of Electrical Engineering and Computer Sciences University of California Berkeley.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao
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.
CSCI-1680 Link Layer Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 16.
CS 356: Introduction to Computer Networks Lecture 6: Multi-access links Xiaowei Yang
8-Oct-154/598N: Computer Networks Shared Access Networks Token Ring ATM Fibre channel Myrinet.
14-Oct-15Computer Networks1 Reliable Transmission.
CSS CSS432 Point-to-Point Links Textbook Ch2.1.2 – 2.5 Professor: Munehiro Fukuda.
Lecture 7: Reliable Packet Transmission. Cyclic Redundancy Check Add k bits of extra data (the CRC field) to an n-bit message to provide error detection.
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.
1 Other LANs Token Rings Wireless –Wireless LAN (802.11, WiFi) –Broadband Wireless (802.16) –Bluetooth.
Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
CS3505: DATA LINK LAYER. data link layer  phys. layer subject to errors; not reliable; and only moves information as bits, which alone are not meaningful.
1 CHAPTER 2 HARDWARE BUILDING BLOCK ENCODING FRAMING ERROR DETECTION.
Link Layer Dr. Mozafar Bag-Mohammadi Ilam University.
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.
5: DataLink Layer 5a-1 Multiple Access protocol. 5: DataLink Layer 5a-2 Multiple Access Links and Protocols Three types of “links”: r point-to-point (single.
Mozafar Bag-Mohammadi University of Ilam
9-Jan-164/598N: Computer Networks Overview Performance metrics - Section 1.5 Direct link networks –Hardware building blocks - Section 2.1 –Encoding - Section.
Point-to-Point Links: Framing
Transport Layer: Sliding Window Reliability
1 Chapter 2: Direct Link Networks (Part Two) Dr. Rocky K. C. Chang 30 January 2004.
1 Ethernet History –developed by Xerox PARC in mid-1970s –roots in Aloha packet-radio network –standardized by Xerox, DEC, and Intel in 1978 –similar to.
Univ. of TehranIntroduction to Computer Network1 An Introduction to Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr.
1 Shared Access Networks: Token ring, Wireless Sections 2.7 & 2.8.
1 Hardware Building Blocks Five Issues –Encoding –Framing –Error Detection –Reliable delivery –Access Media Direct Link Networks.
1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam.
1 Direct Link Networks: Reliable Transmission Sections 2.5.
CSE331: Introduction to Networks and Security Lecture 4 Fall 2002.
Univ. of TehranIntroduction to Computer Network1 An Introduction to Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr.
Computer Networking Lecture 16 – Reliable Transport.
1 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
1 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
CS380 Int. to Comp. Networks Data Link Networks - Part II1 Reliable Transmission How to fix corrupted frames. –Error correcting codes too expensive –Should.
Reliable Transmission
Data Link Networks Hardware Building Blocks Nodes & Links CS380
Advanced Computer Networks
Medium Access Control (MAC) Sub-layer
CSS432 Point-to-Point Links Textbook Ch2.1 – 2.5
Reliable transmission
Point-to-Point Links Outline Encoding Framing Error Detection
Advanced Computer Networks
Hardware Building Blocks
Dr. Mozafar Bag-Mohammadi Ilam University
Error detection: Outline
Presentation transcript:

1 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

2 Encoding Signals propagate over a physical medium –modulate electromagnetic waves –e.g., vary voltage Encode binary data onto signals –e.g., 0 as low signal and 1 as high signal –known as Non-Return to zero (NRZ) Bits NRZ

3 Problem: Consecutive 1s or 0s Low signal (0) may be interpreted as no signal High signal (1) leads to baseline wander Unable to recover clock

4 Alternative Encodings Non-return to Zero Inverted (NRZI) –make a transition from current signal to encode a one; stay at current signal to encode a zero –solves the problem of consecutive ones Manchester –transmit XOR of the NRZ encoded data and the clock –only 50% efficient (bit rate = 1/2 baud rate)

5 Encodings (cont) Bits NRZ Clock Manchester NRZI

6 Encodings (cont) 4B/5B –every 4 bits of data encoded in a 5-bit code –5-bit codes selected to have no more than one leading 0 and no more than two trailing 0s –thus, never get more than three consecutive 0s –resulting 5-bit codes are transmitted using NRZI –achieves 80% efficiency

7 Framing Break sequence of bits into a frame Typically implemented by network adaptor Frames Bits Adaptor Node BNode A

8 Approaches Sentinel-based –delineate frame with special pattern: –e.g., HDLC, SDLC, PPP –problem: special pattern appears in the payload –solution: bit stuffing sender: insert 0 after five consecutive 1s receiver: delete 0 that follows five consecutive 1s HeaderBody CRC Beginning sequence Ending sequence

9 Approaches (cont) Counter-based –include payload length in header –e.g., DDCMP –problem: count field corrupted –solution: catch when CRC fails

10 Approaches (cont) Clock-based –each frame is 125us long –e.g., SONET: Synchronous Optical Network –STS-n (STS-1 = Mbps)

11 Cyclic Redundancy Check Add k bits of redundant data to an n-bit message –want k << n –e.g., k = 32 and n = 12,000 (1500 bytes) Represent n-bit message as n-1 degree polynomial –e.g., MSG= as M(x) = x 7 + x 4 + x 3 + x 1 Let k be the degree of some divisor polynomial –e.g., C(x) = x 3 + x 2 + 1

12 CRC (cont) Transmit polynomial P(x) that is evenly divisible by C(x) –shift left k bits, i.e., M(x)x k –subtract remainder of M(x)x k / C(x) from M(x)x k Receiver polynomial P(x) + E(x) –E(x) = 0 implies no errors Divide (P(x) + E(x)) by C(x); remainder zero if: –E(x) was zero (no error), or –E(x) is exactly divisible by C(x)

13 Selecting C(x) All single-bit errors, as long as the x k and x 0 terms have non-zero coefficients. All double-bit errors, as long as C(x) contains a factor with at least three terms Any odd number of errors, as long as C(x) contains the factor (x + 1) Any ‘burst’ error (i.e., sequence of consecutive error bits) for which the length of the burst is less than k bits. Most burst errors of larger than k bits can also be detected See Table 2.6 on page 102 for common C(x)

14 Internet Checksum Algorithm View message as a sequence of 16-bit integers; sum using 16-bit ones-complement arithmetic; take ones-complement of the result. u_short cksum(u_short *buf, int count) { register u_long sum = 0; while (count--) { sum += *buf++; if (sum & 0xFFFF0000) { /* carry occurred, so wrap around */ sum &= 0xFFFF; sum++; } return ~(sum & 0xFFFF); }

15 Acknowledgements & Timeouts

16 Stop-and-Wait Problem: keeping the pipe full Example –1.5Mbps link x 45ms RTT = 67.5Kb (8KB) –1KB frames implies 1/8th link utilization SenderReceiver

17 Sliding Window Allow multiple outstanding (un-ACKed) frames Upper bound on un-ACKed frames, called window SenderReceiver T ime … …

18 SW: Sender Assign sequence number to each frame ( SeqNum ) Maintain three state variables: –send window size ( SWS ) –last acknowledgment received ( LAR ) –last frame sent ( LFS ) Maintain invariant: LFS - LAR <= SWS Advance LAR when ACK arrives Buffer up to SWS frames  SWS LARLFS ……

19 SW: Receiver Maintain three state variables –receive window size ( RWS ) –largest frame acceptable ( LFA ) –last frame received ( NFE ) Maintain invariant: LFA - LFR <= RWS Frame SeqNum arrives: –if LFR < SeqNum < = LFA accept –if SeqNum LFA discarded Send cumulative ACKs  RWS NFELFA ……

20 Sequence Number Space SeqNum field is finite; sequence numbers wrap around Sequence number space must be larger then number of outstanding frames SWS <= MaxSeqNum-1 is not sufficient –suppose 3-bit SeqNum field (0..7) –SWS=RWS=7 –sender transmit frames 0..6 –arrive successfully, but ACKs lost –sender retransmits 0..6 –receiver expecting 7, 0..5, but receives second incarnation of 0..5 SWS < (MaxSeqNum+1)/2 is correct rule Intuitively, SeqNum “slides” between two halves of sequence number space

21 Concurrent Logical Channels Multiplex 8 logical channels over a single link Run stop-and-wait on each logical channel Maintain three state bits per channel –channel busy –current sequence number out –next sequence number in Header: 3-bit channel num, 1-bit sequence num –4-bits total –same as sliding window protocol Separates reliability from order

22 Shared Access Networks Outline Bus (Ethernet) Token ring (FDDI) Wireless (802.11)

23 Gedankenexperiment How does communication work in real life? If there are lots of speakers/speaking? If there is little speaking? If there are “important” people? Can we map this to computer networks?

24 Ethernet Overview History –developed by Xerox PARC in mid-1970s –roots in Aloha packet-radio network –standardized by Xerox, DEC, and Intel in 1978 –similar to IEEE standard CSMA/CD –carrier sense –multiple access –collision detection Frame Format Dest addr CRCPreamble Src addr TypeBody 1648

25 Ethernet (cont) Addresses –unique, 48-bit unicast address assigned to each adapter –example: 8:0:e4:b1:2 –broadcast: all 1 s –multicast: first bit is 1 Bandwidth: 10Mbps, 100Mbps, 1Gbps Length: 2500m (500m segments with 4 repeaters) Problem: Distributed algorithm that provides fair access

26 Transmit Algorithm If line is idle… –send immediately –upper bound message size of 1500 bytes –must wait 9.6us between back-to-back frames If line is busy… –wait until idle and transmit immediately –called 1-persistent (special case of p-persistent)

27 Algorithm (cont) If collision… –jam for 32 bits, then stop transmitting frame –minimum frame is 64 bytes (header + 46 bytes of data) –delay and try again 1st time: 0 or 51.2us 2nd time: 0, 51.2, 102.4, or 153.6us nth time: k x 51.2us, for randomly selected k=0..2 n - 1 give up after several tries (usually 16) exponential backoff

28 Collisions AB AB AB AB

29 Token Ring Overview Examples –16Mbps IEEE (based on earlier IBM ring) –100Mbps Fiber Distributed Data Interface (FDDI)

30 Token Ring (cont) Idea –Frames flow in one direction: upstream to downstream –special bit pattern (token) rotates around ring –must capture token before transmitting –release token after done transmitting immediate release delayed release –remove your frame when it comes back around –stations get round-robin service Frame Format Control CRC Start of frame End of frame Dest addr Body 48 Src addr Status 32

31 Timed Token Algorithm Token Holding Time (THT) –upper limit on how long a station can hold the token Token Rotation Time (TRT) –how long it takes the token to traverse the ring –TRT <= ActiveNodes x THT + RingLatency Target Token Rotation Time (TTRT) –agreed-upon upper bound on TRT

32 Algorithm (cont) Each node measures TRT between successive tokens –if measured-TRT > TTRT: token is late so don’t send –if measured-TRT < TTRT: token is early so OK to send Two classes of traffic –synchronous: can always send –asynchronous: can send only if token is early Worse case: 2 x TTRT between seeing token Back-to-back 2 x TTRT rotations not possible

33 Token Maintenance Lost Token –no token when initializing ring –bit error corrupts token pattern –node holding token crashes Generating a Token (and agreeing on TTRT) –execute when join ring or suspect a failure –send a claim frame that includes the node’s TTRT bid –when receive claim frame, update the bid and forward –if your claim frame makes it all the way around the ring: your bid was the lowest everyone knows TTRT you insert new token

34 Maintenance (cont) Monitoring for a Valid Token –should periodically see valid transmission (frame or token) –maximum gap = ring latency + max frame < = 2.5ms –set timer at 2.5ms and send claim frame if it fires

35 Wireless Technologies Most commonly used wireless technologies: Wi-Fi (802.11) Bluetooth ( ) WiMAX (802.16) 3G Cellular

36 BluetoothWi-FiWiMAX3G Typical Length Approx. 30 ftApprox. 320 ftApprox ft Approx and higher Bandwidth 2.1 Mbps Total ( each host must share so bandwidth is dynamic) 54 Mbps Total (each host must share so bandwidth is dynamic) 70 Mbps Total (each host must share so bandwidth is dynamic) 384 Kbps for each host Typical Use Connecting devices to PC Connecting laptop to internet Connecting an entire building to the internet Cell phone internet and data services Wired CounterpartUSBEthernetCoaxial CableDSL/FIOS Wireless Technologies

37 Wireless Technologies Physical Considerations of wireless protocols: Bandwidth Capabilities Transmission Distance Limitations (Range) Frequency/Power/License

38 Wireless Technologies Well suited for multiple clients as one base station can transmit and receive with multiple clients. Common to all of these technologies is the fixed point.

39 Bluetooth One Master device 7 Active slave devices 255 Parked Devices License Exempt band of 2.45 GHz Low Power Consumption Protocol implemented beyond link level -Where it defines application protocols via use of profiles -Profiles are application level protocols for different types of device connections. -Hands Free Devices -Hardware and peripherals -PDA Synchronization

40 Wi-Fi a -> 5 GHz band OFDM (Orthogonal Frequency division Multiplexing) Direct sequence easily absorbed by environment, limited to line of sight b -> Variant of direct sequence g -> OFDM (Orthogonal Frequency division Multiplexing) Backward compatible with b

41 Wi-Fi Functional Aspects of Wi-Fi Each host has an assigned access point. Access point is fixed. Collision avoidance- (not detection) Problem: If each host has its own link, how do we determine if the link is busy? (It is the receiver that must be determined to be free or busy.) Examples: Hidden nodes and Exposed nodes Solution: MACA (multiple access with collision avoidance ).

42 Wi-Fi Functional Aspects of Wi-Fi MACA- Control Frames- Exchange of RTS and CTS frames RTS –Comes from source, requesting access CTS – Comes from recipient, granted access Note: RTS–contains a field that indicates the amount of time the sender is requesting. Exchange of the CTS frame informs surrounding nodes that are in range that they cannot transmit during the period of time that it takes to transmit that one frame and to send and ACK. Question: What if we have to hosts that send and RTS message that results in a collision at the host? Answer: When the timeout period expires each host will make the determination that a collision has occurred at the host ( the host does not have any collision detection in ). Thus each will resend according to an exponential back off algorithm.

43 Wi-Fi Distribution System: Active Scanning: Host sends out a probe frame, analyzes responses from AP’s Passive Scanning: AP sends out Beacon frame that advertises capabilities. Host evaluates current situation and stays or sends out an association request to be associated with the new AP.

44 Wi-Fi Frame Formats: Control Field: Contains 3 Sub fields 1.TYPE Field: Indicates whether frame carries data or identifies itself as a RTS or CTS frame. 2.ToDS one bit field 3.FromDS one bit field

45 Wi-Fi Addr1 in the most simple cases, is the destination address. Addr2 in the most simple cases, is the source address. In the Event that the DS bits are not 0, this indicates that the frame has been forwarded by more than one node, thus the sender’s address is not necessarily the origination address. Thus we have 4 fields for addresses.

46 Wi-MAX Worldwide interoperability for Microwave Access -Intended as a “Last Mile” Technology. Offers 70Mbps connections when connected to subscriber stations. Requires Line of Sight for connection. Not a mobile technology, both access point and host are stationary GHz Range(licensed and unlicensed) Base station transmits to all hosts, hosts pick what belongs to them and ignore the rest. This simplifies the outbound transmissions (only the transmitter takes up outbound slots). Incoming slots are shared among all hosts, this includes other WiMAX stations. QOS can be implemented to garuntee quality for voice communications. Under this concept slots are dynamically allocated to some requesters.

47 Wi-MAX Two ways of dividing the bandwidth between upstream and down stream: TDD: STDM of the up and down streams. FDD: FDM of the up and down streams.

48 3G CDMA (most commonly used in the US)is a 2G technology that uses chipping codes instead of FDM or TDM on the physical link layer. Speed is limited as time slots and compression algorithms are geared towards compressing human speech. Thus they are not optimized for data. GSM (Europe) also a 2 G technology used GPRS for data had better data rates as more time slots could be allocated if available for data. 3G: technolgy is still emerging and has yet to be truly standardized, but one promising standard is UMTS. UMTS-Based on W-CDMAs, 1.9 Mpbs