1 / 31

CSEE W4140 Networking Laboratory

CSEE W4140 Networking Laboratory. Lecture 8: LAN Switching Jong Yul Kim 03.29.2010. Announcements. Reminder of lab rules Labs are mandatory. Don’t connect rack machines to Internet. Don’t bring food / drinks to the lab. Short review of midterm. Today’s lecture. Hubs (review) Switches

pstoll
Download Presentation

CSEE W4140 Networking Laboratory

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSEE W4140Networking Laboratory Lecture 8: LAN Switching Jong Yul Kim 03.29.2010

  2. Announcements • Reminder of lab rules • Labs are mandatory. • Don’t connect rack machines to Internet. • Don’t bring food / drinks to the lab.

  3. Short review of midterm

  4. Today’s lecture • Hubs (review) • Switches • Learning algorithm • Spanning Tree Protocol

  5. Various equipments are used to interconnect networks

  6. We already know routers • Routers operate at the Network Layer (Layer 3) • Interconnect different subnetworks

  7. We’ve heard about gateways • The term Gateway is used with different meanings in different contexts • Gateway is a generic term for routers (Level 3) • “Default gateway” • Gatewayis also used for a device that interconnects different Layer 3 networks and which performs translation of protocols (“Multi-protocol router”)

  8. Ethernet Hub • A simple repeater (extends the physical cable) • Frame collisions are propagated • Good for sniffing traffic in a network we want to monitor

  9. Bridges/LAN switches • A bridgeor LAN switch is a device that interconnects two or more Local Area Networks (LANs) and forwards packets between these networks. • Bridges/LAN switches operate at the Data Link Layer (Layer 2)

  10. Terminology: Bridge, LAN switch, Ethernet switch There are different terms to refer to a data-link layer interconnection device: • The term bridge was coined in the early 1980s. • Today, the terms LAN switch or (in the context of Ethernet) Ethernet switch are used. Convention: • Since many of the concepts, configuration commands, and protocols for LAN switches were developed in the 1980s, and commonly use the old term `bridge’, we will, with few exceptions, refer to LAN switches as bridges.

  11. Internet A Switched Enterprise Network Router Switch

  12. Routers Each host’s IP address must be configured If network is reconfigured, IP addresses may need to be reassigned Routing done via RIP or OSPF Each router manipulates packet header (e.g., reduces TTL field) Bridges MAC addresses are hardwired No network configuration needed plug-and-play! No routing protocol needed (sort of) learning bridge algorithm spanning tree algorithm Bridges do not manipulate frames Bridges versus Routers

  13. Frame Forwarding • Each bridge maintains a forwarding table with entries < MAC address, port, age> MAC address:host name or group address port:port number of bridge age:aging time of entry with interpretation: • a machine with MAC address lies in direction of the port number from the bridge. The entry is age time units old.

  14. Frame Forwarding • Assume a MAC frame arrives on port x. Is MAC address of destination in forwardingtable for ports A, B, or C ? Notfound ? Found? Forward the frame on theappropriate port Flood the frame, i.e., send the frame on all ports except port x.

  15. Src=x, Dest=y Src=x, Dest=y Src=x, Dest=y Src=y, Dest=x Src=x, Dest=y Src=x, Dest=y Src=x, Dest=y Src=x, Dest=y Src=x, Dest=y Src=y, Dest=x Learning Algorithm • Routing tables entries are set automatically with a simple heuristic: The source field of a frame that arrives on a port tells which hosts are reachable from this port. Port 1 Port 4 x is at Port 3 y is at Port 4 Port 2 Port 5 Port 3 Port 6

  16. Learning Algorithm Algorithm: • For each frame received, the source stores the source field in the forwarding database together with the port where the frame was received. • All entries are deleted after some time (default is 15 seconds).

  17. Learning Algorithm Example • Consider the following packets: (Src=A, Dest=F), (Src=C, Dest=A), (Src=E, Dest=C) • What have the bridges learned?

  18. F F F F F F Danger of Loops • Consider the two LANs that are connected by two bridges. • Assume host n is transmitting a frame F with unknown destination. What is happening? • Bridges A and B flood the frame to LAN 2. • Bridge B sees F on LAN 2 (with unknown destination), and copies the frame back to LAN 1 • Bridge A does the same. • The copying continues Where’s the problem? What’s the solution ? F

  19. Spanning Tree Protocol (STP) • A solution is to prevent loops in the topology • IEEE 802.1d has an algorithm that builds and maintains a spanning tree in a dynamic environment • Bridges that run 802.1d are called transparent bridges • Bridges exchange messages to configure the bridge (Configuration Bridge Protocol Data Unit, Configuration BPDUs) to build the tree. • Using the BPDUs, each bridges makes a local decision which of its ports are part of the spanning tree

  20. Diagram of a spanning tree Disabled ports Forwarding ports

  21. Concepts • Each bridge as a unique identifier: Bridge ID = <priority number+ MAC address> Note that a bridge has several MAC addresses (one for each port), but only one ID * lower priority number has higher priority (The lower the better!!) • Each port within a bridge has a unique identifier (port ID). • Root Bridge • The bridge with the lowest identifier is the rootof the spanning tree. • Root Port • Each bridge has a root port which identifies the next hop from a bridge to the root.

  22. Concepts • Root Path Cost • For each bridge, the cost of the min-cost path to the root. • The lower the better!! • Designated Bridge, Designated Port • Lowest cost bridge on the segment is the designated bridge. • On the designated bridge, the port that is attached to the segment is the designated port. • if two bridges have the same cost, select the one with lower bridge ID • if the min-cost bridge has two or more ports on the LAN, select the port with the lowest identifier

  23. Steps of Spanning Tree Algorithm 1. Determine the root bridge 2. Determine the root port on all other bridges 3. Determine the designated port on each LAN • Each bridge is sending out BPDUs that contain the following information: root ID cost bridge ID/port ID root bridge (what the sender thinks it is) root path cost for sending bridgeIdentifies sending bridge

  24. Determine the Root Bridge • Initially, all bridges assume they are the root bridge. • Each bridge B sends BPDUs of this form on its LANs: • Each bridge looks at the BPDUs received on all its ports and its own transmitted BPDUs. • Root bridge is the smallest received root ID that has been received so far (Whenever a smaller ID arrives, the root is updated) B 0 B

  25. Calculate the Root Path CostDetermine the Root Port • At this time: A bridge B has a belief of who the root is, say R. • Bridge B determines the Root Path Cost (Cost) as follows: • If B = R : Cost = 0. • If B  R: Cost = {Smallest Cost in any of BPDUs that were received} +cost of B’s interface where this BPDU was received • B’s root port is the port from which B received the lowest cost path to R • Knowing R and Cost, B can generate its BPDU (but will not necessarily send it out) R Cost B

  26. Default Cost

  27. Calculate the Root Path CostDetermine the Root Port • At this time: B has generated its BPDU • B will send this BPDU on one of its ports, say port x, only if its BPDU is lower than any BPDU that B received from port x. • In this case, B also assumes that it is the designated bridge for the LAN to which the port connects. R Cost B

  28. Selecting the Ports for Spanning Tree • Each bridges makes a local decision which of its ports are part of the spanning tree • B will decide which ports are in the spanning tree: • B’s root port is part of the spanning tree • All designated ports are part of the spanning tree • All other ports are not part of the spanning tree • B’s ports that are in the spanning tree will forward packets (=forwarding state) • B’s ports that are not in the spanning tree will not forward packets (=blocking state)

  29. Configuration BPDUs

  30. Main Points of Lab 6 • Hubs vs. switches • Switches • Learning algorithm • Spanning Tree Protocol

  31. Homework • Prelab 7 due this Friday • Lab report 5.2 + BGP lab due this week • Lab report 6 due next week.

More Related