<<

Outline Store-and-Forward Switches Bridges and Extended LANs Cell Switching Segmentation and Reassembly

CS565 Switching 1 Packet Switching

• Problem: “Not all networks are Directly Connected” • Directly connected networks have two limitations: - number of hosts that can be accommodated - geographic limitation • Goal – networks that are global in scale • Like using (circuit) switches, we use packet switches(store-and-forward) that take packets that arrive on an input and forward (switch) them to the right output. Two ways to do it: - connection - connectionless

CS565 Switching 2 Packet Switching

• Key problems that a switch must deal with: • Contention – packet arrival exceeds packet dispatch (in this chapter) • Congestion – packets discards (due to running out of buffer space) too frequently (in future chapter) • Key issues covered - forwarding - contention • Two switching technologies - LAN switching – Popular in LAN, evolved from - Asynchronous Transfer Mode(ATM) – popular in WAN

CS565 Switching 3 Star Topology

• Large numbers of switches can be connected • Connecting switches/hosts using Point-to-Point links • Scaling doesn’t always mean performance  (switches designed with enough aggregate capacity) CS565 Switching 4 Scalable Networks • Switch – forwards packets from input port to output port, this is referred to as either switching or forwarding. In terms of the OSI architecture, it is the main function of the network layer. – port selected based on address in packet header

T3 T3 T3 Switch T3 STS-1 STS-1 Input Output ports ports • Advantages – cover large geographic area (tolerate latency) – support large numbers of hosts (scalable )

CS565 Switching 5 Switches

Q. How does the switch determine output port?

A. By looking at an identifier in the packet header

Three approaches:

Virtual Circuit (connection-oriented) Datagram (connectionless) Source

CS565 Switching 6 Virtual Circuits 0 Switch 1 3 1 2 Switch 2 2 3 1 5 11 0 •Explicit connection setup (and tear-down) phase •Subsequence packets A follow same circuit •Two types: •Sometimes called -PVC Permanent connection-oriented model •Need network administrator 7 configure the state 0 Switch 3 -SVC “Signalled” Virtual Circuit 13 •Send a message into the 4 Host B network(signalling) 2 • Analogy: phone call • Each switch maintains a VC table

CS565 Switching 7 Virtual Circuits Tables VC Table Incoming Incoming Outgoing Outgoing 0 Switch 1 Interface VCI Interface VCI for Switch 1 25111 3 1 1 2 3 1 2 . . . 2 3 1 5 11 VC Table for Switch 2 0 Switch 2 Incoming Incoming Outgoing Outgoing Interface VCI Interface VCI 31107 1 2 0 2 Host A . . . VCI Virtual Circuit Identifier (0, 1, 2, …) • combined with incoming/outgoing 7 interface (e.g. 0, 1, 2, 3)can uniquely 0 Switch 3 identify the virtual connection (VC) 13 • assigned whenever a new connection 4 Host B is created 2 • not a globally significant identifier for the VC; rather, only on a given link

CS565 Switching 8 Host C Example: Give Virtual Circuit Host E Tables for all switches 0 Switch 1 Host D Switch 3 2 Host F 3 1 3 1 1 Switch 2 Host B 2 0 2 0 Host G 3 Host A Host H Incoming Incoming Outgoing Outgoing Connections Switch Incoming Outgoing Interface# VCI# Interface# VCI# Established Interface# VCI# Interface# VCI# VC Table 0 0 1 1 in the order of for Switch 1 1 2 2 1 (a) to (d) 2 0 1 0 (a) Host A 1 2010 connects to 2 0 0 2 0 Incoming Incoming Outgoing Outgoing Host E 3 3 0 2 0 Interface# VCI# Interface# VCI# (b) Host C 1 0 0 11 VC Table 0 0 2 0 connects to 2 0 1 21 for Switch 2 0 1 2 1 Host G 3 3 1 0 0 1 0 2 3 2 2 0 2 (c) Host G 1 1 2 2 1 connects to 2 2 2 0 2 Incoming Incoming Outgoing Outgoing Host A 3 0 1 3 2 Interface# VCI# Interface# VCI# VC Table (d) Host D 2 1023 0 1 3 2 connects to 3 3 3 2 1 for Switch 3 3 0 2 0 Host E 3 1 0 0 3 3 2 1 CS565 Switching 9 Virtual Circuit Model

• Typically wait full RTT for connection setup before sending first data packet. • While the connection request contains the full address for destination, each data packet contains only a small identifier, making the per-packet header overhead small. • If a switch or a link in a connection fails, the connection is broken and a new one needs to be established. • Connection setup provides an opportunity to reserve resources(QoS reservations). • ATM utilizes virtual circuits

CS565 Switching 10 Datagrams

Host D •Idea – provide just enough information for the 0 Switch 1 Host E Host F switch to forward the 3 1 2 Switch 2 packet Host C 2 3 1 • No setup time 0 • Independent forwarding Host A packets destination Port A3 • Analogy – postal system B0 • Each switch maintains a 0 Switch 3 Forwarding C3Host G Host B forwarding (routing) table. table for D3 13 Switch 2 E2 More routing in the next 2 F1 G0 chapter H0 Host H CS565 Switching 11 Workstation Used As a Switch

I/O bus

CPU Interface 1

Interface 2

Interface 3 Main memory

Main problem: all packets must pass through a single point of contention. (I/O bus, read to/write from the main memory)

CS565 Switching 12 Forwarding Table for Nodes D A BC

E • Give the datagram forwarding table for each node:

Node A Node B Node C Node D Node E

Destination Next Hop Destination Next Hop Destination Next Hop Destination Next Hop Destination Next Hop BBAAABAC AC CBCCBBBC BC DBDCDDCC CC EBECEEEC DC

CS565 Switching 13 Datagram Model • There is no round trip time delay for connection setup; a host can send data as soon as it is ready. • Source host has no way of knowing if the network is capable of delivering a packet or if the destination host is even up. • Since packets are treated independently, it is possible to route around link and node failures. • Since every packet must carry the full address of the destination, the overhead per packet is higher than for the connection-oriented model.

CS565 Switching 14 Source Routing

0 Switch 1 0 3 1 3 1 2 Switch 2 2 3 1 2 3 01 1 3 0 0

Host A • Does not need to use either

013 VCs or Datagrams although 0 Switch 3 can be used in combination 13 with Host B 2 - IP for instance uses • Source host contains all datagrams but has a information source routing option - rotates data - Can be used for VC setup

CS565 Switching 15 Bridges and LAN Switches

Q. What can be used to share data between two shared-media LAN’s? A. LAN switch (or bridge) – like a host in LANs connected with >= 1 bridge are called Extended LANs • Problem – what about when node A wants to send A B C node B a message, what happens? Port 1 Bridge Port 2 XZY CS565 Switching 16 Learning Bridges

• Do not forward when unnecessary • Maintain forwarding Host Port ABC A 1 B 1 Port 1 C 1 Bridge Port 2 X 2 Y 2 XZY X 2 • Learn table entries based on source address • Table is an optimization; need not be complete • Always forward broadcast frames

CS565 Switching 17 Spanning Tree Algorithm

A

B • Problem: loops B3 C B5

D B7 B2 K

E F

B1

• Bridges run a distributed G H

B6 spanning tree algorithm B4 - select which bridges actively I J forward - developed by - now IEEE 802.1 specification

(a) (b) CS565 Switching 18 What is a Spanning Tree? The problem: 1) Tree - is connected graph with no cycles.

2) A Spanning Tree of G is a tree which contains all vertices in G. Example: Given a graph G

Is G a Spanning Tree?

Yes No Note: Connected graph with n vertices and exactly n – 1 edges is Spanning Tree.

CS565 Switching 19 Spanning Tree Example

Example: a) G: 1

23

6 7 45

8

CS565 Switching 20 Centralized Spanning Tree Algorithm

1 #1 #7 7

2 3 #2 5 #6 4 6 #3 #4 8 #5

. DFS (Depth First Search)

CS565 Switching 21 Centralized Spanning Tree Algorithm

1 #1 #2

2 3 #3 #4 #5 #6

4567 #7

8

. BFS (Breadth First Search)

CS565 Switching 22 Distributed Spanning Tree Algorithm - Overview

• Each bridge has unique id(e.g., B1, B2 ,B3 ) • Select bridge with smallest id as root • Select bridge on each LAN closest to root as the designated bridge(use id to break ties) A

B B3

C B5

D B7 B2 K

E F

B1

G H

B6 B4 I CS565 SwitchingJ 23 Distributed Spanning Tree Algorithm - Detail

• Bridges exchange configuration messages  id for bridge sending the message  id for what the sending bridge believes to be root bridge  distance(hops) from sending bridge to root bridge • Each bridge records current “best” configuration message for each port • Initially, each bridge believes it is the root and sends messages out on all its ports(distance to root = 0) • When learn not root, stop generating configuration messages – in steady state, only root generates configuration messages • When learn not designated bridge, stop forwarding config messages(disconnected) – in steady state, only designated bridges forward config messages • Root continues to periodically send config messages • If any bridge does not receive config message after a period of time, it starts generating config messages claiming to be the root

CS565 Switching 24 Distributed Spanning Tree Algorithm - Overview

• Ports which are not selected (disconnected) by the Distributed Spanning Tree Algorithm

A

× B B3 C × B5 × D B7 B2 K

E F

B1

G H × B6 B4 I × J

CS565 Switching 25 Asynchronous Transfer Mode(ATM)

• Connection-oriented packet-switched network (virtual circuits) • Used in both WAN and LAN settings • Signaling(connection setup) Protocol: Q.2931 • Packets are called cells – 5-byte header + 48-byte payload(fixed length)

CS565 Switching 26