Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Chapter 3: Packet Switching (Switched LANs) Dr. Rocky K. C. Chang 23 February 2004.

Similar presentations


Presentation on theme: "1 Chapter 3: Packet Switching (Switched LANs) Dr. Rocky K. C. Chang 23 February 2004."— Presentation transcript:

1 1 Chapter 3: Packet Switching (Switched LANs) Dr. Rocky K. C. Chang 23 February 2004

2 2 1. Bridges and LAN switches Problem: How do we connect multiple LAN segments together effectively? LAN switches are used to interconnect a number of LANs of the same kind to form an extended LAN. –E.g., Switched Ethernets, switched token rings, switched FDDI. –It is usually very difficult to connect two different types of LAN using LAN switches. LAN switches operate mainly at layer two (datalink).

3 3 1.1 Basic model of a LAN switch LAN switches are operationally equivalent to transparent bridging (IEEE 802.1D). –A spanning tree algorithm –A flat 48-bit MAC address space (for Ethernet) Each LAN switch consists of –Forward/filter logic: Make forwarding decisions –Learning logic: Associate port and MAC addresses –Port interface: Access ports and network uplink ports –Source address table: Each entry is associated with an age.

4 4 1.1 Basic model of a LAN switch Source Address Table MAC addressPort Port Interface Learning LogicSAT Lookup

5 5 1.1.1 Learning logic A switch listens promiscuously, receiving every frame received. For each frame received, the switch stores the source MAC address and the port upon which the frame was received in a cache. –A frame will not use broadcast or multicast addresses as the source address. The switch ages each entry in the cache, and deletes it after a period of time.

6 6 1.1.2 Forwarding logic For each frame received, the switch looks through its cache for the destination MAC address specified in the frame. –If not found, the switch forwards the frame to all ports except the one from which the frame is received. –If found, and the specified port is different from the one where the frame comes from, the frame is forwarded to the specified port. Else, the frame is dropped.

7 7 1.1.3 An example Initially, assume the cache is empty. Try this sequence of frame transmission: A  B, B  A, A  Z, Y  A. A Switch BC XYZ Port 1 Port 2

8 8 2. Switched LANs with loops Assume that both switches have learnt all the MAC addresses. Now, when A broadcasts a frame, –Both B and C receive them. –Switches 1 and 2 each forward a copy to LAN 2. –On LAN 2, when switch 1’s copy is received by switch 2, it alters the port for A from the upper one to the lower one and it forwards another copy to LAN 1. Two problems: Incorrect address table and broadcast storm.

9 9 2. Switched LANs with loops A Switch 1 BC XYZ Switch 2 LAN 1 LAN 2

10 10 2.1 A Spanning-tree approach One approach is to overlap a spanning tree on the network topology. –The spanning tree is “rooted” at an elected bridge, called the root bridge. –On each LAN, at most one bridge’s (not counting the root bridge) port is in forwarding state; others are put into blocking states. Frames received at the ports in blocking states will be dropped. Frames received at the ports in forwarding states will be processed as usual.

11 11 2.1 A Spanning-tree approach If bridge 1 is elected as a root bridge, A Bridge 1 BC XYZ Bridge 2 LAN 1 LAN 2

12 12 2.2 Spanning tree protocol The bridges transmit messages (BPDUs) to one another to compute a spanning tree. The BPDUs contain enough information so that switches can –elect a root bridge, –find a shortest path from themselves to the root bridge. For each LAN, elect a designated bridge that is one closest to the root bridge. Choose a port (root port) that gives the shortest path from themselves to the root bridge. –Include root ports and any ports on which self has been elected designated bridge.

13 13 2.2 Spanning tree protocol B3 A C E D B2 B5 B B7 K F H B4 J B1 B6 G I

14 14 2.2 Spanning tree protocol B3 A C E D B2 B5 B B7 K F H B4 J B1 B6 G I

15 15 2.2 Spanning tree protocol A C E D B2 B5 B B7 K F H B4 J B1 G I

16 16 2.2 Spanning tree protocol B3 A C E D B2 B5 B B7 K F H B4 J B1 B6 G I Root ports Root bridge B1

17 17 2.2 Spanning tree protocol B3 A C E D B2 B5 B B7 K F H B4 J B1 B6 G I Root ports Root bridge Designated bridges B1 B4 B7 B4 B2 B5

18 18 2.2 Spanning tree protocol B3 A C E D B2 B5 B B7 K F H B4 J B1 B6 G I Root ports Root bridge Designated bridges B1 B4 B7 B4 B2 B5

19 19 2.2 Spanning tree protocol Each BPDU contains –the id for the bridge that is sending this message, –the id for what the sending bridge believes to be the root bridge, –the distance, measured in hops, from the sending bridge to the root bridge. Each bridge records the current best BPDU message it has seen on each of its ports.

20 20 2.3 An example Initially, every bridge, say B1, sends out (B1, B1, 0) onto all of its ports. –The one that has the smallest id is elected to be the root bridge. Then, B2, B4, B5, B6, and B7 send out (Bx, B1, 1) onto the attached LANs other than the ones attached to B1. Then, B3 sends (B3, B1, 2) onto LAN A.

21 21 2.2 Spanning tree protocol B3 A C E D B2 B5 B B7 K F H B4 J B1 B6 G I

22 22 2.3 An example Designated bridges: –LAN A: B5 (closer than B3) –LAN B: B5 (id smaller than B7) –LAN C: B2 (closer than B3) –LAN D-H: B1 (closer than other bridges) –LAN I: B4 (id smaller than B6) –LAN J: B4 (the only bridge) –LAN K: B7 (the only bridge)

23 23 3. Benefits & limitations of switched Net. Benefits: –A switched network is generally much faster and more cost-effective than a routed network. –Support virtual LANs. –Practical experience shows that switched networks can provide good-quality streaming video. Limitations: –Special attention to avoid broadcast storm (including multicast), thus limiting its scalability. –Limit the types of LANs connected by switches. –The spanning tree does not support load balancing.

24 24 4. Virtual LANs Virtual LANs allow a group of hosts that may not be connected to the same LAN appear to be in the same LAN. WX B1B2 Y Z VLAN 100 VLAN 200

25 25 4. Virtual LANs Virtual LAN membership can be determined based on –Switches’ port numbers –Hosts’ MAC addresses –Hosts’ upper-layer network addresses, such as IP addresses. Switches that support VLANs need to know the VLAN number (or color) associated with each of its ports, and communicate this information with other switches.


Download ppt "1 Chapter 3: Packet Switching (Switched LANs) Dr. Rocky K. C. Chang 23 February 2004."

Similar presentations


Ads by Google