18
1 Interconnecting LAN segments • Repeaters • Hubs • Bridges • Switches

1 Interconnecting LAN segments Repeaters Hubs Bridges Switches

  • View
    220

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 1 Interconnecting LAN segments Repeaters Hubs Bridges Switches

1

Interconnecting LAN segments

• Repeaters• Hubs• Bridges• Switches

Page 2: 1 Interconnecting LAN segments Repeaters Hubs Bridges Switches

2

Interconnecting with repeaters

• Repeaters used to connect multiple LAN segments• A repeater repeats bits it hears on one interface to

its other interfaces: physical layer device only!• Ethernet: Max 4 repeaters per LAN

• Total 5 LAN segments 5*30 = 150 nodes max.• Repeaters have become a legacy technology

Repeater

LAN segment 1 LAN segment 2

Page 3: 1 Interconnecting LAN segments Repeaters Hubs Bridges Switches

3

Interconnecting with hubs• Effectively a physical layer device

– Multi-port repeater– Operates at bit level– Repeat received bits on one interface to

all other interfaces

Page 4: 1 Interconnecting LAN segments Repeaters Hubs Bridges Switches

4

Interconnecting with hubs• Hubs can be arranged in a hierarchy (or multi-tier

design), with backbone hub at its top• Better than repeaters

– Hubs can detect malfunctioning node adapters and disconnect them from the network thereby increasing reliability

– Can collect statistics such as collision rate, network usage, average frame size

• Provide network management functionality

Page 5: 1 Interconnecting LAN segments Repeaters Hubs Bridges Switches

5

Advantages of hubs• Easy to Understand• Easy to Implement• …so they’re cheap

Page 6: 1 Interconnecting LAN segments Repeaters Hubs Bridges Switches

6

Limitation of hubs• Can’t interconnect 10BaseT & 100BaseT• Individual segment collision domains become one

large collision domain– if a node in CS and a node EE transmit at same time: collision

• Poor security– Why should host B get to share its link with a conversation

between A and D?– “Packet sniffer” on one port can monitor the traffic of all of

the ports

• Can we do better?– Use bridges

Page 7: 1 Interconnecting LAN segments Repeaters Hubs Bridges Switches

7

Interconnecting with bridges

bridge collision domain

collision domain

= hub

= host

LAN segment LAN segment

• Link layer device – stores and forwards LL, e.g., Ethernet, frames– examines frame header and selectively forwards frame

based on MAC destination address– when frame is to be forwarded on segment, uses CSMA/CD to

access segment– segments become separate collision domains

• Transparent: hosts are unaware of presence of bridges• Plug-and-play, self-learning: bridges do not need to be

configured

Page 8: 1 Interconnecting LAN segments Repeaters Hubs Bridges Switches

8

Backbone Bridge

100BaseT

• Recommended configuration• Notice that a bridge can connect a 10BaseT

LAN with a 100BaseT LAN, while a hub can not!

Page 9: 1 Interconnecting LAN segments Repeaters Hubs Bridges Switches

9

Bridges: Forwarding

100BaseT

• How does the bridge determine to which LAN segment to forward a frame to?

• Notice that this has to be done transparent to the hosts. That is, hosts should not be aware that there is a bridge connecting several LANs together

Page 10: 1 Interconnecting LAN segments Repeaters Hubs Bridges Switches

10

Bridges: Self Learning• Basic idea: Build cache (called the bridge

table) of which nodes are downstream of which ports– entry in bridge table:

• (Node MAC Address, Bridge Interface, Time Stamp)• stale entries in table dropped (TTL can be 60 min)

• How? Bridge monitors source MAC address on all packets that it forwards– when frame received, bridge “learns” location of

sender: incoming LAN segment– records sender/location pair in bridge table

• What to do with unknown sources?– Flood network, i.e., forward the frame on all

interfaces except over the one from which the frame was received

Page 11: 1 Interconnecting LAN segments Repeaters Hubs Bridges Switches

11

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

Page 12: 1 Interconnecting LAN segments Repeaters Hubs Bridges Switches

12

Bridge Learning: Example

• D generates reply to C, sends – bridge sees frame from D – bridge notes that D is on interface 2 – bridge knows C on interface 1, so selectively

forwards frame out via interface 1

Page 13: 1 Interconnecting LAN segments Repeaters Hubs Bridges Switches

13

Bridges: Filtering/ForwardingWhen bridge receives a frame:

index bridge table using destination MAC address• if entry found for destination

then { if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated } else flood:forward on all but the interface on which

the frame arrived• If destination MAC is FF-FF-FF-FF-FF-FF, that is, the

packet is being broadcast to all hosts, then– forward the frame on all but the interface on which the

frame arrived

Page 14: 1 Interconnecting LAN segments Repeaters Hubs Bridges Switches

14

Eliminating Loops in Bridged Networks: Spanning Tree

• Desirable to have redundant, alternate paths from source to destination for increased reliability, availability

• with multiple simultaneous paths, cycles result - bridges may multiply and forward frame forever

• solution: organize bridges in a spanning tree by disabling subset of interfaces

Disabled

Page 15: 1 Interconnecting LAN segments Repeaters Hubs Bridges Switches

15

Interconnecting with Switches

• Switches– “multi-port bridge”

– Each port acts as a bridge

– Each port determines MAC addresses connected to itself

– Master list within switch determines forwarding behavior

Page 16: 1 Interconnecting LAN segments Repeaters Hubs Bridges Switches

16

Switches (more)• A-to-B and A’-to-B’ communication

simultaneously: no collisions

• large number of interfaces versus bridges (which typically have only two)

• Typically star-shaped topology

• Cut-through switching: frame forwarded from input to output port without awaiting for assembly of entire frame– slight reduction in latency

• Combinations of shared/dedicated, 10/100/1000 Mbps interfaces

• LAN, e.g., Ethernet, but no collisions!

Page 17: 1 Interconnecting LAN segments Repeaters Hubs Bridges Switches

17

Switched Network Advantages• Higher link bandwidth

– Point to point electrically simpler than bus

• Much greater aggregate bandwidth– Separate segments can send simultaneously– Data backplane of switches typically large to

support simultaneous transfers amongst ports

• Challenge– Learning which packets to copy across links

• Forwarding table based on destination MAC address

– Avoiding forwarding loops• Perlman’s Spanning Tree Algorithm

Page 18: 1 Interconnecting LAN segments Repeaters Hubs Bridges Switches

18

Summary• Covered how to extend LAN segments• Repeaters

– Physical Layer Devices

• Hubs– Multi-port repeaters

• Bridges– Link Layer Devices: Store & forward frames based on the

destination MAC address of the frame– Build packet forwarding table on the fly by observing

passing packets– Spanning Tree to eliminate loops

• Switches– Multi-port bridges