data link layer
play

Data Link Layer Home network Regional ISP Yanmin Zhu - PowerPoint PPT Presentation

Data Link Layer Mobile network Global ISP Data Link Layer Home network Regional ISP Yanmin Zhu Institutional network Department of Computer Science and Engineering 1 Network Layer Data Link Layer Link Layer 1 Introduction and 5


  1. Data Link Layer Mobile network Global ISP Data Link Layer Home network Regional ISP Yanmin Zhu Institutional network Department of Computer Science and Engineering 1 Network Layer

  2. Data Link Layer Link Layer  1 Introduction and  5 Ethernet services  6 Link-layer switches  2 Error detection  7 PPP and correction  8 Link virtualization:  3 Multiple access ATM, MPLS protocols  4 Link-layer Addressing 5-2 5: DataLink Layer

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

  4. Data Link Layer Inventors of Ethernet  Robert Metcalfe  PhD Harvard, 1973  David Boggs  PhD Stanford 1982  Mr Metcalfe generating the ideas  Mr Boggs figuring out how to build David Boggs and Robert Metcalfe the system 1-4 Introduction

  5. Data Link Layer Xerox PARC  Ethernet  Laser Printing  GUI  Object-oriented Programming (SmallTalk)  WYSIWYG  …… 1-5 Introduction

  6. Data Link Layer Metcalfe's law Value of a telecommunications network is proportional to the square of the number of connected users of the system ( n 2 ). 1-6 Introduction

  7. Data Link Layer Bus Topology bus: coaxial cable  Old fashioned, Based on Coax  Bus topology popular through mid 90s 1-7 Introduction

  8. Data Link Layer Star topology  today: star topology prevails  active switch in center  each “spoke” runs a (separate) Ethernet protocol (nodes do not collide with each other) switch star 5-8 5: DataLink Layer

  9. Data Link Layer Ethernet Frame Structure Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame Preamble:  7 bytes with pattern 10101010 followed by one byte with pattern 10101011  used to synchronize receiver, sender clock rates 5-9 5: DataLink Layer

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

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

  12. Data Link Layer Ethernet CSMA/CD algorithm  1. NIC receives datagram from network layer, creates frame  2. Carrier sensing  If NIC senses channel idle, starts frame transmission  If NIC senses channel busy, waits until channel idle, then transmits 5-12 5: DataLink Layer

  13. Data Link Layer Ethernet CSMA/CD algorithm (2) 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 After aborting, NIC enters exponential backoff : after m th collision, NIC chooses K at random from {0,1,2,…, 2 m -1}. NIC waits K · 512 bit times, returns to Step 2 demo 5-13 5: DataLink Layer

  14. Data Link Layer Ethernet’s CSMA/CD (more) Exponential Backoff: Jam Signal: make sure all other transmitters are  Goal: adapt retransmission aware of collision; 48 bits attempts to estimated Bit time: 0.1 microsec for 10 current load Mbps Ethernet ;  heavy load: random wait for K=1023, wait time is will be longer about 50 msec  first collision: choose K from {0,1}; delay is K · 512 bit transmission times  after second collision: choose See/interact with Java K from {0,1,2,3}… applet on AWL Web site:  after ten collisions, choose K highly recommended ! from {0,1,2,3,4,…,1023} 5-14 5: DataLink Layer

  15. Data Link Layer Why Exponential?  When there are a small number of competitors, resolve completion in short time => wait a short time  When there are a larger number of competitors, resolve completion in longer time  When experiencing more collisions , be aware of more competitors 1-15 Introduction

  16. Data Link Layer CSMA/CD efficiency  T prop = max prop delay between 2 nodes in LAN  t trans = time to transmit max-size frame 1  efficiency  1 5 t prop /t trans  efficiency goes to 1  as t prop goes to 0  as t trans goes to infinity  better performance than ALOHA: and simple, cheap, decentralized ! 5-16 5: DataLink Layer

  17. Data Link Layer Minimum Frame Length  (1) To make it easier to distinguish valid frames from garbage , Ethernet requires that valid frames must be at least 64 bytes long, from destination address to checksum.  (2) Another is to prevent a station from completing the transmission of a short frame before a potential collision could be detected. 17 MAC Sublayer

  18. Data Link Layer Minimum Frame Length (64 bytes) All frames must take more than 2τ to send so that the transmission is still taking place when the noise burst gets back to the sender in the worst case. 18 MAC Sublayer

  19. Data Link Layer Minimum Frame Length (64 bytes)  Collision detection can take as long as 2 . F min 2 B l 2 2 F B B min v 1-19 Introduction

  20. Data Link Layer 802.3 Ethernet Standards: Link & Physical Layers  many different Ethernet standards  common MAC protocol and frame format  different speeds: 2 Mbps, 10 Mbps, 100 Mbps, 1Gbps, 10G bps  different physical layer media: fiber, cable MAC protocol application and frame format transport network 100BASE-T2 100BASE-FX 100BASE-TX link 100BASE-BX 100BASE-T4 100BASE-SX physical fiber physical layer copper (twister pair) physical layer 5-20 5: DataLink Layer

  21. Data Link Layer Manchester encoding  used in 10BaseT  each bit has a transition  allows clocks in sending and receiving nodes to synchronize to each other  no need for a centralized, global clock among nodes!  Hey, this is physical-layer stuff! 5-21 5: DataLink Layer

  22. Data Link Layer Development of Ethernet Giga Ethernet IEEE 802.3z Fast Ethernet IEEE 802.3 10g Ethernet IEEE 802.3u (thick coax) IEEE 802.3ae Invented 1983 1973 2003 1995 1998 1-22 Introduction

  23. Data Link Layer Link Layer  1 Introduction and  5 Ethernet services  6 Link-layer switches  2 Error detection  7 PPP and correction  8 Link virtualization:  3 Multiple access ATM, MPLS protocols  4 Link-layer Addressing 5-23 5: DataLink Layer

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

  25. Data Link Layer Switch  link-layer device: smarter than hubs, take active role  store, forward Ethernet frames  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  transparent  hosts are unaware of presence of switches  plug-and-play, self-learning  switches do not need to be configured 5-25 5: DataLink Layer

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

  27. Data Link Layer Switch Table A  Q: how does switch know that A’ reachable via interface 4, C’ B B’ reachable via interface 5?  A: each switch has a switch 1 2 3 6 table, each entry: 4 5  (MAC address of host, interface to reach host, time stamp) C  looks like a routing table! B’ A’  Q: how are entries created, maintained in switch table? switch with six interfaces  something like a routing (1,2,3,4,5,6) protocol? 5-27 5: DataLink Layer

  28. Data Link Layer Switch: self-learning Source: A Dest: A’ A A’ A  switch learns which hosts can be reached through C’ B which interfaces  when frame received, 1 2 3 6 switch “learns” location of 4 sender: incoming LAN 5 segment C  records sender/location pair in switch table B’ A’ MAC addr interface TTL Switch table A 1 60 (initially empty) 5-28 5: DataLink Layer

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend