Unit - I
INTRODUCTIONAND PHYSICAL LAYER
Networks – Network Types – Protocol
Layering – TCP/IP Protocol suite –
OSI Model – Physical Layer:
Performance – Transmission media –
Switching – Circuit-switched Networks
– Packet Switching.
Behrouz A. Forouzan, Data Communications and Networking, Fifth Edition
TMH, 2013
3.
1-1 DATA
COMMUNICATIONS
The termtelecommunication means communication at a
distance. The word data refers to information presented in
whatever form is agreed upon by the parties creating and
using the data. Data communications are the exchange of
data between two devices via some form of transmission
medium such as a wire cable.
Topics discussed in this section:
▪Components of a data communications system
▪Data Flow
3
Figure 1.2 Dataflow (simplex, half-duplex, and full-
duplex)
5
6.
1-2 NETWORKS
A networkis a set of devices (often referred to as nodes)
connected by communication links. A node can be a
computer, printer, or any other device capable of sending
and/or receiving data generated by other nodes on the
network. A link can be a cable, air, optical fiber, or any
medium whichcan transport a signal
carrying
information.
Topics discussed in this section:
▪Network Criteria
▪Physical Structures
▪Categories of Networks
6
7.
Network Criteria
■Performance
■Depends onNetwork Elements
■Measured in terms of Delay and Throughput
■Reliability
■Failure rate of network components
■Measured in terms of availability/robustness
■Security
■Data protection against corruption/loss of data due to:
■Errors
■Malicious users
7
8.
Physical
Structures
■Type of Connection
■Pointto Point - single transmitter and
receiver
■Multipoint - multiple recipients of
single transmission
■Physical Topology
■Connection of devices
■Type of transmission - unicast,
mulitcast, broadcast
8
Figure 1.9 Ahybrid topology: a star backbone with three bus
networks
11
12.
Categories of
Networks
■ LocalArea Networks (LANs)
■ Short distances
■ Designed to provide local interconnectivity
■ Wide Area Networks (WANs)
■ Long distances
■ Provide connectivity over large areas
■ Metropolitan Area Networks (MANs)
■ Provide connectivity over areas such as a city, a campus
12
13.
1-3 THE
INTERNET
The Internethas revolutionized many aspects of our daily lives. It has
affected the way we do business as well as the way we spend our
leisure time. The Internet is a communication system that has brought
a wealth of information to our fingertips and organized it for our use.
Topics discussed in this section:
Organization of the Internet
Internet Service Providers (ISPs)
13
14.
1-4
PROTOCOLS
A protocol issynonymous with rule. It consists of a set of
rules that govern data communications. It determines
what is communicated, how it is communicated and when
it is communicated. The key elements of a protocol are
syntax, semantics and timing
Topics discussed in this section:
▪Syntax
▪Semantics
▪Timing
14
15.
Elements of aProtocol
■ Syntax
■ Structure or format of the data
■ Indicates how to read the bits - field delineation
■ Semantics
■ Interprets the meaning of the bits
■ Knows which fields define what action
■ Timing
■ When data should be sent and what
■ Speed at which data should be sent or speed at which it is
being
received.
15
2-1 LAYERED
TASKS
We usethe concept of layers in our daily life. As
an example, let us consider two friends who
communicate through postal mail. The process of
sending a letter to a friend would be complex if
there were no services available from the post
office.
Topics discussed in this section:
Sender, Receiver, and Carrier
Hierarchy
17
2-2 THE OSI
MODEL
Establishedin 1947,the International
Standards (ISO) is
to worldwide
Organization
dedicated
international standards.An ISO
standard
a multinational
body agreement
on
that
covers all aspects of network communications is
the Open Systems Interconnection (OSI) model. It
was first introduced in the late 1970s.
Topics discussed in this section:
Layered Architecture
Peer-to-Peer Processes
Encapsulation
19
20.
Figure 2.2 Sevenlayers of the OSI
model
ISO is the organization.
OSI is the model.
20
Note
21.
Figure 2.3 Theinteraction between layers in the OSI
model
21
2-3 LAYERS INTHE OSI
MODEL
In this section we briefly describe
the functions of each layer in the OSI model.
Topics discussed in this section:
Physical Layer
Data Link Layer
Network Layer
Transport Layer
Session Layer
Presentation Layer
Application Layer
23
24.
Figure 2.5 Physical
layer
Thephysical layer is responsible for movements of
individual bits from one hop (node) to the next.
Note
24
25.
Figure 2.6 Datalink
layer
The data link layer is responsible for moving
frames from one hop (node) to the next.
Note
25
2-4 TCP/IP PROTOCOL
SUITE
Thelayers in the TCP/IP protocol
suite do not
match those in the OSI
model. The
TCP/IP protocol suite was defined
as
exactly
original
having
four layers: host-to-network,
internet,
transport, and application. However, when TCP/IP
is compared to OSI, we can say that the TCP/IP
protocol suite is made of five layers: physical,
data link, network, transport, and application.
Topics discussed in this section:
Physical and Data Link Layers
Network Layer
Transport Layer
Application Layer
35
2-5
ADDRESSING
Four levels ofaddresses are used in an internet
employing the TCP/IP protocols: physical, logical,
port, and specific.
Topics discussed in this section:
Physical Addresses
Logical Addresses
Port Addresses
Specific Addresses
37
In Figure 2.19a node with physical address 10 sends a
frame to a node with physical address 87. The two nodes
are connected by a link (bus topology LAN). As the figure
shows, the computer with physical address 10 is the
sender, and the computer with physical address 87 is the
receiver.
Example 2.1
39
40.
Most local-area networksuse a 48-bit (6-byte)
physical address written as 12 hexadecimal
digits; every byte (2 hexadecimal digits) is
separated by a colon, as shown below:
40
Example 2.2
07:01:02:01:2C:4B
A 6-byte (12 hexadecimal digits) physical
address.
41.
Figure 2.20 showsa part of an internet with two
routers connecting three LANs. Each device
(computer or router) has a pair of addresses
(logical and physical) for each connection. In this
case, each computer is connected to only one
link and therefore has only one pair of
addresses. Each router, however, is connected
to three networks (only two are shown in the
figure). So each router has three pairs of
addresses, one for each connection.
41
Example 2.3
Figure 2.21 shows
43
communicatingvia the
two
computers Internet.
The sending
computer is running three processes at this time
with port addresses a, b, and c. The receiving
computer is running two processes at this time
with port addresses j and k. Process a in the
sending computer needs to communicate with
process j in the receiving computer. Note that
although physical addresses change from hop to
hop, logical and port addresses remain the same
from the source to destination.
Example 2.4
Example 2.5
A portaddress is a 16-bit
address represented by one decimal number
as shown.
753
A 16-bit port address represented
as one single number.
The physical addresses will change from hop to
hop, but the logical addresses usually remain the
same.
Note
45
46.
3-6
PERFORMANCE
One important issuein networking
is the
performance of the network—how good is it? We
discuss quality of service, an overall
measurement of network performance, in greater
detail in Chapter 24. In this section, we introduce
terms that we need for future chapters.
Topics discussed in this section:
▪Bandwidth - capacity of the system
▪Throughput - no. of bits that can be pushed through
▪Latency (Delay) - delay incurred by a bit from start to finish
▪Bandwidth-Delay Product
46
47.
In networking, weuse the term bandwidth in
two contexts.
▪The first, bandwidth in hertz, refers to the
range of frequencies in a composite signal or
the range of frequencies that a channel can
pass.
▪The second, bandwidth in bits per second,
refers to the speed of bit transmission in a
channel or link. Often referred to as Capacity.
Note
47
48.
The bandwidth ofa subscriber line is 4 kHz
for voice or data. The bandwidth of this
line for data transmission
can be up to 56,000 bps using a
sophisticated modem to change the digital
signal to analog.
48
Example 3.42
49.
If the telephone
qualityof
the line
49
and increases
companyimprovesthe
the
bandwidth to 8 kHz, we can send 112,000
bps by using the same technology as
mentioned in Example 3.42.
Example 3.43
50.
Example 3.44
A networkwith bandwidth of 10 Mbps can
pass only an average of 12,000 frames per
minute with each frame carrying an average
of 10,000 bits. What is the throughput of this
network?
Solution
We can calculate the throughput as
The throughput is almost one-fifth
of the bandwidth in this case.
50
51.
Propagation & Transmission
delay
■Propagationspeed - speed at which a bit travels
though the medium from source to destination.
■Transmission speed - the speed at which all the
bits in a message arrive at the destination.
(difference in arrival time of first and last bit)
Propagation Delay = Distance/Propagation speed
Transmission Delay = Message size/bandwidth bps
Latency = Propagation delay + Transmission delay
+
Queueing time + Processing time
51
52.
What is thepropagation time if the distance
between the two points is 12,000 km? Assume the
propagation speed to be 2.4 × 108 m/s in cable.
Solution
We can calculate the propagation time as
Example 3.45
The example shows that a bit can go over the
Atlantic Ocean in only 50 ms if there is a direct cable
between the source and the destination.
52
53.
What are thepropagation time and the transmission time
for a 2.5-kbyte message (an e-mail) if the bandwidth of the
network is 1 Gbps? Assume that the distance between the
sender and the receiver is 12,000 km and that light travels at
2.4 × 108 m/s.
Solution
We can calculate the propagation and transmission time
Example 3.46
Note that in this case, because the message is short and the bandwidth is
high,
the dominant factor is the propagation time, not
the transmission time. The
transmission time can be ignored.
53
54.
What are thepropagation time and the transmission time
for a 5-Mbyte message (an image) if the bandwidth of the
network is 1 Mbps? Assume that the distance between
the sender and the receiver is 12,000 km and that light
travels at 2.4 × 108
m/s.
Solution
We can calculate the propagation and transmission times
Example 3.47
Note that in this case, because the message is very long and the bandwidth is not
very high, the dominant factor is the transmission time, not the propagation time.
The propagation time can be ignored.
54
We can thinkabout the link between two
points as a pipe. The cross section of the
pipe represents the bandwidth, and the
length of the pipe represents the delay. We
can say the volume of the pipe defines the
bandwidth-delay product, as shown in
Figure 3.33.
56
Example 3.48
7-1 GUIDED
MEDIA
Guided media,which are those that provide a conduit from one device
to another, include twisted-pair cable, coaxial
cable, and fiber-optic
cable.
Coaxial Cable
Fiber-Optic Cable
Topics discussed in this section:
Twisted-Pair Cable
62
7-2 UNGUIDED MEDIA:
WIRELESS
Unguidedmedia transport electromagnetic waves without using a
physical conductor. This type of communication is often referred to as
wireless communication.
Topics discussed in this section:
Radio Waves
Microwaves
Infrared
Figure 7.17 Electromagnetic spectrum for wireless communication
69
Figure 7.19 Wirelesstransmission
waves
Note
Infrared signals can be used for short-range communication
in a closed area using line-of-sight propagation.
72
8-1 CIRCUIT-SWITCHED
NETWORKS
A circuit-switchednetwork consists of a set of switches
connected by physical links. A connection between two
stations is a dedicated path made of one or more links.
However, each connection uses only one dedicated
channel on each link. Each link is normally divided
into n channels by using FDM or TDM.
Topics discussed in this section:
Three Phases
Efficiency
Delay
Circuit-Switched Technology in Telephone Networks
76
77.
Figure 8.3 Atrivial circuit-switched
network
A circuit-switched network is made of a set of
switches connected by physical links, in
which each link is divided into n
channels.
Note
77
78.
As a trivialexample, let us use a circuit-switched network to connect eight telephones
in a small area. Communication is through 4-kHz voice channels. We assume that
each link uses FDM to connect a maximum of two voice channels. The bandwidth of
each link is then 8 kHz. Figure 8.4 shows the situation. Telephone 1 is connected to
telephone 7; 2 to 5; 3 to 8; and 4 to 6. Of course the situation may change when new
connections are made. The switch controls the
connections.
Example 8.1
In circuit switching, the resources need to be reserved during
the setup phase; the resources remain dedicated for the entire
duration of data transfer until the teardown phase.
Note
78
79.
As another example,consider a circuit-switched network that connects computers in
two remote offices of a private company. The offices are connected using a T-1 line
leased from a communication service provider. There are two 4 × 8 (4 inputs and 8
outputs) switches in this network. For each switch, four output ports are folded into
the input ports to allow communication between computers in the same office. Four
other output ports allow communication between the two offices. Figure shows the
situation.
Example 8.2
79
Switching at the physical layer in the traditional
telephone network uses the circuit-switching approach.
Note
8-2 DATAGRAM
NETWORKS
In datacommunications, we need to send messages
from one end system to another. If the message is
going to pass through a packet-switched network, it
needs to be divided into packets of fixed or variable
size. The size of the packet is determined by the
network and the governing protocol.
Topics discussed in this section:
Routing Table
Efficiency
Delay
Datagram Networks in the Internet
81
82.
Figure 8.7 Adatagram network with four switches
(routers)
In a packet-switched network, there is no resource
reservation; resources are allocated on demand.
Note
82
83.
Figure 8.8 Routingtable in a datagram
network
Note
The destination address in the header of a packet in
a datagram network remains the same during the
entire journey of the packet.
A switch in a datagram network
uses a routing table that is based
on the destination address.
Note
83
84.
Figure 8.9 Delayin a datagram
network
Switching in the Internet is done by using the
datagram approach to packet switching at
the network layer.
84
Note
85.
8-3 VIRTUAL-CIRCUIT
NETWORKS
A virtual-circuitnetwork is a
cross between a circuit- switched network
and a datagram network. It has
some
characteristics of both.
Addressing
Three
Phases
Efficiency
Delay
Circuit-Switched Technology in
WANs
Topics discussed in this section:
Figure 8.11 Virtual-circuit
identifier 85
86.
Figure 8.12 Switchand tables in a virtual-circuit
network
Figure 8.13 Source-to-destination data transfer in a virtual-circuit nwk
86
Figure 8.15 Setupacknowledgment in a virtual-circuit
network
In virtual-circuit switching, all packets belonging to the same source
and destination travel the same path; but the packets may arrive at
the destination with different delays if resource allocation is on
demand.
88
Note
89.
Figure 8.16 Delayin a virtual-circuit
network
Note
Switching at the data link layer in a switched WAN is
normally implemented by using virtual-circuit
techniques.
89
90.
8-4 STRUCTURE OFA
SWITCH
We use switches in circuit-switched and packet-switched networks. In
this section, we discuss the structures of the switches used in each type
of network. Topics discussed in this section:
Structure of Circuit Switches
Structure of Packet Switches
90
Figure 8.17 Crossbar switch
with three inputs and four
outputs
Figure 8.18 Multistage switch
91.
Example 8.3 Note
Accordingto the Clos criterion: n =
(N/2)1/2
k > 2n – 1 Crosspoints ≥ 4N [(2N)1/2
– 1]
In a three-stage switch, the total number of crosspoints is
2kN + k(N/n)2
which is much smaller than the number of
crosspoints
in a single-stage switch (N2
).
Design a three-stage, 200 × 200 switch (N = 200) with k = 4 and n = 20.
Solution
In the first stage we have N/n or 10 crossbars, each of size 20 × 4. In the second
stage, we have 4 crossbars, each of size 10 × 10. In the third stage, we have 10
crossbars, each of size 4 × 20. The total number of crosspoints is 2kN + k(N/n)2
,
or 2000 crosspoints. This is 5 percent of the number of crosspoints in a single-
stage switch (200 × 200 = 40,000).
Note
91
92.
Example 8.4
Redesign theprevious three-stage, 200 × 200 switch, using
the Clos criteria with a minimum number of crosspoints.
Solution
We let n = (200/2)1/2
, or n = 10. We calculate k = 2n − 1 = 19. In the first stage, we
have 200/10, or 20, crossbars, each with 10 × 19 crosspoints. In the second stage,
we have 19 crossbars, each with 10 × 10 crosspoints. In the third stage, we have 20
crossbars each with 19 × 10 crosspoints. The total number of crosspoints is 20(10 ×
19) + 19(10 × 10) + 20(19 ×10) = 9500.
Fig 8.19 Time-slot interchange
92