Transcript Lec # 25

Lec # 25
Computer Network
Muhammad Waseem Iqbal
•
Learn about the Internetworking Devices
– Repeaters
– Hubs
– Switches
– Bridges
– Routers
Connecting Devices
Connecting devices
A Repeater in the OSI Model
Layer 1: Repeaters (1)
• Operates only in the physical layer.
• It receives the (weak) signal and regenerates the original
bit pattern.
• A repeater is a regenerator not an amplifier regenerate
and propagate signals.
• Used in Ethernet/ 802.3 LANs to extend the length of the
LAN.
• Length of Ethernet/ 802.3 LANs has restrictions.
– Restriction in signal quality.
– Segment exceeds max. Length  signal quality begins
to deteriorate.
Layer 1: Repeaters (2)
•
•
•
•
Transmits in both directions
No buffering
It connects segments of a single LAN.
It cannot connect two LANs using different protocols.
It is used within a single LAN.
• A repeater forwards every frame, it has no filtering
capability.
• Can be used to overcome the 10base5 Ethernet
length restriction.
Layer 1: Repeaters
Layer 1: Repeaters
Layer 1: Repeaters
• A repeater does not filter frames, e.g A’s Frame to B is
also received by C& D
Function of a Repeater
Layer 1: Hubs (1)
•
•
•
•
•
•
•
Unintelligent device works at the physical layer
Used in star topology of LAN e.g. Used in 10baseT
Can be called a multi-port repeater
All devices in the same collision domain
All devices in the same broadcast domain
Devices share the same bandwidth
With hubs, normally CSMA/CD is used
Layer 1: Hubs (2)
• Total network bandwidth is limited to the speed of the hub, i.e. a 10Base-T
hub provides 10Mb bandwidth max, no matter how many ports it has.
• Supports half duplex communications limiting the connection speed to
that of the port, i.e. 10Mb port provides a 10Mb link.
• Hop count rules limit the number of hubs that can be interconnected
between two computers.
• Hub retransmits incoming signal to all outgoing lines
• Only one station can transmit at a time
• With a 10mbps LAN, total capacity is 10mbps
Layer 1: Hubs (3)
.
Hubs
Network Domains
• Domain is referred to a specific area.
– In Networks those computers which come in a single domain can by
default communicate with each other.
• Broadcast Domain
– A range in which if a broadcast is done, all hear it.
– A broadcast domain is a set of NICs for which a broadcast frame sent
by one NIC is received by all other NICs in the same broadcast domain.
• Collision Domain
– A collision domain is a set of network interface cards (NICs) for which a
frame sent by one NIC could result in a collision with a frame sent by
any other NIC in the same collision domain.
Network Domains
• Any device with more broadcast domains is better, as it
can segment the network into multiple network
segments, reducing the broadcasts and thus improving
the efficiency in terms of time and load.
• Hubs
– Network becomes Half Duplex with Hubs
– Hubs supports a single collision domain (assume that at the
back plane/motherboard, there is a single road available for the
frames to travel)
•
Switch
– Network becomes Full Duplex with Switches
– Switch supports multiple collision domains (assume that at the
back plane/motherboard, there are as many roads are available
for the frames to travel as many devices are attached to the
switch)
Hubs
Hubs
A Bridge in the OSI Model
Bridges
• A bridge (or bridge-like device) 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 destination address in a frame and
either forwards this frame onto the next LAN or does not.
• The bridge examines the source address in a frame and places
this address in a routing table, to be used for future routing
decisions.
Layer 2: Bridges
• Connect separate networks together
– Make use of the network’s frame header, therefore
supports only networks that have exactly the same
format for addresses
• Mac-layer bridges: connect networks of the same type
(Ethernet to Ethernet)
• Link-layer bridges: connect different network types (e.G.
Ethernet to 802.5 rings)
• Maps Ethernet addresses of the nodes residing on
each network segment
• Filtering device  allows only necessary traffic to
pass through the bridge
Bridge From 802.3 to 802.3
~
~
~
~
Bridge From 802.3 to 802.5
Layer 2: Bridges
Layer 2: Bridges
Most widely adopted types of bridges
• Transparent bridges
– Makes all routing decisions
– Used in Ethernet/802.3 networks
– Operate in promiscuous mode accepting every
transmitted frame
– Easy to install
• Source routing bridges
– End stations perform major route-finding
– Used in token ring networks
• Main difference between them: routing algorithm
Why Bridges?
• Reliability
– Large LAN can be partitioned: fault will only
affect small segment
• Performance
– Traffic can be distributed: decrease amount of
contention
• Security
– Different security needs on physically separate
media
Function of a Bridge
Bridge Operation: Learning example
Suppose C sends frame to D and D replies back with frame to C.
I
H
A
1
B
C
J
F
3
bridge
address
2
port
A
1
B
1
E
2
H
3
J
3
C
1
E
D
• C sends frame,
bridge has no info
about D, so floods
both LANs
– bridge notes that C is
on port 1
– frame ignored in
upper LAN
• frame received by D
Bridge Operation: Learning Example
I
H
J
A
F
1
B
C
3
bridge
address
2
E
port
A
1
B
1
E
2
H
3
J
3
C
1
D
2
D
• 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
Transparent Bridges
• A transparent bridge does not need programming but
observes all traffic and builds routing tables from this
observation.
• This observation is called backward learning.
• Each bridge has two connections (ports) and there is a routing
table associated with each port.
• A bridge observes each frame that arrives at a port, extracts
the source address from the frame, and places that address in
the port’s routing table.
• A transparent bridge is found with CSMA/CD LANs.
Layer (2): Switch (1)
• A switch is a combination of a hub and a bridge.
• It can interconnect two or more workstations, but like a
bridge, it observes traffic flow and learns.
• When a frame arrives at a switch, the switch examines the
destination address and forwards the frame out the one
necessary connection.
• Workstations that connect to a hub are on a shared segment.
• Workstations that connect to a switch are on a switched
segment.
Layer (2): Switch (2)
• Total network bandwidth is determined by the number of ports on the
switch. i.e. an 8 port 100Mb switch can support up to 800Mb/s
bandwidth.
• Supports full duplex communications. This allows devices to both transmit
and receive data at the same time, thereby doubling traffic capacity and
avoiding packet collisions.
• Switch allows users to greatly expand networks; there are no limits to the
number of switches that can be interconnected between two computers.
• Switch hub's increased performance is worth the slightly higher price.
MAC address Table
• Switches reduce network overhead by forwarding traffic from
one segment to another only when necessary.
• To decide whether to forward a frame, the switch uses a
dynamically built table called a bridge table or MAC address
table.
• The switch examines the address table to decide whether it
should forward a frame.
Bridges and Switches Similarities
• Both are called Layer 2 devices (Data Link
Layer)
• Both filters the traffic on the basis of MAC
address
• Each segment has its own collision
domain
• All segments are in the same broadcast
domain.
Bridges and Switches
• The basic 5 operations:
– Learning
– Forwarding
– Flooding
– Filtering
– Aging
Switches / Bridges
• Forwarding Decisions:
– If Source and Destination LANs are same,
discard the frame
– If Source and Destination LANs are different,
forward the frame
– If Destination LAN is unknown, use flooding.
Bridges/Switches Operations
• Learning
– The switch learns MAC addresses by examining the source
MAC address of each frame it receives.
– Switches build the MAC address table by listening to
incoming frames and examining the frame’s source MAC
address.
– If a frame enters the switch, and the source MAC address is not in the
address table, the switch creates an entry in the table.
– The MAC address is placed in the table, along with the interface in
which the frame arrived.
– By learning, the switch can make good forwarding choices in the
future.
Bridges/Switches Operations
• Flooding
– Bridges forward LAN broadcast frames, and
unknown unicast frames, out all ports.
– The switch floods the frame with the hope that
the unknown device will be on some other
Ethernet segment, it will reply, and the switch
will build a correct entry in the address table.
Bridges/Switches Operations
• Forwarding
– The switch decides when to forward a frame
based on the destination MAC address.
– The switch looks at the previously learned
MAC addresses in an address table to decide
where to forward the frames.
Bridges/Switches Operations
•
Filtering
– A switch generally does filtering along with forwarding
– There are two cases
• When the source and destination devices exist on the same
interface (port) of bridge/switch, then the bridge/switch will filter
the frame and doesn’t pass it to any other interface
• If source and destination are on different interfaces, and the
destination port is known, then the frame is forwarded to only the
destination interface and it will be filtered or not sent on the
remaining interfaces.
Bridges/Switches Operations
• Aging
– By default, every switch keeps the entry of a
computer in its table for 5 minutes. After 5
minutes or aging time, the entry is deleted
from the table, assuming that the device
doesn’t exit on the network.
– (This is useful, if a device is disconnected
from the network, or moved from one
segment to another.)
Switches and Bridges
Switches and Bridges
Switches and Bridges
Switch Forwarding Techniques
• Cut-through switching.
• Store and forward switching.
• Fragment free switching.
– This technology combines the features of the above two
switching modes.
– In essence, this technology lies between the above two
switching technologies.
• Most switches today use one of the following:
– Cut-through switching—or.
– Store-and-forward switching.
Cut-Through Switches
• begin transmitting a frame to destination node as
soon as switch identifies the destination node's
address
• delay is less than store-and-forward
• propagate errors because no integrity checks are
done beforehand
• also available a combination of store-and-forward
and cut-through  hybrid switch
HUB & Switch
.
HUB & Switch
• The main difference between hubs and
switches is the bandwidth available to
network users.
Routers
A Router Is Layer 3 i.e. Network Layer Device
It Doesn’t Support Broadcasting
Each Segment Has Separate Collusion and Broadcast
Domains.
Use Layer 3 Addresses : IP Addresses
Main Function Performed Is Routing Using the IP Addresses
Maintains Routing Tables, ARP Caches.
Exchanges Information With Other Routers
Responsible for Routing the Packet From Source Network to
the Destination Network.
Router Functionality
• Like bridges, filtering and forwarding rates are often used as router
performance measures
• Unlike bridges, routers only process packets that are addressed to them
– Also unlike bridges, forwarding decisions are based on destination addresses
in network layer packet headers
• Routers can also be used to limit access to a network; many have firewall
capabilities
• Multiprotocol routers are capable of forwarding messages using more
than one network layer protocols
• Encapsulation may be used to enable non-routable data link protocols,
such as SDLC, to be routed over TCP/IP networks
Network Device Domains