Link Layer Error Detection Nodes Links Frame R yclic Redundancy hecksum Parity its More about this in exercise! Data Link Layer -1 Data Link Layer -2 Links Two types of links : point-to-point broadcast (shared medium) old-fashioned Ethernet WLN Multiple access protocols Shared channel Problem: collisions How nodes share a channel shared wire (e.g., cabled Ethernet) shared RF (e.g., 802.11 WiFi) shared RF (satellite) humans at a cocktail party (shared air, acoustical) Data Link Layer -3 Data Link Layer - M Protocols hannel Partitioning divide channel into smaller pieces Random ccess channel not divided, allow collisions Taking turns nodes take turns, but nodes with more to send can take longer turns hannel Partitioning M protocols: TDM TDM: time division multiple access each station gets slot 6-slot frame 1 3 1 3 Data Link Layer - Data Link Layer -6 1
frequency bands hannel Partitioning M protocols: FDM FDM: frequency division multiple access FDM cable Random ccess Protocols No coordination Sender uses all capacity ollisions may occur Random access M protocol specifies: how to detect collisions how to recover from collisions Data Link Layer -7 Data Link Layer -8 Slotted LOH Pure (unslotted) LOH Simpler, no synchronization When frame arrives: send at once Pros single active node can transmit at full rate highly decentralized simple ons collisions, wasting slots idle slots clock synchronization Data Link Layer -9 Data Link Layer -10 SM (arrier Sense Multiple ccess) SM collisions Listen before sending: If idle: send frame If busy, send later Data Link Layer -11 Data Link Layer -12 2
SM/D (ollision Detection) SM/D collision detection collisions detected within short time colliding transmissions aborted ompare transmitted and received signal Easy for wires Difficult for radio Data Link Layer -13 Data Link Layer -1 Taking Turns M protocols Taking Turns M protocols Polling: master node T typically used with dumb slave devices problems: overhead latency single point of failure (master) slaves poll master Token passed Data Link Layer -1 Data Link Layer -16 LN ddresses and RP Ethernet 1-2F--76-09-D roadcast address = FF-FF-FF-FF-FF-FF cheap $20 for network interface card first widely used LN technology simpler, cheaper than token LNs and TM kept up with speed race: 10 Mbps 10 Gbps LN (wired or wireless) 71-6-F7-2-08-3 8-23-D7-F-20-0 Metcalfe s Ethernet sketch 0--11-6F-E3-98 Data Link Layer -17 Data Link Layer -18 3
Star topology bus topology popular through mid 90s today: star topology prevails Ethernet Frame Structure (more) Preamble: pattern used to clock rates ddresses: 6 bytes Type: indicates higher layer protocol (mostly IP) R: if error, frame is dropped switch bus: coaxial cable star Data Link Layer -19 Data Link Layer -20 Ethernet: Unreliable, connectionless onnectionless: No handshaking Unreliable: no acks or nacks to sender Ethernet uses SM/D Ethernet SM/D algorithm 1. If channel idle, start transmission If channel busy, wait until channel idle, then transmit 2. If entire frame sent without detecting another transmission or jam signal, finished! Otherwise, go to 3. 3. If collision detected, abort and send jam signal. fter aborting, NI enters exponential backoff: after m:th collision, NI chooses K at random from {0,1,2,,2 m -1}. NI waits K 12 bit times, returns to Step 1 Data Link Layer -21 Data Link Layer -22 Manchester encoding Hubs Dumb repeaters: bits coming go out to all other links all nodes connected to hub can collide with one another no SM/D at hub: host NIs detect collisions twisted pair hub Data Link Layer -23 Data Link Layer -2
Switch: allows multiple simultaneous transmissions hosts have dedicated, direct connection to switch switches buffer packets Ethernet protocol used on each incoming link, but no collisions; full duplex each link is its own collision domain switching: -to- and - to- simultaneously, without collisions not possible with dumb hub 6 1 2 3 switch with six interfaces (1,2,3,,,6) Switch: self-learning switch learns where hosts are M addr interface TTL 1 60 6 1 2 3 Source: Dest: Data Link Layer -2 Data Link Layer -26 Interconnecting switches switches can be connected together S S 1 S 2 D E F G S 3 H I Data Link Layer -27