Professional Documents
Culture Documents
COMMUNICATION
AND NETWORKING
UTTAM K. ROY
Books
• Andrew S. Tanenbaum, “Computer Networks”, Prentice Hall of
India publication
Introduction
Definition
Collection of (autonomous) computers connected by some
fashion
Example
network edge:
applications and
hosts
network core:
routers
network of networks
access networks,
physical media:
communication
links
client/server model
client host requests,
receives service from
always-on server
e.g. Web browser/server;
email client/server
peer-peer model:
minimal (or no) use of
dedicated servers
© Copyright 2007, U. K. Roy, IT, JU
Data Communication and Networking 8
no flow control
App’s using UDP:
no congestion control
streaming media,
teleconferencing,
DNS, Internet
telephony
End-end resources
reserved for “call”
link bandwidth,
switch capacity
dedicated resources:
no sharing
circuit-like
(guaranteed)
performance
call setup required
time division
pieces allocated to
calls
resource piece idle
if not used by
owning call (no
sharing)
Example:
FDM
4 users
frequency
time
TDM
frequency
time
© Copyright 2007, U. K. Roy, IT, JU
Data Communication and Networking 14
Numerical example
How long does it take to send a file of
640,000 bits from host A to host B over
a circuit-switched network?
All links are 1.536 Mbps
Each link uses TDM with 24 slots/sec
500 msec to establish end-to-end circuit
Resource reservation
1.5 Mb/s
B
queue of packets
waiting for output
link
D E
Packet-switching: store-and-forward
L
R R R
Communication Model
Source
generates data to be transmitted—telephones, PC etc.
Transmitter
Converts data into transmittable signals—MODEM, CODEC etc
Transmission System
Carries data
Receiver
Converts received signal into data
Example
• Modem
Destination
Takes incoming data
Routing
Destinatio
n
Sourc
e
Protocols
High degree of cooperation is needed
between two communicating parties
Entities
User applications
e-mail facilities
Computer
Terminal
Remote sensor
Used for communications between
entities in a system
Must speak the same language
Example
a human protocol and a computer network
protocol:
Hi
TCP connection
request
Hi
TCP connection
Got the response
time? Get http://www.awl.com/kurose-ross
2:00
<file>
time
Protocols
Key elements of a Protocol
Syntax
• Data formats
• Signal levels
Semantics
• Control information
• Error handling
Timing
• Speed matching
• Sequencing
Standardized protocol
Needed to promote interoperability among vendor
equipment
Protocol “Layers”
Networks are
complex!
many “pieces”: Question:
hosts
Is there any hope of
routers
organizing
links of various structure of
media network?
applications
protocols
Or at least our
hardware,
discussion of
software networks?
a series of steps
airplane routing airplane routing airplane routing airplane routing airplane routing
Why layering?
OSI Model
Open Systems Interconnection
Developed by the International Organization
for Standardization (ISO) in 1977
Seven layers
Application
Presentation
Session
Transport
Network
Data Link
Physical
A theoretical system delivered too late!
TCP/IP is the de facto standard
OSI Model
Physical Layer
Physical interface between data transmission device (e.g.
computer) and transmission medium or network
Characteristics of transmission medium
• Mechanical—connector type
• Electrical—signal levels
• Functional—function of individual cuircits
• Procedural—sequence of events,data rates etc.
Data Link Layer
Error detection and correction
Flow control
Network Access Layer
Exchange of data between end system and network
Destination address provision
Routing functions across multiple networks
OSI Model
Transport Layer
Connection oriented and connectionless service
Reliable delivery of data
Sequencing/Ordering of delivery
Avoid duplication
Session Layer
Dialog Discipline—full duplex or half duplex
Recovery—check pointing mechanisms
Presentation Later
Format/presentation/syntax of data
Application Layer
Provides user interface such as file transfer (FTP), electronic
mail(SMTP), remote login(Telnet/SSH/rlogin), WWW(http)
etc.
OSI v TCP/IP
Encapsulation
source
message M application
segment Ht M transport
datagram Hn Ht M network
frame Hl Hn Ht M link
physical
link
physical
switch
destination Hn Ht M network
M application
Hl Hn Ht M link Hn Ht M
Ht M transport physical
Hn Ht M network
Hl Hn Ht M link router
physical
© Copyright 2007, U. K. Roy, IT, JU
Data
Transmission
Data Communication and Networking 43
Transmission Terminology
Transmitter
Receiver
Medium
Guided medium
• e.g. twisted pair, optical fiber
Unguided medium
• e.g. air, water, vacuum
Direct link
No intermediate devices
Point-to-point
• Only 2 devices share link
Multi-point
• More than two devices share the link
Transmission Terminology
Simplex
One direction
• e.g. Television
Half duplex
Either direction, but only one way at a time
• e.g. police radio
Full duplex
Both directions at the same time
• e.g. telephone
Sine Wave
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
Wavelength
Distance occupied by one cycle
Distance between two points of corresponding
phase in two consecutive cycles
λ
Assuming signal velocity v
λ = vT
λf = v
c = 3*108 ms-1 (speed of light in free space)
Frequency Domain
Data
Analog
Continuous values within some interval
e.g. sound, video
Digital
Discrete values
e.g. text, integers
Signals
Means by which data are propagated
Analog
Continuously variable
Various media
• wire, fiber optic, space
Speech bandwidth 100Hz to 7kHz
Telephone bandwidth 300Hz to 3400Hz
Video bandwidth 4MHz
Digital
Use two DC components
Analog Transmission
Analog signal transmitted without regard to
content
May be analog or digital data
Attenuated over distance
Use amplifiers to boost signal
Also amplifies noise
Digital Transmission
Concerned with content
Integrity endangered by noise, attenuation etc.
Repeaters used
Repeater receives signal
Extracts bit pattern
Retransmits
Attenuation is overcome
Noise is not amplified
Transmission Impairments
Signal received may differ from signal
transmitted
Analog - degradation of signal quality
Digital - bit errors
Caused by
Attenuation and attenuation distortion
Delay distortion
Noise
Attenuation
Signal strength falls off with distance
Depends on medium
Exponential in nature
Issues
Received signal strength:
• must be enough to be detected
• must be sufficiently higher than noise to be received without
error
Attenuation is an increasing function of frequency
• Use equalization
Delay Distortion
Only in guided media
Propagation velocity varies with
frequency
Noise
Additional signals inserted between
transmitter and receiver
Thermal (Also called white noise)
Due to thermal agitation of electrons
Uniformly distributed
Intermodulation
Signals that are the sum and difference of original
frequencies sharing a medium
Crosstalk
A signal from one line is picked up by another
Impulse
Irregular pulses or spikes
e.g. External electromagnetic interference
Short duration
High amplitude
© Copyright 2007, U. K. Roy, IT, JU
Data Communication and Networking 71
Channel Capacity
Data rate
In bits per second
Rate at which data can be communicated
Bandwidth
In cycles per second of Hertz
Constrained by transmitter and medium
Nyquist Bandwidth
Establishes data rate and bandwidth for noise free channel
Given M signal levels and B bandwidth, maximum data rate
C that can be achieved is
C = 2Blog2M
Shannon’s Capacity
Given signal to noise ratio SNR, maximum data rate
C = B log2(1 + SNR)
© Copyright 2007, U. K. Roy, IT, JU
Transmission Media
Data Communication and Networking 73
Overview
Guided - wire
Unguided - wireless
Characteristics and quality determined by
medium and signal
For guided, the medium is more important
For unguided, the bandwidth produced by the
antenna is more important
Key concerns are data rate and distance
Design Factors
Bandwidth
Higher bandwidth gives higher data rate
Transmission impairments
Attenuation
Interference
Number of receivers
In guided media
More receivers (multi-point) introduce more attenuation
Electromagnetic Spectrum
Twisted Pair
Analog
Amplifiers every 5km to 6km
Digital
Use either analog or digital signals
repeater every 2km or 3km
Limited distance
Limited bandwidth (1MHz)
Limited data rate (100MHz)
Susceptible to interference and noise
UTP Categories
Cat 3
up to 16MHz
Voice grade found in most offices
Twist length of 7.5 cm to 10 cm
Cat 4
up to 20 MHz
Cat 5
up to 100MHz
Commonly pre-installed in new office buildings
Twist length 0.6 cm to 0.85 cm
Coaxial Cable
Analog
Amplifiers every few km
Closer if higher frequency
Up to 500MHz
Digital
Repeater every 1km
Closer for higher data rates
Optical Fiber
Wireless Transmission
Unguided media
Transmission and reception via antenna
Directional
Focused beam
Careful alignment required
Omnidirectional
Signal spreads in all directions
Can be received by many antennae
Frequencies
2GHz to 40GHz
Microwave
Highly directional
Point to point
Satellite
30MHz to 1GHz
Omnidirectional
Broadcast radio
3 x 1011 to 2 x 1014
Infrared
Local
Terrestrial Microwave
Parabolic dish
Focused beam
Line of sight
Long haul telecommunications
Higher frequencies give higher data rates
Satellite Microwave
Satellite is relay station
Satellite receives on one frequency, amplifies
or repeats signal and transmits on another
frequency
Requires geo-stationary orbit
Height of 35,784km
Television
Long distance telephone
Private business networks
Broadcast Radio
Omnidirectional
FM radio
UHF and VHF television
Line of sight
Suffers from multipath interference
Reflections
Infrared
Modulate noncoherent infrared light
Line of sight (or reflection)
Blocked by walls
e.g. TV remote control, IRD port
Encoding Techniques
Data are not generally transmitted as they are
due to:
Framing
Error detection and correction
Data are converted into transmittable signals
There are two possibilities
Analog communication
• Analog data, analog signal
• Telephone system
• Digital data, analog signal
• Computer to computer communication using telephone line
Digital Communication
• Digital data, digital signal
• Analog data, digital signal
Terminology
Unipolar
All signal elements have same sign
Polar
One logic state represented by positive voltage the other by
negative voltage
Data rate
Rate of data transmission in bits per second
Bit duration or length of a bit
Time taken for transmitter to emit the bit
Modulation rate
Rate at which the signal level changes
Measured in baud = signal elements per second
Mark and Space
Binary 1 and Binary 0 respectively
© Copyright 2007, U. K. Roy, IT, JU
Data Communication and Networking 102
Interpreting Signals
Need to know
Timing of bits - when they start and end
Signal levels
Factors affecting successful interpreting of
signals
Signal to noise ratio
Data rate
Bandwidth
Error detection
• Can be built in to signal encoding
Signal interference and noise immunity
• Some codes are better than others
Cost and complexity
• Higher signal rate (& thus data rate) lead to higher costs
• Some codes require signal rate greater than data rate
© Copyright 2007, U. K. Roy, IT, JU
Data Communication and Networking 104
Encoding Schemes
Non-Return to Zero
Non-Return to Zero-Level (NRZ-L)
Non-Return to Zero Inverted (NRZ-I)
Multilevel Binary
Bipolar -AMI
Pseudoternary
Biphase
Manchester
Differential Manchester
Scrambling
B8ZS
HDB3
0 1 0 0 1 1 0 0 0 1 1
Differential Encoding
Data represented by changes rather than
levels
More reliable detection of transition rather
than level
In complex transmission layouts it is easy to
lose sense of polarity
0 1 0 0 1 1 0 0 0 1 1
Multilevel Binary
Use more than two levels
Bipolar-AMI
zero represented by no line signal
one represented by positive or negative pulse alternatively
one pulses alternate in polarity
Pros
No loss of sync if a long string of ones (zeros still a problem)
No net dc component
Lower bandwidth
Easy error detection
0 1 0 0 1 1 0 0 0 1 1
Pseudoternary
One represented by absence of line signal
Zero represented by alternating positive and
negative
No advantage or disadvantage over bipolar-
AMI
1 0 0 0 1 1 0 0 0 1 1
Biphase
Manchester
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.3
0 1 0 0 1 1 0 0 0 1 1
Biphase
Differential Manchester
Midbit transition is clocking only
Transition at start of a bit period represents zero
No transition at start of a bit period represents one
Note: this is a differential encoding scheme
Used by IEEE 802.5
0 1 0 0 1 1 0 0 0 1 1
Scrambling
Use scrambling to replace sequences that
would produce constant voltage
Filling sequence
Must produce enough transitions to sync
Must be recognized by receiver and replace with original
Same length as original
No dc component
No long sequences of zero level line signal
No reduction in data rate
Error detection capability
B8ZS
Bipolar With 8 Zeros Substitution
Based on bipolar-AMI
If octet of all zeros and last voltage pulse
preceding was positive encode as 000+-0-+
If octet of all zeros and last voltage pulse
preceding was negative encode as 000-+0+-
Causes two violations of AMI code
Unlikely to occur as a result of noise
Receiver detects and interprets as octet of all
zeros
HDB3
High Density Bipolar 3 Zeros
Based on bipolar-AMI
String of four zeros replaced with one or two
pulses
+ 000+ -000-
Bandwidth Comparison
Modulation Rate
Modulation Rate
Introduction
Network Layer
LLC sub-layer
Data Link Layer
MAC sub-layer
Physical Layer
Introduction
Network Layer
LLC sub-layer
Data Link Layer
MAC sub-layer
Physical Layer
Introduction
Channel
Unicast—single user
Broadcast—sometimes called multi-access/random
access channels
Key issue in a broadcast network
determine who gets to use the channel when there is
competition for it
the protocols used to determine who goes next on a
multiaccess channel belong to a sublayer of the data
link layer called the MAC (Medium Access
Control) sublayer.
ALOHA
Pure ALOHA
Slotted ALOHA
Pure ALOHA
A station transmits a frame whenever it has
one
If collision occurs,
detect it
wait a random amount of time and
retransmit
© Copyright 2007, U. K. Roy, IT, JU
Data Communication and Networking 134
P0 = e − G
Throughpu S = Ge −2G
1
tMaximum S max = with G = 0.5
throughput
2e
Out of 100 frames, maximum of 18 frames reach
their destination without collision
© Copyright 2007, U. K. Roy, IT, JU
Data Communication and Networking 136
Slotted ALOHA
Time is divided into discrete intervals
Transmission of a frame is only allowed at
the beginning of a slot
If a frame is generated in the middle of a
slot, the station must wait for the next slot
Throughpu S = Ge − G
t 1
Maximum S max = with G = 1
throughput
e
Throughput of ALOHA
Throughput of ALOHA
Probability that a frame will avoid collision is e-G
Probability that a frame will suffer a collision is (1-e-
G
)
Probability of a transmission requires exactly k
attempts is
Pk= e-G (1-e-G)k-1
α α
E = kP =
Expected
∑
number
k =1
of −G −G k −1
ke (1 − e )
transmission
k ∑
k =1
= e G
CSMA Protocols
• Protocols in which stations listen for a carrier and act
accordingly are called carrier sense protocols
• Persistent CSMA
• If the channel is busy, station waits until it becomes idle (it
continually senses the carrier for the purpose of seizing it)
• Non-Persistent CSMA
• If the channel is busy, station waits random amount of time
and repeats the algorithm
• 1-persistent CSMA
• If the channel is idle, the station transmits with a
probability of 1
• If collision occurs, it waits a random amount of time, and
starts all over again
• p-persistent
• applies to slotted channels, when the station becomes
ready to send, it senses the channel, if it is idle, it
transmits with a probability p
© Copyright 2007, U. K. Roy, IT, JU
Data Communication and Networking 140
CSMA/CD Protocol
Collision
Collision Detection
CSMA/CD Protocol
Performance Comparison
Basic Assumptions
N number of stations
Each station has a unique address from 0 to N-1
Bit-Map Protocol
Basic Steps
Contention period
Frame transmission
Contention slot has exactly N slots one for each
station
Station j is allowed to transmit (either 1 or 0) during
slot j
No other station is allowed to transmit during that
slot
Station j sends a 1 if it has frame to transmit, 0
otherwise
After N time slots, each station has complete
knowledge of which stations wish to transmit
© Copyright 2007, U. K. Roy, IT, JU
Data Communication and Networking 147
Bit-Map Protocol
Performance Comparison
Two basic protocols
Contention-based
Contention free
Two performance measures
Delay
Channel efficiency
Contention-based protocols are preferable at low
load
Contention free protocols are preferable at high load
Solution is Limited Contention Protocol
Symmetric Protocol
k number of stations
Each has a probability p of transmitting during each
slot
Probability that some station will successfully
acquire the channel during a given slot is A=kp(1-
p)k-1
pmax= 1/k
Amax=(1-1/k)k-1
Symmetric Protocol
Example
Improvement
Further Improvement
G and H want to transmit
At slot 0, collision will occur, slot 1 will be idle
It is pointless to probe node 3 (because collision will
be the obvious result)
Framing
Breaks the message into number of segments called
frames
This is done to
reduce total transmission time
S A B D S A B D
1
Transmission
delay message 2
Total 3 1
Delay 2
TD 3 1
Total
message 2
Delay TD
3
Propagation delay
message
Time Time
reduce amount of retransmission due to error
3
R
x
+ h
2 TD t =
p
1 f R
3
x
tp 2 p + h
p
tm =
tf 3 R
T x x
p + h + h
p + (k − 1) p
TD = + kt
p
R R
dTD x(k − 1)
=0 ⇒ p=
dp h
© Copyright 2007, U. K. Roy, IT, JU
Data Communication and Networking 164
error is
Probability that the message requires exactly i
transmission for successful transmission [i.e. (i-1)
unsuccessful transmission followed[1 (1 − b) x ]( i −1) (1 − b) x
by−successful
transmission] is
Expected number of
transmission i =α
N rx = ∑ i[1 − (1 − b) ]
x ( i −1) x
(1 − b)
i =1
1
N rx =
(1 − b) x x
Total number of bits transmitted without
framing (1 − b) x
© Copyright 2007, U. K. Roy, IT, JU
Data Communication and Networking 165
Framing
four methods for framing are:
character count
starting and ending characters
starting and ending flags
physical layer coding violations
Character Count
Assumes character oriented data transmission
This method uses a field in the header to specify the
number of characters in the frame
When data link layer at the destination sees this, it
knows how many characters follow
Bit Stuffing
Error Detection
The data link layer breaks the bit stream up into
discrete frames and then computes the checksum for
each frame
when a frame arrives at the destination the checksum is
recomputed, and if it is different from the one contained
in the frame, the data link layer knows that an error has
occurred
Error Detection
Two-dimensional parity
Detectable
Double-bit-
error
1 0 1 0 1 1
Undetec
1 1 0 1 1 0 ed
error
0 1 1 1 0 1
0 0 1 0 1 0
Detected
error
r
D.2 R
=Q+
G G
T = D.2 + R r
T D.2 + R R R R+R
r
= =Q+ + =Q+ =Q
G G G G G
© Copyright 2007, U. K. Roy, IT, JU
Data Communication and Networking 177
Example
D=1010001101
G=110101
R=? G 1 1 0 1 0 1|1 0 1 0 0 0 1 1 0 1 0 0 0 0
0
110101
111011
110101
1110 10
1101 01
11 11 10
11 01 01
T=101000110101110 101100
110101
110010
1 1 0 1 0 1 R
© Copyright 2007, U. K. Roy, IT, JU 01110
Data Communication and Networking 178
Example
D=101110
G=1001
R=?
Error Correction
Flow Control
Receiver may be slower than transmitter
Transmitter must not transmit frames at a rate faster
than the receiver can receive
Ensuring the sending entity does not overwhelm the
receiving entity
Preventing buffer overflow
Transmission time
Time taken to emit all bits into medium
Propagation time
Time for a bit to traverse the link
propagation time
a=
transmission time
Fragmentation
Large block of data may be split into small
frames
Limited buffer size
Errors detected sooner (when whole frame received)
On error, retransmission of smaller frames is needed
Prevents one station occupying medium for long periods
Stop and wait becomes inadequate
Performance?
Performance?
Performance?
1 N ≥ 1 + 2a
U = N
1 + 2a N < 1 + 2a
Error Control
Detection and correction of errors
Lost frames
Damaged frames
Automatic repeat request
Error detection
Positive acknowledgment
Retransmission after timeout
Negative acknowledgement and retransmission
Go Back N
Based on sliding window
If no error, ACK as usual with next frame
expected
Use window to control number of outstanding
frames
If error, reply with rejection
Discard that frame and all future frames until error frame
received correctly
Transmitter must go back and retransmit that frame and all
subsequent frames
Go Back N - Diagram
Selective Reject/Retransmission
Only rejected frames are retransmitted
Subsequent frames are accepted by the
receiver and buffered
Minimizes retransmission
Receiver must maintain large enough buffer
More complex login in transmitter
Performance?
Tf
Channel Utilization U =
Tt
Where Tf=time to transmit a single frame
Tt=total time that line is engaged in the
transmission of a single frame
For error free operation using Stop-and-Wait
protocol Tf
U=
T f + 2T p
In the presence of error equation must be modified
T
as U=
f
N r (T f + 2T p )
Performance?
p=probability that a single frame is in error
Assume ACKs and NAKs are never in error
To transmit a frame successfully, it requires
exactly i attempts
That means i-1 times unsuccessful (with error)
transmission followed by 1 successful (without
error) transmission
Probability that a frame requires exactly i
transmission is pi-1(1-p) α
Nr=E[transmission]= ∑ (1 − p)
ip i −1
i =1
1
=
1− p
© Copyright 2007, U. K. Roy, IT, JU
Data Communication and Networking 216
Performance?
1− p
Stop-and-Wait ARQ U =
1 − 2a
1 − p N ≥ 1 + 2a
Selective Reject ARQ U =
N (1 − p)
1 + 2a N < 1 + 2a
Go-back-N?
Nr=E[number of transmitted frame to transmit one frame
successfully]
f(i)=total number of transmission if original frame
must be transmitted i times
K=total number of frames retransmitted (including
the original frame) for each
α
error
N r = ∑ [(1 − K ) + Ki ] p i −1 (1 − p )
f(i)=1+(i-1)K i =1
α α
=(1-K)+Ki = (1 − K )∑ p (1 − p ) + K ∑ ip i −1 (1 − p )
i −1
i =1 i =1
K
= (1 − K ) +
1− p
1 − p + Kp
=
1− p
Go-back-N?
1− p N ≥ 1 + 2 a , K = 1 + 2 a
1 + 2ap
U =
N (1 − p)
N < 1 + 2a, K = N
(1 + 2a )(1 − p + Np )
Performance?
HDLC Protocol
Widely used data link control protocol
• Used in PPP
Satisfy Basic Characteristics
• Three types of stations
• Two link configurations
• Three data transfer mode
Frame Structure
Uses synchronous transmission
All transmissions in frames
Single frame format for all data and control
exchanges
Flag Fields
01111110
Delimit frame at both ends
May close one frame and open another
Receiver hunts for flag sequence to
synchronize
Bit stuffing used to avoid confusion with data
containing 01111110
0 inserted after every sequence of five 1s
If receiver detects five 1s it checks next bit
If 0, it is deleted
If 1 and seventh bit is 0, accept as flag
If sixth and seventh bits are 1, sender is indicating abort
Bit Stuffing
Example with
possible errors
Address Field
Identifies secondary station that will send or
receive frames
Usually 8 bits long
May be extended to multiples of 8 bits
LSB of each octet indicates that it is the last octet (1) or not
(0)
All ones (11111111) is broadcast
Control Field
Different for different frame type
Three types of frames
Information - data to be transmitted to user (next layer up)
• Flow and error control piggybacked on information frames
Supervisory - ARQ when piggyback not used
Unnumbered - supplementary link control
First one or two bits of control filed identify
frame type
Remaining bits explained later
Supervisory frames
Unnumbered frames
Poll/Final Bit
Use depends on context
Command frame
P bit
1 to solicit (poll) response from peer
Response frame
F bit
1 indicates response to soliciting command
Information Field
Only in information and some unnumbered
frames
Must contain integral number of octets
Variable length
HDLC Operation
Exchange of information, supervisory and
unnumbered frames
Three phases
Initialization
Data transfer
Disconnect
Required Reading
Stallings chapter 7
Web sites on HDLC, frame relay, Ethernet and
ATM
Ethernet Cabling
Ethernet Topology
Encoding
Ethernet Protocol
Preamble—7 bytes each containing 10101010
Allow receivers clock to synchronized with the sender’s clock
Start Delimiter—1 byte 10101011
Destination address—2 bytes or 6 bytes
Ordinary address—high order bit 0
Group address—high order bit 1
Broadcast address—all 1’s
Source address
Length—number of bytes present in data field
Minimum 0 maximum 1500
Pad—0 to 46 bytes long—used to make an Ethernet
packet at least 64 bytes long
Checksum—32 bits
Collision detection
Performance
K stations are always ready to transmit
p—probability that each station will transmit during
each slot
Probability that some station will acquire the channel
is A=kp(1-p)k-1
Amax1/e as kα for p=1/k
Probability that the contention interval has exactly j
slots is A(1-A)j α
1
Mean number of contention slot ∑ jA(1 − A) = A
j
j =0
For optimal p (1/k), mean number of contention slots
is never more than e
P=mean frame time P
Channel efficiency P +2τ / A
© Copyright 2007, U. K. Roy, IT, JU
Data Communication and Networking 255
Ethernet Efficiency
Token Bus
Ethernet protocol is probabilistic protocol and worst
case time waiting time is unbounded
Solution—use ring and avoid collision
For n stations, if each takes T time to transmit frame,
no station will have to wait more than nT time
Token Bus
Routing Algorithms
In most subnets packets have to take
multiple hops
the algorithms that choose the routes and the
data structures that they use are a major
area of network layer design
the routing algorithm that is a part of the
network layer software responsible for
deciding which output line an incoming
packet should be transmitted on
In session routing route remains in force for
an entire user session
Routing Algorithms
Characteristics Decision Time and Place
required Time
Correctness • Packet or virtual circuit
Simplicity basis
Robustness
Place
• Distributed
Stability
• Made by each node
Fairness • Centralized
Optimality • Source
Efficiency
Routing Strategies
Performance Criteria Non-adaptive
Used for selection of route • Flooding
Minimum hop • Random
Least cost Adaptive
Flooding
No network info required
Packets are sent by source node to every
neighbor
Incoming packets are retransmitted on every
link except incoming link
Eventually a number of copies will arrive at
destination
Flooding Example
Properties of Flooding
All possible routes are tried
Very robust
At least one packet will have taken minimum
hop count route
Can be used to set up virtual circuit
All nodes are visited
Useful to distribute information (e.g. routing)
Disadvantage of Flooding
Huge number of packets will be generated
Solution
Each packet is uniquely numbered so duplicates can be
discarded
Nodes can remember packets already forwarded to keep
network load in bounds
Can include a hop count in packets
Random Routing
Node selects one outgoing path for
retransmission of incoming packet
Selection can be random or round robin
Can select outgoing path based on probability
calculation
No network info needed
Route is typically not least cost nor minimum
hop
Adaptive Routing
Used by almost all packet switching networks
Routing decisions change as conditions on the
network change
Failure
Congestion
Requires info about network
Decisions more complex
Tradeoff between quality of network info and
overhead
Reacting too quickly can cause oscillation
Too slowly to be relevant
Classification
Based on information sources
Local (isolated)
• Route to outgoing link with shortest queue
• Can include bias for each destination
• Rarely used - do not make use of easily available info
Adjacent nodes
All nodes
1
Mean delay, T= µC −λ
Hierarchical Routing
Congestion Control
when too many packets are present in (a part of the) subnet,
performance degrades, and the situation is called congestion
as traffic increases too far, the routers are no longer able to
cope, and they begin losing packets
at very high traffic the performance collapses completely, and
almost no packets are delivered
congestion can be brought about by insufficient memory to
hold the packets, slow processors, low-bandwidth lines
Congestion tends to feed upon itself and become worse
congestion control has to do with making sure the subnet is
able to carry the offered traffic, flow control, in contrast
relates to point-to-point traffic between a given sender and a
receiver
Congestion
General Principles
control theory approach divides the solutions into two
groups: open loop and closed loop
open loop solutions tend to solve the problem by good
design, in essence, to make sure that it does not occur
in the first place
closed loop solutions are based on the concept of
feedback loop
closed loop handles congestion control by:
monitoring the system to detect when and where
congestion occurs
passing this information to place where action can
be taken
adjusting system operations to correct the problems
open loop manages congestion by a technique called
traffic shaping - forcing the packets to be transmitted
©at a more
Copyright 2007, predictable
U. K. Roy, IT, JU rate
Data Communication and Networking 321
Chock Packet
IP Addressing
IP Address Requirements
What is an IP Address?
Network IDs and Host IDs
What is a Physical Segment?
IP Addressing Rules
Classfull IP Addressing
Address Classes
Class A Addresses
Class B Addresses
Class C Addresses
Class D & E Addresses
Address Class Summary
IP Addressing Requirements
What is an IP Address?
Network ID Host ID
Shared or Common to all Identifies a specific device
computers on the same (Host) within a physical
physical segment
segment
Unique on the Entire
Network
Unique on the physical
segment
“Area Code”
“Phone Number”
192.176.11.201
IP Addressing
What is a Physical Segment?
A Broadcast Domain
The portion of the network that you can retrieve
information from by using a broadcast packet!
Ignore Repeaters, Bridges, or Switches
Forward Broadcasts
Everything (all devices) --
Out a port of a router
Between two routers
Routers Don’t Forward Broadcasts
IP Addressing Rules
All Devices on the Same Physical Segment Share a
Common Network ID
Each Physical Segment Has a Unique Network IDs
IP Addressing
IP Addressing Rules
IP Addressing
Classfull IP Addressing
IP Addressing
Address Classes
Class A
Network . Host . Host . Host
Class B
Network . Network . Host . Host
Class C
Network . Network . Network . Host
Class D & E
IP Addressing
Class A Networks:
The Definition
Per Specification:
1st Octet is the Network ID
2nd, 3rd, 4th Octets are the Host ID
In Binary –
Any address that starts with a “0” in the first bit!
First Class A Network Address:
00000001.00000000.0000000.00000000 (Binary)
1.0.0.0 (Decimal)
Last Class A Network Address:
01111111.00000000.00000000.00000000 (Binary)
127.0.0.0 (Decimal) (Loopback Address)
IP Addressing
Class A Networks:
Network IDs
1st Octet is the Network ID
0.0.0.0 (Invalid)
1.0.0.0
2.0.0.0
3.0.0.0
~~~~
127.0.0.0 (Loop back)
2nd, 3rd, 4th Octets are the Host IDs
An Assigned Class A Network Address:
33.0.0.0 (Specifies the Network)
2nd, 3rd, 4th Octets are the Host IDs
Specified by Network Administrators
IP Addressing
Class A Networks:
The Number of Networks
IP Addressing
Class A Networks:
Host ID Addresses
IP Addressing
Class B Networks:
The Definition
Per Specification:
1st and 2nd Octets are the Network ID
3rd, 4th Octets are the Host IDs
In Binary –
Any address that starts with a “10” in the first two
bits of the first octet!
First Class B Network Address:
10000000.00000000.0000000.00000000 (Binary)
128.0.0.0 (Decimal)
Last Class B Network Address:
10111111.11111111.00000000.00000000 (Binary)
191.255.0.0 (Decimal)
IP Addressing
Class B Networks:
Network IDs
1st and 2nd Octets are the Network IDs
128.0.0.0
128.1.0.0
~~~~
128.255.0.0
129.0.0.0
129.1.0.0
~~~~
191.255.0.0
3rd, 4th Octets are the Host IDs
An Assigned Class B Network Addresses
153.11.0.0
3rd, 4th Octets are the Host IDs
Specified by Network Administrators
IP Addressing
Class B Networks:
The Number of Networks
IP Addressing
Class B Networks:
Host ID Addresses
IP Addressing
Class C Networks:
The Definition
Per Specification:
1st, 2nd, 3rd Octets are the Network ID
4th Octet is the Host ID
In Binary –
Any address that starts with a “110” in the first three
bits of the first octet!
First Class C Network Address:
11000000.00000000.0000000.00000000 (Binary)
192.0.0.0 (Decimal)
Last Class C Network Address:
11011111.11111111.11111111.00000000 (Binary)
223.255.255.0 (Decimal)
IP Addressing
Class C Networks:
Network IDs
IP Addressing
Class C Networks:
The Number of Networks
IP Addressing
Class C Networks:
Host ID Addresses
IP Addressing
Class D & E
Class D
Used by Multicast Applications
Shared Addresses
224.0.0.0 – 239.255.255.255
Class E
Experimental
240.0.0.0 +
IP Addressing
Address Classes:
Network IDs and Host IDs
IP Addressing
Address Class Summary
IP Addressing
IP Address: What is It?
IP Addressing
IP Addressing Rules
IP Addressing
Address Classes: Network IDs and Host
IDs