5: Link Layer and Local Area Networks5a-1 Chapter 5: Link Layer Protocols.

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.
5: DataLink Layer5-1 Data Link Layer r What is Data Link Layer? r Multiple access protocols r Ethernet.
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:
Chapter 5 Link Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 20.
DataLink Layer session 1 TELE3118: Network Technologies Week 2: Data Link Layer Framing, Error Control, Multiple Access Some slides have been taken.
5-1 Data Link Layer r Today, we will study the data link layer… r This is the last layer in the network protocol stack we will study in this class…
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.
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.
Introduction 1 Lecture 23 Link Layer (Error Detection/Correction) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Part 1: Overview of the Data Link layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose,
4-1 Last time □ Link layer overview ♦ Services ♦ Adapters □ Error detection and correction ♦ Parity check ♦ Internet checksum ♦ CRC □ PPP ♦ Byte stuffing.
NUS.SOC.CS2105 Ooi Wei Tsang Application Transport Network Link Physical you are here.
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.
5: DataLink Layer5a-1 13: Link Layer, Multiple Access Protocols Last Modified: 10/14/2015 3:28:03 PM.
1 Data Link Layer Lecture 20 Imran Ahmed University of Management & Technology.
Data Link Layer Moving Frames. Link Layer Protocols: ethernet, wireless, Token Ring and PPP Has node-to-node job of moving network layer.
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.
Chapter 5 Link Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Link Layer introduction,
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 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 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 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.
CS 457 – Lecture 3 Link Layer Protocols Fall 2011.
EEC-484/584 Computer Networks
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.
2012 session 1 TELE3118: Network Technologies Week 2: Data Link Layer Framing, Error Control, Multiple Access Some slides have been taken from: Computer.
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.
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.
Link Layer: Multiple Access
Link Layer Protocols 2019년 7월 5일 오전 3시 44분2019년 7월 5일 오전 3시 44분.
Presentation transcript:

5: Link Layer and Local Area Networks5a-1 Chapter 5: Link Layer Protocols

5: Link Layer and Local Area Networks5a-2 Link Layer Services  Framing and link access:  link layer has a node-to-node job over a single link.  encapsulate (network layer’s) datagram into frame adding header and trailer,  datagrams could be handled by different link-layer protocols (e.g., Ethernet, PPP, frame relay, etc.)  implement channel access if shared medium,  ‘physical addresses’ are used in frame headers to identify source and destination of frames on broadcast links (different from IP addresses)  Reliable Delivery:  similar to TCP’s reliable data transfer (ACK, retransmit) but not the same: TCP (E2E), Link layer (node-to-node)  seldom used on fiber optic, co-axial cable and some twisted pairs too due to low bit error rate.  used on wireless links, where the goal is to reduce errors thus avoiding end-to-end retransmissions

5: Link Layer and Local Area Networks5a-3 Link Layer Services (more)  Flow Control:  pacing between senders and receivers  again because of finite buffer space at sender/receiver  Error Detection:  errors are caused by signal attenuation and noise.  receiver detects presence of errors:  it signals the sender for retransmission or just drops the corrupted frame  Error Correction:  mechanism for the receiver to locate and correct the error without resorting to retransmission  Half-Duplex and Full-Duplex:  transmission between two node: one-way or two-way

5: Link Layer and Local Area Networks5a-4 Link Layer Protocol Implementation  Link layer protocol entirely implemented in the adapter (e.g. PCMCIA card). An adapter typically includes: RAM, DSP chips, host bus interface, and link interface; also known as “network interface card” (NIC)  Adapter send operations: encapsulates (set sequence numbers, feedback info, etc.), adds error detection bits, implements channel access for shared medium, transmits on link  Adapter receive operations: error checking and correction, interrupts host to send frame up the protocol stack, updates state info regarding feedback to sender, sequence numbers, etc.

5: Link Layer and Local Area Networks5a-5 Error Detection EDC= Error Detection and Correction bits (redundancy) D = Data protected by error checking, may include some header fields error detection is not 100%; protocol may miss some errors, but rarely larger EDC field yields better detection and correction

5: Link Layer and Local Area Networks5a-6 Parity Checking Single Bit Parity: Detect single bit errors Two Dimensional Bit Parity: Detect and correct single bit errors

5: Link Layer and Local Area Networks5a-7 Checksumming Methods  Internet Checksum: View data as made up of 16 bit integers; add all the 16 bit fields (one’s complement arithmetic) and append the frame with the resulting sum; the receiver repeats the same operation and matches the checksum sent with the frame  Cyclic Redundancy Codes:  data is viewed as a string of coefficients of a polynomial (D)  a generator G polynomial is chosen (r+1 bits) with the leftmost bit of 1  divide (modulo 2) the D*2 r polynomial by G. Append the remainder (R) to D. Note that, by construction, the new string is now divisible exactly by G  all CRC calculations in modulo 2 arithmetic without carries in addition or borrows in subtraction (identical add and subtract)

5: Link Layer and Local Area Networks5a-8 CRC Example D = d = 6 G = 1001 r = 3

5: Link Layer and Local Area Networks5a-9 CRC Implementation (cont)  The sender carries out on-line, in hardware the division of the string D by the polynomial G and appends the remainder R to it  The receiver divides by G; if the remainder is non- zero, the transmission was corrupted  International standards for G polynomials of degrees 8, 12, 15 and 32 have been defined  ARPANET was using a 24 bit CRC for the alternating bit link protocol  ATM is using a 32 bit CRC in AAL 5 Error detection capability of CRC of r bit  all single-bit errors  all double-bit errors (if G has a factor with at least 3 terms)  any odd number of errors as long as G has a factor of (x+1)  burst errors of less than r +1 bits  most larger burst errors

5: Link Layer and Local Area Networks5a-10 Multiple Access Links and Protocols Three types of links: (a) Point-to-point (single wire) (b) Broadcast (shared wire or medium; e.g., Ethernet, wireless, etc.) (c) Switched (e.g., Switched Ethernet, ATM etc.) We start with Broadcast links. Main challenge: Multiple Access Protocol

5: Link Layer and Local Area Networks5a-11 Multiple Access Control (MAC) Protocols  MAC protocol: coordinates transmissions from different stations in order to minimize/avoid collisions  (a) Channel Partitioning MAC protocols  (b) Random Access MAC protocols  (c) “Taking turns” MAC protocols  Goal: efficient, fair, simple, decentralized

5: Link Layer and Local Area Networks5a-12 Channel Partitioning MAC protocols  TDM (Time Division Multiplexing): channel divided into N time slots, one per user; inefficient with low duty cycle users and at light load.  FDM (Frequency Division Multiplexing): frequency subdivided.

5: Link Layer and Local Area Networks5a-13 Channel Partitioning (CDMA)  CDMA (Code Division Multiple Access): unique “code” assigned to each user; ie, code set partitioning  Used mostly in wireless broadcast channels (cellular, satellite,etc)  All users share the same frequency, but each user has own “chipping” sequence (ie, code)  Chipping sequence like a mask: used to encode the signal  encoded signal = (original signal) X (chipping sequence)  decoding: innerproduct of encoded signal and chipping sequence (note, the innerproduct is the sum of the component-by-component products)  To make CDMA work, chipping sequences must be chosen orthogonal to each other (i.e., innerproduct = 0)

5: Link Layer and Local Area Networks5a-14 CDMA Encode/Decode

5: Link Layer and Local Area Networks5a-15 CDMA: two-sender interference

5: Link Layer and Local Area Networks5a-16 CDMA (cont’d) CDMA Properties:  protects users from interference and jamming (used in WW II)  protects users from radio multipath fading  allows multiple users to “coexist” and transmit simultaneously with minimal interference (if codes are “orthogonal”)

5: Link Layer and Local Area Networks5a-17 Random Access protocols  A node transmits at random (ie, no a priory coordination among nodes) at full channel data rate R.  If two or more nodes “collide”, they retransmit at random times  The random access MAC protocol specifies how to detect collisions and how to recover from them (via delayed retransmissions, for example)  Examples of random access MAC protocols: (a) SLOTTED ALOHA (b) ALOHA (c) CSMA and CSMA/CD

5: Link Layer and Local Area Networks5a-18 Slotted Aloha  all frames consist of exactly L bits  time is divided into equal size slots (full packet size of L/R)  a newly arriving station transmits only at the beginning of the next slot  if collision occurs (assume channel feedback, eg the receiver informs the source of a collision), the source retransmits the packet at each slot with probability p, until successful  Success (S), Collision (C), Empty (E) slots  S-ALOHA is channel utilization efficient; it is fully decentralized.

5: Link Layer and Local Area Networks5a-19 Slotted Aloha efficiency If N stations have packets to send, and each transmits in each slot with probability p, the probability of successful transmission S is: For a particular node, S= p (1-p) (N-1) For an arbitrary node of the N, S = Prob (only one transmits) = N p (1-p) (N-1) Optimal value of P: P = 1/N For example, if N=2, S=.5 For N very large one finds S= 1/e (approximately,.37)

5: Link Layer and Local Area Networks5a-20 Pure (unslotted) ALOHA  Slotted ALOHA requires slot synchronization  A simpler version, pure ALOHA, does not require slots  A node transmits without awaiting for the beginning of a slot  Collision probability increases (packet can collide with other packets which are transmitted within a window twice as large as in S-Aloha)  Throughput is reduced by one half, ie S= 1/(2e)

5: Link Layer and Local Area Networks5a-21 CSMA (Carrier Sense Multiple Access)  CSMA: listen before transmit. If channel is sensed busy, defer transmission  Collision Detection: a transmitting node listens to the channel while it is transmitting. If it detects that another node is transmitting an interfering frame, it stops transmitting and uses some protocol to determine when it should next attempts to transmit.  Note: collisions may still exist, since two stations may sense the channel idle at the same time.  In case of collision, the entire packet transmission time is wasted

5: Link Layer and Local Area Networks5a-22 CSMA/CD (Collision Detection)  CSMA/CD: carrier sensing and deferral like in CSMA. But, collisions are detected within a few bit times.  Transmission is then aborted, reducing the channel wastage considerably.  Typically, persistent retransmission is implemented  Collision detection is easy in wired LANs (eg, E-net): can measure signal strength on the line, or code violations, or compare transmit and receive signals  Collision detection cannot be done in wireless LANs (the receiver is shut off while transmitting, to avoid damaging it with excess power)  CSMA/CD can approach channel utilization =1 in LANs (low ratio of propagation over packet transmission time)

5: Link Layer and Local Area Networks5a-23 “Taking Turns” MAC protocols  MAC desirable properties: 1.When only one node  node throughput = R 2.When M nodes  each node throughput = R/M  So far we have seen that channel partitioning MAC protocols (TDM, FDM and CDMA) can share the channel fairly; but a single station cannot use it all  Random access MAC protocols allow a single user full channel rate; but cannot share the channel fairly (in fact, capture is often observed), ALOHA and CSMA  Also there are “taking turns” protocols...

5: Link Layer and Local Area Networks5a-24 “Taking Turns” MAC protocols  Taking Turns MAC protocols achieve both fairness and full rate, at the expense of some extra control overhead (a) Polling: A Master station on a LAN in turn “invites” the slave stations to transmit their packets (up to a Max). Problems: Request to Send/Clear to Send overhead, latency, single point of failure (Master); A centralized protocol (b) Token passing: The control token is passed from one node to the next sequentially. Can alleviate the latency and improve fault tolerance (in a token bus configuration). Still, elaborate procedures to recover from lost token, etc.; A decentralized protocol

5: Link Layer and Local Area Networks5a-25 Summary of MAC protocols  What do you do with a shared media?  Channel Partitioning, by time or frequency Code Division MA, Wave Division MA  Random partitioning (dynamic), ALOHA, S-ALOHA, CSMA, CSMA/CD  Taking Turns polling from a central cite, token passing  For satellites, sensing if the channel is busy (if the channel is carrying a signal) is hard: ALOHA  For LANs, carrier sensing is easier, but no perfect: CSMA  Improve things is Collision Detection exists (CSMA/CD)  (Ethernet) is CSMA/CD