CSE 123A Computer Networks

Similar documents
Some portions courtesy Srini Seshan or David Wetherall

Lecture 6: Bridging & Switching. Last time. Today. CSE 123: Computer Networks Chris Kanich. How do multiple hosts share a single channel?

CSE 123: Computer Networks Alex C. Snoeren. HW 2 due Thursday 10/21!

Lecture 9: Bridging & Switching"

Lecture 8: Networks to Internetworks

CSE 461: Bridging LANs. Last Topic

Lecture 10: Internetworking"

Medium Access Protocols

Summary of MAC protocols

Hubs. twisted pair. hub. 5: DataLink Layer 5-1

Lecture 9: Bridging. CSE 123: Computer Networks Alex C. Snoeren

SWITCHING, FORWARDING, AND ROUTING

Administrivia CSC458 Lecture 4 Bridging LANs and IP. Last Time. This Time -- Switching (a.k.a. Bridging)

Chapter 3 Part 2 Switching and Bridging. Networking CS 3470, Section 1

Data Link Layer. Our goals: understand principles behind data link layer services: instantiation and implementation of various link layer technologies

Review. Error Detection: CRC Multiple access protocols. LAN addresses and ARP Ethernet. Slotted ALOHA CSMA/CD

Underlying Technologies -Continued-

CSEP 561 LAN Switches. David Wetherall

Principles behind data link layer services

Switching and Forwarding Reading: Chapter 3 1/30/14 1

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Principles behind data link layer services:

Principles behind data link layer services:

ECE 158A: Lecture 13. Fall 2015

More on LANS. LAN Wiring, Interface

Hubs, Bridges, and Switches (oh my) Hubs

The Spanning Tree Protocol

Good day. Today we will be talking about Local Internetworking What is Internetworking? Internetworking is the connection of different networks.

Image courtesy Cisco Systems, Inc. Illustration of a Cisco Catalyst switch

Configuring your VLAN. Presented by Gregory Laffoon

Internetworking Part 1

Goal and Outline. Computer Networking. What Do We Need? Today s Story Lecture 3: Packet Switched Networks Peter Steenkiste

CSCI Computer Networks

Computer Networks. Wenzhong Li. Nanjing University

CSE/EE 461 Lecture 7 Bridging LANs. Last Two Times. This Time -- Switching (a.k.a. Bridging)

Chapter 6 Connecting Device

Switched Ethernet Virtual LANs

LAN Overview (part 2) Interconnecting LANs - Hubs

CCM 4300 Lecture 5 Computer Networks, Wireless and Mobile Communications. Dr Shahedur Rahman. Room: T115

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

CS3600 SYSTEMS AND NETWORKS

Guide to Networking Essentials, 6 th Edition. Chapter 7: Network Hardware in Depth

ECE 435 Network Engineering Lecture 21

Interface The exit interface a packet will take when destined for a specific network.

Growth. Individual departments in a university buy LANs for their own machines and eventually want to interconnect with other campus LANs.

Introduction to OSPF

Lecture 7. Reminder: Homework 2, Programming Project 1 due today. Homework 3, Programming Project 2 out, due Thursday next week. Questions?

Chapter Seven. Local Area Networks: Part 1. Data Communications and Computer Networks: A Business User s Approach Seventh Edition

CMPE 150 Winter 2009

CS Networks and Distributed Systems. Lecture 5: Bridging. Revised 1/14/13

Chapter 4 NETWORK HARDWARE

Getting Connected (Chapter 2 Part 4) Networking CS 3470, Section 1 Sarah Diesburg

Link Layer Review. CS244A Winter 2008 March 7, 2008 Ben Nham

CompSci 356: Computer Network Architectures. Lecture 7: Switching technologies Chapter 3.1. Xiaowei Yang

More on Link Layer. Recap of Last Class. Interconnecting Nodes in LAN (Local-Area Network) Interconnecting with Hubs. Computer Networks 9/21/2009

Chapter 5 Link Layer and LANs

High Level View. EE 122: Ethernet and Random Access protocols. Medium Access Protocols

Ethernet. EE 122: Intro to Communication Networks. Fall 2007 (WF 4-5:30 in Cory 277) Vern Paxson TAs: Lisa Fowler, Daniel Killebrew & Jorge Ortiz

LAN Interconnection and Other Link Layer Protocols

EE 122: Ethernet and

Internetwork Expert s CCNP Bootcamp. Hierarchical Campus Network Design Overview

Connecting LANs. Required reading: Forouzan 17.1 to 17.1 Garcia 6.11 (intro ) CSE 3213, Fall Instructor: N. Vlajic

Telematics I. Chapter 6 Internetworking. (Acknowledement: These slides have been compiled from H. Karl s set of slides)

Communication Networks

CompSci 356: Computer Network Architectures. Lecture 8: Spanning Tree Algorithm and Basic Internetworking Ch & 3.2. Xiaowei Yang

Configuring STP and RSTP

CS4700/CS5700 Fundamentals of Computer Networks

Top-Down Network Design

Computer Networking. December 2004 CEN CN

Switching & ARP Week 3

The MAC Address Format

Reminder: Datalink Functions Computer Networking. Datalink Architectures

ECE 4450:427/527 - Computer Networks Spring 2017

Campus Networking Workshop. Layer 2 engineering Spanning Tree and VLANs

Bridging and Switching Basics

DD2490 p Layer 2 networking. Olof Hagsand KTH CSC

Guide to Networking Essentials, 6 th Edition. Chapter 7: Network Hardware in Depth

King Fahd University of Petroleum & Minerals Electrical Engineering Department EE 400, Experiment # 2

Link layer: introduction

ECE 333: Introduction to Communication Networks Fall 2001

CS 43: Computer Networks Switches and LANs. Kevin Webb Swarthmore College December 5, 2017

Lecture 9 The Data Link Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

ECE 333: Introduction to Communication Networks Fall Lecture 19: Medium Access Control VII

CSC 4900 Computer Networks: Link Layer (2)

1 GSW Bridging and Switching

Data Communications. Connecting Devices

2. LAN Topologies Gilbert Ndjatou Page 1

Lecture 2: Network Design and Topology. CS 598: Advanced Internetworking Matthew Caesar January 20, 2011

Introduction to LAN Protocols

Midterm Review. Topics. Review: Network. Review: Network. Layers & Protocols. Review: Network WAN. Midterm Review EECS 122 EECS 122

Midterm Review EECS 122. University of California Berkeley

Introduction to LAN Protocols

Ethernet Hub. Campus Network Design. Hubs. Sending and receiving Ethernet frames via a hub

THE OSI MODEL. Application Presentation Session Transport Network Data-Link Physical. OSI Model. Chapter 1 Review.

Connecting LANs. Required reading: Garcia 6.11 (intro ) CSE 3213, Fall 2010 Instructor: N. Vlajic

CSE 123a Computer Networking

Part3. Local Area Networks (LAN)

Network Infrastructure

Transcription:

CSE 123A Computer Networks Winter 2005 Lecture 6: Data-Link III: Hubs, Bridges and Switches Some portions courtesy Srini Seshan or David Wetherall

Last Time How do multiple hosts share a single channel? Medium Access Control (MAC) protocols Channel partitioning (FDMA,TDMA,CDMA) Contention-based protocols (CSMA/CD) Contention-free protocols (Token Ring) Wireless MAC (CSMA/CA and RTS/CTS) January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 2

Assignments Homework #1 Questions from text, due one week from today Turned in at the beginning of class Assignment #1 (solo project) Program to generate CRC for bitstream Program to check whether CRC for bitstream is correct Use the very special Savage polynomial I made up this morning x 8 + x 7 + x 4 + x 1 + x 0 (110010011) Turned in electronically by 1pm on the 3 rd of Feb Details for both on Web page January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 3

Misc computer resources We will be using Unix ieng6.ucsd.edu (linux) ieng9.ucsd.edu (solaris) If you have an OCE account just type: prep cs123w Else talk to Walter There is a class Webboard for the class (webboard.ucsd.edu) On all issues related to the programming projects Walter is the man (whphili@ucsd.edu) January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 4

January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 5

Today What if one wire isn t enough? Interconnecting different LANs Hubs/Repeaters: bit-for-bit rebroadcast Bridges: selective rebroadcast Switches: multi-port selective rebroadcast January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 6

Limits of a LAN One shared LAN can limit us in terms of: Distance Number of nodes Performance nodes (wire) What to do? January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 7

Hubs/Repeaters Physical layer device One port for each LAN Repeat received bits on one port out all other ports LAN1 Repeater LAN2 LAN3 January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 8

Benefits of Hubs Hubs can be arranged into hierarchies to create larger networks Ethernet rules» Up to four hubs between pair of nodes» <100M between hubs Most of LAN continues to operate if leaf hub dies Simple, cheap January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 9

Limitations of the One Big LAN Approach Single collision domain No improvement in max throughput Average throughput < as # of nodes increases Why? Still limited in distance & # of hosts Collision detection requirements Synchronization requirements Requires performance homogeneity Can t connect 10BaseT and 100BaseT networks January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 10

Bridges to the rescue Data-link layer device Key difference vs hubs Buffers entire packet and then rebroadcasts it on other ports ( store and forward device)» Uses CSMA/CD for access to each LAN» Can accommodate different speed interfaces (issues?) Creates separate collision domains» Improves throughput New opportunity: selective forwarding Why not with a hub? January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 11

Selective forwarding optimization Only rebroadcast a packet to the LAN where its destination resides If A sends packet to X, then bridge should forward packet If A sends packet to B, then bridge shouldn t Benefits? LAN 1 A LAN 2 W B C bridge X Y D Z January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 12

How to make this work? Need to know destination of packet Destination address in packet header (48bit in Ethernet) Need know which destinations are on which LANs Could be statically configured Table mapping address to output port (i.e. LAN) Simple algorithm receive packet p on port q lookup p.dest for output port if p.dest found then if output port is q then drop packet /* already delivered */ else forward the packet on output port; else flood; /* forward on all ports but the one on which the frame arrived*/ January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 13

Learning Bridges Eliminate manual configuration by learning which addresses are on which LANs Basic approach If a packet arrives on a port, then associate its source address with that port As each host transmits, the table becomes accurate Tricky problem: moving offices Solution: table aging» Associate a timestamp with each table entry» Refresh timestamp for each new packet with same src» If entry is older than x (stale), then delete entry January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 14

Bridge Learning: example Suppose C sends frame to D and D replies back with frame to C C sends frame, bridge has no info about D, so floods to both LANs bridge notes that C is on port 1 frame ignored on upper LAN frame received by D January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 15

Bridge Learning: example D generates reply to C, sends bridge sees frame from D bridge notes that D is on port 2 bridge knows C on port 1, so selectively forwards frame out via port 1 January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 16

Issues w/combination Hubs/Bridges Linear organization Inter-bridge hubs (e.g. CS) are single points of failure Unnecessary transit (e.g. EE<->SE must traverse CS) Backbone/tree Can survive LAN failure Manages all inter-lan communication Requires more ports January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 17

Why aren t t we done? Learning works well in tree topologies A B3 B C B5 Trees are fragile B2 D B7 Net admins like redundant/backup paths E F K B1 Cycles? G H Where should B1 forward packets destined for LAN A? B6 B4 I J January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 18

Potential solutions Don t allow redundant links (no loops allowed) Distributed routing protocol (SPF) [future lecture] Create a temporary virtual tree on the physical topology Spanning Tree algorithm January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 19

Spanning Tree Spanning tree uses subset of bridges so there are no cycles C A B3 B5 B Prune some ports Only one tree E B2 D B7 F K Q: How do we find a spanning tree? G B1 H Automatically B6 B4 I J January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 20

Spanning Tree Algorithm Elect a root node of the tree (lowest address) Grow tree as shortest distances from the root (use lowest address to break distance ties) All bridges send periodic configuration messages over ports for which they are the best path Then turn off ports that aren t on best paths January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 21

Spanning tree details Each bridge sends periodic configuration messages (RootID, Distance to Root, BridgeID) Special multicast address (all bridges on this LAN) Each bridge receives messages, updates best config. Smaller root address is better, then shorter distance To break ties, bridge with smaller address is better Initially, each bridge thinks it is the root Sends configuration messages on all ports Later, bridges send only best configs Add 1 to distance, send configs where still best (designated bridge) Turn off forwarding on ports except those that send/receive best January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 22

Spanning Tree Example Message format: (RootID, Distance to Root, BridgeID) A Sample messages sequences to and from B3: 1. B3 sends (B3, 0, B3) to B2 and B5 2. B3 receives (B2, 0, B2) and (B5, 0, B5) and accepts B2 as root 3. B3 sends (B2, 1, B3) to B5 4. B3 receives (B1, 1, B2) and (B1, 1, B5) and accepts B1 as root 5. B3 wants to send (B1, 2, B3 ) but doesn t as its nowhere best 6. B3 receives (B1, 1, B2) and (B1, 1, B5) again stable Data forwarding is turned off to the LAN A C E G B2 I B3 B6 D B1 B5 B4 B7 F H J B K January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 23

Some other tricky details What if root bridge fails? Age configuration info» If not refreshed for MaxAge seconds then delete root and recalculate spanning tree» If config message is received with more recent age, then recalculate spanning tree Applies to all bridges (not just root) Temporary loops When topology changes, takes a bit for new configuration messages to spread through the system Don t start forwarding packets immediately -> wait some time for convergence We send broadcast packets everywhere January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 24

So, what s s a switch then? A multi-port bridge learning + spanning tree protocol Parallel switching between different ports: A-to-B and A -to-b simultaneously Typically Supports Full-Duplex communication A->B and B->A simultaneously Connect individual hosts No collisions doesn t look anything like CSMA/CD; mostly irrelevant now January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 25

Some switching details Cut through switching optimization Only buffer packet header (for output port lookup) Then forward remaining bits directly Reduced latency, but may forward bad packets Backpressure flow control Input port=1gbps, output port = 100Mbps Buffer can only absorb temporary bursts Send JAM signal on input power when buffer gets too full Aggregate bandwidth is function of topology & workload (why?) January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 26

VLANs Scaling problem with switches All LANs in same broadcast domain As # hosts grows, broadcast traffic becomes an issue Virtual LANs (VLANs) created to address this issue Each port optionally configured with a VLAN ID Inbound packets tagged with this ID All switches will only forward on ports part of the same VLAN Creates independent broadcast domains within a single tree Also enforces administrative isolation between LANs January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 27

Bridge/Switch summary Create spanning tree across LANs Learn which ports to use to reach which addresses Benefits Higher link bandwidth (point-to-point links) Higher aggregate throughput (parallel communication) Improved fault tolerance (redundant paths) Limitations Requires homogeneous link layer (e.g. all Ethernet) Can t control forwarding topology» All traffic must traverse root; what if its poorly connected? Bottom line: we can scale LANs a lot, but there are real limitations; motivates internetworking & routing January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 28

For next time Read 4.1 on Internetworking Get working on homework & project #1 January 25, 2005 CSE 123A -- Lecture 5 Datalink III: Hubs, Bridges and Switches 29