0% found this document useful (0 votes)
97 views35 pages

Repeaters, Bridges, Hubs, Switches: Mahadev Gawas

The document discusses network bridges and spanning trees. It describes how bridges operate at the data link layer to connect network segments and filter packets to isolate traffic. Bridges learn MAC addresses to populate forwarding tables and can forward frames selectively to reduce broadcast traffic. However, multiple bridges can cause network loops, so spanning tree algorithms are used to establish a logical topology without loops by selecting which bridge ports participate.

Uploaded by

uasphurthi
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views35 pages

Repeaters, Bridges, Hubs, Switches: Mahadev Gawas

The document discusses network bridges and spanning trees. It describes how bridges operate at the data link layer to connect network segments and filter packets to isolate traffic. Bridges learn MAC addresses to populate forwarding tables and can forward frames selectively to reduce broadcast traffic. However, multiple bridges can cause network loops, so spanning tree algorithms are used to establish a logical topology without loops by selecting which bridge ports participate.

Uploaded by

uasphurthi
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 35

Computer Networks

An Engineering Design Approach

Repeaters, Bridges, Hubs, Switches


1

MAHADEV GAWAS LECTURER


COMPUTER SCIENCE & INFORMATION SYSTEMS GROUP
BIRLA INSTITUTE OF TECHNOLOGY & SCIENCE, PILANI, GOA CAMPUS

mahadev@bits-goa.ac.in
Network hub
2

 A network hub is a device for connecting multiple


twisted pair or fiber optic Ethernet devices together
and thus making them act as a single network
segment.
 Hubs work at the physical layer (layer 1) of the OSI
model.
 Hubs do not manage any of the traffic that comes
through them, and any packet entering any port
is broadcast out on all other ports.

mahadev@bits-goa.ac.in
Hubs connecting segments
3

mahadev@bits-goa.ac.in
Bridges
4

 Bridges operate at the data link layer (Layer 2) of the OSI model.

 A bridge can be used to connect two similar LANs, such as two


CSMA/CD LANs.
 A bridge can also be used to connect two closely similar LANs,
such as a CSMA/CD LAN and a token ring LAN.
 The bridge examines the source address in a frame and places
this address in a routing table, to be used for future routing
decisions.
Bridges reduce the amount of traffic on a LAN by
dividing it into two segments.
mahadev@bits-goa.ac.in
A bridge interconnecting two dissimilar LANs

mahadev@bits-goa.ac.in 5
Bridge interconnecting two identical LANs

mahadev@bits-goa.ac.in 6
To determine the network segment a MAC address
belongs to, bridges use one of the following:
7

 Transparent Bridging - They build a table of addresses


(bridging table) as they receive packets. If the address is not
in the bridging table, the packet is forwarded to all
segments other than the one it came from. This type of
bridge is used on Ethernet networks.

 Source route bridging - The source computer provides path


information inside the packet. This is used on Token Ring
networks.

mahadev@bits-goa.ac.in
Disadvantages of network bridges
8

Does not limit the scope of broadcasts .

Does not scale to extremely large networks.

Bridging of different MAC protocols introduces errors.

mahadev@bits-goa.ac.in
Bridges: traffic isolation
5a-9

 Bridge installation breaks LAN into LAN segments


 bridges filter packets:
 same-LAN-segment frames not usually forwarded onto
other LAN segments
 segments become separate collision domains

collision collision = hub


bridge
domain domain = host

LAN segment LAN segment

LAN (IP network)

mahadev@bits-goa.ac.in
Filtering/Forwarding
5a-
10

When bridge receives a frame:

index bridge table using MAC dest 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
}
forward on all but the interface
else flood on which the frame arrived

mahadev@bits-goa.ac.in
71:2B:13:45:61:41 71:2B:13:45:61:13

71:2B:13:45:61:42 71:2B:13:45:61:12

1 2
Bridge

71:2B:13:45:61:13
71:2B:13:45:61:41 71:2B:13:45:61:13

LAN 1 LAN 2

Address Port
71:2B:13:45:61:41 1
71:2B:13:45:61:41 1 Forwarding
71:2B:13:45:61:12 2 Table
71:2B:13:45:61:13 2
Bridge example
5a-
12
Suppose C sends frame to D and D replies back with
frame to C.

 Bridge receives frame from C


 notes in bridge table that C is on interface 1
 because D is not in table, bridge sends frame into
interfaces 2 and 3
 frame received by D
mahadev@bits-goa.ac.in
Bridge Learning: example
5a-
13

 D generates frame for C, sends

 bridge receives frame

 notes in bridge table that D is on interface 2


 bridge knows C is on interface 1, so selectively forwards
frame to interface 1

mahadev@bits-goa.ac.in
Spanning Tree
5a-
14

 Bridge automatically develops routing table


 Automatically update in response to changes
 Frame forwarding
 Address learning
 Loop resolution

5: DataLink Layer
Frame forwarding
5a-
15

Maintain forwarding database for each port


 List station addresses reached through each port
For a frame arriving on port X:
 Search forwarding database to see if MAC address is
listed for any port except X
 If address not found, forward to all ports except X
 If address listed for port Y, check port Y for blocking
or forwarding state
 Blocking prevents port from receiving or transmitting
 If not blocked, transmit frame through port Y

5: DataLink Layer
Address Learning
5a-
16

When frame arrives at port X, it has come form 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 (reset whenever
frame received)
Each time frame arrives, source address checked
against forwarding database.

5: DataLink Layer
Loop of Bridges
5a-
17

5: DataLink Layer
LAN 1
A B
AD
AD

1 1
Address Port Address Port
A 1 Bridge1 Bridge2 A 1

2 2

AD AD

C D

Loops
Loop Resolving
5a-
19

 The simple learning mechanism described fails in


presence of loops in the LAN.
 Loops may be present by mistake, or deliberately
provided for redundancy.
 This problem is resolved by running a distributed
spanning tree algorithm.

5: DataLink Layer
Spanning Tree Algorithm
5a-
20

 Creates a logical, or “active” topology that


behaves like a spanning tree
 Makes alternate bridges redundant
 Is run periodically, so will discover failures and use
alternate bridges if necessary

5: DataLink Layer
Spanning tree

 Think of the LAN as a graph that possibly has loops


(LAN segments as nodes, bridges as edges)
 The spanning tree is a sub graph of this graph that covers
all vertices (LAN segments), but contains no cycles.

(a) (b)

5: DataLink Layer
Spanning tree algorithm

 Spanning tree algorithm is a protocol used by a set of


bridges to agree upon a spanning tree for a particular
extended LAN.
 Essentially, this means that each bridge decides the ports
over which it is and is not willing to forward packets.
 Some ports (or even entire bridges) may not participate in
a spanning tree.
 How does the bridge select the ports to include
(/exclude)?

5: DataLink Layer
Spanning Tree Algorithm
5a-
23

Working: Bridges regularly exchange the configuration


messages which contain three pieces of information:

1 the id for the bridge that is sending the message


2 the id for what the sending bridge believes to be the root
bridge
3 the distance, measured in hops, from the sending bridge to
the root bridge

5: DataLink Layer
Algorithm...

1. Once root port is determined, one bridge port is


selected for each LAN segment as the designated
bridge port (DP) over which frames will be sent
for that LAN segment.
a) This is a port (which is NOT a root port)
which has the least path cost to the root.
b) The ports of the root bridge are always DPs
for the LAN segments connected to the root
bridge.

5: DataLink Layer
Example:

A A

B B
B3 B3
C B5 C B5

D B7 D B7
B2 K B2 K

E F E F

B1 B1

G H G H

B6 B6
B4 B4
I I
J J

5: DataLink Layer
Example: working

 B1 is the root bridge .


 B3 and B5 are both connected to LAN A, but B5
is the designated port since it's closer to root.
 B5 and B7 are both connected to LAN B, but
B5 is the designated port due to smaller ID (equal
distance).

5: DataLink Layer
Topology Initialization
5a-
27

BPDUs are sent to a broadcast MAC address of all bridges on the


LAN
All bridges initially assume they are the root bridge
A bridge updates its own info if it receives an update which
 identifies a root with smaller id or
 identifies a root with equal id but with shorter distance
 the root id and distance are equal, but the sending bridge has a
smaller id

The bridge adds 1 to the received RPC in the above update and
saves this info.

5: DataLink Layer
Initialization...

 When a bridge determines that it's not the root


bridge, it stops generating messages on its
own and only forwards configuration
messages from others.
 Also, when a bridge determines that it's the DP for
that LAN, it stops sending messages on that
port.
 When the system stabilizes, only the root is
generating messages, and the messages are
forwarded over only the spanning tree.

5: DataLink Layer
Example:

A A

B B
B3 B3
C B5 C B5

D B7 D B7
B2 K B2 K

E F E F

B1 B1

G H G H

B6 B6
B4 B4
I I
J J

5: DataLink Layer
Bridges vs. Routers
5a-
30
 both store-and-forward devices
 routers: network layer devices (examine network layer headers)
 bridges are link layer devices
 routers maintain routing tables, implement routing
algorithms
 bridges maintain bridge tables, implement filtering,
learning and spanning tree algorithms

5: DataLink Layer
Repeater

 A repeater can be used to increase the length of your


network by eliminating the effect of attenuation on the
signal.

 It connects two segments of the same network, overcoming


the distance limitations of the transmission media.
 Disadvantages
 Repeaters do not filter data

 Its use is inappropriate when there is a heavy network


traffic.
Application Application

Transport Transport

Network Network

Data link Data link

Physical Repeater/Hub Physical


Repeater

Segment 1 Segment 2
Repeater
 Connects two LAN segments
Does not connect two LANs
 Repeater forwards all packets
Does not filter the packets
 It is a regenerator
It is not an amplifier
Repeater

Amplifier

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy