5-1 Data Link Layer r What is Data Link Layer? r Multiple access protocols r Link-layer Addressing r Ethernet.

Slides:



Advertisements
Similar presentations
Ethernet “dominant” LAN technology: cheap $20 for 100Mbs!
Advertisements

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.
1 Ethernet EECS 489 Computer Networks Z. Morley Mao Wednesday Feb 21, 2007 Acknowledgement: Some slides taken.
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 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 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.
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.
1 Announcement r Homework #3 was due last night r Homework #4 is out.
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 22.
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:
Chapter 5 Link Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 21.
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.
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.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
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.
Introduction 1 Lecture 25 Link Layer (Ethernet, Switch) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
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.
Introduction1-1 Data Communications and Computer Networks Chapter 5 CS 3830 Lecture 26 Omar Meqdadi Department of Computer Science and Software Engineering.
5: DataLink Layer5-1 LAN technologies Data link layer so far: m services, error detection/correction, multiple access Next: LAN technologies m addressing.
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.
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 Chapter 5 Link Layer and LANs Part 4: Link Layer addressing Ethernet Computer Networking: A Top Down Approach 6 th edition Jim Kurose,
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.
4-1 Last time □ Link layer overview ♦ Services ♦ Adapters □ Error detection and correction ♦ Parity check ♦ Internet checksum ♦ CRC □ PPP ♦ Byte stuffing.
Chapter 5 Link Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Link Layer multiple.
Link Layer5-1 Chapter 5: Link layer our goals:  understand principles behind link layer services:  error detection, correction  sharing a broadcast.
Link Layer: MAC Ilam University Dr. Mozafar Bag-Mohammadi.
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.
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 The Data Link Layer Chapter 5 Kurose and Ross Today 5.1 and 5.3.
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.
Multiple Access Links and Protocols
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 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.
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.
Lecture 22 University of Nevada – Reno Computer Science & Engineering Department Fall 2015 CPE 400 / 600 Computer Communication Networks Prof. Shamik Sengupta.
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)
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.
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: 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 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-1 Last time □ Multiple access protocols ♦ Channel partitioning MAC protocols TDMA, FDMA ♦ Random access MAC protocols Slotted Aloha, Pure Aloha, CSMA,
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.
Link Layer 5.1 Introduction and services
Random Access Protocols
Chapter 5 Link Layer and LANs
Computer Communication Networks
CS 457 – Lecture 6 Ethernet Spring 2012.
Data Link Issues Relates to Lab 2.
Multiple access.
Data Link Issues Relates to Lab 2.
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 5.1 Introduction and services
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.
Presentation transcript:

5-1 Data Link Layer r What is Data Link Layer? r Multiple access protocols r Link-layer Addressing r Ethernet

5-2 Link Layer Services r framing, link access: m encapsulate datagram into frame, adding header, trailer m channel access if shared medium m “MAC” addresses used in frame headers to identify source, dest different from IP address!

5-3 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 r half-duplex and full-duplex m with half duplex, nodes at both ends of link can transmit, but not at same time

5-4 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-5 Multiple Access Links and Protocols Two types of “links”: r point-to-point m PPP for dial-up access m point-to-point link between Ethernet switch and host r broadcast (shared wire or medium) m old-fashioned Ethernet m upstream HFC m wireless LAN shared wire (e.g., cabled Ethernet) shared RF (e.g., WiFi) shared RF (satellite) humans at a cocktail party (shared air, acoustical)

5-6 Multiple Access protocols r single shared broadcast channel r two or more simultaneous transmissions by nodes: interference m collision if node receives two or more signals at the same time multiple access protocol r distributed algorithm that determines how nodes share channel, i.e., determine when node can transmit r communication about channel sharing must use channel itself! m no out-of-band channel for coordination

5-7 Ideal Multiple Access Protocol What are the multiple access protocols?

5-8 Channel Partitioning MAC protocols: 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 slot frame

5-9 Channel Partitioning MAC protocols: FDMA FDMA: frequency division multiple access r channel spectrum divided into frequency bands r 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 FDM cable

5-10 Ideal Multiple Access Protocol TDMA and FDMA have their own disadvantages…

5-11 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 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, CSMA/CD, CSMA/CA

5-12 Slotted ALOHA Assumptions: r all frames same size r time divided into equal size slots (time to transmit 1 frame) r nodes start to transmit only slot beginning r nodes are synchronized r if 2 or more nodes transmit in slot, all nodes detect collision Operation: r when node obtains fresh frame, transmits in next slot m if no collision: node can send new frame in next slot m if collision: node retransmits frame in each subsequent slot with prob. p until success

5-13 Slotted ALOHA Pros r single active node can continuously transmit at full rate of channel r highly decentralized: only slots in nodes need to be in sync r simple Cons r collisions, wasting slots r idle slots r nodes may be able to detect collision in less than time to transmit packet r clock synchronization

5-14 Pure (unslotted) ALOHA r unslotted Aloha: simpler, no synchronization r when frame first arrives m transmit immediately r collision probability increases: m frame sent at t 0 collides with other frames sent in [t 0 -1,t 0 +1]

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

5-16 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 r collision detection: m easy in wired LANs: measure signal strengths, compare transmitted, received signals m difficult in wireless LANs: received signal strength overwhelmed by local transmission strength r human analogy: the polite conversationalist

5-17 “Taking Turns” MAC protocols channel partitioning MAC protocols: m share channel efficiently and fairly 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 “taking turns” protocols look for best of both worlds!

5-18 “Taking Turns” MAC protocols Polling: r master node “invites” slave nodes to transmit in turn r typically used with “dumb” slave devices r concerns: m polling overhead m latency m single point of failure (master) master slaves poll data

5-19 “Taking Turns” MAC protocols 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) T data (nothing to send) T

5-20 Summary of MAC protocols r channel partitioning, by time, frequency or code m Time Division, Frequency Division r random access (dynamic), m ALOHA, S-ALOHA, CSMA, CSMA/CD m carrier sensing: easy in some technologies (wire), hard in others (wireless) m CSMA/CD used in Ethernet m CSMA/CA used in r taking turns m polling from central site, token passing m Bluetooth, FDDI, IBM Token Ring

5-21 MAC Addresses r 32-bit IP address: m network-layer address m used to get datagram to destination IP subnet r MAC (or LAN or physical or Ethernet) address: m function: get frame from one interface to another physically-connected interface (same network) m 48 bit MAC address (for most LANs) burned in NIC ROM, also sometimes software settable

5-22 LAN Addresses and ARP Each adapter on LAN has unique LAN address Broadcast address = FF-FF-FF-FF-FF-FF = adapter 1A-2F-BB AD D7-FA-20-B0 0C-C4-11-6F-E F7-2B LAN (wired or wireless)

5-23 LAN Address (more) r MAC address allocation administered by IEEE r manufacturer buys portion of MAC address space (to assure uniqueness) r analogy: (a) MAC address: like Social Security Number (b) IP address: like postal address  MAC flat address ➜ portability m can move LAN card from one LAN to another r IP hierarchical address NOT portable m address depends on IP subnet to which node is attached

5-24 Ethernet “dominant” wired LAN technology: r cheap $20 for NIC r first widely used LAN technology r simpler, cheaper than token LANs and ATM r kept up with speed race: 10 Mbps – 10 Gbps Metcalfe’s Ethernet sketch

5-25 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-26 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-27 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

5-28 Ethernet: Unreliable, connectionless r connectionless: No handshaking between sending and receiving NICs r unreliable: receiving NIC doesn’t send acks or nacks to sending NIC m stream of datagrams passed to network layer can have gaps (missing datagrams) m gaps will be filled if app is using TCP m otherwise, app will see gaps r Ethernet’s MAC protocol: unslotted CSMA/CD

5-29 Ethernet CSMA/CD algorithm 1. NIC receives datagram from network layer, creates frame 2. If NIC senses channel idle, starts frame transmission If NIC senses channel busy, waits until channel idle, then transmits 3. If NIC transmits entire frame without detecting another transmission, NIC is done with frame ! 4. If NIC detects another transmission while transmitting, aborts and sends jam signal 5. After aborting, NIC enters exponential backoff: after mth collision, NIC chooses K at random from {0,1,2,…,2 m -1}. NIC waits K·512 bit times, returns to Step 2

5-30 Ethernet’s CSMA/CD (more) Jam Signal: make sure all other transmitters are aware of collision; 48 bits Bit time:.1 microsec for 10 Mbps Ethernet ; for K=1023, wait time is about 50 msec Exponential Backoff: r Goal: adapt retransmission attempts to estimated current load m heavy load: random wait will be longer r first collision: choose K from {0,1}; delay is K· 512 bit transmission times r after second collision: choose K from {0,1,2,3}… r after ten collisions, choose K from {0,1,2,3,4,…,1023}

5-31 Hubs … physical-layer (“dumb”) repeaters: m bits coming in one link go out all other links at same rate m all nodes connected to hub can collide with one another m no frame buffering m no CSMA/CD at hub: host NICs detect collisions twisted pair hub

5-32 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-33 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)