Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Packet Switching Outline Switching and Forwarding Bridges and Extended LANs.

Similar presentations


Presentation on theme: "1 Packet Switching Outline Switching and Forwarding Bridges and Extended LANs."— Presentation transcript:

1 1 Packet Switching Outline Switching and Forwarding Bridges and Extended LANs

2 2 Switching and Forwarding A switch is a multi-input, multi-output device, which transfers packets from an input to one or more outputs Adding a new host to the network by connecting it to a switch does not mean that the already connected hosts are affected A switch is connected to a set of links, and each of these links, run the appropriate data link protocol to communicate with the node at the other end of the link

3 3 Datagram Every packet contains enough information to enable any switch to decide how to get to its destination Each packet is forwarded independently of previous packet that might have been sent to the same destination DestinationPort ABCDEFGHABCDEFGH 3033210030332100 Forwarding table for switch 2

4 4 Virtual Circuit Switching This approach is a connection-oriented model, which requires to first setup a virtual connection from the source to destination In the first stage a connection is setup and in the second stage data transfer takes place In connection setup phase a connection state is established in each of the switches between the source and destination hosts The connection state for a single connection consists of an entry in the VC table. One entry in the VC table on a single switch contains: –virtual circuit identifier (VCI) – A unique identifier for the switch –an incoming interface on which packets for this VC arrive at the switch –an outgoing interface in which packets for this VC leave the switch –a potentially different VCI that will be used for outgoing packets

5 5 Virtual Circuit Switching (contd..) Incoming InterfaceIncoming VCIOutgoing InterfaceOutgoing VCI 25111 (a) Incoming InterfaceIncoming VCIOutgoing InterfaceOutgoing VCI 31127 (b) Incoming InterfaceIncoming VCIOutgoing InterfaceOutgoing VCI 0714 (c) A packet is sent into a virtual circuit network A packet makes its way through a virtual circuit network

6 6 Source Routing All the information about network topology that is required to switch a packet across a network is provided by the source host

7 7 Bridge A hardware device, has a CPU, memory, and two network interfaces  Connects two LAN segments  Forward frames between segments  Does not forward noise or collisions from one segment to another  Learns addresses of hosts and filters from transmitted frames  Allows independent transmission on each segment

8 8 Learning Bridges Do not forward when unnecessary Maintain forwarding table HostPort A1 B1 C1 X2 Y2 Z2 Learn table entries based on source address Table is an optimization; need not be complete Always forward broadcast frames A Bridge BC XY Z Port 1 Port 2

9 9 Bridge Learning Algorithm A bridge  Listens in promiscuous mode  Checks source address in incoming frames  Makes list of computers on each segment  Only forwards a frame to a segment if necessary  Always forwards broadcast/multicast frames

10 10 Illustration of Bridge Learning Algorithm B UVWXYZ Segment 1Segment 2

11 11 Example Bridged Network B3B4B5 B2 B1 B6 LAN Segments B1 - B6: Bridges

12 12 Cycle of Bridges B3B4B5 B2 B1 B6 LAN Segments B1 - B7: Bridges B7

13 13 Cycle of Bridges (contd..) Problem occurs if all bridges forward broadcast frames Copies of broadcast frames continue to flow around the cycle forever if not prevented Effect: Each computer on a segment receives an infinite number of copies of a broadcast frame Conclusion: Not all bridges can be allowed to forward broadcast frames

14 14 Spanning Tree Algorithm Problem: loops Bridges run a distributed spanning tree algorithm –bridges select the ports over which they will forward frames –developed by Radia Perlman –now IEEE 802.1 specification B3 A C E D B2 B5 B B7 K F H B4 J B1 B6 G I

15 15 Spanning Tree Algorithm in General terms Allows cycles Used by all bridges to –Discover one another while booting –Determine whether forwarding will introduce a cycle for a broadcast frame –Decide which bridge will or will not forward a broadcast frame –Break cycle(s) –Known as Distributed Spanning Tree (DST)

16 16 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 designated bridge (use id to break ties) B3 A C E D B2 B5 B B7 K F H B4 J B1 B6 G I Each bridge forwards frames over each LAN for which it is the designated bridge

17 17 Algorithm Details Bridges exchange configuration messages (Y, d, X) –id for the bridge that is sending the message (X) –id for what the sending bridge believes to be the root bridge (Y) –distance (hops) from the sending bridge to the root bridge (d) Each bridge records current best configuration message for each port Initially, each bridge believes it is the root; so it sends message out on all ports identifying itself as root and giving a distance to the root of 0. The new configuration message is “better” than the currently recorded information if –It identifies a root with a smaller id or –It identifies a root with an equal id but with a shorter distance or –The root id and distance are equal, but the sending bridge has a smaller id

18 18 Algorithm Detail (contd..) When learn not root, stop generating config messages –in steady state, only root generates configuration messages When learn not designated bridge, stop forwarding config messages –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

19 19 Limitations of Bridges Good to connect a handful of similar LANs Do not scale –spanning tree algorithm does not scale –broadcast does not scale Do not accommodate heterogeneity Caution: beware of transparency –can cause problems with applications designed to operate on a single segment LAN (congestion, out of order frames can occur in rare situations)


Download ppt "1 Packet Switching Outline Switching and Forwarding Bridges and Extended LANs."

Similar presentations


Ads by Google