DCA 3303 Full
DCA 3303 Full
DCA 3303 Full
DCA 3303
DCA 3303
COMPUTER NETWORKS
Writer
Co-ordinator
Mohammod Shamim Hossain
School of Science and Technology
Bangladesh Open University
Editor
Anwar Sadat
School of Science and Technology
Bangladesh Open University
President
Member
Anwar Sadat
Lecturer
School of Science and Technology
Bangladesh Open University
Unit 7 : Multiplexing
Lesson 1 : Frequency Division Multiplexing ............................................................ 105
Lesson 2 : Time Division Multiplexing ..................................................................... 109
Unit 8 : Switched Data Communication Networking
Lesson 1 : Circuit Switching ..................................................................................... 113
Lesson 2 : Control Signaling in Circuit-Switched Network ...................................... 117
Lesson 3 : Packet Switching ................................................................................... 123
Lesson 4 : Routing in Packet-Switched Network .................................................... 126
Lesson 5 : Traffic Control in Packet Switched Network .......................................... 131
Lesson 6 : X.25 Protocol Standard ......................................................................... 136
Unit 9 : Local Area Networks
Lesson 1 : LAN Technology .................................................................................... 141
Lesson 2 : Medium Access Control Protocols ........................................................ 152
Lesson 3 : LAN Standards ...................................................................................... 158
During the first two decades of their existence, computer systems were highly
centralized, usually within a single large room. The old model of a single computer
serving all of the organization’s computational needs has been obsolete and the
computer workloads are continuously being decentralized. The need for
communicating among the geographically dispersed computers has evolved
computer networks. So computer network has become an essential part of
computer science education. The purpose of this book is to present various
concepts, protocols, standards, and applications related to computer networks. The
materials of the book are mostly organized on the basis of different layers of the
computer network architecture. The concept of data communications in the physical
layer is given special attention. The other layers are discussed in relation to
protocols and standards recently being used. Concepts and technologies of the
local area networks are also given special emphasis. The book is divided into
thirteen units covering all aspects of computer networks.
Unit 1 deals with definition, types, and topologies of computer networks.
Unit 2 introduces the architectural concepts of computer networks. The OSI Model
and the TCP/IP protocol suite are presented.
Unit 3 presents various concepts related to signals and data transmission. Data
transmission media and techniques are also presented.
Unit 4 deals with various techniques of data encoding for transmission.
Unit 5 discusses transmission of digital data. Error detection techniques and
transmission line interface standards for digital data transmission are also
discussed.
Unit 6 presents concepts, techniques, and protocols for data link control.
Unit 7 introduces multiplexing techniques for data link.
Unit 8 deals with switched data communication networking. Circuit switched
networking is introduced briefly. Packet switching networking is discussed in details
including one widely used protocol standard.
Unit 9 discusses concepts, technologies, and standards of local area networks.
Unit 10 presents services and protocols related to transport mechanism.
Unit 11 introduces session services and protocols.
Unit 12 discusses presentation concepts and protocols. Network security and virtual
terminal protocol are also presented.
Unit 13 deals with some distributed applications including electronic mail system.
At the end of each lesson there is an exercise. The answers of the multiple choice
questions are provided at the end of the book. A learner can check his/her
understanding of the lesson by answering the questions.
Unit 1 : Introduction to Computer
Networks
Introduction
2
Introduction to Computer Networks
1.6. Exercise
i) autonomous computers
ii) network nodes
iii) mainframe computers
iv) personal computers.
b. A distributed system is
3
Computer Networks
Types of computer There are two types of computer networks based on transmission
networks based on technology :
transmission technology.
(i) Broadcast Networks : Broadcast networks have a single
communication channel that is shared by all the computers on
the network. Packets sent by any computer are received by
all the others. An address field within the packet specifies for
whom it is intended. Upon receiving a packet, a computer
checks the address field. If the packet is intended for itself, it
process the packet; if the packet is intended for some other
computer, it is just ignored.
(ii) Point-to-point Networks : Point-to-point networks consist of
many connections between individual pairs of computers. To
go from source to the destination, a packet on this type of
network may have to first visit one or more intermediate
computers.
Types of computer There are three types of computer networks based on their scale
networks based on their :
scale.
(i) Local Area Networks : Local area networks, generally called
LANs, are privately owned networks within a single building or
campus of up to a few kilometers in size. They are widely
used to connect personal computers and workstations in
company offices and factories to share resources and
exchange information.
(ii) Metropolitan Area Networks : A metropolitan area network,
or MAN, is basically a bigger version of a LAN and normally
uses similar technologies. It might cover a group of nearby
corporate offices or a city and might be either private or
public.
4
Introduction to Computer Networks
2.4. Internetworks
2.5. Exercise
5
Computer Networks
6
Introduction to Computer Networks
3.2. Definition
Computer Hub
Computer Cable
Cable
7
Computer Networks
Subnet Router
Host
LAN
8
Introduction to Computer Networks
9
Computer Networks
3.5. Exercise
b. A subnet consists of
i) transmission lines
ii) routers
iii) routers and transmission lines
iv) none of the above.
10
Unit 2 : Computer Networks
Architecture
Introduction
Lesson 1 : Protocols
1.1. Learning Objectives
Direct/indirect
Important characteristics Monolithic/structured
of a protocol. Symmetric/asymmetric
Standard/nonstandard.
12
Computer Networks Architecture
13
Computer Networks
14
Computer Networks Architecture
1.4. Exercise
a. An entity is
15
Computer Networks
2.2. Introduction
2.3. Concepts
1. Physical Layer
2. Data Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer.
16
Computer Networks Architecture
Figure 2.1 illustrates the OSI model. Each system contains the
seven layers. Communication is between applications in the
systems, labeled application X and application Y in the figure. If
application X wishes to send a message to application Y, it
invokes the application layer (layer 7). Layer 7 establishes a peer
relationship with layer 7 of the target machine, using a layer 7
protocol. This protocol requires services from layer 6, so the two
layer 6 entities use a protocol of their own, and so on down to the
physical layer, which actually passes the bits through a
transmission medium.
Outgoing Application X Application Y Incoming
PDU Construction PDU Construction
17
Computer Networks
(N+1)
(N+1) entity
layer
(N-1) Service
access point
(N-1) Service
access point
(N-1) (N-1)
layer entity
(N-1) Connection
18
Computer Networks Architecture
19
Computer Networks
X-confirm t3 X-response
t4
X-request t1
t2 X-indication
20
Computer Networks Architecture
2.5. Exercise
i) Transport Layer
ii) Network Layer
iii) Data Link Layer
iv) Physical Layer.
21
Computer Networks
Physical Layer
While the physical layer provides only a raw bit stream service,
the data link layer attempts to make the physical link reliable and
provides the means to activate, maintain, and deactivate the link.
The principal service provided by the data link layer to the higher
layers is that of error detection and control. Thus, with a fully
functional data link layer protocol, the next higher layer may
assume virtually error-free transmission over the link.
Network Layer
Transport Layer
The transport layer ensures that data units are delivered error-
free, in sequence, with no losses or duplications. The transport
22
Computer Networks Architecture
Session Layer
Presentation Layer
Application Layer
23
Computer Networks
Application
User-oriented
Presentation Users of
transport service
Session
End-to-end Transport
Connection-oriented
Network
3.4. Exercise
24
Computer Networks Architecture
25
Computer Networks
4.2. Introduction
26
Computer Networks Architecture
27
Computer Networks
Figure 4.5 indicates how TCP and IP protocols are configured for
communications. The total communications facility may consist of
multiple networks, the constituent networks are usually referred to
as subnetworks. Some sort of network access protocol is used
28
Computer Networks Architecture
Host Host
Application Application
Operatibg System
Operatibg System
TCP TCP
IP IP
Router
IP
Subnetwork 1 Subnetworks 2
NAP 1 NAP 2
29
Computer Networks
TCPH TCP
Segment
IPH IP
Datagram
Network
NetH level
Packet
Fig. 4.6 : Protocol data units in the TCP/IP architecture.
30
Computer Networks Architecture
4.5. Exercise
31
Computer Networks
32
Data Transmission Fundamentals
Introduction
34
Data Transmission Fundamentals
1.5. Exercise
35
Computer Networks
36
Data Transmission Fundamentals
37
Computer Networks
38
Data Transmission Fundamentals
C = 2W (3.2)
For a binary digital signal, the highest data rate that can be carried
is 2W bps for a channel with W Hz bandwidth.
39
Computer Networks
i) finite bandwidth.
ii) infinite bandwidth.
iii) zero bandwidth.
iv) none of the above.
40
Data Transmission Fundamentals
Physical Description
41
Computer Networks
Transmission Characteristics
Physical Description
Uses
42
Data Transmission Fundamentals
Transmission Characteristics
3.5. Exercise
43
Computer Networks
i) twisted pair
ii) coaxial cable
iii) optical fiber
iv) none of the above.
44
Data Transmission Fundamentals
Physical Description
Fig. 3.4: (a) Side view of a single fiber. (b) End view of a sheath
with three fibers.
Uses
Greater bandwidth
Smaller size and higher weight
Lower attenuation
45
Computer Networks
Electromagnetic isolation
Greater repeater spacing.
Long-haul trunks
Metropolitan trunks
Rural exchange trunks
Local loops
Local area networks.
Transmission Characteristics
46
Data Transmission Fundamentals
4.3. Exercise
47
Computer Networks
Physical Description
Uses
Transmission Characteristics
48
Data Transmission Fundamentals
Physical Description
Satellite
Satellite
Receiver
Multiple
Receivers Transmitter
49
Computer Networks
Ku-band
satellite
256 kbps
256 kbps
1
56 kbps
2
The very small aperture 56 kbps
Uses
Television distribution
Long-distance telephone transmission.
50
Data Transmission Fundamentals
Transmission Characteristics
5. 4. Radio
Physical Description
Uses
Transmission Characteristics
51
Computer Networks
5.5. Exercise
i) 82 km
ii) 100 km
iii) 82 m
iv) 100 m.
i) 30 MHz to 1 GHz
ii) 2 to 40 GHz
iii) 0 to 30 MHz
iv) none of the above.
i) 30 MHz to 1 GHz
ii) 2 to 40 GHz
iii) 0 to 30 MHz
iv) none of the above.
52
Data Transmission Fundamentals
53
Computer Networks
6.3. Exercise
54
Data Transmission Fundamentals
55
Computer Networks
56
Data Encoding
Bit Duration : The bit duration is the amount of time it takes for
the transmitter to emit the bit. For a data rate R, the bit duration is
1/R.
Mark and Space : The terms mark and space refer to the binary
digit 1 and 0 respectively.
In this coding, two different voltage levels are used for the two
binary digits as stated below :
Techniques of Digital
Encoding 0 = high voltage level (more commonly a positive voltage level).
1 = low voltage level (more commonly a negative voltage level).
0 1 0 0 1 1 0 0 0 1 1
NRZ-L
NRZI
Pseudoternary
Manchester
Differential
Manchester
58
Data Encoding
0 = no line signal.
1 = positive or negative voltage level, alternating for successive
ones.
Pseudoternary Coding
Manchester Coding
59
Computer Networks
1.4. Exercise
i) NRZ-L coding
ii) Bipolar-AMI coding
iii) Manchester coding
iv) Differential Manchester coding.
60
Data Encoding
61
Computer Networks
0 0 1 1 0 1 0 0 0 1 0
Amplitude-shift keying
0 0 1 1 0 1 0 0 0 1 0
Frequency-shift keying
0 0 1 1 0 1 0 0 0 1 0
Phase-shift keying
62
Data Encoding
2.3. Exercise
i) amplitude
ii) frequency
iii) phase
iv) amplitude and phase.
63
Computer Networks
The device used for converting analog data into digital form for
transmission, and subsequently recovering the original analog
data from the digital is known as codec (coder-decoder).
Codec coder-decoder.
3.3. Techniques of Coding and Decoding of Analog Data
64
Data Encoding
produce PCM data, the PAM samples are quantized. That is, the
amplitude of each PAM pulse is approximated by an n-bit integer.
The PCM pulse is then converted into a block of n bits. This
process is illustrated in figure 4.3.
(a) Original
signal 6.2 5.9
4.1
3.0 2.8
1.4 1.3
Ts
The output of the delta (b) PAM pulses
modulation process is
represented as a single 6 6
binary digit for each
4
sample.
3 3
1 1
011001110001011110100
(c) PCM output
65
Computer Networks
66
Data Encoding
3.4. Exercise
a) What is a codec?
b) What is PAM?
c) State sampling theorem.
67
Computer Networks
4.2. Introduction
68
Data Encoding
Carrier
Phase-modulated wave
Frequency-modulated wave
69
Computer Networks
4.4. Exercise
a. In FM,
70
Digital Data Communications Techniques
Data are transmitted one grasp the two transmission modes used to achieve
bit at a time over the cooperation between transmitter and receiver
medium. asynchronous
synchronous.
1.2. Introduction
Transmitter timing
0 100 200 300 400 500 600 700 800
start 1 2 3 4 5 6 7 8 Stop
72
Digital Data Communications Techniques
0100000110010000110110000111
The start bit (0) starts the timing sequence for the next eight
elements, which are the 7-bit ASCII code and the stop bit. In the
idle state, the receiver looks for a transition from 1 to 0 to begin
the next character and then samples the input signal at one-bit
intervals for seven intervals. It then looks for the next 1-to-0
transition.
73
Computer Networks
1.5. Exercise
i) binary 1
ii) binary 0
iii) transition of 1-to-0
iv) none of the above.
74
Digital Data Communications Techniques
2.2. Introduction
Parity check
Longitudinal redundancy check
Cyclic redundancy check.
Typically even parity is The simplest bit error detection scheme is to append a parity bit
used for asynchronous to the end of each word in the frame. A typical example is ASCII
transmission. transmission, in which a parity bit is attached to each 7-bit ASCII
character.
Even Parity : In even parity, the value of the parity bit is selected
so that the word has an even number of 1’s. Typically even parity
is used for asynchronous transmission.
Odd Parity : In odd parity, the value of the parity bit is selected
so that the word has an odd number of 1’s. Typically odd parity is
used for synchronous transmission.
75
Computer Networks
Parity
bit 1 2 3 4 5 6 7 bit
Character 1 0 1 1 0 1 1 1
1
2 1 1 0 1 0 1 1 1
3 0 0 1 1 1 0 1 0
4 1 1 1 1 0 0 0 0
5 1 0 0 0 1 0 1 1
6 0 1 0 1 1 1 1 1
Parity Check 0 1 1 1 1 1 1 0 LRC
Character
VRC
The parity bit at the end of each character (row parity bit) is
The parity bit at the end of
generated using the bits of that character. For the parity check
each character are
referred to as the vertical character, each bit is generated using the corresponding bits of
redundancy check (VRC). all characters. The parity bit at the end of each character are
referred to as the vertical redundancy check (VRC).
76
Digital Data Communications Techniques
Message, M FCS, F
Transmitted Frame
2n M R
Q (5.2)
P P
Then
n
T=2 M+R (5.3)
77
Computer Networks
101000110100000
01110
T 101000110101110
This T is transmitted.
78
Digital Data Communications Techniques
The pattern P is chosen to be one bit larger than the desired FCS
and both the high- and low-order bits of P must be 1.
X n M (X ) R(X )
Q( X )
P( X ) P(X )
T ( X ) X n M ( X ) R( X )
2.6. Exercise
i) asynchronous transmission
ii) synchronous transmission
iii) both of the above
iv) none of the above.
79
Computer Networks
i) asynchronous transmission
ii) synchronous transmission
iii) both of the above
iv) none of the above.
80
Digital Data Communications Techniques
3.2. Introduction
EIA-232-D
EIA-530
ISDN Physical Interface.
81
Computer Networks
3.3. EIA-232-D
3.4. EIA-530
82
Digital Data Communications Techniques
83
Computer Networks
3.6. Exercise
i) 3
ii) 14
iii) 8
iv) 6.
84
Unit 6 : Data Link Control
Introduction
The topology of a data The duplexity of a link refers to the direction and timing of signal
link refers to the physical flow. In simplex transmission, the signal flow is always in one
arrangement of stations direction. A half-duplex link can transmit and receive but not
on a link. simultaneously. On a full-duplex link, two stations can
simultaneously send and receive data from each other.
Point-to-point Links
Multipoint Links
86
Data Link Control
Secondary S
S
10
POLL 11 POLL
SEL SEL
12 +
13
DATA
ACK
14
POLL
The most common form 15 DATA
of polling is roll-call ACK
polling. DATA
ACK
ACK
(a) Polled terminal has (b) Polled terminal has (d) Fast select
(c) Select
nothing Data to send
87
the line is free; otherwise,
it must wait.
Computer Networks
88
Data Link Control
2.2. Introduction
89
Computer Networks
With the use of multiple frames for a single message, the simple
stop-and-wait flow control procedure may be inadequate. This
problem is overcome by using the sliding-window flow control.
90
Data Link Control
91
Computer Networks
2.5. Exercise
i) from 0 to 7
ii) from 0 to 16
iii) from 0 to 15
iv) none of the above.
92
Data Link Control
93
Computer Networks
3.2. Introduction
Stop-and-wait ARQ
94
Data Link Control
Go-back-N ARQ
Selective-reject ARQ.
A B
Time
Frame 0
ACK 1
Frame 1
ACK 0
Time
out Frame 0
*
Frame lost: Frame 0
A retransmits
ACK 1
Frame 1
Time ACK 0
out *
ACK 0 lost:
Frame 1
A retransmits
B discards
ACK 0
duplicate frame
95
Computer Networks
96
Data Link Control
97
Computer Networks
3.6. Exercise
98
Data Link Control
4.2. Introduction
99
Computer Networks
100
Data Link Control
101
Computer Networks
8 8 8 or 16 Variable 16 or 32 8
bit Extendable Extendable
(a) Frame format
1 2 3 4 5 6 7 8
I: Information O N(S) P/F N(R)
1 1 M P/F M
U: Unnumbered
N (S) = Send sequence number
N (R) = Receive sequence number
S = Supervisory function bits
M = Unnumbered function bits
P/F = Poll/final bit
(b) Control field format
1 2 3 4 5 6 7 8 9 10 1112 13 14 15 16 8n
0 0 ...... 1
Figure 6.5 depicts the structure of the HDLC frame. The frame
has the following fields :
Flag : 8 bits
Address : One or more octets
Control : 8 or 16 bits
Information : variable
Frame Check Sequence (FCS) : 16 or 32 bits
Flag : 8 bits.
The flag, address, and control fields that precede the data field
are known as a header. The FCS and flag fields following the
data field are referred to as a trailer.
102
Data Link Control
Flag Fields
Flag fields delimit the frame at both ends with the unique pattern
01111110. A single flag may be used as the closing flag for one
frame and the opening flag for the next. All active stations
attached to the link are continuously hunting for the flag
sequence to synchronize on the start of a frame. While receiving
a frame, a station continues to hunt for that sequence to
determine the end of the frame. However, since the HDLC frame
allows arbitrary bit patterns, there is no assurance that the pattern
01111110 will not appear somewhere inside the frame, thus
destroying frame-level synchronization. To avoid this problem, a
procedure known as bit stuffing is used. The transmitter will
always insert an extra 0 bit after each occurrence of five 1’s in the
frame. After detecting a starting flag, the receiver monitors the bit
stream. When a pattern of five 1’s appears, the sixth bit is
examined. If this bit is 0, it is deleted. If the sixth bit is a 1 and the
seventh bit is a 0, the combination is accepted as a flag. If the
Bit stuffing sixth and seventh bits are both 1, the sending station is signaling
an abort condition. With the use of bit stuffing, arbitrary bit
patterns can be inserted into the data field of the frame. This
property is known as data transparency. An example of the bit
stuffing is given below :
Address Field
Control Field
103
Computer Networks
Information Field
HDLC defines three types The information field is present only in I-frames and some
of frames, each with a unnumbered frames. The field can contain any sequence of bits.
different control field Its length is undefined in the standard, but is generally limited by
format. each implementation to a specified maximum.
4.5. Exercise
i) primary station
ii) secondary station
iii) both primary and secondary stations
iv) none of the above.
i) primary station
ii) secondary station
iii) both primary and secondary stations
iv) none of the above.
104
Data Link Control
105
Computer Networks
5.2. Introduction
106
Data Link Control
107
Computer Networks
108
Data Link Control
5.6. Exercise
109
Multiplexing
Unit 7 : Multiplexing
Introduction
n inputs n outputs
D
M E
U M
1 link, n channels U
X
X
Synchronous TDM
Statistical TDM.
mN(t) Subcarrier
fSC1 SSCN(t)
(a) Transmitter
|Mc(f)|
0 fSC1
f
fSC2 fSCN
BSC1 B SC2 BSCN
B
m1(t)
Bandpass filter, fSC1 Demodulator, fSC1
m2(t)
Bandpass filter, fSC2 Demodulator, fSC2
Receiver
mN(t)
Bandpass filter, fSCN Demodulator, fSCN
(C) Receiver
106
Multiplexing
107
Computer Networks
1.4. Exercise
i) analog
ii) digital
iii) either analog or digital
iv) both analog and digital.
N
i) B B sci
i 1
N
ii) B Bsci
i 1
N
iii) B Bsci
i 1
iv) none of the above.
108
Multiplexing
m2(t)
mc(t) s(t)
Modem
mn(t)
m1(t)
m1(t)
m2(t)
mc(t)
mn(t)
Scan Buffer
Operation
(c) Receiver
109
Computer Networks
110
Multiplexing
2.4. Exercise
2.4.1. Multiple choice questions
i) must equal the sum of the data rates of the input signal
mi(t).
ii) must at least equal the sum of the data rates of the input
signal mi(t).
iii) must be less than the sum of the data rates of the input
signal mi(t).
iv) none of the above.
111
Computer Networks
112
Switched Data Communication Networking
Switched networks
Circuit-switched networks
Packet-switched networks.
Broadcast network
Local area networks (LANs)
Metropolitan area networks (MANs).
B 1 3 D
A 4 6
F
=Network station
114
Switched Data Communication Networking
115
Computer Networks
1.4. Exercise
116
Switched Data Communication Networking
1. Prior to the call, both stations are not in use (on-hook). The
call begins when one station lifts the receiver (off-hook), which
is automatically signaled to switch.
2. The switch responds with an audible dial tone, signaling the
station that the number may be dialed.
3. The caller dials the number, which is communicated as a
destination address to the switch.
117
Computer Networks
4. If the called station is not busy, the switch alerts the station to
an incoming call by sending a ringing signal, which causes the
station to ring.
On-hook On-hook
On-hook
Off-hook
1
Dial tone
2
Address
11
Audible ringing tone 5a 4 Ringing (20 Hz)
6
Off-hook (answer) Off-hook
(Customers connected
conversation ensues)
On-hook On-hook
8 8
Disconnect
6. The called station accepts the call by lifting the receiver (off-
hook), which is automatically signaled to the switch.
118
Switched Data Communication Networking
Supervisory
Address
Call information
Network management.
119
Computer Networks
Inband signaling
Out-of-band signaling.
Inband signaling uses not only the same physical path as the call
it serves, it also uses the same frequency band as the signals that
are carried. This form of signaling has several advantages.
Because the control signals have the same electromagnetic
Inband signaling
properties as the signals, they can go anywhere that the signals
go. Thus there are no limits on the use of inband signaling
anywhere in the network, including places where analog-to-digital
or digital-to-analog conversion takes place. In addition, it is
impossible to set up a call on a faulty path, since the control
signals that are used to set up that path would have to follow the
same path.
120
Switched Data Communication Networking
2.5. Exercise
121
Computer Networks
a) What is a “wink”?
b) Name the different categories of functions performed by
control signals.
c) What is the merit of inchannel signaling?
d) Name the different types of inchannel signaling.
e) What are the demerits of inchannel signaling?
122
Switched Data Communication Networking
3.2. Introduction
123
Computer Networks
Datagram
Virtual circuit.
124
Switched Data Communication Networking
3.4. Exercise
125
Computer Networks
4.2. Introduction
Correctness
Simplicity
Robustness
Stability
Fairness
Optimality
Efficiency.
126
Switched Data Communication Networking
5 3
3
2 6
5
2 8
3 3 6
2 3 3
1 1 1 4
1 2
7
1
4 1 5
Define:
The algorithm has three steps; steps 2 and 3 are repeated until M
= N.
127
Computer Networks
1. Initialize:
M = {s} i.e., set of nodes incorporated is only the source
node.
Dn = dsn for n s i.e., initial path costs to neighboring
nodes are simply the link costs.
2. Find the neighboring node not in M that has the least-cost
path from node s and incorporate that node into M:
min
Find w M such that Dw = Dj
j M
Add w to M.
3. Update least-cost paths:
Dn = min[Dn, Dw + dwn} for all n M
Table 8.1 shows the result of applying this algorithm to figure 8.3,
using s = 1. Note that at each step the path to each node plus the
total cost of that path is generated. After the final iteration, the
least-cost path to each node and the cost of that path have been
developed.
Fixed Routing
128
Switched Data Communication Networking
Flooding
Random Routing
Adaptive Routing
Adaptive routing strategies are by far the most prevalent, for two
reasons:
129
Computer Networks
4.5. Exercise
a. In fixed routing,
130
Switched Data Communication Networking
5.2. Introduction
Flow control
Congestion control
Deadlock avoidance.
131
Computer Networks
132
Switched Data Communication Networking
Packets
to C
Packets
A
to D
Packets
to B
E B
Packets
to A
Packets
to E
Direct store-and-forward
deadlock can be avoided
by not allowing all buffers
to end up dedicated to a D C
single link. (b) Indirect store and forward deadlock
A B C
133
Computer Networks
Class N
.
.
.
Class k
.
.
.
Buffer space for packets
Class 2 that have traveled k hops
Class 1
Common pool
(class 0)
Reassembly Deadlock
134
Switched Data Communication Networking
5.6. Exercise
i) flow control
ii) congestion control
iii) deadlock avoidance
iv) all of the above.
135
Computer Networks
User To remote
process user process
PacketUser
Packet
X.25, standard specifies process
an interface between a Multi-channel ligical
host system and a packet- interface
Link Link
switched network. access Lap-B link-level access
logical interface
Physical Physical
X.21 physical interface
DTE DCE
Physical layer
Link layer
Packet layer.
136
Switched Data Communication Networking
User data
Layer 3
header
X.25 packet
LAP-B LAP-B
header trailer
LAP-frame
With the X.25 packet layer, data are transmitted in packets over
external virtual circuits. The virtual-circuit service of X.25 provides
The virtual-circuit service for two types of virtual circuits:
of X.25 provides for two
types of virtual circuits. Virtual call
Permanent virtual circuit.
A variety of packet types are used, all using the same basic
format, with variations (figure 8.8). For user data, the data are
broken up into blocks of some maximum size, and a 24-bit or 32-
bit header is appended to each block to form a data packet. The
header includes a 12-bit virtual-circuit number (expressed as a 4-
bit group number and an 8-bit channel number). The P(S) and
P(R) fields support the functions of flow control and error control
137
Computer Networks
(a) Data packet with 3-bit (b) Data packet with 7-bit
sequence numbers (c) Control packet
sequence numbers
Q D 0 1 Group # Q D 1 0 Group #
Channel # Channel #
P(R) Packet type Packet type
P(R) M
(e) RR, RNR and REJ packets (e) RR, RNR and REJ packets
with 3-bit sequence numbers with 7-bit sequence numbers
6.5. Multiplexing
Flow control and error control at the X.25 packet layer are virtually
identical in format and procedure to flow control used for HDLC. A
138
Switched Data Communication Networking
X.25 provides the To specify this mechanism, X.25 defines two types of packets: A
capability to identify a packets and B packets. An A Packet is one in which the M bit is
contiguous sequence of set to 1, the D bit is set to 0, and the packet is full (equal to the
data packets, which is maximum allowable packet length). A B packet is any packet that
called a complete packet is not an A packet. A complete packet sequence consists of zero
sequence. or more A packets followed by a B packet. The network may
combine this sequence to make one longer packet. The network
may also segment a B packet into smaller packets to produce a
complete packet sequence.
139
Computer Networks
6.8. Exercise
i) 24 bit
ii) 32 bit
iii) any of the above two
iv) none of the above.
i) 1024
ii) 4095
iii) 2048
iv) 128.
i) 2
ii) 7
iii) 127
iv) any of the above.
140
Local Area Networks
The local area networks (LANs) are distinguished from other types
of data networks in that they are optimized for a moderate-size
geographic area such as a single office building, a warehouse, or
a campus. These networks share the characteristics of being
packet broadcasting networks. The nature of a LAN is determined
primarily by three factors: transmission medium, topology, and
medium access control protocol. In this unit, these topics are
discussed.
Ring
Bus
Tree
Star.
Ring Topology
Repeater
Tap Terminating
resistance
Station
Flow of
data
Twisted pair, coaxial cable, and optical fiber are used for
constructing the ring. Table 9.1 summarizes representative
parameters for transmission media for commercially-available ring
LANs.
142
Local Area Networks
Twisted pair, coaxial cable, and optical fiber are used as medium.
Table 9.2 summarizes representative parameters for transmission
media for commercially available bus/tree LANs.
Star Topology
143
Computer Networks
Passive coupler.
Active coupler.
In active star coupler, there is digital logic in the central node that
acts as a repeater. As bits arrive on any input line, they are
The star coupler automatically regenerated and repeated on all outgoing lines. If
multiple input signals arrive simultaneously, a collision signal is
transmitted on all outgoing lines. Table 9.3 summarizes
representative parameters for transmission media for
commercially available star LANs.
Baseband transmission.
Broadband transmission.
144
Local Area Networks
Baseband System
Segment
A maximum of four
repeaters is allowed in the Repeater
path between any two Station
stations, extending the
effective cable length to
2.5 km.
145
Computer Networks
HUB
Two twisted
pair
Transmit
Receive
HHUB
Two twisted
pair
Station
IHUB IHUB
HHUB=Header hub
IHUB=Intermediate hub
146
Local Area Networks
Broadband Systems
Optical Optical
fiber fiber
Optical Optical
Decoder Coder
detector transmitter
Node
Optical Optical
fiber fiber
0 E E 0
Receiver Transmitter
Node
147
Computer Networks
Unidirectional bus A
Unidirectional bus A
(a) Loop Bus
Unidirectional bus A
Unidirectional bus B
148
Local Area Networks
Two configurations for the optical fiber bus have been proposed:
those that use a single bus and those that use two buses. Figure
9.6(a) shows a typical single-bus configuration, referred to as a
loop bus. Each station transmits on the bus in the direction toward
the headend and receives on the bus in the direction away from
the headend. Figure 9.6(b) shows the two-bus configuration. Each
station attaches to both buses and has both transmit and receive
taps on both buses.
Data insertion
Data reception
Data removal.
149
Computer Networks
Transmit state
Bypass state
150
Local Area Networks
1.6. Exercise
a. In carrierband transmission
b. Broadband system is
i) a bidirectional medium
ii) a unidirectional medium
iii) either of the above two
iv) none of the above.
151
Computer Networks
Round robin.
Contention.
Round Robin
Contention
152
Local Area Networks
Figure 9.8 illustrates the technique for a baseband bus. At time t0,
station A begins transmitting a packet addressed to station D. At
time t1, both station B and station C are ready to transmit. Station
B senses a transmission and so defers. Station C, however, is still
unaware of A’s transmission and begins its own transmission.
When station A’s transmission reaches station C, at t2, station C
detects the collision and ceases transmission. The effect of the
collision propagates back to station A, where it is detected some
time later, t3, at which time station A ceases transmission.
t0
A B C D
t1
A B C D
t2
A B C D
t3
A B C D
153
Computer Networks
Nonresistant CSMA/CD:
1-persistent CSMA/CD:
p-persistent CSMA/CD:
Token bus is a technique Token bus is a round robin technique used in bus topology; that is,
in which the stations of the stations are assigned positions in an ordered sequence, with
the bus or tree form a the last member of the sequence followed by the first. Each
logical ring. station knows the identity of the stations preceding and following it
(figure 9.9).
154
Local Area Networks
A C
P=C P=C
S=D S=D
B D
P=C P=C
S=D S=D
155
Computer Networks
156
Local Area Networks
2.6. Exercise
a. CSMA/CD is a
b. Token bus is a
c. Token ring is a
157
Computer Networks
3.2. Introduction
Application
Presentation
Session
Application
Network
() ( ) ( )
Application
Data Link Logical Link Control
Medium Access Control
Physical Physical
158
Local Area Networks
User Data
LLC
LLCPDU
header
MAC MAC
MAC frame
header trailer
CSMA/CD
7 1 2,6 2,6 2 0-1500 4
Token Bus
>1 1 1 2,6 2,6 >0 4 1
Token Ring
1 1 1
SD AC ED
SD AC FC DA SA LLC FCS ED FS
AC = Access Control
DA = Destination Address
DSAP = Destination Service Access Point
ED = Ending Delimiter
FC = Frame Control
FCS = Frame Check Sequence
FS = Frame Status
SA = Source Address
SD = Starting Delimiter
SFD = Start Frame Delimiter
SSAP = Source Service Access Point
159
Computer Networks
LLC Services
LLC Protocol
The basic LLC protocol is modeled after HDLC and has similar
functions and formats. The differences between the two protocols
can be summarized as follows:
All three LLC protocols employ the same PDU format (figure
9.13). The DSAP and SSAP fields each contain 7-bit address,
which specify the destination and source users of LLC. One bit of
the DSAP indicates whether this is an individual or group address.
One bit of the SSAP indicates whether it is a command or
response PDU.
160
Local Area Networks
Medium Options
161
Computer Networks
Table 9.5 summarizes the options defined for the IEEE 802.3
medium. 1BASE5 and 10BASE-T standard support passive-star
topology.
Medium Options
Table 9.6: Physical layer specification for IEEE 802.4 (Token Bus)
LAN standard.
162
Local Area Networks
Medium Option
The IEEE 802.5 physical layer options are given in table 9.7.
The FDDI medium access The FDDI medium access control technique is also a token-
control technique is also a passing ring technique. FDDI does not use the priority/reservation
token-passing ring scheme of 802.5. Accordingly, the FDDI MAC frame (figure 9.13)
technique. is the same as that of 802.5 except that there is no access control
field in the FDDI frame.
Medium Option
163
Computer Networks
3.8. Exercise
164
Transport Protocols
Type of service.
Quality of service.
Data transfer.
User interface.
Connection management.
Expedited delivery.
Computer Networks
Status reporting.
Security.
Types of Service
Connection-oriented service.
Connectionless or datagram service.
Quality of Service
Data Transfer
Connection Management
166
Transport Protocols
Expedited Deliver
Status Reporting
Security
167
Computer Networks
Addressing.
Multiplexing.
Flow control.
Connection establishment/termination.
In this case, the network service will only accept TPDU’s of some
maximum size for transfer. There are two types of data transfer
required by the user: stream-oriented and block-oriented. A
stream-oriented interface between transport and the user accepts
Two types of data transfer data as if they were a continuous stream of bits and reproduce the
required by the user: stream at the other end without conveying any information about
stream-oriented and the breakpoints in the stream submitted by the sender. A more
block-oriented. common occurrence is a transport user that sends data in blocks.
If a block exceeds the maximum allowable TPDU size, the
transport entity must segment the block before transmission, to be
reassembled at reception prior to delivery to the user.
168
Transport Protocols
In this case, TPDUs are occasionally lost, and TPDUs may arrive
out of sequence. Six issues need to be addressed:
Retransmission strategy.
Duplication detection.
Flow control.
Connection establishment.
Connection termination.
Crash recovery.
1.4. Exercise
169
Computer Networks
Service Primitives
170
Transport Protocols
171
Computer Networks
Transport Services
The transport service specification is the same for all classes. The
ISO specification is in the form of four primitive types and 10
primitives. The T-CONNECT primitives are used to established a
connection. The transport entity will either provide the requested
quality of service, or indicate in the indication and confirm
The ISO specification is in primitives a lesser quality of service that can be provided. T-
the form of four primitive DISCONNECT primitive provides for an abrupt connection
types and 10 primitives. termination. Termination can be initiated by either side or by one
of the transport entities. T-DISCONNECT can also be used by the
local transport entity or the remote addressee to reject a
connection attempt. T-DATA and T-EXPEDITED-DATA primitives
are used to transfer data over a transport connection.
Protocol Formats
A fixed header.
A variable header.
A data field.
The latter two optionally may not be present in a TPDU. The fixed
header contains the frequently occurring parameters and the
variable header contains optional or infrequently occurring
parameters.
Protocol Mechanisms
Connection establishment.
172
Transport Protocols
Data transfer.
Connection termination.
Connection Establishment
Data Transfer
Connection Termination
173
Computer Networks
TCP Services
TCP uses only a single type of TPDU, called a TCP segment. The
header is shown in figure 10.1(a). The header fields are:
174
Transport Protocols
1111111111122222222233
01234567890123456789012345678901
Sequence number
Acknowledgement number
Data
Reserved Window
offset
Ckecksum Urgent pointer
Options Padding
Length Ckecksum
TCP Mechanism
175
Computer Networks
176
Transport Protocols
2.5. Exercise
i) Class 1.
ii) Class 2.
iii) Class 3.
iv) all of the above.
177
Computer Networks
178
Session Services and Protocols
The transport protocol is The essential purpose of a session protocol is to provide a user-
responsible for creating oriented connection service. The transport protocol is responsible
and maintaining a logical for creating and maintaining a logical connection between
connection between endpoints. A session protocol provides a “user interface” by
endpoints.
“adding value” to the basic connection service. The value-added
functions can be grouped into the following categories:
The session entity accepts records from the session user and
encapsulates each into a session protocol data unit (SPDU).
SPDUs are, in turn, handed over the local transport entity to be
sent over a transport connection in a sequence of transport
protocol data units (TPDUs). The data are received on the other
side and delivered to the user in the proper order. The sending
transport entity may, at its discretion, segment SPDUs into
multiple TPDUs if the SPDU size is too large. Alternatively,
multiple records may be blocked into a single TPDU for efficiency
of transmission. In any case, the receiving entity recovers the
original records and passes these on to the receiving user.
Dialogue Management
Recovery
180
Session Services and Protocols
Session Services
181
Computer Networks
It is the job of the session protocol to bridge the gap between the
services provided by the transport layer and those required by the
session user. In essence, the transport layer provides three
services:
182
Session Services and Protocols
SPDUs. The next field is the length indicator, which specifies the
length of the header. If the SPDU contains any parameters, then
the next field contains these parameters. Finally, there may be a
field for session user information.
PGI LI PC
PGI
or
unit
PGI LI P1-Field
PI
PI LI PV
unit
SI = SPDU identifier
LI = Length indicator
PGI/P1-Field = One or more PGI and/or PI units
PGI = Parameter group identifier
PV = Parameter value
PI-Field = One or more PI units
PI = Parameter identifier
Transport Connection
183
Computer Networks
1.5. Exercise
i) a session protocol
ii) a transport protocol
iii) any one of the above two
iv) none of the above.
184
Presentation Facilities
USER USER
encoding encoding
rules rules
186
Presentation Facilities
187
Computer Networks
Child Information
Name: Matia Karim
Date of Birth: 15 January 1193
188
Presentation Facilities
189
Computer Networks
1.4. Exercise
i) abstract syntax.
ii) transfer syntax.
iii) absolute syntax.
iv) any one of the above.
i) the type
ii) the module
iii) the macro
iv) none of the above.
i) must be infinite
ii) must be finite
iii) may be infinite
iv) none of the above.
190
Presentation Facilities
191
Computer Networks
Key
Encryption Decryption
User A Plain Text Cipher Text Plain Text User B
Algorithm Algorithm
Encryption Decryption
User A Plain Text Cipher Text Plain Text User B
Algorithm Algorithm
192
Presentation Facilities
193
Computer Networks
It must be able to verify the author and the date and time of
the signature.
It must be able to authenticate the contents at the time of the
signature.
The signature must be verifiable by third parties, to resolve
disputes.
Encryption Decryption
User A Plain Text Cipher Text Plain Text User B
Algorithm Algorithm
Fig. 12.4 : (b) Digital signature scheme providing authentication and secrecy
194
Presentation Facilities
195
Computer Networks
2.7. Exercise
196
Presentation Facilities
197
Computer Networks
Terminal
processes
Network
198
Presentation Facilities
Figure 12.5 illustrates the process involved. Upon user input, the
characteristics of a real terminal are transformed into the agreed
format, or “virtual terminal”. These formatted data are transmitted
over a network to a host system. In the host computer, the virtual
terminal structure is translated into the terminal format normally
used by the host. The reverse process is performed for host-to-
terminal traffic. Thus, a virtual terminal service must understand
the virtual terminal format and be able to employ a data-transfer
mechanism, such as that provided in the OSI architecture.
Applications
Virtual terminal
Virtual terminal service
service
Presentation Presentation
Session Session
Transport Transport
Terminal
handler
Network Network
Physical Physical
199
Computer Networks
3.3. TELNET
200
Presentation Facilities
Real Application
terminal program
Virtual
Local terminal Local
mapping service mapping
Presentation
service
201
Computer Networks
3.5. Exercise
202
Distributed Applications
All of the protocols and functions are geared toward the support of
distributed applications that involve the interaction of multiple
independent systems. In the OSI model, such applications occupy
the application layer and are directly supported by the
presentation layer. In the TCP/IP protocol suite, such applications
typically rely on TCP or UDP for support. In this unit, tree
distributed applications supported by a network architecture are
discussed.
204
Distributed Applications
Management Applications
SNMPv2 manager
MIB
Element manager
MIB MIB
Agent
=SNMPv2 party
205
Computer Networks
206
Distributed Applications
1.4. Exercise
i) s stand-alone system.
ii) s shared system.
iii) any one of (i) and (ii).
iv) none of (i) and (ii).
i) TCP/IP-based networks.
ii) OSI-based networks.
iii) both TCP/IP- and OSI-based networks.
iv) none of the above.
207
Computer Networks
2.2. Architecture
Logical
User FTP FTP
connection
6 6
5 5
OS OS
4 4
3 3
2 2
1 Data path 1
System A System B
208
Distributed Applications
Services required
File by FTP
management Virtual file facility
system
Lower-level
Protocol module
protocol entity
User interface
Services provided
User by FTP
The user connects to the local FTP in order to transfer all or part
of a file. FTP must interact with three entities, as depicted in figure
13.3. First, there must be a user interface to accept request from
an interactive user or, possibly, a program. Of course, this
interaction only takes place at the requesting system. The remote
FTP in a file transfer event does not interact with a user. Second,
FTP must be able to communicate with other FTPs to achieve file
transfer. Typically, this is done by interfacing to a lower-level
protocol entity. Finally, to transfer a file, FTP must be able to get
at the file. For this, an interface is needed to the local file
management system.
2.3. Characteristics
Service Features
The following are the service features for file transfer protocols:
209
Computer Networks
Protocol Features
210
Distributed Applications
211
Computer Networks
212
Distributed Applications
2.5. Exercise
213
Computer Networks
214
Distributed Applications
Mailboxes
215
Computer Networks
Other telematic
User User
services
MHS
PDAU
MTA
User UA
User UA
MTA
PDAU
Other telematic
User User
services
216
Distributed Applications
Message Message
User transfer User
transfer
agent agent agent
agent
Preparation Receipt
Add Add
Remove Remove
Envelope
Heading Heading Heading
217
Computer Networks
218
Distributed Applications
X.400 Series
For both sets of services, the services are divided into three
categories:
Basic.
Essential optional.
Additional optional.
3.5. Exercise
i) submitted messages.
ii) delivered messages.
iii) both of (i) and (ii).
iv) none of the above.
219
Computer Networks
i) P1
ii) P3
iii) P7
iv) none of the above.
220
COMPUTER NETWORKS
DCA 3303
COMPUTER NETWORKS
Computer network is
introduced in a self learning style
of distance education under Open university
system. The book covers detailed study of data
communications, different layers of computer
architecture, local area networks, widely used
standards in computer networks, and various
distributed applications. The book is suitable
for a self learner, for students, and
professionals.