Computer Networks. Wenzhong Li. Nanjing University

Similar documents
LAN Overview (part 2) Interconnecting LANs - Hubs

Local Area Network Overview

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

CH : 15 LOCAL AREA NETWORK OVERVIEW

ET4254 Communications and Networking 1

Chapter 15 Local Area Network Overview

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

Medium Access Protocols

LAN Interconnection. different interconnecting devices, many approaches Vasile Dadarlat- Local Area Computer Networks

Summary of MAC protocols

Chapter 11 in Stallings 10 th Edition

Link layer: introduction

Switching & ARP Week 3

ECE 4450:427/527 - Computer Networks Spring 2017

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

Chapter 6 Connecting Device

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

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 18

Principles behind data link layer services

More on LANS. LAN Wiring, Interface

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

Communication Networks ( ) / Spring 2011 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner

Principles behind data link layer services:

Principles behind data link layer services:

LAN Interconnection and Other Link Layer Protocols

7010INT Data Communications Lecture 7 The Network Layer

CSC 4900 Computer Networks: Link Layer (2)

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

CS 455/555 Intro to Networks and Communications. Link Layer Addressing, Ethernet, and a Day in the Life of a Web Request

CS 3516: Advanced Computer Networks

Chapter 4 NETWORK HARDWARE

Introduction to LAN Protocols

Part3. Local Area Networks (LAN)

CSC 401 Data and Computer Communications Networks

Some portions courtesy Srini Seshan or David Wetherall

LLC and Bridges. Raj Jain. Professor of CIS. The Ohio State University

Introduction to LAN Protocols

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

The Link Layer and LANs: Ethernet and Swiches

CHAPTER 15 LOCAL AREA NETWORKS ANSWERS TO QUESTIONS

CSE 123A Computer Networks

Introduction to Communication Networks Spring Unit 13 Network extensions Bridges.

Lecture 5 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Access Technologies! Fabio Martignon

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

6.1.2 Repeaters. Figure Repeater connecting two LAN segments. Figure Operation of a repeater as a level-1 relay

Computer Networks Principles LAN - Ethernet

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

Lecture 6 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

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

Computer Networks. Wenzhong Li. Nanjing University

Bridging and Switching Basics

Layer 2 functionality bridging and switching

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

CHAPTER 2 - NETWORK DEVICES

Underlying Technologies -Continued-

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

Hubs, Bridges, and Switches (oh my) Hubs

1. Data Link Layer Protocols

Extending the LAN. Context. Info 341 Networking and Distributed Applications. Building up the network. How to hook things together. Media NIC 10/18/10

Configuring Banyan VINES

Cisco Cisco Certified Network Associate (CCNA)

Data Communications. Connecting Devices

Chapter 5 Reading Organizer After completion of this chapter, you should be able to:

Introduction. High Speed LANs. Emergence of High-Speed LANs. Characteristics of High Speed LANS. Text ch. 6, High-Speed Networks and

Network Devices,Frame Relay and X.25

Lecture 4b. Local Area Networks and Bridges

Lecture 20: Link Layer

Network Infrastructure

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

Introduction to Networking Devices

Link Layer and Ethernet

PART X. Internetworking Part 1. (Concept, IP Addressing, IP Routing, IP Datagrams, Address Resolution)

CS343: Data Communication LAN Overview

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

CCNA Exploration1 Chapter 7: OSI Data Link Layer

1 GSW Bridging and Switching

Chapter 5 Link Layer and LANs

ECE 158A: Lecture 13. Fall 2015

Computer Networks. Wenzhong Li. Nanjing University

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

Chapter 5 part 2 LINK LAYER. Computer Networks Timothy Roscoe Summer Networks & Operating Systems Computer Networks

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

Chapter 5: The Data Link Layer. Chapter 5 Link Layer and LANs. Ethernet. Link Layer. Star topology. Ethernet Frame Structure.

Data Link Protocols. TCP/IP Suite and OSI Reference Model

Lecture 9: Bridging & Switching"

1: Review Of Semester Provide an overview of encapsulation.

Link Layer and Ethernet

Distributed Queue Dual Bus

Redes de Computadores. Medium Access Control

3.5 CONNECTING DEVICES

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

Announcements. CS 5565 Network Architecture and Protocols. Ethernet. Ethernet. Ethernet Model. Ideal Multiple Access Protocol

Internetworking is connecting two or more computer networks with some sort of routing device to exchange traffic back and forth, and guide traffic on

EECS Introduction to Computer Networking. Local Area Networks / Ethernet. Hub

CMPE 150 Winter 2009

Question 7: What are Asynchronous links?

CISCO SYSTEM ADMINISTRATION (41)

CSE 461: Bridging LANs. Last Topic

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061/1110. Lecture 8. Medium Access Control Methods & LAN

Transcription:

Computer Networks Wenzhong Li Nanjing University 1

Chapter 2. Direct Link Networks Link Service and Framing Error Detection and Reliable Transmission HDLC, PPP, and SONET Token Ring Ethernet Bridges and Layer-2 switch Wireless Networks Network Performance 2

Bridges and Layer-2 switch

Bridges and Layer-2 switch Ability to expand beyond single LAN Provide interconnection to other LANs/WANs Bridge is used (later Layer-2 switch) Connects LANs, usually more than two LANs Identical protocols for physical and MAC layers Store, forward LAN frames Exact bitwise copy of frame Switch (route) functions needed 4

Requirements of a Bridge Store and Forward Read frames transmitted on one LAN, Examine frames MAC address, selectively store those address to other LANs Using MAC protocol of second LAN, retransmit each frame Transparent Stations are unaware of presence of bridges Plug-and-play, self-learning Bridges do not need to be configured 5

Bridge Operation 6

Bridge Protocol Architecture IEEE 802.1D, MAC level Use MAC address for switching Bridge does not need LLC layer Relaying MAC frames Can pass frame over external WAN or links Capture LAN frame, encapsulate it Forward it across WAN (Wide Area Network) link Remove encapsulation and forward over LAN link 7

A Simple Connection of LANs Bridge MAC head MAC tail 8

Routing for Bridges Complex LANs configuration cause alternative routes Bridge must decide (Switching) Whether to forward frame Which LAN to forward frame on A forward table is needed Fixed routing for each source-destination pair of LANs Done in configuration Station cannot be moved Fixed routing is impracticable 9

Bridges and LANs with Alternative Routes 1 5 10

Mechanisms of a Bridge Objectives Bridge automatically develops switching table Automatically update in response to changes Mechanisms Transparent bridge: 802.1D Frame forwarding Address learning Loop resolution: spanning tree Source Routing Bridges: connecting Token Ring 11

Frame forwarding Maintain forwarding database for each port <Mac Address, Port, Timestamp>: station addresses reached through each port For a frame arriving on port X Search forwarding database to see if dest MAC address is listed for any port: If address not found, forward to all ports (flooding) except X If address listed for port X, drop it If address listed for port Y, check port Y for Blocking or Forwarding state, transmit if Forwarding state Blocking used to form a tree 12

Address Learning Forwarding database can be learned When frame arrives at port X, it has come from the LAN attached to port X Use the source address to update forwarding database for port X to include that address Timer on each entry in database, Entry deleted when timer is off Each time frame arrives, source address checked against forwarding database 13

S1 S2 S3 S4 S5 LAN1 LAN2 LAN3 B1 B2 Port 1 Port 2 Port 1 Port 2 Address Port Address Port 14

S1 S5 S1 S2 S3 S4 S5 S1 S5 S1 S5 S1 S5 S1 S5 LAN1 LAN2 LAN3 B1 B2 Port 1 Port 2 Port 1 Port 2 Address Port S1 1 Address Port S1 1 15

S3 S2 S1 S2 S3 S4 S5 S2 S3 S3 S2 S3 S2 S2 S3 S3 S2 LAN1 LAN2 LAN3 B1 B2 Port 1 Port 2 Port 1 Port 2 Address Port S1 1 S3 2 Address Port S1 1 S3 1 16

S4 S3 S1 S2 S3 S4 S5 S3 S4 S3 S4 LAN1 S3 S4 LAN2 LAN3 B1 B2 Port 1 Port 2 Port 1 Port 2 Address Port S1 1 S3 2 S4 2 Address Port S1 1 S3 1 S4 2 17

S2 S1 S1 S2 S3 S4 S5 S2 S1 LAN1 S2 S1 LAN2 LAN3 B1 B2 Port 1 Port 2 Port 1 Port 2 Address Port S1 1 S3 2 S4 2 S2 1 Address Port S1 1 S3 1 S4 2 18

Loop of Bridges Bridge a, b not know where Station B is 19

Spanning Tree Address learning works for tree layout i.e. no closed loops Spanning tree A tree that maintains connectivity but contains no loops for any connected graph Each bridge assigned unique identifier Exchange between bridges to establish spanning tree 20

The Algorithm Select a root bridge among all the bridges Root bridge = the lowest bridge ID Determine the root port for each bridge except the root bridge Root port = port with the least-cost path to the root bridge Select a designated bridge for each LAN Designated bridge = bridge with the least-cost path from the LAN to the root bridge Designated port connects the LAN with the designated bridge All root ports and all designated ports are placed into a forwarding state The other ports are placed into a blocking state 21

LAN1 (1) B1 (2) LAN2 LAN3 B4 (1) (2) (1) B2 (2) (1) B5 (2) LAN4 (1) (3) B3 (2) 22

LAN1 (1) B1 (2) B2 (1) (2) (1) (3) B3 Bridge 1 selected as root bridge LAN2 (1) (2) B4 (2) LAN3 (1) B5 (2) LAN4 23

LAN1 (1) B1 (2) R (1) B2 (2) R (1) (3) B3 Root port selected for every bridge except root bridge LAN2 R (1) (2) B4 (2) LAN3 R (1) B5 (2) LAN4 24

LAN1 D (1) B1 (2) D R (1) B2 (2) R (1) (3) B3 Select designated bridge for each LAN LAN2 R (1) B4 D (2) D (2) LAN3 R (1) B5 (2) LAN4 25

LAN1 D (1) B1 (2) D R (1) B2 (2) R (1) (3) B3 All root ports & designated ports put in forwarding state LAN2 R (1) B4 D (2) D (2) LAN3 R (1) B5 (2) LAN4 26

Source Routing Bridges To interconnect IEEE 802.5 token rings The source station determines route to destination Routing information inserted in frame Routing control Route 1 designator Route 2 designator Route m designator 2 bytes 2 bytes 2 bytes 2 bytes Destination address Source address Routing information Data FCS 27

Route Discovery For a destination each station broadcasts a single-route broadcast frame The frame visits every LAN once & eventually reaches destination Destination sends all-routes broadcast frame which generates all routes back to source Source collects routes & picks best 28

Detailed Route Discovery (Source) Bridges must be configured to form a spanning tree Source sends single-route frame without route designator field Bridges in first LAN add <incoming LAN #, bridge #, outgoing LAN #> into frame & forwards Each subsequent bridge attaches <bridge #, outgoing LAN #> Eventually, one single-route frame arrives at destination 29

Detailed Route Discovery (Destination) When destination receives single-route broadcast frame it responds with all-routes broadcast frame Bridge at first hop inserts <incoming LAN #, bridge #, outgoing LAN #> and forwards Subsequent bridges insert <bridge #, outgoing LAN #> and forward Before forwarding, bridge checks to see if outgoing LAN already in designator field Source eventually receives all routes to destination station 30

Find Routes from S1 to S3 S1 LAN 1 X B1 B2 LAN 2 B4 LAN 4 B3 B5 X X B7 LAN 3 B6 LAN 5 S2 S3 B3 LAN3 B6 LAN5 LAN1 B1 LAN2 B4 LAN4 31

S1 B1 LAN 2 B4 LAN 4 S2 LAN 1 B3 B5 B7 B2 LAN 3 B6 LAN 5 S3 LAN5 B6 B7 LAN3 LAN4 B2 B3 B5 B4 B5 LAN1 B1 LAN2 LAN2 LAN4 LAN2 LAN3 B1 B4 B4 B7 B1 B3 B2 B3 B6 LAN1 LAN4 LAN2 LAN3 B3 B4 B2 B5 B7 B1 B3 B2 B5 B6 B1 B1 B4 LAN4 LAN1 LAN1 B2 LAN3 LAN1 LAN2 LAN1 LAN2 LAN1 B5 B7 B2 B3 B5 B6 B1 B3 B4 B2 32

Types of devices for interconnecting LANs Hubs: physical repeaters Bridges:connecting LANs (forwarding + address learning) Layer 2 switches: connecting Hosts or LANs (bridge functions + collision free) Layer 3 switches: involving router functions 33

Hubs Active central element of star layout Each station connected to hub by two lines Transmit and receive Hub acts as a repeater When a station transmits, hub repeats signal on outgoing line to all other stations Physically star, logically bus Transmission from any station received by all other stations If two stations transmit at the same time, collision 34

Shared Medium Bus and Hub 35

Layer 2 Switch:Requirement Link-layer device: takes an active role Store, forward Ethernet frames Examine incoming frame s MAC address, selectively forward frame to one-or-more outgoing links when frame is to be forwarded on segment, uses CSMA/CD to access segment Transparent Hosts are unaware of presence of switches Plug-and-play, self-learning Switches do not need to be configured Switch vs. Bridge Bridge: connect LANs (normally 2-4 ports) Switch: connect multiple hosts/subnets (a lot of ports, can achieve collision-free transmission)

Switch: multiple simultaneous transmissions Stations have dedicated, direct connection to switch Switches buffer and forward frames Ethernet protocol used on each incoming link, but no collisions; full duplex each link is its own collision domain switching: A-to-A and B-to-B can transmit simultaneously, without collisions Multiplying capacity of LANs Each port/link forms a LAN segment (no collisions) More than one station transmitting at a time 37

Shared Medium Hub and Layer 2 Switch 20M instead of 10M 38

Layer 2 Switch Benefits No change to attached stations to convert bus/hub LAN to switched LAN For Ethernet LAN, each station uses Ethernet MAC protocol Station has dedicated capacity equal to original LAN Assuming switch has sufficient capacity to keep up with all stations Layer 2 switch scales easily New layer 2 switch added to accommodate additional stations 39

Types of Layer 2 Switch Store-and-forward switch Accepts frame on input line Buffers and routes it to appropriate output line Adds delay between sender and receiver while boosts integrity of network Cut-through switch ( 直通式交换 ) Takes advantage of dest address appearing at beginning of frame Begins repeating frame onto output line as soon as it recognizes dest address Highest possible throughput Risk of propagating bad frames: unable to check CRC prior to retransmission 40

Switch: frame filtering/forwarding when frame received at switch: 1. record incoming link, MAC address of sending host 2. index switch table using MAC destination address 3. if entry found for destination then { if destination on segment from which frame arrived then drop frame } else forward frame on interface indicated by entry else flood /* forward on all interfaces except arriving interface */ 19

Interconnecting switches switches can be connected together S 4 A B S 1 C S 2 D E F G S 3 H I Q: sending from A to G - how does S 1 know to forward frame destined to F via S 4 and S 3? A: self learning! (works exactly the same as in single-switch case!) 20

Self-learning multi-switch example Suppose C sends frame to I, I responds to C A B 2 S 1 1 3 4 C S 2 2 3 4 D E S 4 1 2 3 1 F G 2 1 S 3 4 3 H I Q: show switch tables and packet forwarding in S 1, S 2, S 3, S 4 (assuming they are empty in the beginning) 21

Layer 3 Switches As number of stations grows, layer 2 switches reveal inadequacies Broadcast overload Lack of multiple paths Layer 3 switch Implement packet-forwarding (IP) logic of a router in hardware Interconnecting similar LANs, as in layer 2 switches 44

Broadcast Overload Set of stations and LANs connected by layer 2 switches builds singular physical net All nodes share common MAC broadcast address Broadcast frame delivered to all stations attached to LANs connected by layer 2 switches Under broadcast, layer 2 switches become hubs IP causes many broadcasts under daily work, e.g. ARP, DHCP, IGMP 45

Lack of Multiple Paths Layer 2 switches uses spanning tree for routing (switching) Dictate no closed loops: only one path between any two stations Limits both performance and reliability Solution: Break up LANs into sub-networks connected by switches using router functions (layer 3 switch) MAC broadcast frames limited to single sub-network Allow use of multiple paths between sub-networks 46

Two Categories of Layer 3 Switches Packet by packet Operates in same way as traditional router Order of magnitude increase in performance compared to software-based router Flow-based switch tries to enhance performance by identifying flows of IP packets Same source and destination Done by using a special flow label in packet header Once flow is identified, predefined route can be established 47

Typical Large LANs in an Organization Circles in diagram identify separate LAN subnetworks MAC broadcast frame limited to its subnetwork 48

VLANs (Virtual Local Area Network) consider: CS user moves office to EE, but wants connect to CS switch? Virtual Local Area Network switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure. port-based VLAN: switch ports grouped (by switch management software) so that single physical switch operates as multiple virtual switches 1 2 Electrical Engineering (VLAN ports 1-8) 7 8 9 10 15 16 Computer Science (VLAN ports 9-15) 5-49

Summary Bridge and Layer 2 Switch 概念 转发表 地址学习 生成树算法 路由发现机制 比较 :Bridge, hub, Layer 2 Switch, Layer 3 Switch (Router)

Homework 第 5 章 :P23, P24, P25, P26