5: DataLink Layer5a-1 13: Link Layer, Multiple Access Protocols Last Modified: 10/14/2015 3:28:03 PM.

Slides:



Advertisements
Similar presentations
Lecture 15 Link Layer Protocols. Lecture 15-2 Link Layer Services r Framing and link access: encapsulate datagram into frame adding header and trailer,
Advertisements

5: DataLink Layer5a-1 Chapter 5 Data Link Layer Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley,
Link Layer Protocols. Link Layer Services  Framing and link access:  encapsulate datagram into frame adding header and trailer,  implement channel.
Network Layer4-1 Link Layer: Introduction Some terminology: r hosts and routers are nodes (bridges and switches too) r communication channels that connect.
5-1 Link Layer: Introduction Some terminology: r hosts and routers are nodes r communication channels that connect adjacent nodes along communication path.
1 The Data Link Layer Based on slides by Shiv. Kalyanaraman and B. Sidkar.
5: DataLink Layer5a-1 MAC Sublayer. 5: DataLink Layer5a-2 Multiple Access Links and Protocols Two types of “links”: r point-to-point m PPP for dial-up.
5: DataLink Layer5a-1 19: Link Layer: Error Detection/Correction, Multiple Access Protocols Last Modified: 6/17/ :26:09 AM.
15 – Data link layer Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction.
11/11/ /13/2003 DLL, Error Detection, MAC, ARP November 11-13, 2003.
Rensselaer Polytechnic Institute © Shivkumar Kalvanaraman & © Biplab Sikdar1 ECSE-4730: Computer Communication Networks (CCN) Chapter 5: The Data Link.
Review r Multicast Routing m Three options m source-based tree: one tree per source shortest path trees reverse path forwarding m group-shared tree: group.
1 Link Layer Message M A B Problem: Given a message M at a node A consisting of several packets, how do you send the packets to a “neighbor” node B –Neighbor:
DataLink Layer session 1 TELE3118: Network Technologies Week 2: Data Link Layer Framing, Error Control, Multiple Access Some slides have been taken.
5: DataLink Layer5-1 Link Layer – Error Detection/Correction and MAC.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
16 – CSMA/CD - ARP Network Layer4-1. 5: DataLink Layer5-2 CSMA (Carrier Sense Multiple Access) CSMA: listen before transmit: If channel sensed idle: transmit.
CS352- Link Layer Dept. of Computer Science Rutgers University.
5: DataLink Layer5-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction m.
Lecture 16 Random Access protocols r A node transmits at random at full channel data rate R. r If two or more nodes “collide”, they retransmit at random.
Introduction1-1 1DT014/1TT821 Computer Networks I Chapter 5 Link Layer and LANs.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Part 3: MAC Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.
5: Link Layer and Local Area Networks5a-1 Chapter 5: Link Layer Protocols.
4-1 Last time □ Link layer overview ♦ Services ♦ Adapters □ Error detection and correction ♦ Parity check ♦ Internet checksum ♦ CRC □ PPP ♦ Byte stuffing.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking LANs 2: MAC protocols.
Chapter 5 Link Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Link Layer multiple.
CS 1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Jack Lange.
Link Layer5-1 Chapter 5: Link layer our goals:  understand principles behind link layer services:  error detection, correction  sharing a broadcast.
Medium Access Control NWEN302 Computer Network Design.
4: DataLink Layer1 Chapter 4: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction m sharing.
November 8 th, 2012 CS1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved.
5: DataLink Layer5-1 Error Detection EDC= Error Detection and Correction bits (redundancy) D = Data protected by error checking, may include header fields.
5: DataLink Layer5a-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction.
4: DataLink Layer1 Multiple Access Links and Protocols Three types of “links”: r point-to-point (single wire, e.g. PPP, SLIP) r broadcast (shared wire.
Network Layer4-1 Link Layer: Introduction Some terminology: r hosts and routers are nodes (bridges and switches too) r communication channels that connect.
5: DataLink Layer5-1 Link Layer r 5.1 Introduction and services r 5.2 Error detection and correction r 5.3Multiple access protocols r 5.4 Link-Layer Addressing.
1 Week 5 Lecture 3 Data Link Layer. 2 Data Link Layer location application: supporting network applications –FTP, SMTP, STTP transport: host-host data.
11/25/20151 EEC-484 Computer Networks Lecture 12 Wenbing Zhao Cleveland State University
5: DataLink Layer5-1 The Data Link Layer Chapter 5 Kurose and Ross Today 5.1 and 5.3.
Multiple Access Links and Protocols
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.
Data Link Layer. Useful References r Wireless Communications and Networks by William Stallings r Computer Networks (third edition) by Andrew Tanenbaum.
5: DataLink Layer5a-1 Chapter 5: The Data Link Layer Last time: r link layer services r error detection, correction r multiple access protocols and LANs.
5: DataLink Layer5-1 Chapter 5: The Data Link Layer Our goals: r Understand principles behind data link layer services: m error detection, error correction.
EEC-484/584 Computer Networks
5: DataLink Layer5-1 Chapter 5: The Data Link Layer Our goals: r Understand principles behind data link layer services: m error detection, error correction.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
5: DataLink Layer5a-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction.
5: DataLink Layer 5a-1 17: Link Layer, Multiple Access Protocols, ARP Last Modified: 2/4/2016 5:22:10 PM.
5: DataLink Layer5-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, error correction.
Transport Layer 3-1 Chapter 5 Link Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012  CPSC.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
5: DataLink Layer5-1 Link Layer r 5.1 Introduction and services r 5.2 Error detection and correction r 5.3Multiple access protocols r 5.4 Link-layer Addressing.
5: DataLink Layer5-1 Slotted ALOHA Assumptions r all frames same size r time is divided into equal size slots, time to transmit 1 frame r nodes start to.
EEC-484/584 Computer Networks
Chapter 5 Link Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
Chapter 5 Link Layer and LANs
Computer Communication Networks
Chapter 5: The Data Link Layer
CS 1652 Jack Lange University of Pittsburgh
CS 457 – Lecture 6 Ethernet Spring 2012.
Services of DLL Framing Link access Reliable delivery
Multiple access.
2017 session 1 TELE3118: Network Technologies Week 2: Data Link Layer Framing, Error Control, Multiple Access Slides have been adapted from: Computer.
2012 session 1 TELE3118: Network Technologies Week 2: Data Link Layer Framing, Error Control, Multiple Access Some slides have been taken from: Computer.
EEC-484/584 Computer Networks
Link Layer and LANs Not everyone is meant to make a difference. But for me, the choice to lead an ordinary life is no longer an option 5: DataLink Layer.
17: Link Layer, Multiple Access Protocols, ARP
Link Layer 5.1 Introduction and services
Link Layer: Multiple Access
Presentation transcript:

5: DataLink Layer5a-1 13: Link Layer, Multiple Access Protocols Last Modified: 10/14/2015 3:28:03 PM

5: DataLink Layer5a-2 Data Link Layer Goals: r understand principles behind data link layer services: m sharing a broadcast channel: multiple access m link layer addressing m error detection, correction r instantiation and implementation of various link layer technologies Overview: r link layer services r error detection, correction r multiple access protocols and LANs r link layer addressing, ARP r specific link layer technologies: m Ethernet m hubs, bridges, switches m IEEE LANs m PPP m ATM

5: DataLink Layer5a-3 Link Layer: setting the context r two physically connected devices: m host-router, router-router, host-host r unit of data: frame application transport network link physical network link physical M M M M H t H t H n H t H n H l M H t H n H l frame phys. link data link protocol adapter card

5: DataLink Layer5a-4 Link Layer r Node-to-node connectivity r Point-to-point or multiple access m Multiple access requires addressing m Both require rules for sharing the links r Examples: m Point-to-point (single wire, e.g. PPP, SLIP) m Broadcast (shared wire or medium; e.g, Ethernet or wireless) m Switched (e.g., switched Ethernet, ATM etc)

5: DataLink Layer5a-5 Communication Technologies r Wired LANs, Wireless LANs (RF or light), Cellular Telephones, Satellites, Packet Radio, Wired Telephone, Voice

5: DataLink Layer5a-6 Data Model? r Packet Mode – bursty discrete transmissions r Circuit Mode – continuous traffic

5: DataLink Layer5a-7 Basics of Link Layer r Multiple Access Protocols r Error Detection/Correction

5: DataLink Layer5a-8 Multiple Access r Multiple Access - fundamental to communication r Two or more communicators use a shared medium to share information r Multiple Access Protocol - Rule for sharing medium to facilitate communication? m Can simultaneous transmissions cause interference? r Claim: humans use multiple access protocols all the time

5: DataLink Layer5a-9 Multiple Access protocols r Algorithm that determines how stations share channel, i.e., determine when station can transmit r Note: communication about channel sharing must use channel itself! (or be agreed upon ahead of time) r what to look for in multiple access protocols: m synchronous or asynchronous m information needed about other stations m robustness (e.g., to channel errors) m performance

5: DataLink Layer5a-10 MAC Protocols: a taxonomy Three broad classes: r Channel Partitioning m divide channel into smaller “pieces” (time slots, frequency) m allocate piece to node for exclusive use r Random Access m allow collisions m “recover” from collisions r Polling Style m tightly coordinate shared access to avoid collisions Goal: efficient, fair, simple, decentralized

5: DataLink Layer5a-11 Channel Partitioning : TDMA TDMA: time division multiple access r access to channel in "rounds" r each station gets fixed length slot (length = pkt trans time) in each round r unused slots go idle r example: 6-station LAN, 1,3,4 have pkt, slots 2,5,6 idle

5: DataLink Layer5a-12 Channel Partitioning : FDMA FDMA: frequency division multiple access r channel spectrum divided into frequency bands m each station assigned fixed frequency band r unused transmission time in frequency bands go idle r example: 6-station LAN, 1,3,4 have pkt, frequency bands 2,5,6 idle frequency bands time

5: DataLink Layer5a-13 Channel Partitioning: CDMA CDMA (Code Division Multiple Access) r unique “code” assigned to each user; ie, code set partitioning r used mostly in wireless broadcast channels (cellular, satellite,etc) r all users share same frequency, but each user has own “chipping” sequence (ie, code) to encode data r encoded signal = (original data) X (chipping sequence) m For each code there is a spreading factor G m For d bits of user data, G*d bits are trannsmitted r decoding: inner-product of encoded signal and chipping sequence r allows multiple users to “coexist” and transmit simultaneously with minimal interference (if codes are “orthogonal”)

5: DataLink Layer5a-14 Can’t Cheat Nature r TDMA – all channel part of time r FDMA – part of channel all the time r CDMA – use all the channel all the time BUT transmit more bits (spread-out) in a specified pattern that avoids interference with others

5: DataLink Layer5a-15 TDMA vs FDMA vs CDMA r In TDMA, each station gets the whole channel spectrum some of the time r In FDMA, each station gets part of the channel spectrum all of the time r In CDMA, each station is assigned a code that determines what portions of the channel spectrum they use and for how long to avoid collision with others r All require lots of coordination about who “speaks” when and in what way! m What if didn’t want to coordinate things so tightly?

5: DataLink Layer5a-16 Random Access protocols r Random access protocols are alternative to tight coordination m When want to transmit, transmit and hope for the best m If bad things happen, protocol says how to recover

5: DataLink Layer5a-17 Random Access Protocols r When node has packet to send m transmit at full channel data rate R. m no a priori coordination among nodes r two or more transmitting nodes -> “collision”, r random access MAC protocol specifies: m how to detect collisions m how to recover from collisions (e.g., via delayed retransmissions) r Examples of random access MAC protocols: m slotted ALOHA m ALOHA m CSMA and CSMA/CD (Ethernet) m Remember Ethernet grew out of technology for broadcast in Hawaiian Islands?

5: DataLink Layer5a-18 Random Access: Slotted Aloha r time is divided into equal size slots (= pkt trans. time) r node with new arriving pkt: transmit at beginning of next slot r if collision: retransmit pkt in future slots with probability p, until successful. Success (S), Collision (C), Empty (E) slots

5: DataLink Layer5a-19 Slotted Aloha efficiency Q: what is max fraction slots successful? A: Suppose N stations have packets to send m each transmits in slot with probability p m prob. successful transmission S is: by single node: S= (prob it sends) * (prob all others do not) = p (1-p) (N-1) by any of N nodes S = Prob (only one transmits) = N p (1-p) (N-1) … choosing optimum p as n -> infty... = 1/e =.37 as N -> infty At best: channel use for useful transmissions 37% of time!

5: DataLink Layer5a-20 Random Access: Pure (unslotted) ALOHA r unslotted Aloha: simpler, no synchronization r pkt needs transmission: m send without awaiting for beginning of slot r collision probability increases: m pkt sent at t 0 collide with other pkts sent in [t 0 -1, t 0 +1]

5: DataLink Layer5a-21 Pure Aloha (cont.) P(success by given node) = P(node transmits). P(no other node transmits in [p 0 -1,p 0 ]. P(no other node transmits in [p 0 -1,p 0 ] = p. (1-p). (1-p) P(success by any of N nodes) = N p. (1-p). (1-p) … choosing optimum p as n -> infty... = 1/(2e) =.18 S = throughput = “goodput” (success rate) G = offered load = Np Pure Aloha Slotted Aloha protocol constrains effective channel throughput!

5: DataLink Layer5a-22 CSMA: Carrier Sense Multiple Access CSMA: listen before transmit: r If channel sensed idle: transmit entire pkt r If channel sensed busy, defer transmission m Persistent CSMA: retry immediately with probability p when channel becomes idle (may cause instability) m Non-persistent CSMA: retry after random interval r human analogy: don’t interrupt others!

5: DataLink Layer5a-23 CSMA collisions collisions can occur: propagation delay means two nodes may not year hear each other’s transmission collision: entire packet transmission time wasted spatial layout of nodes along ethernet note: role of distance and propagation delay in determining collision prob.

5: DataLink Layer5a-24 CSMA/CD (Collision Detection) CSMA/CD: carrier sensing, deferral as in CSMA m collisions detected within short time m colliding transmissions aborted, reducing channel wastage m persistent or non-persistent retransmission r collision detection: m easy in wired LANs: measure signal strengths, compare transmitted, received signals m difficult in wireless LANs: receiver shut off while transmitting r human analogy: if start talking at same time some one else does don’t just continue talking

5: DataLink Layer5a-25 CSMA/CD collision detection

5: DataLink Layer5a-26 Compromise? Polling Style MAC protocols channel partitioning MAC protocols: m share channel efficiently at high load m inefficient at low load: delay in channel access, 1/N bandwidth allocated even if only 1 active node! Random access MAC protocols m efficient at low load: single node can fully utilize channel m high load: collision overhead Polling style protocols (“taking turns”) look for best of both worlds!

5: DataLink Layer5a-27 Polling style MAC protocols Polling: r master node “invites” slave nodes to transmit in turn r Request to Send, Clear to Send msgs r concerns: m polling overhead m latency m single point of failure (master) Token passing: r control token passed from one node to next sequentially. r token message r concerns: m token overhead m latency m single point of failure (token)

5: DataLink Layer5a-28 Reservation-based protocols Distributed Polling: r time divided into slots r begins with N short reservation slots m reservation slot time equal to channel end-end propagation delay m station with message to send posts reservation m reservation seen by all stations r after reservation slots, message transmissions ordered by known priority

5: DataLink Layer5a-29 Summary of MAC protocols r What do you do with a shared media? m Channel Partitioning, by time, frequency or code Time Division,Code Division, Frequency Division m Random access ALOHA, S-ALOHA, CSMA, CSMA/CD carrier sensing: easy in some technologies (wire), hard in others (wireless) CSMA/CD used in Ethernet m Polling Style polling from a central cite, token passing

5: DataLink Layer5a-30 Basics of Link Layer r Multiple Access Protocols r Error Detection/Correction

5: DataLink Layer5a-31 Error Detection EDC= Error Detection and Correction bits (redundancy) D = Data protected by error checking, may include header fields Error detection not 100% reliable! protocol may miss some errors, but rarely larger EDC field yields better detection and correction

5: DataLink Layer5a-32 Smart Redundancy r In general, more bits of redundancy the stronger the error detection/correction abilities but smart redundancy r What if transmitted another copy of the same thing? m How many bits till not detected? Ability to correct? r Can we do better than that with less space?

5: DataLink Layer5a-33 Recall: Internet checksum Sender: r treat segment contents as sequence of 16-bit integers r checksum: addition (1’s complement sum) of segment contents r sender puts checksum value into UDP checksum field Receiver: r compute checksum of received segment r check if computed checksum equals checksum field value We saw this a bunch of times in upper layers – is this a good choice for the link layer?

5: DataLink Layer5a-34 Intelligent choice for link layer? r Tailored to type and frequency of errors expected in the specific technology being used m Some technologies (like fiber) have very low error rates m Some technologies (like wireless) have high error rates r How to we tailor the number of bits to use and *how* we use them to get the desired effect??

5: DataLink Layer5a-35 Example: Parity Single Bit Parity: Detect single bit errors Two Dimensional Bit Parity: Detect and correct single bit errors Want even number of 1’s in each dimension 0 0 Single Bit vs Two Dimensional Bit Parity: Example of using redundant bits intelligently for increased error detection/correction capability!

5: DataLink Layer5a-36 Beyond parity? r How can we generalize this example of single vs double bit parity? r Is there a theory of using redundant bits efficiently based on the types of errors we expect to find? r Cyclic Redundancy Checks (CRC) views both the data and the redundant bits as binary polynomials and ensures that they satisfy a certain mathematical relationship

5: DataLink Layer5a-37 Checksumming: Cyclic Redundancy Check r view data bits, D, as a binary number or binary polynomial m = X^5+X^3+X^1+X^0 = X^5+X^3+X+1. r choose r+1 bit pattern/polynomial (generator), G r goal: choose r CRC bits, R, such that m = D* 2 r XOR R (shift D over place R in the end) m exactly divisible by G (modulo 2) m receiver knows G, divides by G. If non-zero remainder: error detected! m can detect all burst errors less than r+1 bits r widely used in practice (ATM, HDCL)

5: DataLink Layer5a-38 CRC Example Want: D. 2 r XOR R = nG equivalently: if we divide D. 2 r by G, want reminder R R = remainder[ ] D.2rGD.2rG

5: DataLink Layer5a-39 Common CRC Polynomials (G) r CRC-12 used for transmission of streams of 6-bit characters and generates 12-bit FCS m CRC-12: X^12+X^11+X^3+X^2+X+1 r Both CRC-16 and CCRC-CCITT are used for 8 bit transmission streams and both result in 16 bit FCS. Considered to give adequate protection for most applications. m CRC-16: X^16+X^15+X^2+1 (USA) m CRC-CCITT: X^16+X^12+X^5+1 (Europe) r CRC-32 gives extra generates 32 bit FCS. Used by the local network standards committee (IEEE- 802) and in some DOD applications. m CRC-32: X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X ^7+X^5+X^4+X^2+X+1