Top Banner
5: DataLink Layer 5-1 Chapter 5 Link Layer and LANs A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following: If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we’d like people to use our book!) If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Thanks and enjoy! JFK/KWR Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
216
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • Chapter 5Link Layer and LANsA note on the use of these ppt slides:Were making these slides freely available to all (faculty, students, readers). Theyre in PowerPoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following: If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, wed like people to use our book!) If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material.

    Thanks and enjoy! JFK/KWR

    All material copyright 1996-2007J.F Kurose and K.W. Ross, All Rights ReservedComputer Networking: A Top Down Approach 4th edition. Jim Kurose, Keith RossAddison-Wesley, July 2007.

  • Chapter 5: The Data Link LayerOur goals: understand principles behind data link layer services:error detection, correctionsharing a broadcast channel: multiple accesslink layer addressingreliable data transfer, flow control: done!instantiation and implementation of various link layer technologies

  • Link Layer5.1 Introduction and services5.2 Error detection and correction 5.3Multiple access protocols5.4 Link-Layer Addressing5.5 Ethernet and other data link layers5.6 Hubs and switches5.7 PPP5.8 Link Virtualization: ATM and MPLS

  • Link Layer: IntroductionSome terminology:hosts and routers are nodescommunication channels that connect adjacent nodes along communication path are linkswired linkswireless linksLANslayer-2 packet is a frame, encapsulates datagram

    data-link layer has responsibility of transferring datagram from one node to adjacent node over a link

  • Adaptors Communicatinglink and physical layers implemented in adaptor/NIC (Network Interface Card)RAM, DSP chips, host bus interface, and link interfaceEthernet card, PCMCIA card, 802.11 cardsending side:encapsulates datagram in a frameadds error checking bits, rdt, flow control, etc.receiving sidelooks for errors, rdt, flow control, etcextracts datagram, passes to upper layer at receiving sidedatagram transferred by different link protocols over different links:e.g., Ethernet on first link, frame relay on intermediate links, 802.11 on last linksendingnodercvingnodedatagramadapteradapterlink layer protocol

  • Protocol stack picture

    networklinkphysicalframephys. linkdata linkprotocoladapter card

  • Host adaptor

  • Link Layer FunctionsFlow Controlpacing between adjacent sending and receiving nodesReliable delivery between adjacent nodeswe learned how to do this already (chapter 3)!seldom used on low bit error link (i.e. fiber, twisted pair)wireless links: high error ratesEschew end-to-end principle for performanceSecurityDemux to upper protocolFramingencapsulate datagram into frame, adding header, trailer

  • Link Layer Functions (more)Error Detectionerrors caused by signal attenuation, noise. receiver detects presence of errors: signals sender for retransmission or drops frame Error Correctionreceiver identifies and corrects bit error(s) without resorting to retransmissionMedium access and quality of servicechannel access if shared mediumAddressingMAC addresses used in frame headers to identify source, dest (different from IP address)

  • Flow controlPacing between sender and receiverSender prevented from overrunning receiverReady-To-Send, Clear-To-Send signalling

  • Reliable deliveryReliability at the link layerHandled in a similar manner to transport protocolsARQ, Stop-and-wait, Go-back-N, Selective RepeatWhen and why should this be used? Rarely done over twisted-pair or fiber optic linksUsually done over lossy links for performance improvement (versus correctness)

  • SecurityMainly for broadcast data-link layersEncrypt payload of higher layersHide IP source/destination from eavesdroppersImportant for wireless LANs especiallyParking lot attacks with 802.11bWEP, WPAIf time permits, security will be covered at the end of the course.

  • Demux to upper protocolProtocol type specification interfaces to network layerData-link layer can support any number of network layersType field in data-link header specifies network layer of packetEach data-link layer defines its own protocol type numbering for network layerIP is one of many network layers

  • Demux to upper protocolhttp://www.cavebear.com/CaveBear/Ethernet/type.htmlSome Ethernet protocol types0800 DOD Internet Protocol (IP) 0806 Address Resolution Protocol (ARP)8037 IPX (Novell Netware) 80D5 IBM SNA Services809B EtherTalk (AppleTalk over Ethernet)

  • FramingData encapsulation for transmission over physical linkData embedded within a link-layer frame before transmissionData-link header and/or trailer addedPhysical addresses used in frame headers to identify source and destination (not IP)

  • Fixed length framingLength delimitedBeginning of frame has lengthSingle corrupt length can cause problemsMust have start of frame character to resynchronizeResynchronization can fail if start of frame character is inside packets as well

  • Variable length framingByte stuffingSpecial start of frame byte (e.g. 0xFF)Special escape byte value (e.g. 0xFE)Values actually in text are replaced (e.g. 0xFF by 0xFEFF and 0xFE by 0xFEFE)Worst case can double the size of frameBit stuffingSpecial bit sequence (0x01111110)0 bit stuffed after any 11111 sequence

  • Clock-Based FramingUsed by SONETFixed size frames (810 bytes)Look for start of frame marker that appears every 810 bytesWill eventually sync up

  • Link Layer5.1 Introduction and services5.2 Error detection and correction 5.3Multiple access protocols5.4 Link-Layer Addressing5.5 Ethernet and other data link layers

    5.6 Hubs and switches5.7 PPP5.8 Link Virtualization: ATM

  • Error detection/correctionErrors caused by signal attenuation, noise. Receiver detects presence of errorsPossible actionsSignal sender for retransmissionDrops frameCorrect bit errors if possible and continue

  • Error DetectionEDC= 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

  • Parity CheckingSingle Bit Parity:Detect single bit errorsTwo Dimensional Bit Parity:Detect and correct single bit errors00

  • Cyclic Redundancy Check (CRC)Polynomial codeTreat data bits as coefficients of n-bit polynomialChoose r+1 bit generator polynomial GG well known chosen in advanceAdd r bits to packet so that message is divisible by GAt receiver, divide payload by generator polynomialIf result not zero, error detectedBetter loss detection properties than checksumsAll single bit errors, all double bit errors, all odd-numbered errors, burst errors less than rWidely used in practice (802.11, WiFi, ATM, SCTP)

  • Cyclic Redundancy Check (CRC)Calculate code using modulo 2 division of data by generator polynomialSubtraction equivalent to XORWeak definition of magnitudeX >= Y iff position of highest 1 bit of X is the same or greater than the highest 1 bit of YRecord remainder R after division and attach R after dataResult divisible by generator polynomial

  • Cyclic Redundancy Check (CRC)

  • CRC exampleData:101110Generator Polynomial:x3 + 1 (1001) Send: 101110011

  • CRC exampleData:10000Generator Polynomial:x2 + 1 (101) Send: 101 1000000G

  • CRC exampleData:10000Generator Polynomial:x2 + 1 (101) Send: 1000001101 1000000 101 010 000 100 101 010 000 100 101 01 101DGR

  • Cyclic Redundancy Check (CRC)CRC-16 implementationShift register and XOR gates

  • CRC polynomialsCRC-16 = x16 + x15 + x2+ 1 (used in HDLC) CRC-CCITT = x16 + x12 + x5 + 1 CRC-32 = x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7 + x5 + x4 + x2 + x + 1 (used in Ethernet)

  • Forward error correctionFECUse error correcting codes to repair lossesAdd redundant information which allows receiver to correct bit errorsSee information and coding theory work.

  • Link Layer5.1 Introduction and services5.2 Error detection and correction 5.3Multiple access protocols5.4 Link-Layer Addressing5.5 Ethernet and other data link layers5.6 Hubs and switches5.7 PPP5.8 Link Virtualization: ATM

  • Multiple Access Links and ProtocolsTwo types of links:point-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and hostbroadcast (shared wire or medium)old-fashioned Ethernetupstream HFC (cable)802.11 wireless LAN

    shared wire (e.g., cabled Ethernet)shared RF (e.g., 802.11 WiFi)shared RF(satellite) humans at acocktail party (shared air, acoustical)

  • Multiple access problemPoint-to-point link and switched media no problemBroadcast links?Network arbitrationGive everyone a fixed time/freq slot?Ok for fixed bandwidth (e.g., voice)What if traffic is bursty?Centralized arbiterEx: cell phone base stationSingle point of failureDistributed arbitrationAloha/EthernetHumans use multiple access protocols all the time

  • Multiple access protocolssingle shared communication channel two or more simultaneous transmissions by nodes: interference only one node can send successfully at a time multiple access protocol:distributed algorithm that determines how stations share channel, i.e., determine when station can transmitcommunication about channel sharing uses channel itself! what to look for in multiple access protocols: synchronous or asynchronous amount of information needed about other stations robustness (e.g., to channel errors) performance

  • Ideal Multiple Access ProtocolBroadcast channel of rate R bps1. Efficient:When one node wants to transmit, it can send at rate R.2. Fair:When M nodes want to transmit, each can send at average rate R/M3. Fully decentralized:no special node to coordinate transmissionsno synchronization of clocks, slots4. Simple

  • MAC Protocols: a taxonomyThree broad classes:Channel Partitioningdivide channel into smaller pieces (time slots, frequency, code)allocate piece to node for exclusive useRandom Accesschannel not divided, allow collisionsrecover from collisionsTaking turnstightly coordinate shared access to avoid collisionsNodes take turns, but nodes with more to send can take longer turns

  • Channel Partitioning MAC protocols: TDMATDMA: time division multiple access channel divided into N time slots, one per useraccess to channel in "rounds" inefficient with low duty cycle users and at light loadeach station gets fixed length slot (length = pkt trans time) in each round unused slots go idle example: 6-station LAN, 1,3,4 have pkt, slots 2,5,6 idle1341346-slotframe

  • Channel Partitioning MAC protocols: FDMAFDMA: frequency division multiple access channel spectrum divided into frequency bandseach station assigned fixed frequency bandunused transmission time in frequency bands go idle example: 6-station LAN, 1,3,4 have pkt, frequency bands 2,5,6 idle frequency bandstimeFDM cable

  • Channel Partitioning MAC protocolsCDMA (Code Division Multiple Access) unique code assigned to each user; ie, code set partitioningused mostly in wireless broadcast channels (cellular, satellite,etc)each user has own chipping sequence (ie, code) to encode dataencoded signal = (original data) X (chipping sequence)decoding: inner-product of encoded signal and chipping sequenceallows multiple users to coexist and transmit simultaneously with minimal interference (if codes are orthogonal)

  • Channel Partitioning MAC protocolsCDMA Encode/Decode

  • Channel Partitioning MAC protocols CDMA: two sender interference

  • Random Access ProtocolsWhen node has packet to sendtransmit at full channel data rate R.no a priori coordination among nodestwo or more transmitting nodes collision,To avoid deterministic collisions: randomize random access MAC protocol specifies: how to detect collisionshow to recover from collisions (e.g., via delayed retransmissions)Asynchronous TDMAExamples of random access MAC protocols:slotted ALOHAALOHACSMA, CSMA/CD, CSMA/CA

  • Slotted ALOHAAssumptionsall frames same sizetime is divided into equal size slots, time to transmit 1 framenodes start to transmit frames only at beginning of slotsnodes are synchronizedif 2 or more nodes transmit in slot, all nodes detect collisionOperationwhen node obtains fresh frame, it transmits in next slotno collision, node can send new frame in next slotif collision, node retransmits frame in each subsequent slot with prob. p until success

  • Slotted ALOHAProssingle active node can continuously transmit at full rate of channelhighly decentralized: only slots in nodes need to be in syncsimple

    Conscollisions, wasting slotsidle slotsnodes may be able to detect collision in less than time to transmit packetclock synchronization

  • Slotted Aloha efficiencySuppose N nodes with many frames to send, each transmit in slot with probability pprob that node 1 has success in a slot = p(1-p)N-1prob that any node has a success = Np(1-p)N-1For max efficiency with N nodes, find p* that maximizes Np(1-p)N-1For many nodes, take limit of Np*(1-p*)N-1 as N goes to infinity, gives 1/e = .37Efficiency is the long-run fraction of successful slots when there are many nodes, each with many frames to sendAt best: channelused for useful transmissions 37%of time!

  • Pure (unslotted) ALOHAunslotted Aloha: simpler, no synchronizationwhen frame arrivesSend without awaiting for beginning of slotcollision probability increases:frame sent at t0 collides with other frames sent in [t0-1,t0+1]

  • Pure Aloha efficiencyP(success by given node) = P(node transmits) . P(no other node transmits in [p0-1,p0] . P(no other node transmits in [p0,p0+1] = p . (1-p)(N-1) . (1-p) (N-1)P(success by any of N nodes) = N p . (1-p) (N-1). (1-p) (N-1) choosing optimum p as n -> infty ... = 1/(2e) = .18 S = throughput = goodput (success rate)

  • CSMA (Carrier Sense Multiple Access)Human analogy: dont interrupt others!Listen before transmittingCSMA algorithmIf channel sensed idle: transmit entire frameIf channel sensed busy, defer transmission Persistent CSMA: retry immediately with probability p when channel becomes idleNon-persistent CSMA: retry after random interval

  • CSMA collisionscollisions can still occur:propagation delay means two nodes may not heareach others transmissioncollision:entire packet transmission time wastedspatial layout of nodes note:role of distance & propagation delay in determining collision probability

  • CSMA/CD (Collision Detection)Human analogy: the polite conversationalist CSMA/CD algorithmCarrier sensing, deferral as in CSMAAttempt to detect collisions while sendingAbort colliding transmissions as soon as possible to reduce channel wastage Collision detection: Easy in wired LANs: measure signal strengths, compare transmitted, received signalsCollisions detected within short time

  • CSMA/CD collision detection

  • CSMA/CD problemsCan CSMA/CD work over wireless LANs?Collision detection difficult in wireless LANs: receiver shut off while transmittingHidden terminal problem

  • Hidden Terminal effectA, C cannot hear each otherobstacles, signal attenuationNeither A nor C can tell if they collide at B

  • CSMA/CA: CSMA w/ collision avoidanceUse base CSMAAdd acknowledgementsReceiver acknowledges receipt of dataAvoids hidden terminal problemAvoid collisions explicitly via channel reservationSender sends request-to-send (RTS) messagesTransmitted without reservation using CSMA with ACKsReceiver sends clear-to-send (CTS) messagesTransmitted without reservation using CSMA with ACKsSender sends data packet using reservationExplicitly indicates length of so others know how long to back offUsed in 802.11 wireless LAN networks

  • Taking Turns MAC protocolsRecall, channel partitioning MAC protocols:share channel efficiently and fairly at high loadinefficient at low load: delay in channel access, 1/N bandwidth allocated even if only 1 active node! Random access MAC protocolsefficient at low load: single node can fully utilize channelhigh load: collision overheadtaking turns protocolslook for best of both worlds!

  • Taking Turns MAC protocolsPolling: master node invites slave nodes to transmit in turnRTS, CTS messagestypically used with dumb slave devicesconcerns:polling overhead latencysingle point of failure (master)masterslaves

  • Taking Turns MAC protocolsToken passing:control token passed from one node to next sequentially.token messageconcerns:token overhead latencysingle point of failure (token) Tdata(nothingto send)T

  • Taking-turns protocolsDistributed Polling: time divided into slotsbegins with N short reservation slots reservation slot time equal to channel end-end propagation delay station with message to send posts reservationreservation seen by all stations after reservation slots, message transmissions ordered by known priority

  • Summary of MAC protocolsWhat do you do with a shared media?Channel PartitioningTime DivisionFrequency DivisionCode DivisionRandom partitioning (dynamic), ALOHA, S-ALOHA, CSMA, CSMA/CDcarrier sensing: easy in some technologies (wire), hard in others (wireless)CSMA/CD used in EthernetCSMA/CA used in 802.11Taking Turnspolling from a central site, token passingBluetooth, FDDI, IBM Token Ring

  • Link Layer5.1 Introduction and services5.2 Error detection and correction 5.3Multiple access protocols5.4 Link-Layer Addressing5.5 Ethernet and other data link layers5.6 Hubs and switches5.7 PPP5.8 Link Virtualization: ATM

  • MAC AddressesMAC/LAN/physical/Ethernet address: used to get frame from one interface to another physically-connected interface (same network)Globally unique 48 bit address (for most LANs) burned in the adapter ROMifconfig aAdministered by IEEEmanufacturer buys portion of MAC address space to assure uniqueness

  • LAN AddressesEach adapter on LAN has unique LAN addressBroadcast address =FF-FF-FF-FF-FF-FF= adapter1A-2F-BB-76-09-AD58-23-D7-FA-20-B00C-C4-11-6F-E3-9871-65-F7-2B-08-53 LAN(wired orwireless)

  • MAC vs IP addressingMAC addressFlat (not hierarchical)Like Social Security NumbersDoes not change when machine is moved (portable)IP addressesHierarchically organizedLike postal addressDepends on IP subnet that node is attached toMust change when machine is moved (not portable)Why have separate IP and hardware addresses?Assign adapters an IP addressHardware only works for IP (no IPX, DECNET)Use hardware address as network addressNo route aggregation

  • ARP: Address Resolution ProtocolARPBroadcast interest in Bs MAC addressB responds with its MAC addressKeep track of mappings in ARP tableIP/MAC address mappings for LAN nodes < IP address; MAC address; TTL>TTL (Time To Live)Soft stateQuestion: how to determine MAC address of B given Bs IP address?1A-2F-BB-76-09-AD58-23-D7-FA-20-B00C-C4-11-6F-E3-9871-65-F7-2B-08-53 LAN237.196.7.23237.196.7.78237.196.7.14237.196.7.88

  • ARP protocol: Same LAN (network)A knows Bs IP address and wants to send datagram to B, and Bs MAC address not in As ARP table.A broadcasts ARP query packet, containing B's IP address Dest MAC address = FF-FF-FF-FF-FF-FFall machines on LAN receive ARP query B receives ARP packet, replies to A with its (B's) MAC addressframe sent to As MAC address (unicast)

    A caches (saves) IP-to-MAC address pair in its ARP table until information becomes old (times out) soft state: information that times out (goes away) unless refreshedARP is plug-and-play:nodes create their ARP tables without intervention from net administratorarp a/proc/net/arp

  • Routing to another LANwalkthrough: send datagram from A to B via R assume A knows Bs IP address

    Two ARP tables in router R, one for each IP network (LAN)In routing table at source Host, default route 111.111.111.110A creates datagram with source A, destination B ARB

  • A checks route table to find B is not on its networkA uses ARP to get Rs MAC address (ARP for 111.111.111.110)A creates link-layer frame with R's MAC address as dest, frame contains A-to-B IP datagramAs adapter sends frame Rs adapter receives frame R removes IP datagram from Ethernet frame, sees its destined to BR uses ARP to get Bs MAC address R creates frame containing A-to-B IP datagram sends to BARB

  • DHCPQ: How does host get an IP address on subnet?

    hard-coded by system admin in a fileWintel: control-panel->network->configuration->tcp/ip->propertiesUNIX: /etc/rc.configDHCP: Dynamic Host Configuration Protocol: dynamically get address from serverplug-and-playGiven a hardware address, give me the IP addressPredecessors: RARP, BOOTPOpposite of ARP (given IP address, give me MAC address)

  • DHCP: Dynamic Host Configuration ProtocolGoal: allow host to dynamically obtain its IP address from network server when it joins networkAllows reuse of addresses (only hold address while connected and on)Support for mobile users who want to join networkCan renew its lease on address in useDHCP overview:host broadcasts DHCP discover msgDHCP server responds with DHCP offer msghost requests IP address: DHCP request msgDHCP server sends address: DHCP ack msg

  • DHCP client-server scenario223.1.1.1223.1.1.2223.1.1.3223.1.1.4223.1.2.9223.1.2.2223.1.2.1223.1.3.2223.1.3.1223.1.3.27 DHCP server arriving DHCP client needsaddress in this(223.1.2.0/24)network

  • DHCP client-server scenarioDHCP server: 223.1.2.5arriving clienttimeDHCP offersrc: 223.1.2.5, 67 dest: 255.255.255.255, 68yiaddrr: 223.1.2.4transaction ID: 654Lifetime: 3600 secsDHCP requestsrc: 0.0.0.0, 68 dest:: 255.255.255.255, 67yiaddrr: 223.1.2.4transaction ID: 655Lifetime: 3600 secsDHCP ACKsrc: 223.1.2.5, 67 dest: 255.255.255.255, 68yiaddrr: 223.1.2.4transaction ID: 655Lifetime: 3600 secs

  • Link Layer5.1 Introduction and services5.2 Error detection and correction 5.3Multiple access protocols5.4 Link-Layer Addressing5.5 Ethernet and other data link layers5.6 Hubs and switches5.7 PPP5.8 Link Virtualization: ATM

  • Specific data-link layersSpecific data-link layersEthernet (802.3)Token Ring (802.5)WiFi (802.11)Frame relaySpecial link layers covered later (PPP, ATM)

  • Ethernet's implementation of data-link layerFraming (special pre-amble within frame)Physical addressing (6 byte hardware addresses)Demux to upper protocol (type field in header)Flow control (none)Error detection and correction (CRC-32)Reliable delivery (none)Security (none)Media access and quality of service (CSMA/CD with adaptive, randomized wait)Digital to analog conversion (Manchester encoding)

  • Ethernetdominant wired LAN technology: First practical local area network, built at Xerox PARC in 70sfirst widely used LAN technologySimpler, cheaper than token LANs and ATMcheap: $3 for 100Mbs NICMetcalfes Ethernetsketch

  • Ethernet topologiesFlexible topologiesBus topology popular through mid 90sall nodes in same collision domainrequires the use of CSMA/CDStar topology todayactive switch in centereach spoke runs a (separate) Ethernet protocol (nodes do not collide with each other)switchbus: coaxial cablestar

  • Ethernet Frame StructureSending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

    Preamble: 7 bytes with pattern 10101010 followed by one byte with pattern 10101011used to synchronize receiver, sender clock rates

  • Ethernet Frame Structure (more)Addresses: 6 bytesGlobally unique, allocated to manufacturersif adapter receives frame with matching destination address, or with broadcast address (eg ARP packet), it passes data in frame to net-layer protocolotherwise, adapter discards frameType: indicates the higher layer protocolmostly IP but others include Novell IPX and AppleTalkData 46 to 1500 bytesCRC: 4 byteschecked at receiver, if error is detected, frame is droppedCRC-32(x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1)

  • Unreliable, connectionless serviceConnectionless: No handshaking between sending and receiving adapter. Unreliable: receiving adapter doesnt send acks or nacks to sending adapterstream of datagrams passed to network layer can have gapsgaps will be filled if app is using TCPotherwise, app will see the gaps

  • Ethernet CSMA/CD algorithm1. Adaptor receives datagram from net layer & creates frame2. Carrier sensing: If adapter senses channel idle, it starts to transmit frame. If it senses channel busy, waits until channel idle and then transmits3. If adapter transmits entire frame without detecting another transmission, the adapter is done with frame !4. Collision detection: If adapter detects another transmission while transmitting, aborts and sends jam signal (make sure all adapters see collision: 48 bits)5. Random access: After aborting, adapter enters exponential backoff before returning to Step 2after m th collision, choose K randomly out of {0,1,2,2m-1}. Wait K*512 bit timesfirst collision: choose K from {0,1}; delay is K 512 bit transmission timesafter second collision: choose K from {0,1,2,3}after ten collisions, choose K from {0,1,2,3,4,,1023}

  • Exponential backoff calculation Goal: adapt retransmission attempts to estimated current loadheavy load: random wait will be longerDeterministic delay after collisionCollision will occur again in lockstepRandom delay with fixed meanFew senders needless waitingToo many senders too many collisionsExponentially increasing random delayInfer senders from # of collisionsMore senders increase wait timeSee/interact with Javaapplet on AWL Web site:highly recommended !

  • General Ethernet CSMA/CD

  • Ethernet CSMA/CD and Packet SizeWhat if two people sent really small packetsHow do you find collision?Must have a minimum packet sizeMin packet length > 2x max prop delayIf A, B are at opposite sides of link, and B starts one link prop delay after A

  • Propagation delay & packet sizePropagation delay determines min. packet size to prevent undetected collisionsModern 10Mb EthernetSegment length to support?500m maximum segment lengthCan add repeaters up to a maximum 5 segments (2500m)Propagation delay for maximum segmentc in cable = 60% * c in vacuum = 1.8 x 10^8 m/s~ 12.5us one-way delayAdd repeater and tranceiver delayTo be safe IEEE specifies a 512 bit-time slot for Ethernet = 51.2us 512 bits = 64 bytes (minimum data payload = 46 bytes)

  • Minimum packet sizeWhat about scaling? 100Mbit, 1Gbit...Make network smaller?Solution for 100BaseTMake min pkt size larger?512bits @ 1Gbps = 512ns512ns * 1.8 * 10^8 = 92metersGigabit ethernet uses collision extension for small pkts

  • Ethernet ProblemsEthernet unstable at high loadsPeak throughput worse withMore hosts more collisions needed to identify single senderSmaller packet sizes more frequent arbitrationLonger links collisions take longer to observe, more wasted bandwidth

  • Token RingsPackets broadcast around ringToken right to send rotates around ringFair, real-time bandwidth allocationEvery host holds token for limited timeHigher latency when only one sender

  • Token Passing: IEEE802.5 standard4 Mbps max token holding time: 10 ms (limits frame length)

  • Why Did Ethernet Win?Better failure modesToken rings network unusableEthernet node detachedGood performance in common caseVolume lower cost higher volume .AdaptableTo higher bandwidths (vs. FDDI)To switching (vs. ATM)Completely distributed, easy to maintain/administerEasy incremental deploymentCheap cabling, etc

  • IEEE 802.11 Wireless LANUntethered (often mobile) networkingIEEE 802.11 standard:Defines specific implementations of data-link functionsFraming, error detection, MAC, etc.Unlicensed frequency spectrum: 900Mhz, 2.4Ghz

  • IEEE 802.11 Ad-hoc modeAd hoc network: stations can dynamically form network without APApplications:laptop meeting in conference room, carinterconnection of personal devicesbattlefield IETF MANET (Mobile Ad hoc Networks) working group

  • IEEE 802.11 Infrastructure modeTypically used with access point (base station)Several communication methods supportedCSMA (with explicit ACK to indicate collision)CSMA/CA: reservationsPolling from AP

  • IEEE 802.11 MAC Protocol: CSMA802.11 CSMA sender- if sense channel idle for DIFS sec. then transmit entire frame (no collision detection)-if sense channel busy then backoff (random, exponential)802.11 CSMA receiver-if received OK return ACK after SIFSSIFS < DIFS allows acks to grab channel with higher priority802.11 CSMA othersNAV: Network Allocation Vector802.11 frame has transmission time fieldothers (hearing data) defer access for NAV time units

  • IEEE 802.11 MAC Protocol CSMA/CASame as previous mode but with explicit channel reservationSend short reservation messages via CSMA to reserve channelSender RTS (request to send), Receiver CTS (clear to send)CTS notifies all hidden stations of sender's reservationShort messages so that collision less likely and of short durationSend data unobstructed on reserved channelEnd result similar to CSMA/CD

  • Link Layer5.1 Introduction and services5.2 Error detection and correction 5.3Multiple access protocols5.4 Link-Layer Addressing5.5 Ethernet and other data link layers5.6 Interconnections: Hubs and switches5.7 PPP5.8 Link Virtualization: ATM

  • Link-layer devicesQ: Why not just one big LAN? limited aggregate bandwidthlimited length: electrical limitationslarge collision domain (can collide with many stations)access delay (eg 802.5 token passing delay)

  • HubsHubs are essentially physical-layer, multi-port repeaters:bits coming from one link go out all other links at the same rateaddresses electrical limitationsno frame bufferingno CSMA/CD at hub: adapters detect collisionsall nodes connected to hub can collide with one another

  • Hubs (more)Hubs do not isolate collision domains: node may collide with any node residing at any segment in LAN Hub Advantages:simple, inexpensive deviceextends maximum distance between node pairs

  • Interconnecting with hubsBackbone hub interconnects LAN segmentsBut individual segment collision domains become one large collision domainSingle collision domain results in no increase in max throughputSimultaneous transfers between A to A and B to B collide Multi-tier throughput same as single segment throughputCant interconnect 10BaseT & 100BaseThubhubhubhubAABB

  • SwitchesLink Layer deviceSmarter than hubsActively stores and forwards Ethernet framesExamines frame header and selectively forwards frame based on destination MAC addressTwo-port switch known as a bridgeSwitches known as multi-port bridgesA switch isolates collision domains since it buffers framesUses CSMA/CD to access individual network segments to transmit framesTransparent to hostsPlug-and-play, self-learning (do not need to be configured)

  • Switches: multiple simultaneous transmissionsHosts have dedicated direct connection to switchEthernet protocol and frame used, butNo collisionsEach link is its own collision domainFull duplex operationSwitch buffers framesMuch greater aggregate bandwidthData backplane of switches typically large to support simultaneous transfers amongst ports

    Switching: A-to-A and B-to-B simultaneously, no collisions

    switchAABBCC

  • Switches (more)Switch advantages:Isolates collision domains resulting in higher total max throughput

    Can connect different type Ethernet since it is a store and forward device

    Transparent: no need for any change to hosts LAN adapters

  • Switch operationHow do determine onto which LAN segment to forward frame?Looks like a routing problem...123

  • Self learningApproachMonitor traffic to build a cache (switch table) of which nodes are downstream of which ports(MAC Address, Interface, Time Stamp)learns which hosts can be reached through which interfaces Selectively forward frames based on cache entriesFlood network for frames with unknown (MAC) destinations

  • Switch algorithmWhen frame received: 1. record link associated with sending host2. index switch table using MAC dest address3. if entry found for destination then { if dest on segment from which frame arrived then drop the frame else forward the frame on interface indicated } else flood forward on all but the interface on which the frame arrived

  • Switch exampleSuppose C sends frame to DSwitch receives frame from from Cnotes in bridge table that C is on interface 1because D is not in table, switch forwards frame into interfaces 2 and 3frame received by D hubhubhubswitchABCDEFGHIaddressinterfaceABEG

    1123123

  • Switch exampleSuppose D replies back with frame to C.

    Switch receives frame from from Dnotes in bridge table that D is on interface 2because C is in table, switch forwards frame only to interface 1frame received by C hubhubhubABCDEFGHIaddressinterfaceABEGC11231123switch

  • Switch: traffic isolationswitch installation breaks subnet into LAN segmentsswitch filters packets: same-LAN-segment frames not usually forwarded onto other LAN segmentssegments become separate collision domainscollision domaincollision domaincollision domain

  • Switches and Spanning Treesfor increased reliability, desirable to have redundant, alternate paths from source to destinationwith multiple simultaneous paths, cycles result - bridges may multiply and forward frame foreversolution: organize switches in a spanning tree by disabling subset of interfacesswitchswitch

  • Switches vs. Routersboth store-and-forward devicesrouters: network layer devices (examine network layer headers)switches/bridges are link Layer devicesrouters maintain routing tables, implement routing algorithmsswtiches maintain filtering tables, implement filtering, learning and spanning tree algorithms

  • Routers vs. SwitchesSwitches + and - + Switch operation is simpler requiring less processing bandwidth- Topologies are restricted with switches: avoid cycles with spanning trees - Switches do not offer protection from broadcast storms (endless broadcasting by a host will be forwarded by a switch)

  • Routers vs. SwitchesRouters + and -+ arbitrary topologies can be supported, cycling is limited by TTL counters (and good routing protocols)- require IP address configuration (not plug and play)- require higher processing bandwidth

    switches do well in small (few hundred hosts) while routers used in large networks (thousands of hosts)

  • Summary comparison

    hubs

    routers

    switches

    traffic

    isolation

    no

    yes

    yes

    plug & play

    yes

    no

    yes

    optimal

    routing

    no

    yes

    no

    cut

    through

    yes

    no

    yes

  • Link Layer5.1 Introduction and services5.2 Error detection and correction 5.3Multiple access protocols5.4 Link-Layer Addressing5.5 Ethernet and other data link layers5.6 Hubs and switches5.7 PPP5.8 Link Virtualization: ATM

  • Point to Point Data Link ControlPoint-to-point linksOne sender, one receiver, one linkEasier than shared broadcast linksNo media access controlNo need for explicit MAC addressing (ie ARP)Goal of Point-to-Point protocolsLayer generic higher-level data-link layer functions on top of a variety of point-to-point linksDial-up phone line, DSL, ISDN etc.Each different link does its own digital-analog conversion (ie provides bits)Implement pseudo-link layer on top that implements common functionsFraming, Demux to upper layer, etc.ExamplesPPP (point-to-point protocol)HDLC: High level data link control (Data link used to be considered high layer in protocol stack!)

  • PPP Design Requirements [RFC 1557]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 timedemultiplex upwardsbit transparency: must carry any bit pattern in the data fielderror detection (no correction)connection liveness: detect, signal link failure to network layernetwork layer address negotiation: endpoint can learn/configure each others network address

  • PPP non-requirementsno error correction/recoveryno flow controlout 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!

  • PPP Data FrameFlag: delimiter (framing)Address: does nothing (only one option)Control: does nothing; in the future possible multiple control fieldsProtocol: upper layer protocol to which frame delivered (eg, PPP-LCP, IP, IPCP, etc)

  • PPP Data Frameinfo: upper layer data being carriedcheck: cyclic redundancy check for error detection

  • Byte Stuffing data transparency requirement: data field must be allowed to include flag pattern Q: is received data or flag?

    Sender: adds (stuffs) extra < 01111101> byte before each data byteadds (stuffs) extra < 01111101> byte before each data byteReceiver: 01111101 byte followed by 01111110 byte: discard first byte, continue data receptionsingle 01111110: flag byte

  • Byte Stuffingflag bytepatternin datato sendflag byte pattern plusstuffed byte in transmitted data

  • PPP Data Control ProtocolBefore exchanging network-layer data, data link peers mustconfigure PPP link (max. frame length, authentication)learn/configure network layer informationfor IP: carry IP Control Protocol (IPCP) msgs (protocol field: 8021) to configure/learn IP address

  • Link Layer5.1 Introduction and services5.2 Error detection and correction 5.3Multiple access protocols5.4 Link-Layer Addressing5.5 Ethernet and other data link layers5.6 Hubs and switches5.7 PPP5.8 Link Virtualization: ATM and MPLS

  • Virtualization of networksVirtualization of resources: a powerful abstraction in systems engineering:computing examples: virtual memory, virtual devicesVirtual machines: e.g., javaIBM VM os from 1960s/70slayering of abstractions: dont sweat the details of the lower layer, only deal with lower layers abstractly

  • The Internet: virtualizing networks1974: multiple unconnected nets ARPAnetdata-over-cable networkspacket satellite network (Aloha)packet radio network

    differing in:addressing conventionspacket formatserror recoveryrouting

    ARPAnetsatellite net"A Protocol for Packet Network Intercommunication", V. Cerf, R. Kahn, IEEE Transactions on Communications, May, 1974, pp. 637-648.

  • The Internet: virtualizing networksGateway: embed internetwork packets in local packet format or extract themroute (at internetwork level) to next gateway

    ARPAnetsatellite netgateway

  • Cerf & Kahns Internetwork ArchitectureWhat is virtualized?two layers of addressing: internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology cablesatellite56K telephone modemtoday: ATM, MPLS invisible at internetwork layer. Looks like a link layer technology to IP!

  • Virtual links and tunnelingMany options of encapsulating or tunneling packets through a virtual link (VPN)Generic Routing Encapsulation (GRE)PPTP (Point-to-point Tunneling Protocol)L2F (Layer 2 Forwarding)L2TP (Layer 2 Tunneling Protocol)Can also be done at network layer via IPsec Encrypt data at a layer below network layerWorks for IP packets

  • Virtual links exampleTreat IP-to-IP session as a virtual LAN linkIP_local = IP addr. of client at home assigned by ISPIP_work = IP addr. of client for use in accessing work LANIP_file_serv = IP addr. of protected file server at workACL to only allow access from work LANIP_VPN_serv = IP addr. of VPN server at workAuthenticates remote client via username/passwordAssigns remote client an IP address on LAN (IP_work)Responds to ARPs for IP_remote on behalf of clientDecapsulates and encapsulates packets to/from clientIP Dst = IP_VPN_servIP Src = IP_localIP Src = IP_workIP Src = IP_file_servIP Src = IP_workIP Src = IP_file_servVPN server terminates tunnel

  • ATM and MPLSATM, MPLS separate networks in their own right different service models, addressing, routing from Internetviewed by Internet as logical link connecting IP routersjust like dialup link is really part of separate network (telephone network)

  • Multiprotocol label switching (MPLS)initial goal: speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP address!

    Data-link headerIP headerremainder of payloadMPLS headerlabelExpSTTL20315

  • MPLS capable routersa.k.a. label-switched routerforwards packets to outgoing interface based only on label value (dont inspect IP address)MPLS forwarding table distinct from IP forwarding tablessignaling protocol needed to set up forwardingRSVP-TEforwarding 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

  • MPLS forwarding tablesR1R2DR3R4R50100AR6 in out outlabel label dest interface 10 A 0 12 D 010 8 A 1

  • Chapter 5: Summary principles behind data link layer services:error detection, correctionsharing a broadcast channel: multiple accesslink layer addressinginstantiation and implementation of various link layer technologiesEthernetswitched LANSPPPvirtualized networks as a link layer: ATM, MPLS

  • Physical LayerFunctionsDigital to Analog conversionPhysical media characteristics

  • Digital to analog conversionBits sent as analog signalsPhotonic pulses of a given wavelength over optical fiberElectronic signals of a given voltage

  • Digital to analog conversionWill cover electronic transmission (optical transmission left for you to research)Biggest issueWhen to sample voltage?Detecting sequences involves clocking with the same clockHow to synchronize sender and receiver clocks?Need easily detectible event at both endsSignal transitions help resync sender and receiverNeed frequent transitions to prevent clock skewhttp://www.mouse.demon.nl/ckp/telco/encode.htm

  • NRZ-LNon-Return to Zero Level (NRZ-L)1=high signal, 0=lower signalLong sequence of same bit causes difficultyDC bias hard to detect low and high detected by difference from average voltageClock recovery difficultUsed by Synchronous Optical Network (SONET)SONET XORs bit sequence to ensure frequent transitionsUsed in early magnetic tape storage

  • NRZ-L

  • NRZ-MNon-Return to Zero MarkLess power to transmit versus NRZ1=signal transition at start of bit, 0=no changeNo problem with string of 1sNRZ-like problem with string of 0sUsed in SDLC (Synchronous Data Link Control)Used in modern magnetic tape storage

  • Manchester (Bi-Phase-Level) codingManchester 0=low to high transition, 1=high to low transitionTransition for every bit simplifies clock recoveryNot very efficientDoubles the number of transitionsCircuitry must run twice as fastUsed by Ethernet

  • Manchester codingEncoding for 110100Bit stream110100Manchester encoding

  • Physical LayerPlethora of physical mediaFiber, copper, airSpecifies the characteristics of transmission mediaToo many to cover in detail, not the focus of the courseMany data-link layer protocols (i.e. Ethernet, Token-Ring, FDDI. ATM run across multiple physical layers)Physical characteristics dictate suitability of data-link layer protocol and bandwidth limits

  • Common CablingCopperTwisted PairUnshielded (UTP)CAT-1, CAT-2, CAT-3, CAT-4, CAT-5, CAT-5eShielded (STP)Coaxial CableFiberSingle-modeMulti-mode

  • Twisted PairMost common LAN interconnectionMultiple pairs of twisted wiresTwisting to eliminate interferenceMore twisting = Higher data rates, higher cost

  • Twisted pairStandards specify twisting, resistance, and maximum cable length for use with particular data-link layer 5 categoriesCategory 1Voice only (telephone wire)Category 2Data to 4Mbs (LocalTalk)Category 3Data to 10Mbs (Ethernet)Category 4Data to 20Mbs (16Mbs Token Ring)Category 5 (100 MHz)Data to 100Mbs (Fast Ethernet)Category 5e (350 MHz)Data to 1000Mbs (Gigabit Ethernet)

  • Twisted PairCommon connectors for Twisted PairRJ11 (3 pairs)Phone connectionsRJ45 (4 pairs) Allows both data and phone connections(1,2) and (3,6) for data(4,5) for voice(7,8) unusedCrossover cables for NIC-NIC, Hub-Hub connection (Data pairs swapped)

  • UTPUnshielded Twisted PairLimited amount of protection from interferenceCommonly used for voice and ethernetVoice: multipair 100-ohm UTP

  • STPShielded Twisted PairNot as common at UTPUTP susceptible to radio and electrical interferenceExtra shielding material addedCables heavier, bulkier, and more costlyOften used in token ring topologies150 ohm STP two pair (IEEE 802.5 Token Ring)

  • Coaxial cableTwo concentric copper conductorsBidirectionalSeparated by plastic insulation layerSupport longer connectivity distances over UTPUsed in CATV networksHFC networks (Hybrid Fiber/Coax)Fiber from cable headend to location near homeCoax to homeFDM to support multiple data channels

  • FiberTransmit light pulses vs. electronic signalsImmune to electromagnetic noise/interferencehigh-speed point-to-point transmission (e.g., 10s-100s Gps)Low error rateCablingCenter core made of glass or plastic fiberPlastic coating to cushion coreKevlar fiber for strengthTeflon or PVC outer insulating jacket

  • FiberSingle-mode fiberSmaller diameter (12.5 microns)One mode onlyPreserves signal better over longer distancesTypically used for SONET or SDHLasers used to signalMulti-mode fiberLarger diameter (62.5 microns)Multiple modesWDM and DWDM = (dense) wavelength division multiplexingPhotodiodes at receivers

  • Physical-link lingoSpecifies capacities over physical mediaElectronicT1/DS1=1.54 Mbps T3/DS3=45MbpsOptical (OC=optical carrier)OC1=52 MbpsOC3/STM1=156 MbpsOC12=622 MbpsOC48=2488 MbpsOC192=10 Gbps OC768=40 Gbps

  • WirelessEntire spectrum of transmission frequency rangesRadioInfraredLasersCellular telephone Microwave SatelliteAcoustic (see ESE sensors)Ultra-wide bandpropagation environment effects:reflection obstruction by objectsinterferencehttp://www.ntia.doc.gov/osmhome/allochrt.html

  • What runs on them?Protocol Summary

  • Extra slides

  • ARQAutomatic Repeat Request (ARQ)Receiver sends acknowledgement (ACK) when it receives packetSender waits for ACK and timeouts if it does not arrive within some time period

  • Stop and WaitTimeTimeoutSenderReceiver

  • Recovering from ErrorACKTimeoutPacketTimeoutTimeoutTimeoutTimeTimeoutTimeoutACK lostPacket lostEarly timeout

  • Stop and Wait ProblemsHow to recognize a duplicate?PerformanceCan only send one packet per round trip

  • How to Recognize Resends?Use sequence numbersboth packets and acksSequence # in packet is finite -- how big should it be? For stop and wait?One bit wont send seq #1 until received ACK for seq #0Pkt 0Pkt 1

  • How to Keep the Pipe Full?Send multiple packets without waiting for first to be ackedNumber of pkts in flight = windowHow large a window is neededRound trip delay * bandwidth = capacity of pipeReliable, unordered deliverySeveral parallel stop & waitsSend new packet after each ackSender keeps list of unacked packets; resends after timeoutReceiver same as stop&wait

  • Sliding WindowReliable, ordered deliveryReceiver has to hold onto a packet until all prior packets have arrivedSender must prevent buffer overflow at receiverCircular buffer at sender and receiverPackets in transit
  • Sender/Receiver StateSent & AckedSent Not AckedOK to SendNot UsableMax acceptableReceiver window Max ACK receivedNext seqnumReceived & AckedAcceptable PacketNot UsableSender windowNext expected

  • Window Sliding Common CaseOn reception of new ACK (i.e. ACK for something that was not acked earlierIncrease sequence of max ACK receivedSend next packetOn reception of new in-order data packet (next expected)Hand packet to applicationSend cumulative ACK acknowledges reception of all packets up to sequence numberIncrease sequence of max acceptable packet

  • Loss RecoveryOn reception of out-of-order packetSend nothing (wait for source to timeout)Cumulative ACK (helps source identify loss)Timeout (Go Back N recovery)Set timer upon transmission of packetRetransmit max ACK received sequence + 1Restart from max ACK received sequence + 1 Performance during loss recoveryNo longer have an entire window in transitCan have much more clever loss recoveryCovered in TCP lectures

  • Sequence NumbersHow large do sequence numbers need to be?Must be able to detect wrap-aroundDepends on sender/receiver window sizeE.g.Max seq = 7, send win=recv win=7If pkts 0..6 are sent succesfully and all acks lostReceiver expects 7,0..5, sender retransmits old 0..6Max sequence must be >= send window + recv window

  • Checksumming: Cyclic Redundancy Checkview data bits, D, as a binary numberchoose r+1 bit pattern (generator), G goal: choose r CRC bits, R, such that exactly divisible by G (modulo 2) receiver knows G, divides by G. If non-zero remainder: error detected!can detect all burst errors less than r+1 bitswidely used in practice (ATM, HDCL)

  • RZReturn to Zero (RZ)1=pulse to high, dropping back to low0=no transition

  • NRZ-SNon-Return to Zero Space1=no change, 0=signal transition at start of bitNo problem with string of 0sNRZ-like problem with string of 1s

  • Manchester encodingUsed in 10BaseTEach bit has a transitionAllows clocks in sending and receiving nodes to synchronize to each otherno need for a centralized, global clock among nodes!Hey, this is physical-layer stuff!More later

  • Other coding schemesBi-Phase-Mark, Bi-Phase-SpaceLevel change at every bit period boundaryMid-period transition determines bitBi-Phase-M: 0=no change, 1=signal transition

    Bi-Phase-S: 0=signal transition, 1=no change

  • Other coding schemesDifferential Bi-Phase-Space, Differential Bi-Phase-MarkLevel change at every mid-bit period boundaryBit period boundary transition determines bitDiff-Bi-Phase-M: 0=signal transition, 1=no changeDiff-Bi-Phase-S: 0=no change, 1=signal transition

  • 802.3 Ethernet Standards: Link & Physical Layersmany different Ethernet standardscommon MAC protocol and frame formatdifferent speeds: 2 Mbps, 10 Mbps, 100 Mbps, 1Gbps, 10G bpsdifferent physical layer media: fiber, cable

    MAC protocoland frame format100BASE-TX100BASE-T4100BASE-FX100BASE-T2100BASE-SX100BASE-BX

  • 10BaseT and 100BaseT10/100 Mbps rate; latter called fast ethernetT stands for Twisted PairOriginally, half-duplex modeBus topology popular through mid 90s (10Base2, co-ax)Eventually, nodes connect to a hub: star topology; 100 m max distance between nodes and hubNodes at both ends of link can not transmit at same timeNodes can not transmit and receive at same timeToday, mostly full-duplexNodes connect to switchesSimultaneous xmit and receive

  • Gbit Ethernetuses standard Ethernet frame formatallows for point-to-point links and shared broadcast channelsin shared mode, CSMA/CD is used; short distances between nodes required for efficiencyFull-Duplex at 1 Gbps for point-to-point linksNodes can transmit and receive at 1Gbps simultaneously10 Gbps now !

  • Backbone Bridge

  • Interconnection Without Backbone

    Not recommended for two reasons:- single point of failure at Computer Science hub- all traffic between EE and SE must path over CS segment

  • CSMA/CD efficiencyTprop = max prop delay between 2 nodes in LANttrans = time to transmit max-size frame

    efficiency goes to 1 as tprop goes to 0as ttrans goes to infinitybetter performance than ALOHA: and simple, cheap, decentralized!

  • More on Switchescut-through switching: frame forwarded from input to output port without first collecting entire frameslight reduction in latencycombinations of shared/dedicated, 10/100/1000 Mbps interfaces

  • Institutional networkhubhubhubswitchto externalnetworkrouterIP subnetmail serverweb server

  • Ethernet: uses CSMA/CDif packetthen { A: sense channelif idlethen { 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}}

  • 10Base2 EthernetSifting through the jargon (10Base2)10: 10Mbps; 2: under 200 meters max cable lengththin coaxial cable in a bus topology

    repeaters used to connect up to multiple segmentsrepeater repeats bits it hears on one interface to its other interfaces: physical layer device only!

  • ATMATMReplace existing Internet protocols with a more robust architectureNetwork architecture to supportMultiple service classes and per-flow guaranteesVirtual circuits to support real-time applicationsExplicit rate signaling and resource allocationCovered as a data-link layer

  • Internet vs. ATMInternetelastic datagram service, no strict timing req. Computer communication onlysmart end systems (computers)can adapt, perform control, error recoverysimple inside network, complexity at edgemany link types different characteristicsuniform service difficultATMevolved from telephony, strict timing and reliability requirementsComputer and human communication need for guaranteed servicedumb end systemstelephonescomplexity inside network

  • Asynchronous Transfer Mode (ATM)1980s/1990s standard for high-speed (155Mbps to 622 Mbps and higher) Broadband Integrated Service Digital Network architectureTake strengths of IP, learn from its shortcomingsPacket switching goodPacket switching without explicit network-level connections and reservations badPacket switching using large headers for small packets bad (voice)Design new network to address emerging applications while allowing for efficient support for non-real-time data applicationsGoal: integrated, end-end transport of carry voice, video, datameeting timing/QoS requirements of voice, video (versus Internet best-effort model)next generation telephony: technical roots in telephone worldpacket-switching (fixed length packets, called cells) using virtual circuitsCovered now since it is used mostly as a data-link layer

  • ATM architecture adaptation layer: only at edge of ATM networkdata segmentation/reassemblyroughly analagous to Internet transport layerATM layer: network layercell switching, routingphysical layer

  • ATM: network or link layer?Vision: end-to-end transport: ATM from desktop to desktopATM is a network technologyReality: used to connect IP backbone routers IP over ATMATM as switched link layer, connecting IP routers

    ATMnetworkIPnetwork

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

  • ATM Adaptation Layer (AAL) [more]Different versions of AAL layers, depending on ATM service class:AAL1: for CBR (Constant Bit Rate) services, e.g. circuit emulationAAL2: for VBR (Variable Bit Rate) services, e.g., MPEG videoAAL5: for data (eg, IP datagrams)AAL PDUATM cellUser data

  • ATM LayerService: transport cells across ATM networkanalogous to IP network layervery different services than IP network layerNetworkArchitecture

    Internet

    ATM

    ATM

    ATM

    ATMServiceModel

    best effort

    CBR

    VBR

    ABR

    UBRBandwidth

    none

    constantrateguaranteedrateguaranteed minimumnoneLoss

    no

    yes

    yes

    no

    noOrder

    no

    yes

    yes

    yes

    yesTiming

    no

    yes

    yes

    no

    noCongestionfeedback

    no (inferredvia loss)nocongestionnocongestionyes

    noGuarantees ?

  • ATM Layer: Virtual CircuitsVC transport: cells carried on VC from source to destcall setup, teardown for each call before data can floweach packet carries VC identifier (not destination ID)every switch on source-dest path maintain state for each passing connectionlink,switch resources (bandwidth, buffers) may be allocated to VC: to get circuit-like perf.Permanent VCs (PVCs)long lasting connectionstypically: permanent route between to IP routersSwitched VCs (SVC):dynamically set up on per-call basis

  • ATM VCsAdvantages 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 trafficone PVC between each source/dest pair) does not scale (N*2 connections needed) SVC introduces call setup latency, processing overhead for short lived connections

  • ATM Layer: ATM cell5-byte ATM cell header48-byte payloadWhy?: small payload -> short cell-creation delay for digitized voicehalfway between 32 and 64 (compromise!)

    Cell headerCell format

  • ATM cell headerVCI: virtual channel IDwill change from link to link thru netPT: Payload type (e.g. RM cell versus data cell) CLP: Cell Loss Priority bitCLP = 1 implies low priority cell, can be discarded if congestionHEC: Header Error Checksumcyclic redundancy check

  • ATM Physical Layer (more)Two pieces (sublayers) of physical layer:Transmission Convergence Sublayer (TCS): adapts ATM layer above to PMD sublayer belowPhysical Medium Dependent: depends on physical medium being used

    TCS Functions:Header checksum generation: 8 bits CRC Cell delineationWith unstructured PMD sublayer, transmission of idle cells when no data cells to send

  • ATM Physical LayerPhysical Medium Dependent (PMD) sublayerSONET/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 GbpsTI/T3: transmission frame structure (old telephone hierarchy): 1.5 Mbps/ 45 Mbpsunstructured: just cells (busy/idle)

  • IP-Over-ATMClassic IP only 3 networks (e.g., LAN segments)MAC (802.3) and IP addressesIP over ATM replace network (e.g., LAN segment) with ATM networkATM addresses, IP addressesATMnetworkEthernetLANsEthernetLANs

  • IP-Over-ATM

  • Datagram Journey in IP-over-ATM Network at Source Host:IP layer maps between IP, ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data, segments cells, passes to ATM layer ATM network: moves cell along VC to destinationat Destination Host:AAL5 reassembles cells into original datagramif CRC OK, datagram is passed to IP

  • IP-Over-ATMIssues:IP datagrams into ATM AAL5 PDUsfrom IP addresses to ATM addressesjust like IP addresses to 802.3 MAC addresses!ATMnetworkEthernetLANs

  • ATM and IP switchingATM advantagesLookup of VCID = O(1), Lookup of IP routes O(log n)One-time route lookup and circuit establishment, all subsequent traffic switchedATM disadvantagesComplex signaling and routing for establishing communicationDifficulty in mapping IP traffic dynamically onto ATM circuitsGoalMaintain IP infrastructureAccelerate it with labels to support O(1) lookups a la ATMSolutionIpsilon and IP switchinghttp://pnewman.org/papers/infocom96.pdf

  • IP over ATM versus IP switchingIP network controlIP routingATM network controlATM label switchingIP network control IP routingIP network control IP routingIP network controlATM label switchingIP network controlIP routing

  • ATM and IP switchingIn a nutshellStart with ATM switchRip out ATM signaling and routingAdd IP routing softwareAdd Flow classifier to map unknown flows to underlying ATM virtual circuit IDAttach VCID and allow downstream nodes to do the sameOperationUpon arrival of first packet in flowRecord unknown incoming VCIDLookup IP flow and map it to an outgoing virtual circuit ID (label) using IP routing softwareCreate incomingVCID to outgoingVCID table entry for subsequent packetsSubsequent packetsSwitched in hardware using VCID after flow classified at edgeIP packet forwarding done as label index lookup O(1) versus IP route lookup O(log n)

  • ATM and IP switchingLater generalized as MPLS (multi-protocol label switching)Layer 2 Not tied to ATMExtensible to IPv6Half-way in between data-link addresses and IP addressesLabeling done within a cloud versus link-local (data-link addresses) and global (IP addresses)http://www.rfc-editor.org/rfc/rfc3031.txtUsed as a tool for traffic engineeringhttp://www.rfc-editor.org/rfc/rfc2702.txt

  • X.25 and Frame RelayLike ATM:wide area network technologiesvirtual circuit oriented origins in telephony worldNot really a link layer but....Viewed as link layers by IP protocolUsed mostly to carry IP datagrams between IP routersGoing the way of the dinosaurs....

  • X.25X.25 builds VC between source and destination for each user connectionPer-hop control along patherror control (with retransmissions) on each hop using LAP-Bvariant of the HDLC protocoldeveloped when bit error rates over long-haul copper links were orders of magnitude higher per-hop flow control using creditscongestion arising at intermediate node propagates to previous node on pathback to source via back pressure

  • IP versus X.25 X.25: reliable in-sequence end-end delivery from end-to-endintelligence in the networkbuilt for dumb terminals accessing mainframesIP: unreliable, out-of-sequence end-end deliveryintelligence in the endpoints2000gigabit routers: limited processing possibleCPU capacity at end-hostsIP wins

  • Frame RelayDesigned in late 80s, widely deployed in the 90sSecond-generation X.25Frame relay service:no error controlno flow controlEnd-to-end congestion controlSome QoS mechanisms

  • Frame Relay (more)Designed to interconnect corporate customer LANstypically permanent VCs: pipe carrying aggregate traffic between two routers switched VCs: as in ATMcorporate customer leases FR service from public Frame Relay network (eg, Sprint, ATT)

  • Frame Relay (more)Flag bits, 01111110, delimit frameaddress:10 bit VC ID field3 congestion control bitsFECN: forward explicit congestion notification (frame experienced congestion on path)BECN: congestion on reverse pathDE: discard eligibilityPrecursor to IP DiffServ and ECN

  • Frame Relay -VC Rate ControlCommitted Information Rate (CIR)defined, guaranteed for each VCnegotiated at VC set up timecustomer pays based on CIRDE bit: Discard Eligibility bit Edge FR switch measures traffic rate for each VC; marks DE bitDE = 0: high priority, rate compliant frame; deliver at all costsDE = 1: low priority, eligible for discard when congestionPrecursor to IP DiffServCan be used to support higher layer QoS mechanisms

  • Coaxial cableThick (10Base5) Large diameter 50-ohm cableN connectorsThin (10Base2) cablesSmall diameter 50-ohm cableBNC, RJ-58 connectorVideo cable75-ohm cableBNC, RJ-59 connectorNot compatible with RJ-58

  • Fiber connectorsESCON

    Duplex SC

    ST

    MT-RJ (multimode)

    Duplex LC

    Draw on boardDraw 0 1 0 1 = LHLHDraw 0 1 0 1 = LHLH0 1 0 1 = H LH HL LH HL

    Application may get duplicates in the case of early timeoutsXxx pictureDraw 0 1 0 1 = LHLH