Lectured Computer networks 1 - Chapter 5: The data link layer has contents: Introduction and services, error detection and correction, multiple access protocols, link-layer Addressing, link-layer switches.... and other contents.
Computer Networks (Mạng Máy Tính 1) Lectured by: Dr Phạm Trần Vũ CuuDuongThanCong.com https://fb.com/tailieudientucntt Chapter Link Layer and LAN Computer Networking: A Top Down Approach , 5th edition Jim Kurose, Keith Ross Addison-Wesley, April 2009 All material copyright 1996-2009 J.F Kurose and K.W Ross, All Rights Reserved CuuDuongThanCong.com Introduction https://fb.com/tailieudientucntt 1-2 Chapter 5: The Data Link Layer Our goals: understand principles behind data link layer services: error detection, correction sharing a broadcast channel: multiple access link layer addressing reliable data transfer, flow control: done! instantiation and implementation of various link layer technologies CuuDuongThanCong.com 5: DataLink Layer https://fb.com/tailieudientucntt 5-3 Link Layer 5.1 Introduction and services 5.2 Error detection and correction 5.3 Multiple access protocols 5.4 Link-layer Addressing 5.5 Ethernet CuuDuongThanCong.com 5.6 Link-layer switches 5.7 PPP 5.8 Link virtualization: ATM, MPLS 5: DataLink Layer https://fb.com/tailieudientucntt 5-4 Link Layer: Introduction Some terminology: hosts and routers are nodes communication channels that connect adjacent nodes along communication path are links wired links wireless links LANs layer-2 packet is a frame, encapsulates datagram data-link layer has responsibility of transferring datagram from one node to adjacent node over a link 5: DataLink Layer CuuDuongThanCong.com https://fb.com/tailieudientucntt 5-5 Link layer: context datagram transferred by different link protocols over different links: e.g., Ethernet on first link, frame relay on intermediate links, 802.11 on last link each link protocol provides different services e.g., may or may not provide rdt over link CuuDuongThanCong.com transportation analogy trip from Princeton to Lausanne limo: Princeton to JFK plane: JFK to Geneva train: Geneva to Lausanne tourist = datagram transport segment = communication link transportation mode = link layer protocol travel agent = routing algorithm 5: DataLink Layer https://fb.com/tailieudientucntt 5-6 Link Layer Services framing, link access: encapsulate datagram into frame, adding header, trailer channel access if shared medium “MAC” addresses used in frame headers to identify source, dest • different from IP address! reliable delivery between adjacent nodes we learned how to this already (chapter 3)! seldom used on low bit-error link (fiber, some twisted pair) wireless links: high error rates • Q: why both link-level and end-end reliability? CuuDuongThanCong.com 5: DataLink Layer https://fb.com/tailieudientucntt 5-7 Link Layer Services (more) flow control: pacing between adjacent sending and receiving nodes error detection: errors caused by signal attenuation, noise receiver detects presence of errors: • signals sender for retransmission or drops frame error correction: receiver identifies and corrects bit error(s) without resorting to retransmission half-duplex and full-duplex with half duplex, nodes at both ends of link can transmit, but not at same time CuuDuongThanCong.com 5: DataLink Layer https://fb.com/tailieudientucntt 5-8 Where is the link layer implemented? in each and every host link layer implemented in “adaptor” (aka network interface card NIC) Ethernet card, PCMCI card, 802.11 card implements link, physical layer attaches into host’s system buses combination of hardware, software, firmware CuuDuongThanCong.com host schematic application transport network link cpu memory host bus (e.g., PCI) controller link physical physical transmission network adapter card 5: DataLink Layer https://fb.com/tailieudientucntt 5-9 Adaptors Communicating datagram datagram controller controller receiving host sending host datagram frame sending side: encapsulates datagram in frame adds error checking bits, rdt, flow control, etc CuuDuongThanCong.com receiving side looks for errors, rdt, flow control, etc extracts datagram, passes to upper layer at receiving side 5: DataLink Layer https://fb.com/tailieudientucntt 5- ATM Layer: Virtual Circuits VC transport: cells carried on VC from source to dest call setup, teardown for each call before data can flow each packet carries VC identifier (not destination ID) every switch on source-dest path maintain “state” for each passing connection link,switch resources (bandwidth, buffers) may be allocated to VC: to get circuit-like perf Permanent VCs (PVCs) long lasting connections typically: “permanent” route between to IP routers Switched VCs (SVC): dynamically set up on per-call basis CuuDuongThanCong.com 5: DataLink Layer https://fb.com/tailieudientucntt 5- ATM VCs Advantages of ATM VC approach: QoS performance guarantee for connection mapped to VC (bandwidth, delay, delay jitter) Drawbacks of ATM VC approach: Inefficient support of datagram traffic one PVC between each source/dest pair) does not scale (N*2 connections needed) SVC introduces call setup latency, processing overhead for short lived connections CuuDuongThanCong.com 5: DataLink Layer https://fb.com/tailieudientucntt 5- ATM Layer: ATM cell 5-byte ATM cell header 48-byte payload Why?: small payload -> short cell-creation delay for digitized voice halfway between 32 and 64 (compromise!) Cell header Cell format CuuDuongThanCong.com 5: DataLink Layer https://fb.com/tailieudientucntt 5- ATM cell header VCI: virtual channel ID will change from link to link thru net PT: Payload type (e.g RM cell versus data cell) CLP: Cell Loss Priority bit CLP = implies low priority cell, can be discarded if congestion HEC: Header Error Checksum cyclic redundancy check CuuDuongThanCong.com 5: DataLink Layer https://fb.com/tailieudientucntt 5- ATM Physical Layer (more) Two pieces (sublayers) of physical layer: Transmission Convergence Sublayer (TCS): adapts ATM layer above to PMD sublayer below Physical Medium Dependent: depends on physical medium being used TCS Functions: Header checksum generation: bits CRC Cell delineation With “unstructured” PMD sublayer, transmission of idle cells when no data cells to send CuuDuongThanCong.com 5: DataLink Layer https://fb.com/tailieudientucntt 5- ATM Physical Layer Physical Medium Dependent (PMD) sublayer SONET/SDH: transmission frame structure (like a container carrying bits); bit synchronization; bandwidth partitions (TDM); several speeds: OC3 = 155.52 Mbps; OC12 = 622.08 Mbps; OC48 = 2.45 Gbps, OC192 = 9.6 Gbps TI/T3: transmission frame structure (old telephone hierarchy): 1.5 Mbps/ 45 Mbps unstructured: just cells (busy/idle) CuuDuongThanCong.com 5: DataLink Layer https://fb.com/tailieudientucntt 5- IP-Over-ATM Classic IP only “networks” (e.g., LAN segments) MAC (802.3) and IP addresses IP over ATM replace “network” (e.g., LAN segment) with ATM network ATM addresses, IP addresses ATM network Ethernet LANs Ethernet LANs CuuDuongThanCong.com 5: DataLink Layer https://fb.com/tailieudientucntt 5- IP-Over-ATM app transport IP Eth phy IP AAL Eth ATM phy phy ATM phy CuuDuongThanCong.com ATM phy app transport IP AAL ATM phy 5: DataLink Layer https://fb.com/tailieudientucntt 5- Datagram Journey in IP-over-ATM Network at Source Host: IP layer maps between IP, ATM dest address (using ARP) passes datagram to AAL5 AAL5 encapsulates data, segments cells, passes to ATM layer ATM network: moves cell along VC to destination at Destination Host: AAL5 reassembles cells into original datagram if CRC OK, datagram is passed to IP CuuDuongThanCong.com 5: DataLink Layer https://fb.com/tailieudientucntt 5- IP-Over-ATM Issues: IP datagrams into ATM AAL5 PDUs from IP addresses to ATM addresses just like IP addresses to 802.3 MAC addresses! CuuDuongThanCong.com ATM network Ethernet LANs 5: DataLink Layer https://fb.com/tailieudientucntt 5- Multiprotocol label switching (MPLS) initial goal: speed up IP forwarding by using fixed length label (instead of IP address) to forwarding borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address! PPP or Ethernet header MPLS header label 20 CuuDuongThanCong.com IP header remainder of link-layer frame Exp S TTL 5: DataLink Layer https://fb.com/tailieudientucntt 5- MPLS capable routers a.k.a label-switched router forwards packets to outgoing interface based only on label value (don’t inspect IP address) MPLS tables forwarding table distinct from IP forwarding signaling protocol needed to set up forwarding RSVP-TE forwarding possible along paths that IP alone would not allow (e.g., source-specific routing) !! use MPLS for traffic engineering must co-exist with IP-only routers CuuDuongThanCong.com 5: DataLink Layer https://fb.com/tailieudientucntt 5- MPLS forwarding tables in label out label dest 10 12 out interface A D A 0 in label out label dest out interface 10 A 12 D R6 0 D 1 R3 R4 R5 0 R2 in label out label dest CuuDuongThanCong.com A out interface in label outR1 label dest - A A out interface 0 5: DataLink Layer https://fb.com/tailieudientucntt 5- Chapter 5: Summary principles behind data link layer services: error detection, correction sharing a broadcast channel: multiple access link layer addressing instantiation and implementation of various link layer technologies Ethernet switched LANS PPP virtualized networks as a link layer: ATM, MPLS CuuDuongThanCong.com 5: DataLink Layer https://fb.com/tailieudientucntt 5- Chapter 5: let’s take a breath journey down protocol stack complete (except PHY) solid understanding of networking principles, practice … could stop here … but lots of interesting topics! wireless multimedia security network CuuDuongThanCong.com management 5: DataLink Layer https://fb.com/tailieudientucntt 5- ... 7 4-2 9-9 C-E8-FF -5 5 A 111.111.111.111 E6-E 9-0 0-1 7-BB-4B 1A-23-F9-CD-0 6-9 B 222.222.222.220 111.111.111.110 111.111.111.112 R 222.222.222.221 222.222.222.222 B 49-BD-D2-C7 -5 6 -2 A CC-49-DE-D0-AB-7D two... containing A-to-B IP datagram sends to B 88-B 2-2 F -5 4 -1 A-0F 7 4-2 9-9 C-E8-FF -5 5 A E6-E 9-0 0-1 7-BB-4B 111.111.111.111 222.222.222.220 111.111.111.110 111.111.111.112 222.222.222.221 1A-23-F9-CD-0 6-9 B R... 5: DataLink Layer https://fb.com/tailieudientucntt 5- LAN Addresses and ARP Each adapter on LAN has unique LAN address Broadcast address = FF-FF-FF-FF-FF-FF 1A-2F-BB-7 6-0 9-AD 7 1- 6 5- F 7-2 B-08 -5 3