Source books n D Bertsekas and R Gallager
Source books n D. Bertsekas and R. Gallager. Data Networks, 2 nd Ed. , 1992. PH. n S. Keshav. An Engineering Approach to Computer Networking. 1997. E-W n J. F. Kurose and K. W. Ross. Computer Networking. 2000, E-W. n L. Kleinrock. Queueing Systems, Vol. 1. 1975. Wiley n J. Y. Hui, Switching and Traffic Theory for Integrated Broadband Networks, Kluwer 1990 n A. M. Law and W. D. Kelton. Simulation Modeling & Analysis, 2 nd Ed. , 1991, M-H Oct 2004 Principles of Communication Networks 1
Switching n S. Keshav, An Engineering Approach to Computer Networks, A-W, 1997 n M. Karol, M. Hluchyj, and S. Morgan, "Input Versus Output Queueing on a Space-Division Packet Switch, " IEEE Trans. on Communications, 35(12): 1347 -1356, Dec. 1987. Oct 2004 Principles of Communication Networks 2
What is it all about? n How do we move traffic from one part of the network to another? n Connect end-systems to switches, and switches to each other n Data arriving to an input port of a switch have to be moved to one or more of the output ports Oct 2004 Principles of Communication Networks 3
Outline n switching - general n Packet switching u u General Type of switches Switch generations Buffer placement n Port mappers n Buffer Placement n Dropping policies Oct 2004 Principles of Communication Networks 4
Types of switching elements n Telephone switches u n Datagram routers u n switch datagrams ATM switches u Oct 2004 switch samples switch ATM cells Principles of Communication Networks 5
Classification n Packet vs. circuit switches u n Connectionless vs. connection oriented u u u Oct 2004 packets have headers and samples don’t connection oriented switches need a call setup is handled in control plane by switch controller connectionless switches deal with self-contained datagrams Principles of Communication Networks 6
Other switching element functions n Participate in routing algorithms u n Resolve contention for output trunks u n scheduling Admission control u Oct 2004 to build routing tables to guarantee resources to certain streams Principles of Communication Networks 7
Requirements n Capacity of a switch is the maximum rate at which it can move information, assuming all data paths are simultaneously active n Primary goal: maximize capacity u n Circuit switch must reject call if can’t find a path for samples from input to output u n Oct 2004 goal: minimize call blocking Packet switch must reject a packet if it can’t find a buffer to store it awaiting access to output trunk u n subject to cost and reliability constraints goal: minimize packet loss Don’t reorder packets Principles of Communication Networks 8
Outline n switching - general n Packet switching u u General Type of switches Switch generations Buffer placement n Port mappers n Buffer Placement n Dropping policies Oct 2004 Principles of Communication Networks 9
Packet switching n In a circuit switch, path of a sample is determined at time of connection establishment n No need for a sample header--position in frame is enough n In a packet switch, packets carry a destination field n Need to look up destination port on-the-fly n Datagram u n Cell u n Oct 2004 lookup based on entire destination address lookup based on VCI Other than that, very similar Principles of Communication Networks 10
Blocking in packet switches n Can have both internal and output blocking n Internal u n no path to output Output u trunk unavailable n Unlike a circuit switch, cannot predict if packets will block (why? ) n If packet is blocked, must either buffer or drop it Oct 2004 Principles of Communication Networks 11
Dealing with blocking n Overprovisioning u n Buffers u n if switch fabric doesn’t have buffers, prevent packet from entering until path is available Parallel switch fabrics u Oct 2004 at input or output (or both) Backpressure u n internal links much faster than inputs (speedup) increases effective switching capacity Principles of Communication Networks 12
Repeaters, bridges, routers, and gateways n Repeaters: at physical level n Bridges: at datalink level (based on MAC addresses) (L 2) u n Routers: at network level (L 3) u n u treat entire network as a single hop e. g. , mail gateways and transcoders Gain functionality at the expense of forwarding speed u Oct 2004 participate in routing protocols Application level gateways: at application level (L 7) u n discover attached stations by listening for best performance, push functionality as low as possible Principles of Communication Networks 13
Outline n switching - general n Packet switching u u General Type of switches Switch generations Buffer placement n Port mappers n Buffer Placement n Dropping policies Oct 2004 Principles of Communication Networks 14
Three generations of packet switches n Different trade-offs between cost and performance n Represent evolution in switching capacity, rather than in technology u n Oct 2004 With same technology, a later generation switch achieves greater capacity, but at greater cost All three generations are represented in current products Principles of Communication Networks 15
First generation switch computer CPU queues in memory linecard n Old Ethernet switches and cheap packet routers n S/w router, e. g. , Linux/Free. BSD boxes n Bottleneck can be CPU, host-adaptor or I/O bus, depending Oct 2004 Principles of Communication Networks 16
Second generation switch computer bus front end processors or line cards n Port mapping intelligence in line cards n ATM switch guarantees hit in lookup cache Oct 2004 Principles of Communication Networks 17
Third generation switches n Bottleneck in second generation switch is the bus (or ring) n Third generation switch provides parallel paths (fabric) ILC IN ILC Oct 2004 OLC Nx. N packet switch fabric OLC OUT OLC Principles of Communication Networks 18
Third generation (contd. ) n Features u u u Oct 2004 self-routing fabric output buffer is a point of contention F unless we arbitrate access to fabric potential for unlimited scaling, as long as we can resolve contention for output buffer Principles of Communication Networks 19
Outline n switching - general n Packet switching u u u General Type of switches Switch generations n Port mappers n Buffer Placement n Dropping policies Oct 2004 Principles of Communication Networks 20
Port mappers n Look up output port based on destination address n Easy for VCI: just use a table n Harder for datagrams: u n Oct 2004 need to find longest prefix match F e. g. packet with address 128. 32. 1. 20 F entries: (128. 32. *, 3), (128. 32. 1. *, 4), (128. 32. 1. 20, 2) A standard solution: trie Principles of Communication Networks 21
Tries root (10. *) 10 128 32 54 32 4 1 120 (32. *) 25 (128. 32. 25. *) (128. 54. 4. *) 100 (128. 32. 1. 120) (128. 32. 1. 100) n Some ways to improve performance u u Oct 2004 cache recently used addresses in a CAM move common entries up to a higher level (match longer strings) Principles of Communication Networks 22
Outline n switching - general n Packet switching u u u General Type of switches Switch generations n Port mappers n Buffer Placement n Dropping policies Oct 2004 Principles of Communication Networks 23
Buffering n All packet switches need buffers to match input rate to service rate u n Where should we place buffers? u u u Oct 2004 or cause heavy packet loses input output in the fabric Principles of Communication Networks 24
Input buffering (input queueing) queues inputs buffer control queues buffer control Nx. N switch outputs arbitrator n No speedup in buffers or trunks (unlike output queued switch) n Needs arbiter n Problem: head of line blocking u Oct 2004 with randomly distributed packets, utilization at most 58. 6% Principles of Communication Networks 25
head of line blocking – simple upper bound n Assume nxn switch with uniform distribution of destination n Probability for an output port not to be selected is n Capacity is bounded by 1 -1/e = 0. 63 n For 2 x 2 switch the max capacity is 0. 75 (tight bound) Oct 2004 Principles of Communication Networks 26
head of line blocking – alternative calculation n Oct 2004 The success probability of an input port selection: Principles of Communication Networks 27
Dealing with HOL blocking n Per-output queues at inputs (VOQ) n Arbiter must choose one of the input ports for each output port n How to select? n Parallel Iterated Matching n inputs tell arbiter which outputs they are interested in u output selects one of the inputs u some inputs may get more than one grant, others may get none u if >1 grant, input picks one at random, and tells output u losing inputs and outputs try again Used in DEC Autonet 2 switch, Mc. Keown’s i. SLIP, and more. u Oct 2004 Principles of Communication Networks 28
Output queueing inputs Nx. N switch fabric outputs n Don’t suffer from head-of-line blocking n But output buffers need to run much faster than trunk speed n Can reduce some of the cost by using the knockout principle u u Oct 2004 unlikely that all N inputs will have packets for the same output drop extra packets, fairly distributing losses among inputs Principles of Communication Networks 29
Buffered fabric n Buffers in each switch element n Pros u u n Cons u u Oct 2004 Speed up is only as much as fan-in Hardware backpressure reduces buffer requirements costly (unless usingle-chip switches) scheduling is hard Principles of Communication Networks 30
Buffered crossbar n What happens if packets at two inputs both want to go to same output? n Can defer one at an input buffer n Or, buffer crosspoints Oct 2004 Principles of Communication Networks 31
Hybrid solutions n Buffers at more than one point n Becomes hard to analyze and manage n But common in practice Oct 2004 Principles of Communication Networks 32
Multicasting n Useful to do this in hardware n Assume portmapper knows list of outputs n Incoming packet must be copied to these output ports n Two subproblems u u Oct 2004 generating and distributing copies VCI translation for the copies Principles of Communication Networks 33
Generating and distributing copies n Either implicit or explicit n Implicit u u u n Explicit u u u n Oct 2004 suitable for bus-based, ring-based, crossbar, or broadcast switches multiple outputs enabled after placing packet on shared bus used in Paris and Datapath switches need to copy a packet at switch elements use a copy network place # of copies in tag element copies to both outputs and decrements count on one of them collect copies at outputs Both schemes increase blocking probability Principles of Communication Networks 34
Outline n switching - general n Packet switching u u General Type of switches Switch generations Buffer placement n Port mappers n Buffer Placement n Dropping policies Oct 2004 Principles of Communication Networks 35
Packet dropping n Packets that cannot be served immediately are buffered n Full buffers => packet drop strategy n Packet losses happen almost always from best-effort connections (why? ) n Shouldn’t drop packets unless imperative? u Oct 2004 packet drop wastes resources (why? ) Principles of Communication Networks 36
Classification of drop strategies 1. Degree of aggregation 2. Drop priorities 3. Early or late 4. Drop position Oct 2004 Principles of Communication Networks 37
1. Degree of aggregation n Degree of discrimination in selecting a packet to drop n E. g. in vanilla FIFO, all packets are in the same class n Instead, can classify packets and drop packets selectively n The finer the classification the better the protection Oct 2004 Principles of Communication Networks 38
2. Drop priorities n Drop lower-priority packets first n How to choose? u u u Oct 2004 endpoint marks packets regulator marks packets congestion loss priority (CLP) bit in packet header Principles of Communication Networks 39
CLP bit: pros and cons n Pros u u n Cons u u Oct 2004 if network has spare capacity, all traffic is carried during congestion, load is automatically shed separating priorities within a single connection is hard what prevents all packets being marked as high priority? Principles of Communication Networks 40
3. Early vs. late drop n Early drop => drop even if space is available u u n Early random drop u u Oct 2004 signals endpoints to reduce rate cooperative sources get lower overall delays, uncooperative sources get severe packet loss drop arriving packet with fixed drop probability if queue length exceeds threshold intuition: misbehaving sources more likely to send packets and see packet losses Principles of Communication Networks 41
3. Early vs. late drop: RED n Random early detection (RED) makes three improvements n Metric is moving average of queue lengths u u n Packet drop probability is a function of mean queue length u n small bursts pass through unharmed only affects sustained overloads prevents severe reaction to mild overload Can mark packets instead of dropping them u allows sources to detect network state without losses n RED improves performance of a network of cooperating TCP sources n No bias against bursty sources n Controls queue length regardless of endpoint cooperation Oct 2004 Principles of Communication Networks 42
4. Drop position n Can drop a packet from head, tail, or random position in the queue n Tail u u n Head u u Oct 2004 easy default approach harder lets source detect loss earlier Principles of Communication Networks 43
4. Drop position (contd. ) n Random u u u Oct 2004 hardest if no aggregation, hurts hogs most unlikely to make it to real routers Principles of Communication Networks 44
- Slides: 44