Chapter 4 The Data Link Layer Our goals

  • Slides: 94
Download presentation
Chapter 4: The Data Link Layer Our goals: Overview: r understand principles r link

Chapter 4: The Data Link Layer Our goals: Overview: r understand principles r link layer services behind data link layer services: m m error detection, correction sharing a broadcast channel: multiple access link layer addressing reliable data transfer, flow control: done! r instantiation and implementation of various link layer technologies r error detection, correction r multiple access protocols and LANs r link layer addressing, ARP r specific link layer technologies: m m m Ethernet hubs, bridges, switches IEEE 802. 11 LANs PPP ATM 4: Data. Link Layer 1

Link Layer: setting the context 4: Data. Link Layer 2

Link Layer: setting the context 4: Data. Link Layer 2

Link Layer: setting the context r two physically connected devices: m host-router, router-router, host-host

Link Layer: setting the context r two physically connected devices: m host-router, router-router, host-host r unit of data: frame M Ht M Hn Ht M Hl Hn Ht M application transport network link physical data link protocol phys. link adapter card network link physical Hl Hn Ht M frame 4: Data. Link Layer 3

Link Layer Services r Framing, link access: m encapsulate datagram into frame, adding header,

Link Layer Services r Framing, link access: m encapsulate datagram into frame, adding header, trailer m implement channel access if shared medium, m ‘physical addresses’ used in frame headers to identify source, dest • different from IP address! r Reliable delivery between two physically connected devices: m m m we learned how to do 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? 4: Data. Link Layer 4

Link Layer Services (more) r Flow Control: m pacing between sender and receivers r

Link Layer Services (more) r Flow Control: m pacing between sender and receivers 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 4: Data. Link Layer 5

Link Layer: Implementation r implemented in “adapter” m e. g. , PCMCIA card, Ethernet

Link Layer: Implementation r implemented in “adapter” m e. g. , PCMCIA card, Ethernet card m typically includes: RAM, DSP chips, host bus interface, and link interface M Ht M Hn Ht M Hl Hn Ht M application transport network link physical data link protocol phys. link adapter card network link physical Hl Hn Ht M frame 4: Data. Link Layer 6

Error Detection EDC= Error Detection and Correction bits (redundancy) D = Data protected by

Error Detection EDC= Error Detection and Correction bits (redundancy) D = Data protected by error checking, may include header fields • Error detection not 100% reliable! • protocol may miss some errors, but rarely • larger EDC field yields better detection and correction 4: Data. Link Layer 7

Parity Checking Single Bit Parity: Detect single bit errors Two Dimensional Bit Parity: Detect

Parity Checking Single Bit Parity: Detect single bit errors Two Dimensional Bit Parity: Detect and correct single bit errors 0 0 4: Data. Link Layer 8

Internet checksum Goal: detect “errors” (e. g. , flipped bits) in transmitted segment (note:

Internet checksum Goal: detect “errors” (e. g. , flipped bits) in transmitted segment (note: used at transport layer only) Sender: r treat segment contents as sequence of 16 -bit integers r checksum: addition (1’s complement sum) of segment contents r sender puts checksum value into UDP checksum field Receiver: r compute checksum of received segment r check if computed checksum equals checksum field value: m NO - error detected m YES - no error detected. But maybe errors nonethless? More later …. 4: Data. Link Layer 9

Checksumming: Cyclic Redundancy Check r view data bits, D, as a binary number r

Checksumming: Cyclic Redundancy Check r view data bits, D, as a binary number r choose r+1 bit pattern (generator), G r goal: choose r CRC bits, R, such that m m m <D, R> exactly divisible by G (modulo 2) receiver knows G, divides <D, R> by G. If non-zero remainder: error detected! can detect all burst errors less than r+1 bits r widely used in practice (ATM, HDCL) 4: Data. Link Layer 10

CRC Example Want: D. 2 r XOR R = n. G equivalently: D. 2

CRC Example Want: D. 2 r XOR R = n. G equivalently: D. 2 r = n. G XOR R equivalently: if we divide D. 2 r by G, want reminder R R = remainder[ D. 2 r G ] 4: Data. Link Layer 11

Multiple Access Links and Protocols Three types of “links”: r point-to-point (single wire, e.

Multiple Access Links and Protocols Three types of “links”: r point-to-point (single wire, e. g. PPP, SLIP) r broadcast (shared wire or medium; e. g, Ethernet, Wavelan, etc. ) r switched (e. g. , switched Ethernet, ATM etc) 4: Data. Link Layer 12

Multiple Access protocols r single shared communication channel r two or more simultaneous transmissions

Multiple Access protocols r single shared communication channel r two or more simultaneous transmissions by nodes: interference m only one node can send successfully at a time r multiple access protocol: m distributed algorithm that determines how stations share channel, i. e. , determine when station can transmit m communication about channel sharing must use channel itself! m what to look for in multiple access protocols: • synchronous or asynchronous • information needed about other stations • robustness (e. g. , to channel errors) • performance 4: Data. Link Layer 13

MAC Protocols: a taxonomy Three broad classes: r Channel Partitioning m TDMA: time division

MAC Protocols: a taxonomy Three broad classes: r Channel Partitioning m TDMA: time division multiple access FDMA: frequency division multiple access m CDMA (Code Division Multiple Access) m Read! r Random Access m allow collisions m “recover” from collisions r “Taking turns” m tightly coordinate shared access to avoid collisions Goal: efficient, fair, simple, decentralized 4: Data. Link Layer 14

Random Access protocols r When node has packet to send m transmit at full

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 r 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 and ALOHA m CSMA and CSMA/CD 4: Data. Link Layer 15

CSMA: Carrier Sense Multiple Access) CSMA: listen before transmit: r If channel sensed idle:

CSMA: Carrier Sense Multiple Access) CSMA: listen before transmit: r If channel sensed idle: transmit entire pkt r If channel sensed busy, defer transmission m Persistent CSMA: retry immediately with probability p when channel becomes idle (may cause instability) m Non-persistent CSMA: retry after random interval r human analogy: don’t interrupt others! 4: Data. Link Layer 16

CSMA collisions spatial layout of nodes along ethernet collisions can occur: propagation delay means

CSMA collisions spatial layout of nodes along ethernet collisions can occur: propagation delay means two nodes may not year hear each other’s transmission collision: entire packet transmission time wasted note: role of distance and propagation delay in determining collision prob. 4: Data. Link Layer 17

CSMA/CD (Collision Detection) CSMA/CD: carrier sensing, deferral as in CSMA m collisions detected within

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 m persistent or non-persistent retransmission r collision detection: m easy in wired LANs: measure signal strengths, compare transmitted, received signals m difficult in wireless LANs: receiver shut off while transmitting r human analogy: the polite conversationalist 4: Data. Link Layer 18

CSMA/CD collision detection 4: Data. Link Layer 19

CSMA/CD collision detection 4: Data. Link Layer 19

“Taking Turns” MAC protocols channel partitioning MAC protocols: m share channel efficiently at high

“Taking Turns” MAC protocols channel partitioning MAC protocols: m share channel efficiently 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! 4: Data. Link Layer 20

“Taking Turns” MAC protocols Polling: r master node “invites” slave nodes to transmit in

“Taking Turns” MAC protocols Polling: r master node “invites” slave nodes to transmit in turn r Request to Send, Clear to Send msgs r concerns: m m m polling overhead latency single point of failure (master) Token passing: r control token passed from one node to next sequentially. r token message r concerns: m m m token overhead latency single point of failure (token) 4: Data. Link Layer 21

Summary of MAC protocols r What do you do with a shared media? m

Summary of MAC protocols r What do you do with a shared media? m Channel Partitioning, by time, frequency or code • Time Division, Code Division, Frequency Division m Random partitioning (dynamic), • ALOHA, S-ALOHA, CSMA/CD • carrier sensing: easy in some technologies (wire), hard in others (wireless) • CSMA/CD used in Ethernet m Taking Turns • polling from a central cite, token passing 4: Data. Link Layer 22

LAN technologies Data link layer so far: m services, access error detection/correction, multiple Next:

LAN technologies Data link layer so far: m services, access error detection/correction, multiple Next: LAN technologies m addressing m Ethernet m hubs, bridges, switches m 802. 11 m PPP m ATM 4: Data. Link Layer 23

LAN Addresses and ARP 32 -bit IP address: r network-layer address r used to

LAN Addresses and ARP 32 -bit IP address: r network-layer address r used to get datagram to destination network (recall IP network definition) LAN (or MAC or physical) address: r used to get datagram from one interface to another physically-connected interface (same network) r 48 bit MAC address (for most LANs) burned in the adapter ROM 4: Data. Link Layer 24

LAN Addresses and ARP Each adapter on LAN has unique LAN address 4: Data.

LAN Addresses and ARP Each adapter on LAN has unique LAN address 4: Data. Link Layer 25

LAN Address (more) r MAC address allocation administered by IEEE r manufacturer buys portion

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 r MAC flat address => portability m can move LAN card from one LAN to another r IP hierarchical address NOT portable m depends on network to which one attaches 4: Data. Link Layer 26

Recall earlier routing discussion Starting at A, given IP datagram addressed to B: A

Recall earlier routing discussion Starting at A, given IP datagram addressed to B: A 223. 1. 1. 1 223. 1. 2. 1 r look up net. address of B, find B on same net. as A r link layer send datagram to B inside link-layer frame source, dest address B’s MAC A’s MAC addr 223. 1. 1. 2 223. 1. 1. 4 223. 1. 2. 9 B 223. 1. 1. 3 datagram source, dest address A’s IP addr B’s IP addr 223. 1. 3. 27 223. 1. 2. 2 E 223. 1. 3. 2 IP payload datagram frame 4: Data. Link Layer 27

ARP: Address Resolution Protocol Question: how to determine MAC address of B given B’s

ARP: Address Resolution Protocol Question: how to determine MAC address of B given B’s IP address? r Each IP node (Host, Router) on LAN has ARP module, table r ARP Table: IP/MAC address mappings for some LAN nodes < IP address; MAC address; TTL> < ……………. . > m TTL (Time To Live): time after which address mapping will be forgotten (typically 20 min) 4: Data. Link Layer 28

ARP protocol r A knows B's IP address, wants to learn physical address of

ARP protocol r A knows B's IP address, wants to learn physical address of B r A broadcasts ARP query pkt, containing B's IP address m all machines on LAN receive ARP query r B receives ARP packet, replies to A with its (B's) physical layer address r A caches (saves) IP-to-physical address pairs until information becomes old (times out) m soft state: information that times out (goes away) unless refreshed 4: Data. Link Layer 29

Routing to another LAN walkthrough: routing from A to B via R A R

Routing to another LAN walkthrough: routing from A to B via R A R B 4: Data. Link Layer 30

r A creates IP packet with source A, destination B r A uses ARP

r A creates IP packet with source A, destination B r A uses ARP to get R’s physical layer address for 111. 110 r A creates Ethernet frame with R's physical address as dest, r r r Ethernet frame contains A-to-B IP datagram A’s data link layer sends Ethernet frame R’s data link layer receives Ethernet 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 4: Data. Link Layer 31

Ethernet “dominant” LAN technology: r cheap $20 for 100 Mbs! r first wildey used

Ethernet “dominant” LAN technology: r cheap $20 for 100 Mbs! r first wildey used LAN technology r Simpler, cheaper than token LANs and ATM r Kept up with speed race: 10, 1000 Mbps Metcalfe’s Etheret sketch : Data. Link Layer 32

Ethernet Frame Structure Sending adapter encapsulates IP datagram (or other network layer protocol packet)

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

Ethernet Frame Structure (more) r Addresses: 6 bytes, frame is received by all adapters

Ethernet Frame Structure (more) r Addresses: 6 bytes, frame is received by all adapters on a LAN and dropped if address does not match r Type: indicates the higher layer protocol, mostly IP but others may be supported such as Novell IPX and Apple. Talk) r CRC: checked at receiver, if error is detected, the frame is simply dropped : Data. Link Layer 34

Ethernet: uses CSMA/CD A: sense channel, if idle then { transmit and monitor the

Ethernet: uses CSMA/CD A: sense channel, if idle then { transmit and monitor the channel; If detect another transmission then { abort and send jam signal; update # collisions; delay as required by exponential backoff algorithm; goto A } else {done with the frame; set collisions to zero} } else {wait until ongoing transmission is over and goto A} : Data. Link Layer 35

Ethernet’s CSMA/CD (more) Jam Signal: make sure all other transmitters are aware of collision;

Ethernet’s CSMA/CD (more) Jam Signal: make sure all other transmitters are aware of collision; 48 bits; 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 x 512 bit transmission times r after second collision: choose K from {0, 1, 2, 3}… r after ten or more collisions, choose K from {0, 1, 2, 3, 4, …, 1023} : Data. Link Layer 36

Ethernet Technologies: 10 Base 2 r 10: 10 Mbps; 2: under 200 meters max

Ethernet Technologies: 10 Base 2 r 10: 10 Mbps; 2: under 200 meters max cable length r thin coaxial cable in a bus topology r repeaters used to connect up to multiple segments r repeater repeats bits it hears on one interface to its other interfaces: physical layer device only! : Data. Link Layer 37

10 Base. T and 100 Base. T r 10/100 Mbps rate; latter called “fast

10 Base. T and 100 Base. T r 10/100 Mbps rate; latter called “fast ethernet” r T stands for Twisted Pair r Hub to which nodes are connected by twisted pair, thus “star topology” r CSMA/CD implemented at hub : Data. Link Layer 38

10 Base. T and 100 Base. T (more) r Max distance from node to

10 Base. T and 100 Base. T (more) r Max distance from node to Hub is 100 meters r Hub can disconnect “jabbering adapter r Hub can gather monitoring information, statistics for display to LAN administrators : Data. Link Layer 39

Ethernet Switches r layer 2 (frame) forwarding, filtering using LAN addresses r Switching: A-to-B

Ethernet Switches r layer 2 (frame) forwarding, filtering using LAN addresses r Switching: A-to-B and A’-to -B’ simultaneously, no collisions r large number of interfaces r often: individual hosts, star -connected into switch m Ethernet, but no collisions! : Data. Link Layer 40

Ethernet Switches r cut-through switching: frame forwarded from input to output port without awaiting

Ethernet Switches r cut-through switching: frame forwarded from input to output port without awaiting for assembly of entire frame m slight reduction in latency r combinations of shared/dedicated, 10/1000 Mbps interfaces : Data. Link Layer 41

Ethernet Switches (more) Dedicated Shared : Data. Link Layer 42

Ethernet Switches (more) Dedicated Shared : Data. Link Layer 42

Token Passing: IEEE 802. 5 standard r 4 Mbps r max token holding time:

Token Passing: IEEE 802. 5 standard r 4 Mbps r max token holding time: 10 ms, limiting frame length r SD, ED mark start, end of packet r AC: access control byte: m token bit: value 0 means token can be seized, value 1 means data follows FC m priority bits: priority of packet m reservation bits: station can write these bits to prevent stations with lower priority packet from seizing token after token becomes free : Data. Link Layer 43

Token Passing: IEEE 802. 5 standard r FC: frame control used for monitoring and

Token Passing: IEEE 802. 5 standard r FC: frame control used for monitoring and r r maintenance source, destination address: 48 bit physical address, as in Ethernet data: packet from network layer checksum: CRC FS: frame status: set by dest. , read by sender m m set to indicate destination up, frame copied OK from ring DLC-level ACKing : Data. Link Layer 44

Interconnecting LANs Q: Why not just one big LAN? r Limited amount of supportable

Interconnecting LANs Q: Why not just one big LAN? r Limited amount of supportable traffic: on single LAN, all stations must share bandwidth r limited length: 802. 3 specifies maximum cable length r large “collision domain” (can collide with many stations) r limited number of stations: 802. 5 have token passing delays at each station : Data. Link Layer 45

Hubs r Physical Layer devices: essentially repeaters operating at bit levels: repeat received bits

Hubs r Physical Layer devices: essentially repeaters operating at bit levels: repeat received bits on one interface to all other interfaces r Hubs can be arranged in a hierarchy (or multi-tier design), with backbone hub at its top 4: Data. Link Layer 46

Hubs (more) r Each connected LAN referred to as LAN segment r Hubs do

Hubs (more) r Each connected LAN referred to as LAN segment r Hubs do not isolate collision domains: node may collide with any node residing at any segment in LAN r Hub Advantages: m simple, inexpensive device m Multi-tier provides graceful degradation: portions of the LAN continue to operate if one hub malfunctions m extends maximum distance between node pairs (100 m per Hub) 4: Data. Link Layer 47

Hub limitations r single collision domain results in no increase in max throughput m

Hub limitations r single collision domain results in no increase in max throughput m multi-tier throughput same as single segment throughput r individual LAN restrictions pose limits on number of nodes in same collision domain and on total allowed geographical coverage r cannot connect different Ethernet types (e. g. , 10 Base. T and 100 base. T) 4: Data. Link Layer 48

Bridges r Link Layer devices: operate on Ethernet frames, examining frame header and selectively

Bridges r Link Layer devices: operate on Ethernet frames, examining frame header and selectively forwarding frame based on its destination r Bridge isolates collision domains since it buffers frames r When frame is to be forwarded on segment, bridge uses CSMA/CD to access segment and transmit 4: Data. Link Layer 49

Bridges (more) r Bridge advantages: m Isolates collision domains resulting in higher total max

Bridges (more) r Bridge advantages: m Isolates collision domains resulting in higher total max throughput, and does not limit the number of nodes nor geographical coverage m Can connect different type Ethernet since it is a store and forward device m Transparent: no need for any change to hosts LAN adapters 4: Data. Link Layer 50

Bridges: frame filtering, forwarding r bridges filter packets m same-LAN -segment frames not forwarded

Bridges: frame filtering, forwarding r bridges filter packets m same-LAN -segment frames not forwarded onto other LAN segments r forwarding: m how to know which LAN segment on which to forward frame? m looks like a routing problem (more shortly!) 4: Data. Link Layer 51

Bridge Learning: example Suppose C sends frame to D and D replies back with

Bridge Learning: example Suppose C sends frame to D and D replies back with frame to C r C sends frame, bridge has no info about D, so floods to both LANs m m m bridge notes that C is on port 1 frame ignored on upper LAN frame received by D 4: Data. Link Layer 52

Bridge Learning: example r D generates reply to C, sends m bridge sees frame

Bridge Learning: example r D generates reply to C, sends m bridge sees frame from D m bridge notes that D is on interface 2 m bridge knows C on interface 1, so selectively forwards frame out via interface 1 4: Data. Link Layer 53

Bridges vs. Routers r both store-and-forward devices m routers: network layer devices (examine network

Bridges vs. Routers r both store-and-forward devices m routers: network layer devices (examine network layer headers) m bridges are Link Layer devices r routers maintain routing tables, implement routing algorithms r bridges maintain filtering tables, implement filtering, learning and spanning tree algorithms 4: Data. Link Layer 54

Routers vs. Bridges + and + Bridge operation is simpler requiring less processing bandwidth

Routers vs. Bridges + and + Bridge operation is simpler requiring less processing bandwidth - Topologies are restricted with bridges: a spanning tree must be built to avoid cycles - Bridges do not offer protection from broadcast storms (endless broadcasting by a host will be forwarded by a bridge) 4: Data. Link Layer 55

Routers vs. Bridges Routers + and + arbitrary topologies can be supported, cycling is

Routers vs. Bridges Routers + and + arbitrary topologies can be supported, cycling is limited by TTL counters (and good routing protocols) + provide firewall protection against broadcast storms - require IP address configuration (not plug and play) - require higher processing bandwidth r bridges do well in small (few hundred hosts) while routers used in large networks (thousands of hosts) 4: Data. Link Layer 56

IEEE 802. 11 Wireless LAN r wireless LANs: untethered (often mobile) networking r IEEE

IEEE 802. 11 Wireless LAN r wireless LANs: untethered (often mobile) networking r IEEE 802. 11 standard: m MAC protocol r Basic Servicefrequency Set (BSS)spectrum: 900 Mhz, 2. 4 Ghz m unlicensed (a. k. a. “cell”) contains: m wireless hosts m access point (AP): base station r BSS’s combined to form distribution system (DS)

Ad Hoc Networks r Ad hoc network: IEEE 802. 11 stations can dynamically form

Ad Hoc Networks r Ad hoc network: IEEE 802. 11 stations can dynamically form network without AP r Applications: m “laptop” meeting in conference room, car m interconnection of “personal” devices m battlefield r IETF MANET (Mobile Ad hoc Networks) working group

IEEE 802. 11 MAC Protocol: CSMA/CA 802. 11 CSMA: sender - if sense channel

IEEE 802. 11 MAC Protocol: CSMA/CA 802. 11 CSMA: sender - if sense channel idle for DIFS (Distributed Inter Frame Spacing) sec. then transmit entire frame (no collision detection) -if sense channel busy then binary backoff 802. 11 CSMA receiver: if received OK return ACK after SIFS (Short Inter Frame Spacing)

IEEE 802. 11 MAC Protocol 802. 11 CSMA Protocol: others r NAV: Network Allocation

IEEE 802. 11 MAC Protocol 802. 11 CSMA Protocol: others r NAV: Network Allocation Vector r 802. 11 frame has transmission time field r others (hearing sata) defer access for NAV time units

Hidden Terminal effect r hidden terminals: A, C cannot hear each other m obstacles,

Hidden Terminal effect r hidden terminals: A, C cannot hear each other m obstacles, signal attenuation m collisions at B r goal: avoid collisions at B r CSMA/CA: CSMA with Collision Avoidance

Collision Avoidance: RTS-CTS exchange r CSMA/CA: explicit channel reservation m sender: send short RTS:

Collision Avoidance: RTS-CTS exchange r CSMA/CA: explicit channel reservation m sender: send short RTS: request to send m receiver: reply with short CTS: clear to send r CTS reserves channel for sender, notifying (possibly hidden) stations r avoid hidden station

Collision Avoidance: RTS-CTS exchange r RTS and CTS short: m collisions less likely, of

Collision Avoidance: RTS-CTS exchange r RTS and CTS short: m collisions less likely, of shorter duration m end result similar to collision detection r IEEE 802. 11 alows: m CSMA/CA: reservations m polling from AP

Point to Point Data Link Control r one sender, one receiver, one link: easier

Point to Point Data Link Control r one sender, one receiver, one link: easier than broadcast link: m no Media Access Control m no need for explicit MAC addressing m e. g. , dialup link, ISDN line r popular point-to-point DLC protocols: m PPP (point-to-point protocol) m HDLC: High level data link control (Data link used to be considered “high layer” in protocol stack!

PPP Design Requirements [RFC 1557] r packet framing: encapsulation of network- layer datagram in

PPP Design Requirements [RFC 1557] r packet framing: encapsulation of network- layer datagram in data link frame m carry network layer data of any network layer protocol (not just IP) at same time m ability to demultiplex upwards r bit transparency: must carry any bit pattern in the data field r error detection (no correction) r connection livenes: detect, signal link failure to network layer r network layer address negotiation: endpoint

PPP non-requirements r no error correction/recovery r no flow control r out of order

PPP non-requirements r no error correction/recovery r no flow control r out of order delivery OK r no need to support multipoint links (e. g. , polling) Error recovery, flow control, data re-ordering all relegated to higher layers!|

PPP Data Frame r Flag: delimiter (framing) r Address: does nothing (only one option)

PPP Data Frame r Flag: delimiter (framing) r Address: does nothing (only one option) r Control: does nothing; in the future possible multiple control fields r Protocol: upper layer protocol to which frame delivered (eg, PPP-LCP, IPCP, etc)

PPP Data Frame r info: upper layer data being carried r check: cyclic redundancy

PPP Data Frame r info: upper layer data being carried r check: cyclic redundancy check for error detection

Byte Stuffing r “data transparency” requirement: data field must be allowed to include flag

Byte Stuffing r “data transparency” requirement: data field must be allowed to include flag pattern <01111110> m Q: is received <01111110> data or flag? r Sender: adds (“stuffs”) extra < 01111101> byte after each < 01111110> data byte r Receiver: m two 01111110 bytes in a row: discard first byte, continue data reception m single 01111110: flag byte

Byte Stuffing flag byte pattern in data to send flag byte pattern plus stuffed

Byte Stuffing flag byte pattern in data to send flag byte pattern plus stuffed byte in transmitted data

PPP Data Control Protocol Before exchanging network-layer data, data link peers must r configure

PPP Data Control Protocol Before exchanging network-layer data, data link peers must r configure PPP link (max. frame length, authentication) r learn/configure network layer information m for IP: carry IP Control Protocol (IPCP) msgs (protocol field: 8021) to configure/learn IP

Asynchronous Transfer Mode: ATM r 1980 s/1990’s standard for high-speed (155 Mbps to 622

Asynchronous Transfer Mode: ATM r 1980 s/1990’s standard for high-speed (155 Mbps to 622 Mbps and higher) Broadband Integrated Service Digital Network architecture r Goal: integrated, end-end transport of carry voice, video, data m meeting timing/Qo. S requirements of voice, video (versus Internet best-effort model) m “next generation” telephony: technical roots in telephone world m packet-switching (fixed length packets, called “cells”) using virtual circuits

ATM architecture r adaptation layer: only at edge of ATM network m data segmentation/reassembly

ATM architecture r adaptation layer: only at edge of ATM network m data segmentation/reassembly m roughly analagous to Internet transport layer r ATM layer: “network” layer m cell switching, routing r physical layer

ATM: network or link layer? Vision: end-to-end transport: “ATM from desktop to desktop” m

ATM: network or link layer? Vision: end-to-end transport: “ATM from desktop to desktop” m ATM is a network technology Reality: used to connect IP backbone routers m “IP over ATM” m ATM as switched link layer, connecting IP

ATM Adaptation Layer (AAL) r ATM Adaptation Layer (AAL): “adapts” upper layers (IP or

ATM Adaptation Layer (AAL) r ATM Adaptation Layer (AAL): “adapts” upper layers (IP or native ATM applications) to ATM layer below r AAL present only in end systems, not in switches r AAL layer segment (header/trailer fields, data) fragmented across multiple ATM cells m analogy: TCP segment in many IP packets

ATM Adaption Layer (AAL) [more] Different versions of AAL layers, depending on ATM service

ATM Adaption Layer (AAL) [more] Different versions of AAL layers, depending on ATM service class: r AAL 1: for CBR (Constant Bit Rate) services, e. g. circuit emulation r AAL 2: for VBR (Variable Bit Rate) services, e. g. , MPEG video r AAL 5: for data (eg, IP datagrams) User data AAL PDU ATM cell

AAL 5 - Simple And Efficient AL (SEAL) r AAL 5: low overhead AAL

AAL 5 - Simple And Efficient AL (SEAL) r AAL 5: low overhead AAL used to carry IP datagrams m 4 byte cyclic redundancy check m PAD ensures payload multiple of 48 bytes m large AAL 5 data unit to be fragmented into 48 byte ATM cells

ATM Layer Service: transport cells across ATM network r analagous to IP network layer

ATM Layer Service: transport cells across ATM network r analagous to IP network layer r very different services than IP network Guarantees ? layer Service Network Congestion Architecture Internet Model Bandwidth Loss Order Timing feedback best effort none ATM CBR ATM VBR ATM ABR ATM UBR constant rate guaranteed minimum none no no no yes yes yes no no (inferred via loss) no congestion yes no no

ATM Layer: Virtual Circuits r VC transport: cells carried on VC from source to

ATM Layer: Virtual Circuits r VC transport: cells carried on VC from source to dest m call setup, teardown for each call before data can flow m each packet carries VC identifier (not destination ID) m every switch on source-dest path maintain “state” for each passing connection m link, switch resources (bandwidth, buffers) may be allocated to VC: to get circuit-like perf. r Permanent VCs (PVCs) m long lasting connections m typically: “permanent” route between to IP routers

ATM VCs r Advantages of ATM VC approach: m Qo. S performance guarantee for

ATM VCs r Advantages of ATM VC approach: m Qo. S performance guarantee for connection mapped to VC (bandwidth, delay jitter) r Drawbacks of ATM VC approach: m Inefficient support of datagram traffic m one PVC between each source/dest pair) does not scale (N*2 connections needed) m SVC introduces call setup latency, processing overhead for short lived connections

ATM Layer: ATM cell r 5 -byte ATM cell header r 48 -byte payload

ATM Layer: ATM cell r 5 -byte ATM cell header r 48 -byte payload m Why? : small payload -> short cell-creation delay for digitized voice m halfway between 32 and 64 (compromise!) Cell header Cell format

ATM cell header r VCI: virtual channel ID m will change from link to

ATM cell header r VCI: virtual channel ID m will change from link to link thru net r PT: Payload type (e. g. RM cell versus data cell) r CLP: Cell Loss Priority bit m CLP = 1 implies low priority cell, can be discarded if congestion r HEC: Header Error Checksum m cyclic redundancy check

ATM Physical Layer (more) Two pieces (sublayers) of physical layer: r Transmission Convergence Sublayer

ATM Physical Layer (more) Two pieces (sublayers) of physical layer: r Transmission Convergence Sublayer (TCS): adapts ATM layer above to PMD sublayer below r Physical Medium Dependent: depends on physical medium being used TCS Functions: m Header checksum generation: 8 bits CRC m Cell delineation m With “unstructured” PMD sublayer,

ATM Physical Layer Physical Medium Dependent (PMD) sublayer r SONET/SDH: transmission frame structure (like

ATM Physical Layer Physical Medium Dependent (PMD) sublayer r SONET/SDH: transmission frame structure (like a container carrying bits); m bit synchronization; m bandwidth partitions (TDM); m several speeds: OC 1 = 51. 84 Mbps; OC 3 = 155. 52 Mbps; OC 12 = 622. 08 Mbps r TI/T 3: transmission frame structure (old telephone hierarchy): 1. 5 Mbps/ 45 Mbps r unstructured: just cells (busy/idle)

IP-Over-ATM Classic IP only r 3 “networks” (e. g. , LAN segments) r MAC

IP-Over-ATM Classic IP only r 3 “networks” (e. g. , LAN segments) r MAC (802. 3) and IP addresses Ethernet LANs IP over ATM r replace “network” (e. g. , LAN segment) with ATM network r ATM addresses, IP addresses ATM network Ethernet LANs

IP-Over-ATM Issues: r IP datagrams into ATM AAL 5 PDUs r from IP addresses

IP-Over-ATM Issues: r IP datagrams into ATM AAL 5 PDUs r from IP addresses to ATM addresses like IP addresses to 802. 3 MAC addresses! ATM network m just Ethernet LANs

Datagram Journey in IP-over. ATM Network r at Source Host: m IP layer finds

Datagram Journey in IP-over. ATM Network r at Source Host: m IP layer finds mapping between IP, ATM dest address (using ARP) m passes datagram to AAL 5 m AAL 5 encapsulates data, segments to cells, passes to ATM layer r ATM network: moves cell along VC to destination r at Destination Host: m AAL 5 reassembles cells into original datagram m if CRC OK, datgram is passed to IP

ARP in ATM Nets r ATM network needs destination ATM address m just like

ARP in ATM Nets r ATM network needs destination ATM address m just like Ethernet needs destination Ethernet address r IP/ATM address translation done by ATM ARP (Address Resolution Protocol) m ARP server in ATM network performs broadcast of ATM ARP translation request to all connected ATM devices m hosts can register their ATM addresses with server to avoid lookup

X. 25 and Frame Relay Like ATM: r wide area network technologies r virtual

X. 25 and Frame Relay Like ATM: r wide area network technologies r virtual circuit oriented r origins in telephony world r can be used to carry IP datagrams m can thus be viewed as Link Layers by IP protocol

X. 25 r X. 25 builds VC between source and destination for each user

X. 25 r X. 25 builds VC between source and destination for each user connection r Per-hop control along path m error control (with retransmissions) on each hop using LAP-B • variant of the HDLC protocol m per-hop flow control using credits • congestion arising at intermediate node propagates to previous node on path • back to source via back pressure

IP versus X. 25 r X. 25: reliable in-sequence end-end delivery from end-to-end m

IP versus X. 25 r X. 25: reliable in-sequence end-end delivery from end-to-end m “intelligence in the network” r IP: unreliable, out-of-sequence end-end delivery m “intelligence in the endpoints” r gigabit routers: limited processing possible r 2000: IP wins

Frame Relay r Designed in late ‘ 80 s, widely deployed in the ‘

Frame Relay r Designed in late ‘ 80 s, widely deployed in the ‘ 90 s r Frame relay service: m no error control m end-to-end congestion control

Frame Relay (more) r Designed to interconnect corporate customer LANs m typically permanent VC’s:

Frame Relay (more) r Designed to interconnect corporate customer LANs m typically permanent VC’s: “pipe” carrying aggregate traffic between two routers m switched VC’s: as in ATM r corporate customer leases FR service from public Frame Relay network (eg, Sprint, ATT)

Chapter 5: Summary r principles behind data link layer services: m error detection, correction

Chapter 5: Summary r principles behind data link layer services: m error detection, correction m sharing a broadcast channel: multiple access m link layer addressing, ARP r various link layer technologies m Ethernet m hubs, bridges, switches m IEEE 802. 11 LANs m PPP m ATM m X. 25, Frame Relay