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…

Slides:



Advertisements
Similar presentations
Data Link Layer B. Konkoth. PDU  Protocol Data Unit  A unit of data which is specified in a protocol of a given layer  Layer 5, 6, 7 – Data  Layer.
Advertisements

Ethernet “dominant” LAN technology: cheap $20 for 100Mbs!
Review r Error Detection: CRC r Multiple access protocols m Slotted ALOHA m CSMA/CD r Homework 3 out r Project 3 out, link state only. Some slides are.
5: DataLink Layer5-1 Mac Addressing, Ethernet, and Interconnections.
The ALOHA Protocol “Free for all”: whenever station has a frame to send, it does so. –Station listens for maximum RTT for an ACK. –If no ACK after a specified.
1 Ethernet EECS 489 Computer Networks Z. Morley Mao Wednesday Feb 21, 2007 Acknowledgement: Some slides taken.
5-1 Link Layer: Introduction Some terminology: r hosts and routers are nodes r communication channels that connect adjacent nodes along communication path.
5: DataLink Layer5-1 MAC Addresses and ARP r 32-bit IP address: m network-layer address m used to get datagram to destination IP subnet r MAC (or LAN or.
5: DataLink Layer5-1 Data Link Layer r What is Data Link Layer? r Multiple access protocols r Ethernet.
5-1 Data Link Layer r What is Data Link Layer? r Multiple access protocols r Link-layer Addressing r Ethernet.
EE 122: Ethernet and Ion Stoica September 18, 2002 (* this talk is based in part on the on-line slides of J. Kurose & K. Rose)
Chapter 5 Link Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 20.
5: DataLink Layer – Ethernet, Hubs and Switches.
1 Interconnection ECS 152A. 2 Interconnecting with hubs r Backbone hub interconnects LAN segments r Extends max distance between nodes r But individual.
MAC Addresses and ARP 32-bit IP address: –network-layer address –used to get datagram to destination IP subnet MAC (or LAN or physical or Ethernet) address:
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
Review r Error Detection: CRC r Multiple access protocols m Slotted ALOHA m CSMA/CD r LAN addresses and ARP r Ethernet Some slides are in courtesy of J.
Introduction 1 Lecture 25 Link Layer (Ethernet, Switch) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
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,
5: DataLink Layer5-1 LAN technologies Data link layer so far: m services, error detection/correction, multiple access Next: LAN technologies m addressing.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 17.
1 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  two or more transmitting.
Introduction1-1 Data Communications and Computer Networks Chapter 5 CS 3830 Lecture 27 Omar Meqdadi Department of Computer Science and Software Engineering.
5: DataLink Layer5-1 Ethernet “dominant” wired LAN technology: r cheap $20 for 100Mbs! r first widely used LAN technology r Simpler, cheaper than token.
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 Computer Communication & Networks Lecture 13 Datalink Layer: Local Area Network Waleed Ejaz
Link Layer: MAC Ilam University Dr. Mozafar Bag-Mohammadi.
Review: –Ethernet What is the MAC protocol in Ethernet? –CSMA/CD –Binary exponential backoff Is there any relationship between the minimum frame size and.
Data Link Layer Moving Frames. Link Layer Protocols: ethernet, wireless, Token Ring and PPP Has node-to-node job of moving network layer.
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.
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 CSMA (Carrier Sense Multiple Access) CSMA: listen before transmit: If channel sensed idle: transmit entire frame r If channel sensed.
CS 1652 Jack Lange University of Pittsburgh 1. 5: DataLink Layer5-2 MAC Addresses and ARP r 32-bit IP address: m network-layer address m used to get datagram.
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.
Ch 5. The Link Layer and Local Area Networks Myungchul Kim
Lecture 22 University of Nevada – Reno Computer Science & Engineering Department Fall 2015 CPE 400 / 600 Computer Communication Networks Prof. Shamik Sengupta.
EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao
EE 122: Lecture 6 Ion Stoica September 13, 2001 (* this talk is based in part on the on-line slides of J. Kurose & K. Rose)
Shashank Srivastava Motilal Nehru national Institute Of Information Technology, Allahabad Data Link Layer.
1 Multiple Access: Ethernet Section Point-to-Point vs. Broadcast Media Point-to-point –PPP for dial-up access –Point-to-point link between Ethernet.
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: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction m.
5: DataLink Layer5-1 Link-layer switches. 5: DataLink Layer5-2 Hubs … physical-layer (“dumb”) repeaters: m bits coming in one link go out all other links.
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.
CS 457 – Lecture 3 Link Layer Protocols Fall 2011.
5-1 Last time □ Multiple access protocols ♦ Channel partitioning MAC protocols TDMA, FDMA ♦ Random access MAC protocols Slotted Aloha, Pure Aloha, CSMA,
Link Layer 5.1 Introduction and services
Link Layer 5.1 Introduction and services
Chapter 5 Link Layer and LANs
MAC Addresses and ARP 32-bit IP address:
Hubs Hubs are essentially physical-layer repeaters:
University of Pittsburgh
ARP: Address Resolution Protocol
CS 457 – Lecture 6 Ethernet Spring 2012.
Data Link Issues Relates to Lab 2.
Mac Addressing, Ethernet, and Interconnections
Data Link Issues Relates to Lab 2.
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.
Protocol layering and data
EEC-484/584 Computer Networks
Chapter 5 Link Layer Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Link Layer.
Protocol layering and data
Link Layer: Multiple Access
LAN Addresses and ARP IP address: drives the packet to destination network LAN (or MAC or Physical) address: drives the packet to the destination node’s.
Link Layer 5.1 Introduction and services
Presentation transcript:

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-2 Quick recapitulation r What are the other layers? r What are their functions?

r application: supporting network applications m HTTP, FTP, SMTP r transport: process-process data transfer m TCP, UDP r network: routing of datagrams from source to destination m IP addressing, routing protocols r Data link: more concerned about the actual link access m Ethernet r physical: bits “on the wire” 1-3 Internet protocol stack Lecture 3 Introduction application transport network link physical

5-4 Link Layer Services r framing, link access: m encapsulate datagram into frame, adding header, trailer m “MAC” addresses used in frame headers to identify source, dest different from IP address! m channel access if shared medium m Data link layer is more concerned about the competition for the link capturing…so that it can actually transmit packets… m We will study ETHERNET mechanism

5-5 Link Layer Services (more) r flow control: m pacing between adjacent sending and receiving nodes r error detection: m errors caused by signal attenuation, noise. m receiver detects presence of errors: signals sender for retransmission or drops frame r error correction: m receiver identifies and corrects bit error(s) without resorting to retransmission

5-6 Where is the link layer implemented? r in each and every host r link layer implemented in “adaptor” (aka network interface card NIC) m Ethernet card, card m implements link, physical layer r combination of hardware, software, firmware network adapter card

5-7 Link Layer is more concerned about competition! r Competition among whom? m Among the hosts (machines) r Shared medium (shared wire or shared air) m Ethernet LAN (local area network) m wireless LAN shared RF (e.g., WiFi) humans at a cocktail party (shared air, acoustical) shared wire (e.g., cabled Ethernet)

5-8 Multiple Access Control protocols r Single shared broadcast medium (Ethernet or air) r Everybody tries to capture that… r Results in “collision” r Collision: When two or more nodes transmit packets simultaneously, the packets collide with each other m Transmissions fail and packets are lost Obviously, this is not good !!! r So, we need a mechanism (protocol) such that collisions can be reduced: Multiple Access Control Protocol

5-9 Our very popular Ethernet follows one such Multiple Access Control Protocol Let us see how it works…

5-10 CSMA (Carrier Sense Multiple Access) (Step 1) CSMA: listen before transmit: r If channel sensed idle: transmit entire frame r If channel sensed busy, defer transmission till the channel becomes idle… r human analogy: don’t interrupt others!

5-11 CSMA/CD (Collision Detection) (step 2) CSMA/CD: carrier sensing, deferral as in CSMA m If channel sensed idle, attempt transmission m What might go wrong now? Another node also sensed the channel idle and transmitted m Collision occurs and collisions detected through high energy received m Retransmission of packets necessary r human analogy: the polite conversationalist

5-12 CSMA/CD with Backoff (step 3) CSMA/CD with Backoff: carrier sensing, deferral as in CSMA m If channel sensed idle, attempt transmission m What might go wrong now? Another node also sensed the channel idle and transmitted m Collision occurs and collisions detected through high energy received m After collision, colliding nodes wait a random time (backoff) before retransmissions r human analogy: the polite conversationalist

5-13 CSMA/CD with Binary Exponential Backoff (step 4) CSMA/CD with “Binary Exponential Backoff”: How much time for backing off? m When a collision occurs, instead of attempting retransmissions, the nodes wait a random amount of time m 1 st collision: the colliding node chooses a random number in between [0, 1] and waits that many time slots before attempting again… r human analogy: the polite conversationalist

5-14 CSMA/CD with Binary Exponential Backoff (contd.) (step 4 contd.) CSMA/CD with “Binary Exponential Backoff”: How much time for backing off? m Suppose, after the first collision, two nodes generated the same random number 1 from [0, 1] m Wait for 1 timeslot and then retransmit again… m Collision happens again… m 2 nd collision: the colliding nodes now increase their range and chooses a random number in between [0, 1, 2, 3] and waits that many time slots before attempting again…

5-15 CSMA/CD with Binary Exponential Backoff (contd.) (step 4 contd.) CSMA/CD with “Binary Exponential Backoff”: How much time for backing off? m Still collision happens for a node…(3 rd collision for the packet) m 3 rd collision: the colliding node now increase their range yet again and chooses a random number in between [0, 1, 2, 3, 4, 5, 6, 7] and waits that many time slots before attempting again… m … m after TEN collisions, choose a random number from {0,1,2,3,4,…,1023}, wait for that many slots and retry…

5-16 Star topology r bus topology popular through mid 90s m all nodes in same collision domain (can collide with each other) r today: star topology prevails m active switch in center m each “spoke” runs a (separate) Ethernet protocol (nodes do not collide with each other) switch bus: coaxial cable star

5-17 Switch r link-layer device: smarter than hubs, take active role m store, forward Ethernet frames m examine incoming frame’s MAC address, selectively forward frame to one-or-more outgoing links when frame is to be forwarded on segment, uses CSMA/CD to access segment r transparent m hosts are unaware of presence of switches r plug-and-play, self-learning m switches do not need to be configured

5-18 Switch: allows multiple simultaneous transmissions r hosts have dedicated, direct connection to switch r switches buffer packets r Ethernet protocol used on each incoming link, but no collisions; full duplex m each link is its own collision domain r switching: A-to-A’ and B- to-B’ simultaneously, without collisions m not possible with dumb hub A A’ B B’ C C’ switch with six interfaces (1,2,3,4,5,6)

5-19 Ethernet Frame Structure Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame Preamble: r 7 bytes with pattern followed by one byte with pattern r used to synchronize receiver, sender clock rates

5-20 Ethernet Frame Structure (more) r Addresses: 6 bytes m if adapter receives frame with matching destination address, or with broadcast address (eg ARP packet), it passes data in frame to network layer protocol m otherwise, adapter discards frame r Type: indicates higher layer protocol (mostly IP but others possible, e.g., Novell IPX, AppleTalk) r CRC: checked at receiver, if error is detected, frame is dropped