1 / 83

CSE524: Lecture 5

CSE524: Lecture 5. Data-link Layer (Part 2). Administrative. Reading assignment Chapter 5.5-5.11 Due Wednesday, Oct. 8 Homework #2 Due Monday, Oct. 15. Data-link layer. Last class Data-link layer overview Data-link layer functions This class Specific data-link layers and devices.

hmosley
Download Presentation

CSE524: Lecture 5

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSE524: Lecture 5 Data-link Layer (Part 2)

  2. Administrative • Reading assignment • Chapter 5.5-5.11 • Due Wednesday, Oct. 8 • Homework #2 • Due Monday, Oct. 15

  3. Data-link layer • Last class • Data-link layer overview • Data-link layer functions • This class • Specific data-link layers and devices

  4. DL: Specific data-link layers and devices • Specific data-link layers • Ethernet (802.3) • Token Ring (802.5) • WiFi (802.11) • PPP • ATM • X.25 • Frame relay • Specific data-link layer devices • Hubs • Bridges • Switches

  5. DL: Ethernet “dominant” LAN technology: • First practical local area network, built at Xerox PARC in 70’s • Cheap: $20 for 100Mbs! • Simpler, cheaper than token LANs and ATM • Kept up with speed race: 10, 100, 1000 Mbps Metcalfe’s Ethernet sketch

  6. DL: Ethernet • Carrier sense • Check to see if active transmission • Collision detect • Sender checks for collision; wait and retry • Adaptive randomized wait to avoid collisions

  7. DL: Ethernet Frame Structure Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame • Preamble – 8 bytes • 7 bytes with pattern 10101010 followed by one byte with pattern 10101011 • Used to synchronize receiver, sender clock rates • Src/Dst Address – 6 bytes • Globally unique, allocated to manufacturers • All adapters listening receive frame, discard if not destined for itself • Type – 2 bytes • Indicates higher layer (network) protocol being used, mostly IP these days • http://www.cavebear.com/CaveBear/Ethernet/type.html • Data – 46 to 1500 bytes • CRC – 4 bytes • Checked at receiver, dropped if doesn’t match • CRC-32 (x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1)

  8. DL: Ethernet: uses CSMA/CD if packet then { 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} }

  9. DL: Ethernet CSMA/CD No Yes attempts < 16 attempts == 16 Packet? Sense Carrier Detect Collision Send Discard Packet b=CalcBackoff(); wait(b); attempts++;

  10. DL: Ethernet Backoff Calculation • If deterministic delay after collision, collision will occur again in lockstep • If random delay with fixed mean • Few senders  needless waiting • Too many senders  too many collisions • Exponentially increasing random delay • Infer senders from # of collisions • More senders  increase wait time

  11. DL: Ethernet’s CSMA/CD (more) Exponential Backoff: • Goal: adapt retransmission attempts to estimated current load • heavy load: random wait will be longer • first collision: choose K from {0,1}; delay is K x 512 bit transmission times • after second collision: choose K from {0,1,2,3}… • after ten or more collisions, choose K from {0,1,2,3,4,…,1023}

  12. DL: Ethernet CSMA/CD and Packet Size • What if two people sent really small packets • How do you find collision? • Must have a minimum packet size

  13. DL: Ethernet Collision Detect & Packet Size • Min packet length > 2x max prop delay • If A, B are at opposite sides of link, and B starts one link prop delay after A • Jam signal • Jam network for 32-48 bits after collision, then stop sending • Ensures that everyone notices collision

  14. DL: Propagation delay & packet size • Propagation delay • 1Km, c in cable = 60% * c in vacuum = 1.8 x 10^8 m/s • 1000/1.8 x 10^8 ~= 5 x 10^-6 = 5us • 5us * 3Mbps = 15bits in flight! • Modern 10Mb Ethernet { • 2.5km=maximum network segment length, 10Mbps • ~= 12.5us delay • +introduced repeaters (max 5 segments) • worst case – 51.2us round trip time!

  15. DL: Minimum packet size • Slot time = 51.2us = 512bits in flight • After this amount, sender is guaranteed sole access to link • 51.2us = slot time for backoff • What about scaling? 100Mbit, 1Gbit... • Make network smaller? • Solution for 100BaseT • Make min pkt size larger? • 512bits @ 1Gbps = 512ns • 512ns * 1.8 * 10^8 = 92meters • Gigabit ethernet uses collision extension for small pkts

  16. DL: Ethernet Problems • Ethernet unstable at high loads • Peak utilization = 1/e = 37% • Peak throughput worse with • More hosts – more collisions needed to identify single sender • Smaller packet sizes – more frequent arbitration • Longer links – collisions take longer to observe, more wasted bandwidth

  17. DL: 10Base2 Ethernet • 10: 10Mbps; 2: under 200 meters max cable length • thin coaxial cable in a bus topology • repeaters used to connect up to multiple segments • repeater repeats bits it hears on one interface to its other interfaces: physical layer device only!

  18. DL: 10BaseT and 100BaseT Ethernet • 10/100 Mbps rate; latter called “fast ethernet” • T stands for Twisted Pair cabling • Nodes connected to hubs or switches in a “star topology” • Max distance from node to Hub is 100 meters • Smart hubs • Disconnect “jabbering adapter • Managed hubs (monitoring, statistics)

  19. DL: Gbit Ethernet • Use standard Ethernet frame format • Allows for point-to-point links and shared broadcast channels • In shared mode, CSMA/CD is used; short distances between nodes to be efficient • Uses hubs, called here “Buffered Distributors” • Full-Duplex at 1 Gbps for point-to-point links

  20. DL: Token Rings • Packets broadcast around ring • Token “right to send” rotates around ring • Fair, real-time bandwidth allocation • Every host holds token for limited time • Higher latency when only one sender • Higher bandwidth • Point to point links electrically simpler than bus

  21. DL: Token Passing: IEEE802.5 standard • 4 Mbps • max token holding time: 10 ms (limits frame length) • SD, ED mark start, end of packet • AC: access control byte: • token bit: value 0 means token can be seized, value 1 means data follows FC • priority bits: priority of packet • reservation bits: station can write these bits to prevent stations with lower priority packet from seizing token after token becomes free

  22. DL: Token Passing: IEEE802.5 standard • FC: frame control used for monitoring and 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 • set to indicate destination up, frame copied OK from ring • DLC-level ACKing

  23. DL: Why Did Ethernet Win? • Failure modes • Token rings – network unusable • Ethernet – node detached • Good performance in common case • Volume  lower cost  higher volume …. • Adaptable • To higher bandwidths (vs. FDDI) • To switching (vs. ATM) • Completely distributed, easy to maintain/administer • Easy incremental deployment • Cheap cabling, etc

  24. DL: IEEE 802.11 Wireless LAN • Wireless LANs: untethered (often mobile) networking • IEEE 802.11 standard: • MAC protocol • unlicensed frequency spectrum: 900Mhz, 2.4Ghz • Basic Service Set (BSS) (a.k.a. “cell”) contains: • wireless hosts • access point (AP): base station • BSS’s combined to form distribution system (DS)

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

  26. DL: IEEE 802.11 MAC Protocol: CSMA/CA 802.11 CSMA sender - if sense channel idle for DIFS sec. then transmit entire frame (no collision detection) -ifsense channel busy then backoff (random, exponential) 802.11 CSMA receiver if received OK return ACK after SIFS 802.11 CSMA others • NAV: Network Allocation Vector • 802.11 frame has transmission time field • others (hearing data) defer access for NAV time units

  27. DL: IEEE 802.11 MAC Protocol CSMA/CA • Same as previous mode but with explicit channel reservation • sender: send short RTS: request to send • receiver: reply with short CTS: clear to send • CTS reserves channel for sender, notifying (possibly hidden) stations • avoid hidden station collisions

  28. DL: CSMA/CA • RTS and CTS short: • collisions less likely, of shorter duration • end result similar to collision detection • IEEE 802.11 alows: • CSMA • CSMA/CA: reservations • Polling from AP

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

  30. DL: PPP Design Requirements • http://www.rfc-editor.org/rfc/rfc1548.txt • packet framing: encapsulation of network-layer datagram in data link frame • carry network layer data of any network layer protocol (not just IP) at same time • ability to demultiplex upwards • bit transparency: must carry any bit pattern in the data field • error detection: (no correction) • connection liveness: detect, signal link failure to network layer • network layer address negotiation: endpoint can learn/configure each other’s network address

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

  32. DL: PPP Data Frame • Flag: delimiter (framing) • Address: does nothing (only one option) • Control: does nothing; in the future possible multiple control fields • Protocol: upper layer protocol to which frame delivered (eg, PPP-LCP, IP, IPCP, etc) • info: upper layer data being carried • check: cyclic redundancy check for error detection

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

  34. DL: Byte Stuffing flag byte pattern in data to send flag byte pattern plus stuffed byte in transmitted data

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

  36. DL: PPP and security • Encrypt data at a layer below network layer • IPsec only works for IP packets • PP2P, L2F, L2TP • Allow encryption at data-link layer • Works for all network layer packets of all types using PPP • Often tunneled using IP packets • IP(Tunnel) | PP2P/L2F/L2TP | Original Network Packet

  37. DL/NL: Asynchronous Transfer Mode (ATM) • 1980s/1990’s standard for high-speed (155Mbps to 622 Mbps and higher) Broadband Integrated Service Digital Network architecture • Take strengths of IP, learn from its shortcomings • Packet switching good • Packet switching without explicit network-level connections and reservations bad • Design new network to address emerging applications while allowing for efficient support for non-real-time data applications • Goal:integrated, end-end transport of carry voice, video, data • meeting timing/QoS requirements of voice, video (versus Internet best-effort model) • “next generation” telephony: technical roots in telephone world • packet-switching (fixed length packets, called “cells”) using virtual circuits

  38. DL/NL: ATM architecture (whole 9 yards) • adaptation layer: only at edge of ATM network • data segmentation/reassembly • roughly analagous to Internet transport layer • ATM layer: “network” layer • cell switching, routing • physical layer

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

  40. DL/NL: ATM Adaption Layer (AAL) [more] Different versions of AAL layers, depending on ATM service class: • AAL1: for CBR (Constant Bit Rate) services, e.g. circuit emulation • AAL2: for VBR (Variable Bit Rate) services, e.g., MPEG video • AAL5: for data (eg, IP datagrams) User data AAL PDU ATM cell

  41. DL/NL: AAL5 • AAL5: low overhead AAL used to carry IP datagrams • 4 byte cyclic redundancy check • PAD ensures payload multiple of 48bytes • large AAL5 data unit to be fragmented into 48-byte ATM cells

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

  43. DL/NL: 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

  44. DL/NL: 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

  45. DL/NL: 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

  46. DL/NL: 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 = 1 implies low priority cell, can be discarded if congestion • HEC: Header Error Checksum • cyclic redundancy check

  47. DL: ATM: network or link layer? Vision:end-to-end transport: “ATM from desktop to desktop” • ATM is both a network technology and a data-link layer technology Reality:used to connect IP backbone routers • “IP over ATM” • ATM as switched link layer, connecting IP routers

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

  49. DL: 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! ATM network Ethernet LANs

  50. DL: Datagram journey in IP-over-ATM • at ATM network source edge: • IP layer finds mapping between IP, ATM dest address (using ARP) • passes datagram to AAL5 • AAL5 encapsulates data, segments to cells, passes to ATM layer • ATM network:moves cell along VC to destination • at ATM network destination edge: • AAL5 reassembles cells into original datagram • if CRC OK, datgram is passed to IP

More Related