COMPUTER COMMUNICATION NETWORK (BECE401L)
Module II
Dr. Naveen Mishra
Department of Communication Engineering
School of Electronics Engineering
VIT University
Network devices: Separating (connecting) networks or
expanding network. e.g. repeaters, hubs, bridges, routers, brouters,
switches, gateways
2
Expanding Network
Networks cannot be made larger by simply adding new
computers and more cables.
Less efficient !!
Can install components to
(i)segment (divide) large LAN to form smaller LANs.
(ii) connect LANs
Required components: Repeaters, bridges, routers,
brouters, switches or gateways
4
Limitations and Features
• Cannot link unlike segments
• Cannot join segments with different access
methods (e.g. CSMA/CD and token passing)
• Do not isolate and filter packets
• Can connect different
types of media
• The most economic
way of expanding
networks
6
Bridges
A bridge in a computer network is a device used to connect multiple
LANs together with a larger Local Area Network (LAN). The
mechanism of network aggregation is known as bridging. The bridge is a
physical or hardware device but operates at the OSI model’s data link
layer and is also known as a layer of two switches.
7
Bridges
• Has one input and one output
• Used to isolate network traffic and computers
• Has the intelligent to examine incoming packet
source and destination addresses
• But cannot interpret
higher- level
information .
Hence
• cannot filter packet
according to its
protocol.
8
How Bridges Work
• Bridges work at the Media Access Control Sub-
layer of the OSI model
• Routing table is built to
record the segment no. of
address
• If destination address is
in the same segment as
the source address, stop
transmit
• Otherwise, forward to
the other segment
9
Bridges Vs Repeaters
Repeaters Bridges
OSI layer Physical layer Data link layer
Data Regenerate data at Regenerate data
regeneration the signal level at the packet level
Reduce network No Yes
traffic
11
Switches
• Switches operate at the Data Link layer (layer
2) of the OSI model
• Can interpret address information
• Switches resemble bridges and can be
considered as multiport bridges
• By having multiports,
can better use limited
bandwidth and prove
more cost-effective than
bridge
12
Advantages - Switches
• Switches divide a network into several isolated
channels (or collision domains)
• Reduce the possibility of collision
• Collision only occurs when two devices try to get
access to one channel
• Can be solved by buffering one of them for later
access
• Each channel has its own network capacity
• Suitable for real-time applications, e.g. video
conferencing
• Since isolated, hence secure
• Data will only go to the destination, but not others
14
Limitations - Switches
• Although contains buffers to accommodate bursts
of traffic, can become overwhelmed by heavy
traffic
• Device cannot detect collision when buffer full
• CSMA/CD scheme will not work since the data
channels are isolated, not the case as in Ethernet
• Some higher level protocols do not detect error
• E.g. UDP
• Those data packets are continuously pumped
to the switch and introduce more problems
15
Routers
• Layer 2 Switches cannot take advantage of
multiple paths
• Routers work at the OSI layer 3 (network layer)
• They use the
“logical address”
of packets and
routing tables to
determine the best
path for data
delivery
16
How Routers Work
• As packets are passed from routers to routers, Data
Link layer source and destination addresses are
stripped off and then recreated
• Enables a router to route a packet from a TCP/IP
Ethernet network to a TCP/IP token ring network
• Only packets with known network addresses will be
passed - hence reduce traffic
• Routers can listen to a network and identify its
busiest part
• Will select the most cost effective path for
transmitting packets
17
Hubs, Bridges & Routers
Interconnecting Hubs
◦ Repeater: Signal regeneration
Two or more network at Physical layer.
All traffic appears in both LANs
◦ Bridge: MAC address filtering
Two or more network at Data link layer.
Local traffic stays in own LAN
Higher
Scalability
◦ Routers: Internet routing
Two or more network at Network layer.
All traffic stays in own LAN
?B/R
Hub Hub
Two Twisted Two Twisted
Pairs Pairs
Station Station Station Station Station Station
21
Summary
• Repeaters are the least expensive way to expand a
network, but they are limited to connecting two
segments
• Bridges function similar to repeaters, but can
understand the node addresses
• Switches can be considered as multiport bridges,
can divide a network into some logical channels
• Routers interconnect networks and provide filtering
functions. They can determine the best route
22
L A N Bridges
Bridge
⚫ Connects two or more networks at data link
layer
⚫ Interconnects multiple LAN’s to form a
bridged LAN or an extended LAN
Types of Bridges
⚫ TransparentBridge – Used in Ethernet LANs
⚫ Source Routing Bridge –Used in Token- ring
and Fiber Distributed Data Interface (FDDI)
networks
Transparent Bridge
⚫ Defined by IEEE 802.1D committee.
◦ 802.1D is the IEEE MAC Bridges standard which
includes Bridging, Spanning Tree . S1 S2 S3
⚫ Performs three major functions
LAN1
- Forwards frames from one LAN to another
- Learns the location of the stations in the Bridge
LAN LAN2
- Prevents loops in the topology
A transparent bridge is a bridge in which the stations are completely unaware of the
bridge's existence. If a bridge is added or deleted from the system, reconfiguration of S4 S5 S6
the stations is unnecessary.
⚫ Interconnection of IEEE LANs with
complete transparency
⚫ Use table lookup, and
◦ discard frame, if source & destination
in same LAN
◦ forward frame, if source & destination in S1 S2 S3
different LAN
◦ use flooding, if destination unknown
LAN1
◦ Traffic is local: (load on each LAN is
reduced) Bridge
⚫ Use backward learning to build table LAN2
◦ observe source address of arriving LANs
◦ handle topology changes by removing
old entries S6
S4 S5
Bridge Learning
⚫ Frame arrives on one of its ports, the bridges has to decide
whether to forward the incoming frame to another port
based on destination address.
⚫ Bridge need a table to indicate which side of the port of the
destination----Forwarding Table
⚫ Needs forwarding table which contains station address
along with its port number .
Filling of Forwarding Table
Can be done in two ways
-Network administrator can record the station address and load them during
system startup
Disadvantage -Entry has to be done manually
-When bridge receives a frame, it compares source address of the frame with each
entry in the forwarding table
◦ If the match is not found, it adds the source address along with the port
number on which the frame was received in the table
-Later, it compares the destination address of the frame with each entry in the
forwarding table
◦ If the match is found, it forwards the frame to the port indicated in the entry
◦ If the match is found and also if the port is the one on which the frame was
received, no forwarding is required and the frame is discarded
◦ If match is not found, it floods the frame on all ports except the one on which the
frame was received.
Example
Five stations (S1-S5) are connected to an extended LAN through
transparent bridges (B1 and B2), as shown in the figure below. Initially,
the forwarding tables are empty. Suppose the following stations
transmit frames: S1 transmits to S5, S3 transmits to S2, S4 transmits to
S3 and S2 transmits to S1. Fill in the forwarding tables with
appropriate entries after the frames have been completely
transmitted.
S1 S2 S3 S4 S5
LAN1 LAN2 LAN3
B1 B2
Port 1 Port 2 Port 1 Port 2
S1 S2 S3 S4 S5
LAN1 LAN2 LAN3
B1 B2
Port 1 Port 2 Port 1 Port 2
Frame B1 B2
Transmission Address Port No Action Address Port No Action
S1 S2 S3 S4 S5
S1 to S5 S1 to S5 S1 to S5 S1 to S5
LAN1 LAN2 LAN3
B1 B2
Port 1 Port 2 Port 1 Port 2
Frame B1 B2
Transmission Address Port No Action Address Port No Action
S1-> S5 S1 1 Flood S1 1 Flood
S1 S2 S3 S4 S5
S3S2 S3S2 S3S2
S3S2 S3S2
LAN1 LAN2 LAN3
B1 B2
Port 1 Port 2 Port 1 Port 2
B1 B2
Frame
Transmission Port
Address Port No Action Address Action
No
S1-> S5 S1 1 Flood S1 1 Flood
S3->S2 S3 2 Flood S3 1 Flood
S1 S2 S3 S4 S5
S4S3
S4S3 S4S3
LAN1 LAN2 LAN3
B1 B2
Port 1 Port 2 Port 1 Port 2
Frame B1 B2
Transmission Address Port No Action Address Port No Action
S1-> S5 S1 1 Flood S1 1 Flood
S3->S2 S3 2 Flood S3 1 Flood
S4->S3 S4 2 Discard S4 2 Forward
WHILE WRITING THE NODE WE LOOK AT THE INPUT OF THE SIGNAL I.E, FROM THE NODE
WHERE THE INFORMATION IS ENTERING
S1 S2 S3 S4 S5
S2S1
LAN1 S2 S1 LAN2 LAN3
B1 B2
Port 1 Port 2 Port 1 Port 2
Frame B1 B2
Transmission Address Port No Action Address Port No Action
S1-> S5 S1 1 Flood S1 1 Flood
S3->S2 S3 2 Flood S3 1 Flood
S4->S3 S4 2 Discard S4 2 Forward
S2->S1 S2 1 Discard - - -
THE REASON WHY B2 IS EMPTY IN THE LAST CASE IS BECAUSE THE TABLE AREADY KNOWS
THE LOCATION OF S1
Five stations (S1-S5) are connected to an extended LAN through
transparent bridges (B1 and B2), as shown in the figure below.
Initially, the forwarding tables are empty. Suppose the
following stations transmit frames: S2 transmits to S1, S5
transmits to S4, S3 transmits to S5, S1 transmits to S2, and S5
transmits to S4. Fill in the forwarding tables with appropriate
entries after the frames have been completely transmitted.
Adaptive Learning
⚫ In a static network, tables eventually store all
addresses & learning stops.
⚫ In practice, stations are added & moved all the time
• 🞄 Introduce timer (minutes) to age each entry & force it
to be relearned periodically
• 🞄 If frame arrives on port that differs from frame address
& port in table, update immediately
Loop problem
• Transparent bridges work fine as long as there are
no redundant bridges in the system.
• Systems administrators, however, like to have
redundant bridges (more than one bridge between
a pair of LANs) to make the system more reliable.
• If a bridge fails, another bridge takes over until the
failed one is repaired or replaced.
• Redundancy can create loops in the system, which
is very undesirable.
Example
1. Station A sends a frame to station D. The tables of both
bridges are empty. Both forward the frame and update
their tables based on the source address A.
2. Now there are two copies of the frame on LAN 2. The
copy sent out by bridge 1 is received by bridge 2,
which does not have any information about the
destination address D; it floods the bridge. The copy
sent out by bridge 2 is received by bridge 1 and is sent
out for lack of information about D. Note that each
frame is handled separately because bridges, as two
nodes on a network sharing the medium, The tables of
both bridges are updated, but still there is no
information for destination D.
3. Now there are two copies of the frame on LAN 1. Step 2
is
repeated, and both copies flood the network.
4. The process continues on and on. Note that bridges are
also repeaters and regenerate frames. So in each
iteration, there are newly generated fresh copies of
the frames.
Avoiding Loops
LAN1
(1) (1)
B1 B2
•Learning process of a bridge works well
as long as the network does not contain
(2) any loops
B3
LAN2 • Disadvantage of loops is that when
each frame is flooded, it will trigger the
B4 next frame flood causing broadcast
storm and finally brings down the entire
network
LAN3
•To remove loops IEE 802.1 committee
B5 specified an algorithm called Spanning
Tree Algorithm
LAN4
39
Spanning Tree Algorithm
1. Select a root bridge (Root of the Spanning Tree) among all
the bridges (Bridge ID= 8 bytes).
• root bridge = the lowest bridge ID.
• Bridge ID is 8 bytes long in which 2 bytes (priority) and 6
bytes (MAC)
2. Determine the root port for each bridge except the root bridge
• root port = port with the least-cost path to the root bridge
• In case of ties the root port is one with lowest port ID.
• Find the shortest path to the root
40
•Port ID = priority (4 bits) + ID (Interface number) (12 bits); the default port
priority is 128.
41
3. Select a designated bridge and port for each LAN
designated bridge = bridge has least-cost path from the LAN
to the root bridge.
designated port connects the LAN and the designated
bridge.
In case of ties the designated bridge is one with lowest
bridge ID
4. All root ports and all designated ports are placed into a
“forwarding” state. These are the only ports that are allowed to
forward frames. The other ports are placed into a “blocking”
state.
42
LAN1
(1) (1)
B1 B2
(1)
(2) (2) (3)
B3
LAN2 (1) (2)
B4
(2)
LAN3 (1)
B5
(2)
LAN4
43
LAN1
(1) (1) Bridge 1 selected as root bridge
B1 B2
(1)
(2) (2) (3)
B3
LAN2 (1) (2)
B4
(2)
LAN3 (1)
B5
(2)
LAN4
44
LAN1
(1) R (1)
B1 B2 Root port selected for every
R
(1) bridge except root bridge
(2) (2) (3)
B3
LAN2 R (1) (2)
B4
(2)
LAN3 R (1)
B5
(2)
LAN4
45
LAN1
D (1) R (1)
B1 B2 Select designated bridge
R
(1) for each LAN
D (2) (2) (3)
B3
LAN2 R (1)
D (2) D
B4
(2)
LAN3 R (1)
B5
(2)
LAN4
46
LAN1
D (1) R (1)
B1 B2 All root ports & designated
R
(1) ports put in forwarding state
D (2) (2) (3)
B3
LAN2 R (1)
D (2) D
B4
(2)
LAN3 R (1)
B5
(2)
LAN4