1. CS8591 COMPUTER NETWORKS
UNIT – I
Dr.A.Kathirvel, Professor & Head, Computer Science & Engg.
M N M Jain Engineering College, Chennai
2. Unit - I
INTRODUCTION AND 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 term telecommunication 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.
Components of a data communications system
Data Flow
Topics discussed in this section:
3
5. Figure 1.2 Data flow (simplex, half-duplex, and full-duplex)
5
6. 1-2 NETWORKS
A network is 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 which can transport a signal carrying
information.
Network Criteria
Physical Structures
Categories of Networks
Topics discussed in this section:
6
7. Network Criteria
Performance
Depends on Network 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
Point to Point - single transmitter and receiver
Multipoint - multiple recipients of single
transmission
Physical Topology
Connection of devices
Type of transmission - unicast, mulitcast,
broadcast
8
11. Figure 1.9 A hybrid topology: a star backbone with three bus networks
11
12. Categories of Networks
Local Area 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 Internet has 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.
Organization of the Internet
Internet Service Providers (ISPs)
Topics discussed in this section:
13
14. 1-4 PROTOCOLS
A protocol is synonymous 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
Syntax
Semantics
Timing
Topics discussed in this section:
14
15. Elements of a Protocol
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
17. 2-1 LAYERED TASKS
We use the 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.
Sender, Receiver, and Carrier
Hierarchy
Topics discussed in this section:
17
19. 2-2 THE OSI MODEL
Established in 1947, the International Standards
Organization (ISO) is a multinational body
dedicated to worldwide agreement on
international standards. An ISO standard that
covers all aspects of network communications is
the Open Systems Interconnection (OSI) model. It
was first introduced in the late 1970s.
Layered Architecture
Peer-to-Peer Processes
Encapsulation
Topics discussed in this section:
19
20. Figure 2.2 Seven layers of the OSI model
ISO is the organization.
OSI is the model.
Note
20
21. Figure 2.3 The interaction between layers in the OSI model
21
23. 2-3 LAYERS IN THE OSI MODEL
In this section we briefly describe the functions
of each layer in the OSI model.
Physical Layer
Data Link Layer
Network Layer
Transport Layer
Session Layer
Presentation Layer
Application Layer
Topics discussed in this section:
23
24. Figure 2.5 Physical layer
The physical layer is responsible for movements of
individual bits from one hop (node) to the next.
Note
24
25. Figure 2.6 Data link layer
The data link layer is responsible for moving
frames from one hop (node) to the next.
Note
25
27. Figure 2.8 Network layer
The network layer is responsible for the
delivery of individual packets from
the source host to the destination host.
Note
27
35. 2-4 TCP/IP PROTOCOL SUITE
The layers in the TCP/IP protocol suite do not
exactly match those in the OSI model. The
original TCP/IP protocol suite was defined as
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.
Physical and Data Link Layers
Network Layer
Transport Layer
Application Layer
Topics discussed in this section:
35
37. 2-5 ADDRESSING
Four levels of addresses are used in an internet
employing the TCP/IP protocols: physical, logical,
port, and specific.
Physical Addresses
Logical Addresses
Port Addresses
Specific Addresses
Topics discussed in this section:
37
39. In Figure 2.19 a 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 networks use 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:
Example 2.2
07:01:02:01:2C:4B
A 6-byte (12 hexadecimal digits) physical
address.
40
41. Figure 2.20 shows a 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.
Example 2.3
41
43. Figure 2.21 shows two computers
communicating via the 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
43
45. Example 2.5
A port address 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 issue in 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.
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
Topics discussed in this section:
46
47. In networking, we use 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 of a 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.
Example 3.42
48
49. If the telephone company improves the
quality of the line and increases 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
49
50. A network with 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
Example 3.44
The throughput is almost one-fifth of the
bandwidth in this case.
50
51. Propagation & Transmission delay
Propagation speed - 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 the propagation 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 the propagation 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 the propagation 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
56. We can think about 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.
Example 3.48
56
62. 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.
Twisted-Pair Cable
Coaxial Cable
Fiber-Optic Cable
Topics discussed in this section:
62
69. 7-2 UNGUIDED MEDIA: WIRELESS
Unguided media transport electromagnetic waves without using a
physical conductor. This type of communication is often referred to as
wireless communication.
Radio Waves
Microwaves
Infrared
Topics discussed in this section:
Figure 7.17 Electromagnetic spectrum for wireless communication
69
72. Figure 7.19 Wireless transmission waves
Infrared signals can be used for short-range communication
in a closed area using line-of-sight propagation.
Note
72
73. Figure 7.20 Omnidirectional antenna
Radio waves are used for multicast
communications, such as radio and television, and
paging systems.
Note
73
74. Figure 7.21 Unidirectional antennas
Microwaves are used for unicast communication such as cellular
telephones, satellite networks, and wireless LANs.
Note
74
76. 8-1 CIRCUIT-SWITCHED NETWORKS
A circuit-switched network 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.
Three Phases
Efficiency
Delay
Circuit-Switched Technology in Telephone Networks
Topics discussed in this section:
76
77. Figure 8.3 A trivial 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 trivial example, 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
81. 8-2 DATAGRAM NETWORKS
In data communications, 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.
Routing Table
Efficiency
Delay
Datagram Networks in the Internet
Topics discussed in this section:
81
82. Figure 8.7 A datagram 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 Routing table in a datagram network
A switch in a datagram network
uses a routing table that is based
on the destination address.
Note
The destination address in the header of a packet in a
datagram network remains the same during the entire
journey of the packet.
Note
83
84. Figure 8.9 Delay in a datagram network
Switching in the Internet is done by using the
datagram approach to packet switching at
the network layer.
Note
84
85. 8-3 VIRTUAL-CIRCUIT NETWORKS
A virtual-circuit network 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:
85
Figure 8.11 Virtual-circuit identifier
86. Figure 8.12 Switch and tables in a virtual-circuit network
Figure 8.13 Source-to-destination data transfer in a virtual-circuit nwk
86
88. Figure 8.15 Setup acknowledgment 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.
Note
88
89. Figure 8.16 Delay in a virtual-circuit network
Switching at the data link layer in a switched WAN is
normally implemented by using virtual-circuit techniques.
Note
89
90. 8-4 STRUCTURE OF A 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.
Structure of Circuit Switches
Structure of Packet Switches
Topics discussed in this section:
90
Figure 8.17 Crossbar switch
with three inputs and four outputs
Figure 8.18 Multistage switch
91. 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).
Example 8.3
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).
Note
According to the Clos criterion: n = (N/2)1/2
k > 2n – 1 Crosspoints ≥ 4N [(2N)1/2 – 1]
Note
91
92. Redesign the previous 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.
Example 8.4
92
Fig 8.19 Time-slot interchange