Вы находитесь на странице: 1из 17

Computer Networks: Architecture and Protocols

Switching

Outline
Switching approaches Bridges and extended LANs Spanning tree algorithm Segmentation and reassembly

Fall 2011-2012

CSIS321

Switching approaches
Originally two types of switching:
Circuit switching Packet switching

Virtual circuit switching to gain maximum of the advantages of previous switching

Fall 2011-2012

CSIS321

Switching approaches
Circuit switching:
Oldest approach Mainly using TDMA Setup is necessary:
Static route selected and bandwidth allocated for all the duration of the connection Time is necessary for connection No header in frames (no overhead)

Suitable for networks with uniform workload


e.g. telephony

Other switching approach:


FDMA, CDMA
Fall 2011-2012 CSIS321 4

Switching approaches
Packet switching
No end to end physical connection guaranteed
End to end connection are rather logical than physical

Physical circuits and liaisons may be shared between different logical connections Data stream is divided into packets which are sent successively Statistical multiplexing Packet overhead: header and addresses Every packet routed based on the destination address:
No or weak resource allocation and QoS insurance

Suitable for applications with burst traffic


Fall 2011-2012 CSIS321 5

Switching approaches
Packet switching (cont.):
Datagram routing:
Datagram contains destination address Destination address used by the switch to determine the outgoing link or links Switch determines the outgoing links by searching a lookup table (routing table) Entries of routing table are to be determined using routing algorithms (see later in the course)

Source routing:
Sender determines a priori the path of the packet Entire path is attached to the packet
Fall 2011-2012 CSIS321 6

Switching approaches
Virtual circuit:
A solution that combines main advantages of circuit switching and packet switching Setup call is necessary: setup time necessary Possible resource allocation and QoS All packets of a same stream follow the same route Packets must contain the VC identifier: smaller than source and destination addresses
Fall 2011-2012 CSIS321 7

Extended LANs hub


A hub can be seen as a repeater: It transmits the packets received on one port to all the other ports Operates at the physical layer (mostly but not entirely) Extends broadcast domain and segment size May or may not extend the collision domain (depending if it is a store and forward device)
Fall 2011-2012 CSIS321 8

Bridges and extended LANs


LANs have physical limitations (e.g., 2500m) Connect two or more LANs with a bridge
accept and forward strategy level 2 connection (does not add packet header)

More than a hub and Less than a router


A B C Port 1 Bridge Port 2

Ethernet Switch = Bridge on Steroids


Fall 2011-2012 CSIS321 9

Bridges and extended LANs


Learning bridges: Do not forward when unnecessary A bridge has a table of MAC addresses on its ports A
B C D 3L 2L 1L 2L 1L X 2L 1L X 3L 2L 1L 3L 2L 1L B D

A 3L 2L 1L

Fall 2011-2012

CSIS321

10

Bridges and extended LANs


Bridge has learning capabilities (to transfer or not a packet following its destination address)

Learn table entries based on source address Table is an optimization; need not be complete Always forward broadcast frames

Allows some unicast segmentation Collision domain may or may not be limited
Fall 2011-2012 CSIS321 11

Bridges and extended LANs


In case of 2 bridges between 2 segments: what happens if a host broadcast?

B1

B2

May cause network to meltdown...


Fall 2011-2012 CSIS321 12

Spanning tree algorithm


Solution: Spanning Tree Algorithm STA (IEEE 802 .1D)
Select which bridges actively forward Construct a tree with distributed algorithm to avoid loops Select the shortest path in the possible paths

Fall 2011-2012

CSIS321

13

Spanning tree algorithm


STA algorithm:
Each bridge has an identification number Each bridge send messages of the following format:
[senderId | presumedrootId | presumedrootDistance ]

Bridge stores the best message it has received from each port. [S | R | D ] > [S | R | D] if:
R < R or, R=R and D < D or, R=R and D=D and S<S

When it learns it is not root a bridge stops sending msg When it gets a msg on a port > already sent msgs, it stops sending on that port an only relays other msgs after adding 1 to their distance
Fall 2011-2012 CSIS321 14

Spanning tree algorithm


Initially, Bi sends [Bi|Bi|0] When B2 gets [B1|B1|0] it stops transmitting and relays [B2|B1|1] B2 Similarly B6 relays [B6|B1|1] B4 relays [B4|B3|1] and then [B4|B1|2] B3 B5 gets [B3|B1|2] and [B6|B1|1], it knows none of its ports is on shortest path to root
Fall 2011-2012 CSIS321

B1

B4

B6

B5
15

Spanning tree algorithm


To accommodate changes in network topology the bridges keep sending these messages
Root continues to periodically send config messages Designated bridges continue to forward these messages

If any bridge does not receive config message after a period of time, it starts generating config messages claiming to be the root At boot or change, the STA recalculated

Fall 2011-2012

CSIS321

16

Bridges: Conclusions
Adaptive learning Same broadcast domain on both sides Store and forward: collision detection Spanning tree to prevent link loops Limitations
Do not scale
spanning tree algorithm does not scale broadcast does not scale

Do not accommodate heterogeneity Caution: beware of transparency


Fall 2011-2012 CSIS321 17

Вам также может понравиться