Sie sind auf Seite 1von 19

IT 605

Computer Networks

Hubs, Switches, Bridges

Prof . Anirudha Sahoo


KReSIT
IIT Bombay

Prof . Aniruddha sahoo, KReSIT, IIT Bombay Hubs, switches and 4.1
bridges
HUB
• HUB
– A hub is a L1 (physical layer) multi-port repeater.
• –It receives a signal on one port, regenerates it, and
transmits it out all ports.
• –All devices connected to a hub receive any
transmission on that hub, regardless of the intended
recipient.
– Two or more devices on a hub cannot transmit at
the same time.
– Because of these characteristics, a hub (or a group
of hubs connected together) is known as a collision
domain.

Prof . Aniruddha sahoo, KReSIT, IIT Bombay Hubs, switches and 4.2
bridges
Switch
• A device that allows us to interconnect
links to form a larger network.
– Has a fixed number of ports
– But can be interconnected to other
switches to build network of large
geographic scope.

Prof . Aniruddha sahoo, KReSIT, IIT Bombay Hubs, switches and 4.3
bridges
Switch
• Three ways to do switching or
forwarding
– Datagram
– Virtual circuit or connection-oriented
– Source routing

Prof . Aniruddha sahoo, KReSIT, IIT Bombay Hubs, switches and 4.4
bridges
Datagram based switching
• Switch consults the forwarding table
to switch a packet
• If entry is not found, the packet is
flooded to all the
D ports
1 dest port

0
A 2
2
A 3
C
B 3
C 0
B
D 1
Prof . Aniruddha sahoo, KReSIT, IIT Bombay Hubs, switches and 4.5
bridges
Virtual Circuit based
• A connection oriented approach
• Virtual circuit is set up during
signaling (switched virtual circuit)
• Virtual circuit set up permanently
(permanent virtual circuit)

Prof . Aniruddha sahoo, KReSIT, IIT Bombay Hubs, switches and 4.6
bridges
Source routing based
• Entire route (port) information is
carried in the packet
• Switch does not need forwarding table

Prof . Aniruddha sahoo, KReSIT, IIT Bombay Hubs, switches and 4.7
bridges
Bridge (LAN Switch)
• Bridge or LAN switch
– Forwards packets between shared media
LANs such as ethernet.
– a Layer 2 device
– keeps track of which devices are connected
to which ports by maintaining a table of the
MAC-address-to-switch-port mapping.
– Transmissions on a bridge/switch are sent
only to the intended recipients, determined
by the destination MAC address.

Prof . Aniruddha sahoo, KReSIT, IIT Bombay Hubs, switches and 4.8
bridges
Bridge
– Broadcasts are sent to all recipients (ports)
– For this reason, a switch (or a group of
switches connected together) is known as a
broadcast domain.
– Bridge is a device to connect more than one
LAN

Prof . Aniruddha sahoo, KReSIT, IIT Bombay Hubs, switches and 4.9
bridges
why LANs need to be
1. connect 2 connected
existing LANs (CS, math)
-- different organizations want to be
connected
2. LAN too big; need to split it, but stay
connected
-- too many stations or traffic for one
LAN
3. connect geographically separate
LANs.
-- eg, 2 offices in different towns need
connecting ( Remote Bridges, with
PPP connection between
Prof . Aniruddha sahoo, KReSIT, IIT Bombay
bridges) 4.10
Hubs, switches and
bridges
Learning Bridges
• Intelligent filtering
– Necessary when the extended LAN grows
large
– Bridges are used to interconnect different
LAN ( see next slide)
• Internal table with Host --> Port mapping
• Table builds up dynamically
• Bridges see inside MAC frame to know the
source address and records along with
incoming port no.
• Entries are time stamped
• Broadcast to all ports when no entry is
Prof .found
Aniruddha sahoo, KReSIT, IIT Bombay Hubs, switches and 4.11
bridges
Spanning Tree Algorithm
• Works fine until there is
no loop
• In this case there may be
infinite loop with a MAC
frame
• Solved by building a
spanning tree ( subgraph
encompassing all
vertices,having only one
path between the
vertices)
• Perlman algorithm
• Problems: bandwidth
wastage, only one path is
being used.
•ProfHow tosahoo,
. Aniruddha handle---
KReSIT, IITsource
Bombay Hubs, switches and 4.12
route bridge is one way. bridges
Spanning Tree Formation
• Each bridge has id.
– Every body sends config mesg:
– Initially each bridge thinks itself a root,
send configuration message having :
( enters the same in its table)
• It’s own id as root
• Distance as zero

Prof . Aniruddha sahoo, KReSIT, IIT Bombay Hubs, switches and 4.13
bridges
Spanning Tree Formation
– A received ( at any bridge x) config
message replaces ( considered better)
entry for best root in x, if
• It identifies a root with smaller id or
• Equal id with smaller distance or
• Root id and distance is same but the
sending bridge has smaller id.
– A node stops sending its own config
mesg as root if it has already decided
that it is not root. Then it only forwards
config messages from other node by
Prof . Aniruddha sahoo, KReSIT, IIT Bombay Hubs, switches and 4.14
adding a distance 1 to it.
bridges
Limitation of Bridges based
• Scalability solution
– Spanning tree
algorithm not
scalable, the
configuration
messages flood
entire extended LAN.

– Extended LAN
becomes single L2
broadcast domain.
• Separation of
traffic:
– Logical workgroups
but geographically
separated, want to be
on a same LAN
without
Prof . Aniruddha the
sahoo, above
KReSIT, IIT Bombay Hubs, switches and 4.15
problems bridges
• Operation
– Extended LAN in
Virtual LAN
partitioned into virtual
groups Vlan 200 W X
Vlan 100
– Each group given an id
( by administrator;
B1 B2
marketing group, admin
group) Vlan 200
– Each port of the switch Vlan 100 Y Z
belongs to atleast one vlan
id
– A host belongs to one
VLAN
– In the adjacent diagram
packets from vlan100 is
never sent to vlan200
• Dynamic topology:
– Membership can be
changed without changing
physical
Prof . Aniruddha topology.
sahoo, Z can
KReSIT, IIT Bombay Hubs, switches and 4.16
belong to vlan100. Only B2 bridges
Virtual LAN
• Tags
– Ethernet frames need to be tagged
– Protocol: 802.1 Q

Prof . Aniruddha sahoo, KReSIT, IIT Bombay Hubs, switches and 4.17
bridges
802.1 Q
• The tag is
inserted after
Ethernet
header either
by host or
Ingress switch

• Priority bits are


to implement
802.1 p
• 8 priority
Prof . Aniruddha sahoo, KReSIT, IIT Bombay Hubs, switches and 4.18
classes bridges
• TPID : Tag protocol ID
• CFI : Canonical Field Identifier

Prof . Aniruddha sahoo, KReSIT, IIT Bombay Hubs, switches and 4.19
bridges