1 / 12

Link Layer

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: A node attached to the same link Link can be point-to-point or broadcast

ralley
Download Presentation

Link Layer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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: A node attached to the same link Link can be point-to-point or broadcast Link can be guided media (a copper, coax, fiber wire) or unguided media (wireless) Link Layer B A Message M

  2. This communication problem is handled by 2 protocols A Link Layer (LL) that sits on top of the physical layer (PL) and deals with Packet Encapsulation, Mux/Demux Framing – Detecting frame boundaries Error Detection/Recovery – Detecting corrupt frames Media Access Control (if the link is multi-access or broadcast) Reliable delivery, flow control? – Optional A Physical Layer (PL) deals with encoding/decoding bits of a frame to/from the link Message M A B link physical link physical Link and Physical Layers

  3. link physical C Message M A B link physical link physical Broadcast Links, Addressing and Media Access Control • In a broadcast link, there are two additional issues that must be resolved • How do the nodes agree on who gets to use the link next? • Called the Media Access Control problem • How does A tell that the frame is destined to B not to C? • Addressing problem: Each station must have a UNIQUE address, called the Media Access Control (MAC) address

  4. Broadcast Link (LAN) MAC Addresses • Typically 48 bit (for most LANs) • burned in adapter ROM • Flat addresses, i.e., no hierarchical organization • Address space assigned and managed by IEEE • Manufacturer buys portion of MAC address space to ensure GLOBAL uniqueness • Special LAN broadcast address • FF-FF-FF-FF-FF-FF

  5. Media Access Control Protocols Three broad categories: • Channel Partitioning • divide channel into smaller “pieces” (time slots, frequency), allocate piece to node for exclusive use • TDM, FDM • Random Access • allow collisions • “recover” from collisions • “Taking turns” • tightly coordinate shared access to avoid collisions Goal: efficient, fair, simple, decentralized

  6. Random Access MAC Protocols • When node has packet to send • transmit at full channel data rate R. • no a priori coordination among nodes • two or more transmitting nodes -> “collision”, • Random Access MAC protocol specifies: • how to detect collisions • how to recover from collisions (e.g., via delayed retransmissions) • Examples of random access MAC protocols: • ALOHA , slotted ALOHA, CSMA, CSMA/CD

  7. CSMA: Carrier Sense Multiple Access • Listen before transmit: • If channel sensed idle: transmit entire pkt • If channel sensed busy, defer transmission • Persistent CSMA: • retry immediately with probability p when channel becomes idle • Non-persistent CSMA: • retry after random interval

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

  9. CSMA/CD (Collision Detection) • CSMA/CD: carrier sense multiple access/collision detect • collisions detected within short time • colliding transmissions aborted, reducing channel wastage • persistent or non-persistent retransmission • collision detection: • For wired LANs: measure signal strengths, compare transmitted, received signals

  10. CSMA/CD Collision Detection

  11. “Taking Turns” MAC protocols Token passing: • control token passed from one node to next sequentially. • token message • concerns: • token overhead • latency • single point of failure (token) Polling: • master node “invites” slave nodes to transmit in turn (USB) • Request to Send, Clear to Send msgs (802.11) • concerns: • polling overhead • latency • single point of failure (master) • Used in USB

  12. Datagram Datagram H Datagram H Datagram Y H Datagram EDC LL Frame LL LL Add Framing Information Y D-MAC == MyMAC || D-MAC == FFFFFFFFFFFF All bits in D’ OK? N Media Access Control Detected error N Drop the frame D’ EDC‘ Encode Bits to the Link PL Decode Bits from the Link PL Link Link Functionality of a LL With MAC Protocol

More Related