switching - university of cambridge · a circuit switch a switch that can handle n calls has n...
TRANSCRIPT
![Page 1: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/1.jpg)
Switching
An Engineering Approach to Computer NetworkingAn Engineering Approach to Computer Networking
![Page 2: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/2.jpg)
What is it all about?
How do we move traffic from one part of the network to another?How do we move traffic from one part of the network to another? Connect end-systems to switches, and switches to each otherConnect end-systems to switches, and switches to each other Data arriving to an input port of a switch have to be moved toData arriving to an input port of a switch have to be moved to
one or more of the output portsone or more of the output ports
![Page 3: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/3.jpg)
Types of switching elements
Telephone switchesTelephone switches switch samplesswitch samples
Datagram routersDatagram routers switch datagramsswitch datagrams
ATM switchesATM switches switch ATM cellsswitch ATM cells
![Page 4: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/4.jpg)
Classification
Packet vs. circuit switchesPacket vs. circuit switches packets have headers and samples donpackets have headers and samples don ʼ̓tt
Connectionless vs. connection orientedConnectionless vs. connection oriented connection oriented switches need a call setupconnection oriented switches need a call setup setup is handled in setup is handled in control planecontrol plane by switch controller connectionless switches deal with self-contained datagrams
Connectionless(router)
Connection-oriented(switching system)
Packetswitch
Internet router ATM switching system
Circuitswitch
Telephone switchingsystem
![Page 5: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/5.jpg)
Other switching element functions
Participate in routing algorithmsParticipate in routing algorithms to build routing tablesto build routing tables
Resolve contention for output trunksResolve contention for output trunks schedulingscheduling
Admission controlAdmission control to guarantee resources to certain streamsto guarantee resources to certain streams
WeWe ʼ̓ll discuss these laterll discuss these later Here we focus on pure data movementHere we focus on pure data movement
![Page 6: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/6.jpg)
Requirements
Capacity of switch is the maximum rate at which it can moveCapacity of switch is the maximum rate at which it can moveinformation, assuming all data paths are simultaneously activeinformation, assuming all data paths are simultaneously active
Primary goal: Primary goal: maximize capacitymaximize capacity subject to cost and reliability constraintssubject to cost and reliability constraints
Circuit switch must reject call if canCircuit switch must reject call if can ʼ̓t find a path for samplest find a path for samplesfrom input to outputfrom input to output goal: goal: minimize call blockingminimize call blocking
Packet switch must reject a packet if it canPacket switch must reject a packet if it can ʼ̓t find a buffer to storet find a buffer to storeit awaiting access to output trunkit awaiting access to output trunk goal: goal: minimize packet lossminimize packet loss
DonDon ʼ̓t reordert reorder packets packets
![Page 7: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/7.jpg)
A generic switch
![Page 8: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/8.jpg)
Outline
Circuit switchingCircuit switching Packet switchingPacket switching
Switch generationsSwitch generations Switch fabricsSwitch fabrics Buffer placementBuffer placement Multicast switchesMulticast switches
![Page 9: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/9.jpg)
Circuit switching
Moving 8-bit samples from an input port to an output portMoving 8-bit samples from an input port to an output port Recall that samples have no headersRecall that samples have no headers Destination of sample depends on Destination of sample depends on timetime at which it arrives at the at which it arrives at the
switchswitch actually, relative order within a actually, relative order within a frameframe
WeWe ʼ̓ll first study something simpler than a switch: a multiplexorll first study something simpler than a switch: a multiplexor
![Page 10: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/10.jpg)
Multiplexors and demultiplexors
Most trunks time division multiplex voice samplesMost trunks time division multiplex voice samples At a central office, trunk is demultiplexed and distributed toAt a central office, trunk is demultiplexed and distributed to
active circuitsactive circuits Synchronous multiplexorSynchronous multiplexor
N input linesN input lines Output runs N times as fast as inputOutput runs N times as fast as input
![Page 11: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/11.jpg)
More on multiplexing
DemultiplexorDemultiplexor one input line and N outputs that run N times slowerone input line and N outputs that run N times slower samples are placed in output buffer in round robin ordersamples are placed in output buffer in round robin order
Neither multiplexor nor demultiplexor needs addressingNeither multiplexor nor demultiplexor needs addressinginformation (why?)information (why?)
Can cascade multiplexorsCan cascade multiplexors need a standardneed a standard example: DS hierarchy in the US and Japanexample: DS hierarchy in the US and Japan
![Page 12: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/12.jpg)
Inverse multiplexing
Takes a high bit-rate stream and scatters it across multipleTakes a high bit-rate stream and scatters it across multipletrunkstrunks
At the other end, combines multiple streamsAt the other end, combines multiple streams resequencing resequencing to accommodate variation in delaysto accommodate variation in delays
Allows high-speed virtual links using existing technologyAllows high-speed virtual links using existing technology
![Page 13: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/13.jpg)
A circuit switch
A switch that can handle N calls has N logical inputs and NA switch that can handle N calls has N logical inputs and Nlogical outputslogical outputs N up to 200,000N up to 200,000
In practice, input trunks are multiplexedIn practice, input trunks are multiplexed example: DS3 trunk carries 672 simultaneous callsexample: DS3 trunk carries 672 simultaneous calls
Multiplexed trunks carry Multiplexed trunks carry framesframes = set of samples = set of samples Goal: extract samples from frame, and depending on position inGoal: extract samples from frame, and depending on position in
frame, switch to outputframe, switch to output each incoming sample has to get to the right output line and theeach incoming sample has to get to the right output line and the
right slot in the output frameright slot in the output frame demultiplexdemultiplex, switch, multiplex, switch, multiplex
![Page 14: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/14.jpg)
Call blocking
CanCan ʼ̓t find a path from input to outputt find a path from input to output Internal blockingInternal blocking
slot in output frame exists, but no pathslot in output frame exists, but no path Output blockingOutput blocking
no slot in output frame is availableno slot in output frame is available Output blocking is reduced in Output blocking is reduced in transit transit switchesswitches
need to put a sample in one of need to put a sample in one of severalseveral slots going to the desirednext hop
![Page 15: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/15.jpg)
Time division switching
Key idea: when Key idea: when demultiplexingdemultiplexing, position in frame determines, position in frame determinesoutput trunkoutput trunk
Time division switching interchanges sample position within aTime division switching interchanges sample position within aframe: time slot interchange (TSI)frame: time slot interchange (TSI)
![Page 16: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/16.jpg)
How large a TSI can we build?
Limit is time taken to read and write to memoryLimit is time taken to read and write to memory For 120,000 circuitsFor 120,000 circuits
need to read and write memory once every 125 microsecondsneed to read and write memory once every 125 microseconds each operation takes around 0.5 each operation takes around 0.5 ns ns => impossible with current=> impossible with current
technologytechnology Need to look to other techniquesNeed to look to other techniques
![Page 17: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/17.jpg)
Space division switching
Each sample takes a different path through the switch,Each sample takes a different path through the switch,depending on its destinationdepending on its destination
![Page 18: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/18.jpg)
Crossbar
Simplest possible space-division switchSimplest possible space-division switch CrosspointsCrosspoints can be turned on or off For multiplexed inputs, need a switching schedule (why?) Internally nonblocking
but need N2 crosspoints time taken to set each crosspoint grows quadratically vulnerable to single faults (why?)
![Page 19: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/19.jpg)
Multistage crossbar
In a crossbar during each switching time only one In a crossbar during each switching time only one crosspoint crosspoint perperrow or column is activerow or column is active
Can save crosspoints if a Can save crosspoints if a crosspoint crosspoint can attach to more thancan attach to more thanone input line (why?)one input line (why?)
This is done in a multistage crossbarThis is done in a multistage crossbar Need to rearrange connections every switching timeNeed to rearrange connections every switching time
![Page 20: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/20.jpg)
Multistage crossbar
Can suffer internal blockingCan suffer internal blocking unless sufficient number of second-level stagesunless sufficient number of second-level stages
Number of crosspoints < NNumber of crosspoints < N22
Finding a path from input to output requires a depth-first-searchFinding a path from input to output requires a depth-first-search Scales better than crossbar, but still not too wellScales better than crossbar, but still not too well
120,000 call switch needs ~250 million crosspoints120,000 call switch needs ~250 million crosspoints
![Page 21: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/21.jpg)
Time-space switching
Precede each input trunk in a crossbar with a TSIPrecede each input trunk in a crossbar with a TSI Delay samples so that they arrive at the right time for the spaceDelay samples so that they arrive at the right time for the space
division switchdivision switch ʼ̓s schedules schedule
![Page 22: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/22.jpg)
Time-space-time (TST) switching
Allowed to flip samples both on input and output trunkAllowed to flip samples both on input and output trunk Gives more flexibility => lowers call blocking probabilityGives more flexibility => lowers call blocking probability
![Page 23: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/23.jpg)
Outline
Circuit switchingCircuit switching Packet switchingPacket switching
Switch generationsSwitch generations Switch fabricsSwitch fabrics Buffer placementBuffer placement Multicast switchesMulticast switches
![Page 24: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/24.jpg)
Packet switching
In a circuit switch, path of a sample is determined at time ofIn a circuit switch, path of a sample is determined at time ofconnection establishmentconnection establishment
No need for a sample header--position in frame is enoughNo need for a sample header--position in frame is enough In a packet switch, packets carry a destination fieldIn a packet switch, packets carry a destination field Need to look up destination port on-the-flyNeed to look up destination port on-the-fly DatagramDatagram
lookup based on entire destination addresslookup based on entire destination address CellCell
lookup based on VCIlookup based on VCI Other than that, very similarOther than that, very similar
![Page 25: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/25.jpg)
Repeaters, bridges, routers, and gateways
Repeaters: at physical levelRepeaters: at physical level Bridges: at datalink level (based on MAC addresses) (L2)Bridges: at datalink level (based on MAC addresses) (L2)
discover attached stations by listeningdiscover attached stations by listening Routers: at network level (L3)Routers: at network level (L3)
participate in routing protocolsparticipate in routing protocols Application level gateways: at application level (L7)Application level gateways: at application level (L7)
treat entire network as a single hoptreat entire network as a single hop e.g mail gateways and e.g mail gateways and transcoderstranscoders
Gain functionality at the expense of forwarding speedGain functionality at the expense of forwarding speed for best performance, push functionality as low as possiblefor best performance, push functionality as low as possible
![Page 26: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/26.jpg)
Port mappers
Look up output port based on destination addressLook up output port based on destination address Easy for VCI: just use a tableEasy for VCI: just use a table Harder for datagrams:Harder for datagrams:
need to find need to find longest prefix matchlongest prefix match e.g. packet with address 128.32.1.20e.g. packet with address 128.32.1.20 entries: (128.32.*, 3), (128.32.1.*, 4), (128.32.1.20, 2)entries: (128.32.*, 3), (128.32.1.*, 4), (128.32.1.20, 2)
A standard solution: A standard solution: trietrie
![Page 27: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/27.jpg)
Tries
Two ways to improve performanceTwo ways to improve performance cache recently used addresses in a CAMcache recently used addresses in a CAM move common entries up to a higher level (match longer strings)move common entries up to a higher level (match longer strings)
![Page 28: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/28.jpg)
Blocking in packet switches
Can have both internal and output blockingCan have both internal and output blocking InternalInternal
no path to outputno path to output OutputOutput
trunk unavailabletrunk unavailable Unlike a circuit switch, cannot predict if packets will block (why?)Unlike a circuit switch, cannot predict if packets will block (why?) If packet is blocked, must either buffer or drop itIf packet is blocked, must either buffer or drop it
![Page 29: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/29.jpg)
Dealing with blocking
OverprovisioningOverprovisioning internal links much faster than inputsinternal links much faster than inputs
BuffersBuffers at input or outputat input or output
BackpressureBackpressure if switch fabric doesnif switch fabric doesn ʼ̓t have buffers, prevent packet from enteringt have buffers, prevent packet from entering
until path is availableuntil path is available Parallel switch fabricsParallel switch fabrics
increases effective switching capacityincreases effective switching capacity
![Page 30: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/30.jpg)
Outline
Circuit switchingCircuit switching Packet switchingPacket switching
Switch generationsSwitch generations Switch fabricsSwitch fabrics Buffer placementBuffer placement Multicast switchesMulticast switches
![Page 31: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/31.jpg)
Three generations of packet switches
Different trade-Different trade-offs offs between cost and performancebetween cost and performance
Represent evolution in switching capacity, rather than inRepresent evolution in switching capacity, rather than intechnologytechnology With same technology, a later generation switch achieves greaterWith same technology, a later generation switch achieves greater
capacity, but at greater costcapacity, but at greater cost All three generations are represented in current productsAll three generations are represented in current products
![Page 32: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/32.jpg)
First generation switch
Most Ethernet switches and cheap packet routersMost Ethernet switches and cheap packet routers Bottleneck can be CPU, host-Bottleneck can be CPU, host-adaptor adaptor or I/O bus, dependingor I/O bus, depending
![Page 33: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/33.jpg)
Example
First generation router built with 133 MHz PentiumFirst generation router built with 133 MHz Pentium Mean packet size 500 bytesMean packet size 500 bytes Interrupt takes 10 microseconds, word access take 50 Interrupt takes 10 microseconds, word access take 50 nsns Per-packet processing time takes 200 instructions = 1.504 µsPer-packet processing time takes 200 instructions = 1.504 µs
Copy loopCopy loopregister <- memory[read_register <- memory[read_ptrptr]]
memory [write_memory [write_ptrptr] <- register] <- register
read_read_ptr ptr <- read_<- read_ptr ptr + 4+ 4
write_write_ptr ptr <- write_<- write_ptr ptr + 4+ 4
counter <- counter -1counter <- counter -1
if (counter not 0) branch to top of loopif (counter not 0) branch to top of loop
4 instructions + 2 memory accesses = 130.08 4 instructions + 2 memory accesses = 130.08 nsns Copying packet takes 500/4 *130.08 = 16.26 µs; interrupt 10 µsCopying packet takes 500/4 *130.08 = 16.26 µs; interrupt 10 µs Total time = 27.764 µs => speed is 144.1 Total time = 27.764 µs => speed is 144.1 MbpsMbps Amortized interrupt cost balanced by routing protocol costAmortized interrupt cost balanced by routing protocol cost
![Page 34: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/34.jpg)
Second generation switch
Port mapping intelligence in line cardsPort mapping intelligence in line cards ATM switch guarantees hit in lookup cacheATM switch guarantees hit in lookup cache Ipsilon Ipsilon IP switchingIP switching
assume underlying ATM networkassume underlying ATM network by default, assemble packetsby default, assemble packets if detect a flow, ask upstream to send on a particular VCI, andif detect a flow, ask upstream to send on a particular VCI, and
install entry in port install entry in port mapper mapper => implicit signaling=> implicit signaling
![Page 35: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/35.jpg)
Third generation switches
Bottleneck in second generation switch is the bus (or ring)Bottleneck in second generation switch is the bus (or ring) Third generation switch provides parallel paths (fabric)Third generation switch provides parallel paths (fabric)
![Page 36: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/36.jpg)
Third generation (contd.)
FeaturesFeatures self-routing fabricself-routing fabric output buffer is a point of contentionoutput buffer is a point of contention
unless we unless we arbitrate arbitrate access to fabricaccess to fabric potential for unlimited scaling, as long as we can resolve contentionpotential for unlimited scaling, as long as we can resolve contention
for output bufferfor output buffer
![Page 37: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/37.jpg)
Outline
Circuit switchingCircuit switching Packet switchingPacket switching
Switch generationsSwitch generations Switch fabricsSwitch fabrics Buffer placementBuffer placement Multicast switchesMulticast switches
![Page 38: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/38.jpg)
Switch fabrics
Transfer data from input to output, ignoring scheduling andTransfer data from input to output, ignoring scheduling andbufferingbuffering
Usually consist of links and Usually consist of links and switching elementsswitching elements
![Page 39: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/39.jpg)
Crossbar
Simplest switch fabricSimplest switch fabric think of it as 2N buses in parallelthink of it as 2N buses in parallel
Used here for Used here for packetpacket routing: routing: crosspoint crosspoint is left open longis left open longenough to transfer a packet from an input to an outputenough to transfer a packet from an input to an output
For fixed-size packets and known arrival pattern, can computeFor fixed-size packets and known arrival pattern, can computeschedule in advanceschedule in advance
Otherwise, need to compute a schedule on-the-fly (what doesOtherwise, need to compute a schedule on-the-fly (what doesthe schedule depend on?)the schedule depend on?)
![Page 40: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/40.jpg)
Buffered crossbar
What happens if packets at two inputs both want to go to sameWhat happens if packets at two inputs both want to go to sameoutput?output?
Can defer one at an input bufferCan defer one at an input buffer Or, buffer crosspointsOr, buffer crosspoints
![Page 41: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/41.jpg)
Broadcast
Packets are tagged with output port #Packets are tagged with output port # Each output matches tagsEach output matches tags Need to match N addresses in parallel at each outputNeed to match N addresses in parallel at each output Useful only for small switches, or as a stage in a large switchUseful only for small switches, or as a stage in a large switch
![Page 42: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/42.jpg)
Switch fabric element
Can build complicated fabrics from a simple elementCan build complicated fabrics from a simple element
Routing rule: if 0, send packet to upper output, else to lowerRouting rule: if 0, send packet to upper output, else to loweroutputoutput
If both packets to same output, buffer or dropIf both packets to same output, buffer or drop
![Page 43: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/43.jpg)
Features of fabrics built with switching elements
NxN NxN switch with switch with bxb bxb elements has elements withelements has elements with elements per stage elements per stage
Fabric is Fabric is self routingself routing RecursiveRecursive Can be synchronous or asynchronousCan be synchronous or asynchronous Regular and suitable for VLSI implementationRegular and suitable for VLSI implementation
! "log bN! "N b/
![Page 44: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/44.jpg)
Banyan
Simplest self-routing recursive fabricSimplest self-routing recursive fabric
(why does it work?)(why does it work?) What if two packets both want to go to the same output?What if two packets both want to go to the same output?
output blockingoutput blocking
![Page 45: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/45.jpg)
Blocking
Can avoid with a buffered Can avoid with a buffered banyan banyan switchswitch but this is too expensivebut this is too expensive hard to achieve zero loss even with buffershard to achieve zero loss even with buffers
Instead, can check if path is available before sending packetInstead, can check if path is available before sending packet three-phase schemethree-phase scheme send requestssend requests inform winnersinform winners send packetssend packets
Or, use several Or, use several banyan banyan fabrics in parallelfabrics in parallel intentionally misroute and tag one of a colliding pairintentionally misroute and tag one of a colliding pair divert tagged packets to a second divert tagged packets to a second banyanbanyan, and so on to k stages, and so on to k stages expensiveexpensive can reorder packetscan reorder packets output buffers have to run k times faster than inputoutput buffers have to run k times faster than input
![Page 46: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/46.jpg)
Sorting
Can avoid blocking by choosing order in which packets appearCan avoid blocking by choosing order in which packets appearat input portsat input ports
If we canIf we can present packets at inputs sorted by outputpresent packets at inputs sorted by output remove duplicatesremove duplicates remove gapsremove gaps precede precede banyanbanyan with a perfect shuffle stage with a perfect shuffle stage then no internal blockingthen no internal blocking
For example, [X, 010, 010, X, 011, X, X, X] -(sort)-> For example, [X, 010, 010, X, 011, X, X, X] -(sort)-> [010, 011, 011, X, X, X, X, X] -(remove [010, 011, 011, X, X, X, X, X] -(remove dupsdups)->)->
[010, 011, X, X, X, X, X, X] -(shuffle)-> [010, 011, X, X, X, X, X, X] -(shuffle)-> [010, X, 011, X, X, X, X, X] [010, X, 011, X, X, X, X, X]
Need sort, shuffle, and trap networksNeed sort, shuffle, and trap networks
![Page 47: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/47.jpg)
Sorting
Build sorters from merge networksBuild sorters from merge networks Assume we can merge two sorted listsAssume we can merge two sorted lists Sort pairwise, merge, Sort pairwise, merge, recurserecurse
![Page 48: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/48.jpg)
Merging
![Page 49: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/49.jpg)
Putting it together- Batcher Banyan
What about trapped duplicates?What about trapped duplicates? recirculate recirculate to beginningto beginning or run output of trap to multiple or run output of trap to multiple banyans banyans ((dilationdilation))
![Page 50: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/50.jpg)
Effect of packet size on switching fabrics
A major motivation for small fixed packet size in ATM is ease ofA major motivation for small fixed packet size in ATM is ease ofbuilding large parallel fabricsbuilding large parallel fabrics
In general, smaller size => more per-packet overhead, but moreIn general, smaller size => more per-packet overhead, but morepreemption points/secpreemption points/sec At high speeds, overhead dominates!At high speeds, overhead dominates!
Fixed size packets helps build synchronous switchFixed size packets helps build synchronous switch But we could fragment at entry and reassemble at exitBut we could fragment at entry and reassemble at exit Or build an asynchronous fabricOr build an asynchronous fabric Thus, variable size doesnThus, variable size doesn ʼ̓t hurt too mucht hurt too much
Maybe Internet routers can be almost as cost-effective as ATMMaybe Internet routers can be almost as cost-effective as ATMswitchesswitches
![Page 51: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/51.jpg)
Outline
Circuit switchingCircuit switching Packet switchingPacket switching
Switch generationsSwitch generations Switch fabricsSwitch fabrics Buffer placementBuffer placement Multicast switchesMulticast switches
![Page 52: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/52.jpg)
Buffering
All packet switches need buffers to match input rate to serviceAll packet switches need buffers to match input rate to serviceraterate or cause heavy packet losesor cause heavy packet loses
Where should we place buffers?Where should we place buffers? inputinput in the fabricin the fabric outputoutput sharedshared
![Page 53: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/53.jpg)
Input buffering (input queueing)
No speedup in buffers or trunks (unlike output queued switch)No speedup in buffers or trunks (unlike output queued switch) Needs arbiterNeeds arbiter Problem: Problem: head of line blockinghead of line blocking
with randomly distributed packets, utilization at most 58.6%with randomly distributed packets, utilization at most 58.6% worse with worse with hot spotshot spots
![Page 54: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/54.jpg)
Dealing with HOL blocking
Per-output queues at inputsPer-output queues at inputs Arbiter must choose one of the input ports for each output portArbiter must choose one of the input ports for each output port How to select?How to select? Parallel Iterated MatchingParallel Iterated Matching
inputs tell arbiter which outputs they are interested ininputs tell arbiter which outputs they are interested in output selects one of the inputsoutput selects one of the inputs some inputs may get more than one some inputs may get more than one grantgrant, others may get none, others may get none if >1 grant, input picks one at random, and tells outputif >1 grant, input picks one at random, and tells output losing inputs and outputs try againlosing inputs and outputs try again
Used in DEC Used in DEC Autonet Autonet 2 switch2 switch
![Page 55: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/55.jpg)
Output queueing
DonDon ʼ̓t suffer from head-of-line blockingt suffer from head-of-line blocking But output buffers need to run much faster than trunk speedBut output buffers need to run much faster than trunk speed
(why?)(why?) Can reduce some of the cost by using the Can reduce some of the cost by using the knockoutknockout principle principle
unlikely that all N inputs will have packets for the same outputunlikely that all N inputs will have packets for the same output drop extra packets, fairly distributing losses among inputsdrop extra packets, fairly distributing losses among inputs
![Page 56: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/56.jpg)
Shared memory
Route only the header to output portRoute only the header to output port Bottleneck is time taken to read and write Bottleneck is time taken to read and write multiported multiported memorymemory DoesnDoesn ʼ̓t scale to large switchest scale to large switches But can form an element in a multistage switchBut can form an element in a multistage switch
![Page 57: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/57.jpg)
Datapath: clever shared memory design
Reduces read/write cost by doing wide reads and writesReduces read/write cost by doing wide reads and writes 1.2 1.2 Gbps Gbps switch for $50 parts costswitch for $50 parts cost
![Page 58: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/58.jpg)
Buffered fabric
Buffers in each switch elementBuffers in each switch element ProsPros
Speed up is only as much as fan-inSpeed up is only as much as fan-in Hardware Hardware backpressure backpressure reduces buffer requirementsreduces buffer requirements
ConsCons costly (unless using single-chip switches)costly (unless using single-chip switches) scheduling is hardscheduling is hard
![Page 59: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/59.jpg)
Hybrid solutions
Buffers at more than one pointBuffers at more than one point Becomes hard to analyze and manageBecomes hard to analyze and manage But common in practiceBut common in practice
![Page 60: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/60.jpg)
Outline
Circuit switchingCircuit switching Packet switchingPacket switching
Switch generationsSwitch generations Switch fabricsSwitch fabrics Buffer placementBuffer placement Multicast switchesMulticast switches
![Page 61: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/61.jpg)
Multicasting
Useful to do this in hardwareUseful to do this in hardware AssumeAssume portmapper portmapper knows list of outputsknows list of outputs Incoming packet must be copied to these output portsIncoming packet must be copied to these output ports Two Two subproblemssubproblems
generating and distributing copiesgenerating and distributing copies VCI translation for the copiesVCI translation for the copies
![Page 62: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/62.jpg)
Generating and distributing copies
Either implicit or explicitEither implicit or explicit ImplicitImplicit
suitable for bus-based, ring-based, crossbar, or broadcast switchessuitable for bus-based, ring-based, crossbar, or broadcast switches multiple outputs enabled after placing packet on shared busmultiple outputs enabled after placing packet on shared bus used in Paris and used in Paris and Datapath Datapath switchesswitches
ExplicitExplicit need to copy a packet at switch elementsneed to copy a packet at switch elements use a use a copy copy networknetwork place # of copies in tagplace # of copies in tag element copies to both outputs and decrements count on one ofelement copies to both outputs and decrements count on one of
themthem collect copies at outputscollect copies at outputs
Both schemes increase blocking probabilityBoth schemes increase blocking probability
![Page 63: Switching - University of Cambridge · A circuit switch A switch that can handle N calls has N logical inputs and N logical outputs N up to 200,000 In practice, input trunks are multiplexed](https://reader033.vdocuments.us/reader033/viewer/2022042105/5e83e2ee6452e049994d1239/html5/thumbnails/63.jpg)
Header translation
Normally, in-VCI to out-VCI translation can be done either atNormally, in-VCI to out-VCI translation can be done either atinput or outputinput or output
With multicasting, translation easier at output port (why?)With multicasting, translation easier at output port (why?) Use separate port mapping and translation tablesUse separate port mapping and translation tables Input maps a VCI to a set of output portsInput maps a VCI to a set of output ports Output port swaps VCIOutput port swaps VCI Need to do two lookups per packetNeed to do two lookups per packet