Lect 3b 7 Switches Ink

Embed Size (px)

Citation preview

  • 7/27/2019 Lect 3b 7 Switches Ink

    1/20

    David Wetherall ([email protected])

    Professor of Computer Science & Engineering

    Computer Networks

    LAN Switches (4.3.4, 4.8.1-

    4.8.2, 4.8.4 )

  • 7/27/2019 Lect 3b 7 Switches Ink

    2/20

    Computer Networks 2

    Topic How do we connect nodes with a

    switch instead of multiple access

    Uses multiple links/wires

    Basis of modern (switched) Ethernet

    Switch

  • 7/27/2019 Lect 3b 7 Switches Ink

    3/20

    Computer Networks 3

    Switched Ethernet Hosts are wired to Ethernet

    switches with twisted pair

    Switch serves to connect the hosts

    Wires usually run to a closet

    Switch

    Twisted pairSwitch ports

  • 7/27/2019 Lect 3b 7 Switches Ink

    4/20

    Computer Networks 4

    Whats in the box? Remember from protocol layers:

    Network

    Link

    Network

    Link

    Link Link

    Physical PhysicalHub, or

    repeater

    Switch

    Router

    All look like this:

  • 7/27/2019 Lect 3b 7 Switches Ink

    5/20

    Inside a Hub

    All ports are wired together; more convenient and

    reliable than a single shared wire

    Computer Networks 5

  • 7/27/2019 Lect 3b 7 Switches Ink

    6/20

    Inside a Switch

    Uses frame addresses to connect input port to the right

    output port; multiple frames may be switched in parallel

    Computer Networks 6

    .

    .

    .

    Fabric

  • 7/27/2019 Lect 3b 7 Switches Ink

    7/20

    Inside a Switch (2)

    Port may be used for both input and output (full-duplex)

    Just send, no multiple access protocol

    Computer Networks 7

    .

    .

    .

    1

    2

    3

    4

    1 4

    and

    2 3

  • 7/27/2019 Lect 3b 7 Switches Ink

    8/20

    Inside a Switch (3)

    Need buffers for multiple inputs to send to one output

    Computer Networks 8

    .

    .

    .

    . . .

    . . . ..

    .

    Input Buffer Output BufferFabric

    Input Output

  • 7/27/2019 Lect 3b 7 Switches Ink

    9/20

    Inside a Switch (4)

    Sustained overload will fill buffer and lead to frame loss

    Computer Networks 9

    .

    .

    .

    . . .

    . . . ..

    .

    Input Buffer Output BufferFabric

    Input Output

    XXX

    Loss!

  • 7/27/2019 Lect 3b 7 Switches Ink

    10/20

    Computer Networks 10

    Advantages of Switches

    Switches and hubs have replaced theshared cable of classic Ethernet

    Convenient to run wires to one location

    More reliable; wire cut is not a singlepoint of failure that is hard to find

    Switches offer scalable performance

    E.g., 100 Mbps per port instead of 100Mbps for all nodes of shared cable / hub

  • 7/27/2019 Lect 3b 7 Switches Ink

    11/20

    Switch Forwarding Switch needs to find the right output port for the

    destination address in the Ethernet frame. How? Want to let hosts be moved around readily; dont look at IP

    Computer Networks 11

    .

    .

    .

    . . .

    . . . ..

    .

    Source

    Destination

    Ethernet Frame

  • 7/27/2019 Lect 3b 7 Switches Ink

    12/20

    Computer Networks 12

    Backward Learning

    Switch forwards frames with a

    port/address table as follows:

    1. To fill the table, it looks at the

    source address of input frames2. To forward, it sends to the port,

    or else broadcasts to all ports

  • 7/27/2019 Lect 3b 7 Switches Ink

    13/20

    Computer Networks 13

    Backward Learning (2)

    1: A sends to D

    Switch

    D

    Address Port

    A

    B

    C

    D

  • 7/27/2019 Lect 3b 7 Switches Ink

    14/20

    Computer Networks 14

    Backward Learning (3)

    2: D sends to A

    Switch

    D

    Address Port

    A 1

    B

    C

    D

  • 7/27/2019 Lect 3b 7 Switches Ink

    15/20

    Computer Networks 15

    Backward Learning (4)

    3: A sends to D

    Switch

    D

    Address Port

    A 1

    B

    C

    D 4

  • 7/27/2019 Lect 3b 7 Switches Ink

    16/20

    Computer Networks 16

    Backward Learning (5)

    3: A sends to D

    Switch

    D

    Address Port

    A 1

    B

    C

    D 4

  • 7/27/2019 Lect 3b 7 Switches Ink

    17/20

    Learning with Multiple Switches

    Just works with multiple switches and a mix of hubs

    assuming no loops, e.g., A sends to D then D sends to A

    Computer Networks 17

    Switch

  • 7/27/2019 Lect 3b 7 Switches Ink

    18/20

    Learning with Multiple Switches (2)

    Just works with multiple switches and a mix of hubs

    assuming no loops, e.g., A sends to D then D sends to A

    Computer Networks 18

    Switch

  • 7/27/2019 Lect 3b 7 Switches Ink

    19/20

    Learning with Multiple Switches (3)

    Just works with multiple switches and a mix of hubs

    assuming no loops, e.g., A sends to D then D sends to A

    Computer Networks 19

    Switch

  • 7/27/2019 Lect 3b 7 Switches Ink

    20/20

    END

    2013 D. Wetherall

    Slide material from: TANENBAUM, ANDREW S.; WETHERALL, DAVID J., COMPUTER NETWORKS, 5th Edition, 2011.

    Electronically reproduced by permission of Pearson Education, Inc., Upper Saddle River, New Jersey

    Computer Networks 20