Last 3 Lectures: Summary Goals: Overview: network layer services understand IP addressing principles behind network layer routing principle: path selection services: IP o routing (path hierarchical routing selection) Internet routing protocols o dealing with scale reliable transfer o how a router works intra-domain o o advanced topics: inter-domain o IPv6, multicast what’s inside a router? instantiation and IPv6 implementation in multicast routing the Internet 7/10 Datakommunikation & Internet, Anders Broberg, UmU Link layer 1 Chapter 5: The Data Link Layer Our goals: understand principles behind data link layer services: o error detection, correction o sharing a broadcast channel: multiple access o link layer addressing o reliable data transfer, flow control: done! instantiation and implementation of various link layer technologies 7/10 Datakommunikation & Internet, Anders Broberg, UmU Link layer 2 Chapter 5 outline Self studies (extensive) 5.1 Introduction and services 5.2 Error detection and 5.4 LAN addresses and correction ARP 5.8 PPP 5.5 Ethernet 5.9 ATM 5.6 Hubs, bridges, and switches 5.10 Frame Relay 5.7 Wireless links and LANs 5.3Multiple access protocols Intro o (CSMA/CD) o 7/10 Datakommunikation & Internet, Anders Broberg, UmU Link layer 3 1
Link Layer: Introduction “link” Some terminology: hosts and routers are nodes (bridges and switches too) communication channels that connect adjacent nodes along communication path are links wired links o wireless links o LANs o Level 2-PDU is a frame, encapsulates datagram data-link layer has responsibility of transferring datagram from one node to adjacent node over a link 7/10 Datakommunikation & Internet, Anders Broberg, UmU Link layer 4 Link layer: context transportation analogy Datagram transferred trip from Princeton to Lausanne by different link limo: Princeton to JFK o protocols over different plane: JFK to Geneva o links: train: Geneva to Lausanne o o e.g., Ethernet on first tourist = datagram link, frame relay on transport segment = intermediate links, 802.11 communication link on last link transportation mode = link Each link protocol layer protocol provides different travel agent = routing services algorithm o e.g., may or may not provide rdt over link 7/10 Datakommunikation & Internet, Anders Broberg, UmU Link layer 5 Link Layer Services Framing, link access: encapsulate datagram into frame, adding header, trailer o Media Access Control Protocol (MAC) o ‘channel access if shared medium o ‘physical addresses’ used in frame headers to identify source, o dest different from IP address! Reliable delivery between adjacent nodes we learned how to do this already (chapter 3)! o seldom used on low bit error link (fiber, some twisted pair) o wireless links: high error rates o Q: why both link-level and end-end reliability? 7/10 Datakommunikation & Internet, Anders Broberg, UmU Link layer 6 2
Link Layer Services (more) Flow Control: pacing between adjacent sending and receiving nodes o Error Detection : errors caused by signal attenuation, noise. o receiver detects presence of errors: o signals sender for retransmission or drops frame Error Correction: receiver identifies and corrects bit error(s) without resorting o to retransmission Half-duplex and full-duplex with half duplex, nodes at both ends of link can transmit, but o not at same time 7/10 Datakommunikation & Internet, Anders Broberg, UmU Link layer 7 Adaptors Communicating datagram rcving link layer protocol sending node node frame frame adapter adapter link layer implemented receiving side in “adaptor” (aka NIC) o looks for errors, rdt, flow o Ethernet card, PCMCI control, etc card, 802.11 card o extracts datagram, sending side: passes to rcving node o encapsulates datagram in adapter is semi- a frame autonomous o adds error checking bits, rdt, flow control, etc. link & physical layers 7/10 Datakommunikation & Internet, Anders Broberg, UmU Link layer 8 Chapter 5 outline Self studies (extensive) 5.1 Introduction and services 5.4 LAN addresses and ARP 5.2 Error detection 5.5 Ethernet and correction 5.6 Hubs, bridges, and 5.8 PPP switches 5.7 Wireless links and LANs 5.9 ATM 5.3Multiple access protocols 5.10 Frame Relay Intro o (CSMA/CD) o 7/10 Datakommunikation & Internet, Anders Broberg, UmU Link layer 9 3
LAN Addresses and ARP 32-bit IP address: network-layer address used to get datagram to destination IP network (recall IP network definition) LAN (or MAC or physical or Ethernet) address: used to get datagram from one interface to another physically- connected interface (same network) 48 bit MAC address (for most LANs) burned in the adapter ROM 7/10 Datakommunikation & Internet, Anders Broberg, UmU Link layer 10 LAN Addresses and ARP Each adapter on LAN has unique LAN address 7/10 Datakommunikation & Internet, Anders Broberg, UmU Link layer 11 LAN Address (more) MAC address allocation administered by IEEE manufacturer buys portion of MAC address space (to assure uniqueness) Analogy: (a) MAC address: like Social Security Number (b) IP address: like postal address MAC flat address => portability can move LAN card from one LAN to another o IP hierarchical address NOT portable depends on IP network to which node is attached o 7/10 Datakommunikation & Internet, Anders Broberg, UmU Link layer 12 4
Recall earlier routing discussion Starting at A, given IP A datagram addressed to B: 223.1.1.1 look up net. address of B, find 223.1.2.1 223.1.1.2 B on same net. as A 223.1.2.9 223.1.1.4 link layer send datagram to B B 223.1.2.2 inside link-layer frame E 223.1.1.3 223.1.3.27 223.1.3.2 223.1.3.1 frame source, datagram source, dest address dest address A’s IP B’s MAC A’s MAC B’s IP IP payload addr addr addr addr datagram frame 7/10 Datakommunikation & Internet, Anders Broberg, UmU Link layer 13 ARP: Address Resolution Protocol Each IP node (Host, Router) Question: how to determine on LAN has ARP table MAC address of B ARP Table: IP/MAC address mappings for some LAN knowing B’s IP address? nodes < IP address; MAC address; TTL> TTL (Time To Live): time o after which address mapping will be forgotten (typically 20 min) 7/10 Datakommunikation & Internet, Anders Broberg, UmU Link layer 14 ARP protocol A wants to send datagram to A caches (saves) IP-to- B, and A knows B’s IP address. MAC address pair in its ARP table until Suppose B’s MAC address is not in A’s ARP table. information becomes old A broadcasts ARP query (times out) packet, containing B's IP o soft state: information address that times out (goes all machines on LAN o away) unless refreshed receive ARP query ARP is “plug-and-play”: B receives ARP packet, replies to A with its (B's) o nodes create their ARP MAC address tables without frame sent to A’s MAC intervention from net o address (unicast) administrator 7/10 Datakommunikation & Internet, Anders Broberg, UmU Link layer 15 5
Routing to another LAN walkthrough: send datagram from A to B via R assume A know’s B IP address A R B Two ARP tables in router R, one for each IP network (LAN) In routing table at source Host, find router 111.111.111.110 In ARP table at source, find MAC address E6-E9-00-17-BB-4B, etc 7/10 Datakommunikation & Internet, Anders Broberg, UmU Link layer 16 A creates datagram with source A, destination B A uses ARP to get R’s MAC address for 111.111.111.110 A creates link-layer frame with R's MAC address as dest, frame contains A-to-B IP datagram A’s data link layer sends frame R’s data link layer receives frame R removes IP datagram from Ethernet frame, sees its destined to B R uses ARP to get B’s physical layer address R creates frame containing A-to-B IP datagram sends to B A R B 7/10 Datakommunikation & Internet, Anders Broberg, UmU Link layer 17 Chapter 5 outline 5.1 Introduction and Self studies (extensive) services 5.2 Error detection and 5.4 LAN addresses and correction ARP 5.8 PPP 5.5 Ethernet 5.9 ATM 5.6 Hubs, bridges, and 5.10 Frame Relay switches 5.7 Wireless links and LANs 5.3Multiple access protocols o Intro o (CSMA/CD) 7/10 Datakommunikation & Internet, Anders Broberg, UmU Link layer 18 6
Recommend
More recommend