Data Commu
Data Commu
ECEg- 4211
Arba Minch University
Arba Minch Institute of Technology
Faculty of Electrical and Computer Engineering
Chapter One
Introduction
Data Communications, Data Networks, and the Internet
Introduction
Effective and efficient data communication and networking facilities are
vital to any enterprise.
3
A Communications Model
Figure The communication between a workstation and a server over a public telephone network. 4
A Communications Model
Source
– generates data to be transmitted
Transmitter
– Converts data into transmittable signals
Transmission System
– Carries data
Receiver
– Converts received signal into data
Destination
– Takes incoming data
5
Communications Tasks
Transmission system utilization Addressing
Interfacing Routing
6
Networking
7
Two broad categories of communications networks:
8
Wide Area Networks (WANs)
10
Packet Switching
11
Frame Relay
12
Asynchronous Transfer Mode
13
Local Area Networks
14
LAN Topologies
15
Metropolitan Area Networks
MAN
middle ground between LAN and WAN
private or public network
high speed
large area – city or metro
16
The Internet
17
Internet Elements
18
Example Configuration
19
The Need for a Protocol Architecture
21
Layered Protocol Architecture
23
TCP/IP Protocol Architecture
24
TCP/IP Layers
Application
Transport
Internet
Network access /data link layer
Physical
26
Network Access / data link Layer
concerned with the exchange of data b/n an end system and the
network to which it is attached.
27
Internet Layer
29
Application Layer
30
Operation of TCP and IP
31
Addressing Requirements
32
Operation of TCP/IP
The addition of control information to data is referred to as encapsulation
The combination of data from the next higher layer and control information is
known as a protocol data unit (PDU)
33
Transmission Control Protocol (TCP)
34
User Datagram Protocol (UDP)
an alternative to TCP
no guaranteed delivery
no preservation of sequence
no protection against duplication
minimum overhead
adds port addressing to IP
35
TCP/IP Applications
36
Some TCP/IP Protocols
37
OSI Reference Model
39
Layer 1: Physical Layer
40
Layer 2: Data Link Layer
42
Layer 4: Transport Layer
43
Layer 5: Session layer
• Dialog control
• Allows two systems to enter into dialog
• It allows the communication between two processes to take place in
either half-duplex or full-duplex.
• Synchronization
• It allows a process to add checkpoints into a stream of data
• So that if a failure of some sort occurs between checkpoints, the
layer can retransmit all data since the last checkpoint. 44
Layer 6: Presentation layer
46
OSI Layers
47
OSI v TCP/IP
48
Data and Computer
Communications
Chapter 2
2.1 Data Transmission
Transmission Terminology
data transmission occurs between a
transmitter & receiver via some
transmission medium
guided medium
eg. twisted pair, coaxial cable, optical fiber
unguided / wireless medium
eg. air, water, vacuum
In both cases, communication is in the form
of electromagnetic waves.
Transmission Terminology
direct link- the transmission path between
two devices in which signals propagate
directly from transmitter to receiver
no intermediate devices
point-to-point
A guided transmission medium is point to point
direct link
only 2 devices share link
multi-point
more than two devices share the link
Transmission Terminology
A transmission may be
simplex
signals are transmitted in only one direction
• eg. television
half duplex
either direction, but only one way at a time
• eg. police radio
full duplex
both directions at the same time
• eg. telephone
Frequency, Spectrum and Bandwidth
electromagnetic signals used as a means to
transmit data
Signal is a function of time or frequency
time domain concepts
analog signal
• the signal intensity various in a smooth or continuous way
over time
• there are no breaks or discontinuities in the signal
digital signal
• maintains a constant level then changes to another
constant level
periodic signal
• pattern repeated over time
aperiodic signal
• pattern not repeated over time
Analogue & Digital Signals
Periodic
Signals
Sine Wave
The sine wave is the fundamental periodic signal
A general sine wave can be represented by three
parameters:
peak amplitude (A)
maximum strength of signal
volts
frequency (f)
rate of change of signal
Hertz (Hz) or cycles per second
period = time for one repetition (T)
T = 1/f
phase ()
relative position in time
Varying Sine Waves
s(t) = A sin(2ft +)
Wavelength ()
isdistance occupied by one cycle
between two points of corresponding
phase in two consecutive cycles
assuming signal velocity v have = vT
or equivalently f = v
especially when v=c
c = 3*108 ms-1 (speed of light in free space)
Frequency Domain Concepts
In practice, an electromagnetic signal will be
made up of many frequencies
components are sine waves
Fourier analysis can shown that any signal is
made up of component sine waves
By adding together enough sinusoidal signals,
each with the appropriate amplitude, frequency,
and phase, any electromagnetic signal can be
constructed.
Addition of
Frequency
Components
(T=1/f)
The signal
s(t)= 4/ [sin(2 f t) + 1/3
sin(2 (3f) t)] is made up
of two frequency
components
Frequency
Domain
Representations
signals
electric or electromagnetic representations of
data
signaling
physical propagation of the signal along a
suitable medium
transmission
communication of data by propagation and
processing of signals
Acoustic Spectrum (Analog)
Audio Signals
freq range 20Hz-20kHz (speech 100Hz-7kHz)
easily converted into electromagnetic signals
varying volume converted to varying voltage
can limit frequency range for voice channel to
300-3400Hz
Video Signals
USA - 483 lines per frame, at frames per sec
have 525 lines but 42 lost during vertical retrace
525 lines x 30 scans = 15750 lines per sec
63.5s per line
11s for retrace, so 52.5 s per video line
max frequency if line alternates black and white
horizontal resolution is about 450 lines giving
225 cycles of wave in 52.5 s
max frequency of 4.2MHz
Digital Data
asgenerated by computers etc.
has two dc components
bandwidth depends on data rate
Analog Signals
Digital Signals
Advantages & Disadvantages
of Digital Signals
cheaper
less susceptible to noise
but greater attenuation
digital now preferred choice
Transmission Impairments
Withany communications system, signal
received may differ from signal transmitted
due to various transmission impairments.
Analog signals - degradation of signal quality
Digital signals - bit errors may be introduced
most significant impairments are
attenuation and attenuation distortion
delay distortion
noise
Attenuation
where signal strength falls off with distance
depends on medium
received signal strength must be:
strong enough to be detected
sufficiently higher than noise to receive without error
so increase strength using amplifiers/repeaters
is also an increasing function of frequency
so equalize attenuation across band of
frequencies used
eg. using loading coils or amplifiers
Delay Distortion
only occurs in guided media
propagation velocity of a signal through a
guided medium varies with frequency
hence various frequency components
arrive at different times
particularly critical for digital data
since parts of one bit spill over into others
causing intersymbol interference
Noise
additionalsignals inserted between
transmitter and receiver
thermal
due to thermal agitation of electrons
uniformly distributed
white noise
intermodulation
signals that are the sum and difference of
original frequencies sharing a medium
Noise
crosstalk
a signal from one line is picked up by another
impulse
irregular pulses or spikes
• eg. external electromagnetic interference
short duration
high amplitude
a minor annoyance for analog signals
but a major source of error in digital data
• a noise spike could corrupt many bits
Channel Capacity
max possible data rate on comms channel
is a function of
data rate - in bits per second
bandwidth - in cycles per second or Hertz
noise - on comms link
error rate - of corrupted bits
All transmission channels of any practical
interest are of limited bandwidth due to
physical properties
want most efficient use of capacity
Nyquist Bandwidth
consider noise free channels
if rate of signal transmission is 2B then can carry
signal with frequencies no greater than B
ie. given bandwidth B, highest signal rate is 2B
for binary signals, 2B bps needs bandwidth B Hz
can increase rate by using M signal levels
Nyquist Formula is: C = 2B log2M
so increase rate by increasing signals
at cost of receiver complexity
limited by noise & other impairments
Shannon Capacity Formula
consider relation of data rate, noise & error rate
faster data rate shortens each bit so bursts of noise
affects more bits
given noise level, higher rates means higher errors
Shannon developed formula relating these to
signal to noise ratio (in decibels)
SNRdb=10 log10 (signal/noise)
Capacity C=B log2(1+SNR)
theoretical maximum capacity
get lower in practise
Summary
looked at data transmission issues
frequency, spectrum & bandwidth
analog vs digital signals
transmission impairments
Data and Computer
Communications
Chapter 2
2.2 Transmission Media
Overview
The transmission media that are used to convey
information can be classified as guided or unguided.
guided - twisted pair, coaxial cable, and optical
fiber
unguided – wireless e.g. air, water, vacuum
transmission impairments
Impairments, such as attenuation, limit the distance
interference
Interference from competing signals in overlapping
ground wave,
sky wave,
or line of sight (LOS).
Ground Wave Propagation
It is also known as surface wave propagation
Ground wave propagation more or less follows the
contour of the Earth and can propagate
considerable distances, well over the visual horizon
This effect is found in frequencies up to about
2 MHz.
Wireless Propagation
Ground Wave
Sky Wave Propagation
Sky wave propagation is used for amateur radio ,
CB radio and international broadcasts such as
BBC and Voice of America
With sky wave propagation, a signal from an
earth-based antenna is reflected from the ionized
layer of the upper atmosphere (ionosphere) back
down to Earth.
Sky wave propagation is used at 2MHz to 30MHz.
A sky wave signal can travel through a number
of hops, bouncing back and forth between the
ionosphere and the Earth’s surface
With this propagation mode, a signal can be
picked up thousands of kilometers from the
transmitter.
Wireless Propagation
Sky Wave
Line-of-Sight Propagation
Above 30 MHz, neither ground wave nor sky
wave propagation modes operate, and
communication must be by line of sight
For satellite communication, a signal above 30
MHz is not reflected by the ionosphere and
therefore a signal can be transmitted between
an earth station and a satellite overhead that is
not beyond the horizon.
Wireless Propagation
Line of Sight
Refraction
velocity of electromagnetic wave is a function of
density of material
~3 x 108 m/s in vacuum, less in anything else
speed changes as move between media
Index of refraction (refractive index) is
sin(incidence)/sin(refraction)
varies with wavelength
have gradual bending if medium density varies
density of atmosphere decreases with height
results in bending towards earth of radio waves
hence optical and radio horizons differ
Line of Sight Transmission
Free space loss
loss of signal with distance
Atmospheric Absorption
from water vapour and oxygen absorption
Multipath
multiple interfering signals from reflections
Refraction
bending signal away from receiver
Free Space Loss
Multipath Interference
Summary
looked at data transmission issues
frequency, spectrum & bandwidth
analog vs digital signals
transmission impairments
Data and Computer
Communications
2.3 – Signal Encoding Techniques
Signal Encoding Techniques
Digital Data, Digital Signal
Digital signal
discrete, discontinuous voltage pulses
each pulse is a signal element
binary data encoded into signal elements
Some Terms
unipolar
polar
data rate
duration or length of a bit
modulation rate
mark and space
Interpreting Signals
need to know
timing of bits - when they start and end
signal levels
factors affecting signal interpretation
signal to noise ratio
data rate
bandwidth
encoding scheme
Comparison of Encoding
Schemes
signal spectrum
clocking
error detection
signal interference and noise immunity
cost and complexity
Encoding Schemes
Nonreturn to Zero-Level
(NRZ-L)
two different voltages for 0 and 1 bits
voltage constant during bit interval
no transition I.e. no return to zero voltage
such as absence of voltage for zero, constant
positive voltage for one
more often, negative voltage for one value
and positive for the other
Nonreturn to Zero Inverted
nonreturn to zero inverted on ones
constant voltage pulse for duration of bit
data encoded as presence or absence of signal
transition at beginning of bit time
transition (low to high or high to low) denotes binary 1
no transition denotes binary 0
example of differential encoding since have
data represented by changes rather than levels
more reliable detection of transition rather than level
easy to lose sense of polarity
NRZ Pros & Cons
Pros
easy to engineer
make good use of bandwidth
Cons
dc component
lack of synchronization capability
used for magnetic recording
not often used for signal transmission
Multilevel Binary
Bipolar-AMI
Use more than two levels
Bipolar-AMI
zero represented by no line signal
one represented by positive or negative pulse
one pulses alternate in polarity
no loss of sync if a long string of ones
long runs of zeros still a problem
no net dc component
lower bandwidth
easy error detection
Multilevel Binary
Pseudoternary
one represented by absence of line signal
zero represented by alternating positive
and negative
no advantage or disadvantage over
bipolar-AMI
each used in some applications
Multilevel Binary Issues
synchronization with long runs of 0’s or 1’s
can insert additional bits, cf ISDN
scramble data (later)
not as efficient as NRZ
each signal element only represents one bit
• receiver distinguishes between three levels: +A, -A, 0
a 3 level system could represent log23 = 1.58 bits
requires approx. 3dB more signal power for same
probability of bit error
Manchester Encoding
has transition in middle of each bit period
transition serves as clock and data
low to high represents one
high to low represents zero
used by IEEE 802.
Differential Manchester
Encoding
midbit transition is clocking only
transition at start of bit period representing 0
no transition at start of bit period representing 1
this is a differential encoding scheme
used by IEEE 802.5
Biphase Pros and Cons
Con
at least one transition per bit time and possibly two
maximum modulation rate is twice NRZ
requires more bandwidth
Pros
synchronization on mid bit transition (self clocking)
has no dc component
has error detection
Modulation Rate
Scrambling
use scrambling to replace sequences that would
produce constant voltage
these filling sequences must
produce enough transitions to sync
be recognized by receiver & replaced with original
be same length as original
design goals
have no dc component
have no long sequences of zero level line signal
have no reduction in data rate
give error detection capability
B8ZS and HDB3
Digital Data, Analog Signal
main use is public telephone system
has freq range of 300Hz to 3400Hz
use modem (modulator-demodulator)
encoding techniques
Amplitude shift keying (ASK)
Frequency shift keying (FSK)
Phase shift keying (PK)
Modulation Techniques
Amplitude Shift Keying
encode 0/1 by different carrier amplitudes
usually have one amplitude zero
susceptible to sudden gain changes
inefficient
used for
up to 1200bps on voice grade lines
very high speeds over optical fiber
Binary Frequency Shift
Keying
most common is binary FSK (BFSK)
two binary values represented by two different
frequencies (near carrier)
less susceptible to error than ASK
used for
up to 1200bps on voice grade lines
high frequency radio
even higher frequency on LANs using co-ax
Multiple FSK
each signalling element represents more
than one bit
more than two frequencies used
more bandwidth efficient
more prone to error
Phase Shift Keying
phase of carrier signal is shifted to
represent data
binary PSK
two phases represent two binary digits
differential PSK
phase shifted relative to previous transmission
rather than some reference signal
Quadrature PSK
get
more efficient use if each signal
element represents more than one bit
eg. shifts of /2 (90o)
each element represents two bits
split input data stream in two & modulate onto
carrier & phase shifted carrier
can
use 8 phase angles & more than one
amplitude
9600bps modem uses 12 angles, four of
which have two amplitudes
QPSK and OQPSK
Modulators
Performance of Digital to
Analog Modulation Schemes
bandwidth
ASK/PSK bandwidth directly relates to bit rate
multilevel PSK gives significant improvements
in presence of noise:
bit error rate of PSK and QPSK are about 3dB
superior to ASK and FSK
for MFSK & MPSK have tradeoff between
bandwidth efficiency and error performance
Quadrature Amplitude
Modulation
QAM used on asymmetric digital subscriber line
(ADSL) and some wireless
combination of ASK and PSK
logical extension of QPSK
send two different signals simultaneously on
same carrier frequency
use two copies of carrier, one shifted 90°
each carrier is ASK modulated
two independent signals over same medium
demodulate and combine for original binary output
QAM Modulator
QAM Variants
two level ASK
each of two streams in one of two states
four state system
essentially QPSK
four level ASK
combined stream in one of 16 states
have 64 and 256 state systems
improved data rate for given bandwidth
but increased potential error rate
Analog Data, Digital Signal
digitization is conversion of analog data
into digital data which can then:
be transmitted using NRZ-L
be transmitted using code other than NRZ-L
be converted to analog signal
analog to digital conversion done using a
codec
pulse code modulation
delta modulation
Digitizing Analog Data
Pulse Code Modulation (PCM)
sampling theorem:
“If a signal is sampled at regular intervals at a
rate higher than twice the highest signal
frequency, the samples contain all information
in original signal”
eg. 4000Hz voice data, requires 8000 sample
per sec
strictly have analog samples
Pulse Amplitude Modulation (PAM)
so assign each a digital value
PCM Example
PCM Block Diagram
Non-Linear Coding
Companding
Delta Modulation
analog input is approximated by a
staircase function
can move up or down one level () at each
sample interval
has binary behavior
since function only moves up or down at each
sample interval
hence can encode each sample as single bit
1 for up or 0 for down
Delta Modulation Example
Delta Modulation Operation
PCM verses Delta Modulation
DM has simplicity compared to PCM
but has worse SNR
issue of bandwidth used
eg. for good voice reproduction with PCM
• want 128 levels (7 bit) & voice bandwidth 4khz
• need 8000 x 7 = 56kbps
data compression can improve on this
still growing demand for digital signals
use of repeaters, TDM, efficient switching
PCM preferred to DM for analog signals
Analog Data, Analog Signals
modulate carrier frequency with analog data
why modulate analog signals?
higher frequency can give more efficient transmission
permits frequency division multiplexing (chapter 8)
types of modulation
Amplitude
Frequency
Phase
Analog
Modulation
Techniques
Amplitude Modulation
Frequency Modulation
Phase Modulation
Summary
looked at signal encoding techniques
digital data, digital signal
analog data, digital signal
digital data, analog signal
analog data, analog signal
Chapter-3
3.1 Local Area Network Overview
LAN Applications (1)
personal computer LANs
low cost
limited data rate
back end networks
interconnecting large systems (mainframes and large
storage devices)
• high data rate
• high speed interface
• distributed access
• limited distance
• limited number of devices 1
LAN Applications (2)
storage area networks (SANs)
separate network handling storage needs
detaches storage tasks from specific servers
shared storage facility
• eg. hard disks, tape libraries, CD arrays
accessed using a high-speed network
• eg. Fibre Channel
improved client-server storage access
direct storage to storage communication for backup
2
Storage Area Networks
3
LAN Applications (3)
high speed office networks
desktop image processing
high capacity local storage
backbone LANs
interconnect low speed local LANs
reliability
capacity
cost
4
LAN Architecture
topologies
transmission medium
layout
medium access control
5
LAN Topologies
6
Bus and Tree
used with multipoint medium
transmission propagates throughout medium
heard by all stations
full duplex connection between station and tap
allows for transmission and reception
need to regulate transmission
to avoid collisions and hogging
terminator absorbs frames at end of medium
tree a generalization of bus
headend connected to branching cables
7
Frame
Transmission
on Bus LAN
8
Ring Topology
a closed loop of repeaters joined by point to
point links
receive data on one link & retransmit on another
links unidirectional
stations attach to repeaters
data in frames
circulate past all stations
destination recognizes address and copies frame
frame circulates back to source where it is removed
media access control determines when a station
can insert frame
9
Frame
Transmission
Ring LAN
10
Star Topology
each station connects to central node
usually via two point to point links , one for
transmission and one for reception
either central node can broadcast
physical star, logical bus
only one station can transmit at a time
or central node can act as frame switch
11
Choice of Topology
reliability
expandability
performance
needs considering in context of:
medium
wiring layout
access control
12
Bus LAN
Transmission Media (1)
twisted pair
early LANs used voice grade cable
didn’t scale for fast LANs
not used in bus LANs now
baseband coaxial cable
uses digital signalling
original Ethernet
13
Bus LAN
Transmission Media (2)
broadband coaxial cable
as in cable TV systems
analog signals at radio frequencies
expensive, hard to install and maintain
no longer used in LANs
optical fiber
expensive taps
better alternatives available
not used in bus LANs
less convenient compared to star topology
twisted pair
coaxial baseband still used but not often in
new installations 14
Ring and Star Usage
ring
very high speed links over long distances
single link or repeater failure disables network
star
uses natural layout of wiring in building
best for short distances
high data rates for small number of devices
15
Choice of Medium
constrained by LAN topology
capacity
reliability
types of data supported
environmental scope
16
Media Available
Voice grade unshielded twisted pair (UTP)
Cat 3 phone, cheap, low data rates
Shielded twisted pair / baseband coaxial
more expensive, higher data rates
Broadband cable
even more expensive, higher data rate
High performance UTP
Cat 5+, very high data rates, switched star topology
Optical fibre
security, high capacity, small size, high cost
17
LAN Protocol Architecture
18
IEEE 802 Layers (1)
Physical
encoding/decoding of signals
preamble generation/removal (for
synchronization)
bit transmission/reception
transmission medium and topology
19
IEEE 802 Layers (2)
Logical Link Control
interface to higher levels
flow and error control
Media Access Control
on transmit assemble data into frame
on receive disassemble frame
govern access to transmission medium
for same LLC, may have several MAC options
20
LAN Protocols in Context
21
Logical Link Control
transmission of link level PDUs between
stations
must support multiaccess, shared medium
but MAC layer handles link access details
addressing involves specifying source and
destination LLC users
referred to as service access points (SAP)
typically higher level protocol
22
LLC Services
based on HDLC
unacknowledged connectionless service
connection mode service
acknowledged connectionless service
23
LLC Protocol
modeled after HDLC
asynchronous balanced mode
connection mode (type 2) LLC service
unacknowledged connectionless service
using unnumbered information PDUs (type 1)
acknowledged connectionless service
using 2 new unnumbered PDUs (type 3)
permits multiplexing using LSAPs
24
MAC Frame Format
25
Media Access Control
where
central
• greater control, single point of failure
distributed
• more complex, but more redundant
how
synchronous
• capacity dedicated to connection, not optimal
asynchronous
• in response to demand 26
Asynchronous Systems
round robin
each station given turn to transmit data
reservation
divide medium into slots
good for stream traffic
contention
all stations contend for time
good for bursty traffic
simple to implement
tends to collapse under heavy load
27
MAC Frame Handling
MAC layer receives data from LLC layer
fields
MAC control
destination MAC address
source MAC address
LLC
CRC
MAC layer detects errors and discards frames
LLC optionally retransmits unsuccessful frames
28
Bridges
connects similar LANs
identical physical / link layer protocols
minimal processing
can map between MAC formats
reasons for use
reliability
performance
security
geography
29
Functions of a Bridge
Read all frames transmitted on one LAN and
accept those address to any station on the other
LAN
Using MAC protocol for second LAN, retransmit
each frame
Do the same the other way round
30
Bridge Function
31
Bridge Design Aspects
No modification to content or format of frame
No encapsulation
Exact bitwise copy of frame
Minimal buffering to meet peak demand
Contains routing and address intelligence
Must be able to tell which frames to pass
33
Connection of Two LANs
34
Bridges and
LANs with
Alternative
Routes
35
Fixed Routing
complex large LANs need alternative routes
for load balancing and fault tolerance
bridge must decide whether to forward frame
bridge must decide LAN to forward frame to
can use fixed routing for each source-destination
pair of LANs
done in configuration
usually least hop route
only changed when topology changes
widely used but limited flexibility
36
Spanning Tree
bridge automatically develops routing table
automatically updates routing table in
response to changes
three mechanisms:
frame forwarding
address learning
loop resolution
37
Frame Forwarding
maintain forwarding database for each port
lists 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
if not blocked, transmit frame through port Y
38
Address Learning
can preload forwarding database
when frame arrives at port X, it has come form
the LAN attached to port X
use source address to update forwarding
database for port X to include that address
have a timer on each entry in database
if timer expires, entry is removed
each time frame arrives, source address
checked against forwarding database
if present timer is reset and direction recorded
if not present entry is created and timer set
39
Spanning Tree Algorithm
address learning works for tree layout
in general graph have loops
for any connected graph there is a spanning tree
maintaining connectivity with no closed loops
IEEE 802.1 Spanning Tree Algorithm finds this
each bridge assigned unique identifier
exchange info between bridges to find spanning tree
automatically updated whenever topology changes
40
Loop of Bridges
41
Spanning Tree Algorithm
Address learning mechanism is effective if
the topology of the internet is a tree
Terminology
Root bridge: Lowest value of bridge identifier
Path cost: Associated with each port
Root port: Port to the root bridge
Root path cost: Cost of the path to root bridge
Designated bridge/port
Any active port that is not a root port or a
designated port is a blocked port
42
Spanning Tree Algorithm (cont)
Determine the root bridge
All bridges consider themselves to be the root
bridge, Each bridge will broadcast a BPDU on
each of its LAN the asserts this fact
Only the bridge with the lowest-valued identifier
will maintain its belief
Over time, as BPDU propagate, the identity of the
lowest-valued bridge identifier will be known to
all bridges
43
Spanning Tree Algorithm (cont)
Determine the root port on all other bridges
The root bridge will regularly broadcast the fact that it is
the root bridge on all of the LANs; It allows the bridges on
those LANs to determine their root port and the fact that
they are directly connected to the root bridge
Each of these bridges turn broadcasts a BPDU on the
other LANs to which it attached, indicating that it is one
hop away from the root bridge
C = 10 C=5
Bridge 3 Bridge 4
C = 10 C = 10 C=5
Bridge 1 LAN 5
C = 10
C=5
Bridge 5
C=5
LAN 1
C = 10
C=5
Bridge 2 C=5
LAN 3 LAN 4
45
Spanning Tree Algorithm (e.g.)
Bridge 1
Root Path Cost = 0
C = 10 C = 10
D D
LAN 1 LAN 2
R R
C=5 C=5
Bridge 5 Bridge 4
RPC = 5 RPC = 5
C=5 R C=5
C = 10 D
R
Bridge 3
C = 10 RPC = 10 LAN 5
Bridge 2
Root Path Cost = 10 C = 10
C=5 C=5
D D
R = root port
D = designated port
LAN 3 LAN 4
46
Hubs
Active central element of star layout
Each station connected to hub by two lines
Transmit and receive
intermediate
hubs (IHUB)
48
Buses, Hubs and Switches
bus configuration
all stations share capacity of bus (e.g. 10Mbps)
only one station transmitting at a time
hub uses star wiring to attach stations
transmission from any station received by hub and
retransmitted on all outgoing lines
only one station can transmit at a time
total capacity of LAN is 10 Mbps
can improve performance using a layer 2 switch
can switch multiple frames between separate ports
multiplying capacity of LAN 49
Shared
Medium
Bus and
Hub
50
Layer 2 Switch Benefits
no change to attached devices to convert bus
LAN or hub LAN to switched LAN
e.g. Ethernet LANs use Ethernet MAC protocol
have dedicated capacity equal to original LAN
assuming switch has sufficient capacity to keep up
with all devices
scales easily
additional devices attached to switch by increasing
capacity of layer 2
51
Types of Layer 2 Switch
store-and-forward switch
accepts frame on input line, buffers briefly,
routes to destination port
see delay between sender and receiver
better integrity
cut-through switch
use destination address at beginning of frame
switch begins repeating frame onto output line
as soon as destination address recognized
highest possible throughput
risk of propagating bad frames not able to 52
54
Router Problems
typically use subnetworks connected by routers
limits broadcasts to single subnet
supports multiple paths between subnet
two categories
packet by packet
flow based
56
Packet by Packet or
Flow Based
packet by packet
operates like a traditional router
order of magnitude increase in performance
compared to software-based router
flow-based switch
enhances performance by identifying flows of
IP packets with same source and destination
by observing ongoing traffic or using a special
flow label in packet header (IPv6)
a predefined route is used for identified flows
57
Typical
Large
LAN
Organization
Diagram
58
Summary
LAN topologies and media
LAN protocol architecture
bridges, hubs, layer 2 & 3 switches
59