Vous êtes sur la page 1sur 152

Data communication &

networKing

KartiK
IoT
C-DAC Bangalore

04-Dec-15 C-DAC
agenda
• Introduction
• Networks
• Transmission Media
• Switching
• Multiplexing
• PCM
• Multiple Access
• OSI and TCP/IP layered architectures
• Addressing
• Important Protocols viz. TCP,UDP,IP,ICMP,PPP
04-Dec-15 C-DAC
introduction
• data
• communication
• networK
• data communication
– Transmission medium
• wired
• wireless

04-Dec-15 C-DAC
components of dc

04-Dec-15 C-DAC
types of communication

04-Dec-15 C-DAC
networK
• set of devices(nodes) connected by
communication linKs
• ‘things’
• ? property of ‘things’

04-Dec-15 C-DAC
types of networK connection

04-Dec-15 C-DAC
topology
• ?

04-Dec-15 C-DAC
Advantages
• Each connections can carry its own data.
• Robust
• Secure
• Easy fault identification and fault isolation
Disadvantages
Amount of cabling (and also cost) and IO ports.
04-Dec-15 C-DAC
Advantages
• Less expensive than Mesh.
• Robust
• Easy fault identification and fault isolation
Disadvantages
• If Hub fails, whole network fails.
• More cabling than ring/bus

04-Dec-15 C-DAC
advantages
• Less cabling than Mesh and Star.
• Multipoint
disadvantages
• Fault or break in bus stops all transmission.
• Difficult fault identification and fault isolation

04-Dec-15 C-DAC
advantages
• Less cabling than Mesh and Star.
• Multipoint
disadvantages
• Fault or break in bus stops all transmission.
• Difficult fault identification and fault isolation

04-Dec-15 C-DAC
04-Dec-15 C-DAC
scope of networKs

• LAN: privately owned and links devices in a


single building, office or campus.
• MAN: designed to extend over entire city.
• WAN: provides long-distance transmission
over a large geographic areas (country, whole
world).
04-Dec-15 C-DAC
• PAN: personal area networK
• Internet:
• More than one network connected.
• A collaboration of more than hundreds of
thousands interconnected networks.

04-Dec-15 C-DAC
interconnection of lan

04-Dec-15 C-DAC
04-Dec-15 C-DAC
heterogeneous networK

04-Dec-15 C-DAC
transmission media

04-Dec-15 C-DAC
transmission medium and physical
layer

20
classes of transmission media

21
electromagnetic spectrum for
wireless communication

22
propagation methods

23
wireless transmission waves

24
Wireless transmission waves
• Radio waves are used for multicast
communications, such as radio and
television
• Microwaves are used for unicast
communication such as cellular
telephones, satellite networks, and
wireless LANs.
• Infrared signals can be used for short-range
communication in a closed area using line-
of-sight propagation.

04-Dec-15 25
Switching
switched networK
taxonomy of switched networks
circuit switched networK
• 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.
Note
A circuit-switched network is made of a set of switches connected by physical links,
in which each link is
divided into n channels.
trivial circuit-switched networK
Note

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.
circuit-switched networK
delay in a circuit-switched networK
Note
Switching at the physical layer in the traditional telephone network uses
the circuit-switching approach.
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.
Note
In a packet-switched network, there
is no resource reservation;
resources are allocated on demand.
A datagram network with four
switches (routers)
routing table in a datagram networK
Note
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.
delay in a datagram networK
Note
Switching in the Internet is done by using the datagram approach
to packet switching at
the network layer.
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.
virtual-circuit networK
virtual-circuit identifier
switch and tables in a virtual-circuit
networK
source-to-destination data transfer in a virtual-circuit networK
Figure 8.14 Setup request in a virtual-circuit network
Figure 8.15 Setup acknowledgment in a virtual-circuit network
Note
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.
Figure 8.16 Delay in a virtual-circuit network
Note
Switching at the data link layer in a switched WAN is normally
implemented by using
virtual-circuit techniques.
Multiple Access
Figure 1 Data link layer divided into two functionality-oriented sublayers
Figure 2 Categories of multiple-access protocols
RANDOM ACCESS

In random access or contention methods, no station is


superior to another station and none is assigned the control
over another. No station permits, or does not permit, another
station to send. At each instance, a station that has data to
send uses a procedure defined by the protocol to make a
decision on whether or not to send.

Topics discussed in this section:

ALOHA
Carrier Sense Multiple Access
Carrier Sense Multiple Access with Collision Detection
Carrier Sense Multiple Access with Collision Avoidance
Figure 1 Frames in a pure ALOHA network
Figure 12.4 Procedure for pure ALOHA protocol
Note

The throughput for pure ALOHA is


S = G × e −2G .
The maximum throughput
Smax = 0.184 when G= (1/2).
Example 12.3
A pure ALOHA network transmits 200-bit frames on a shared channel of 200 kbps. What is
the throughput if the system (all stations together) produces
a. 1000 frames per second b. 500 frames per second
c. 250 frames per second.

Solution
The frame transmission time is 200/200 kbps or 1 ms.
a. If the system creates 1000 frames per second, this is 1
frame per millisecond. The load is 1. In this case
S = G× e−2G or S = 0.135 (13.5 percent). This means
that the throughput is 1000 × 0.135 = 135 frames. Only
135 frames out of 1000 will probably survive.
Example 12.3 (continued)
b. If the system creates 500 frames per second, this is
(1/2) frame per millisecond. The load is (1/2). In this
case S = G × e −2G or S = 0.184 (18.4 percent). This
means that the throughput is 500 × 0.184 = 92 and that
only 92 frames out of 500 will probably survive. Note
that this is the maximum throughput case,
percentagewise.

c. If the system creates 250 frames per second, this is (1/4)


frame per millisecond. The load is (1/4). In this case
S = G × e −2G or S = 0.152 (15.2 percent). This means
that the throughput is 250 × 0.152 = 38. Only 38
frames out of 250 will probably survive.
Figure 12.9 Vulnerable time in CSMA
Figure 12.10 Behavior of three persistence methods
Figure 12.11 Flow diagram for three persistence methods
Figure 12.12 Collision of the first bit in CSMA/CD
Figure 12.14 Flow diagram for the CSMA/CD
Figure 12.15 Energy level during transmission, idleness, or collision
Figure 12.17 Flow diagram for CSMA/CA
CONTROLLED ACCESS

In controlled access, the stations consult one another


to find which station has the right to send. A station
cannot send unless it has been authorized by other
stations. We discuss three popular controlled-access
methods.

Topics discussed in this section:

Reservation
Polling
Token Passing
Figure 12.18 Reservation access method
Figure 12.19 Select and poll functions in polling access method
Figure 12.20 Logical ring and physical topology in token-passing access method
CHANNELIZATION

Channelization is a multiple-access method in which


the available bandwidth of a link is shared in time,
frequency, or through code, between different stations.
In this section, we discuss three channelization
protocols.

Frequency-Division Multiple Access (FDMA)


Time-Division Multiple Access (TDMA)
Code-Division Multiple Access (CDMA)
Note

In FDMA, the bandwidth is divided into


channels.
Each station uses its allocated band to
send data
Figure 12.21 Frequency-division multiple access (FDMA)
Note

In TDMA, the bandwidth is just one channel


that is timeshared between different
stations.
Figure 12.22 Time-division multiple access (TDMA)
Note

In CDMA, one channel carries all


transmissions simultaneously.
Figure 12.23 Simple idea of communication with code
Figure 12.24 Chip sequences
Figure 12.25 Data representation in CDMA
Figure 12.26 Sharing channel in CDMA
Figure 12.27 Digital signal created by four stations in CDMA
Figure 12.28 Decoding of the composite signal for one in CDMA
Network Models

1.86
Seven layers of the Open Systems Interconnections (OSI) model

04-Dec-15 87
The interaction between layers in the OSI model

04-Dec-15 88
An exchange using the OSI model

04-Dec-15 89
LAYERS IN THE OSI MODEL
Brief description the functions of each layer in the OSI
model.
• Physical Layer
• Data Link Layer
• Network Layer
• Transport Layer
• Session Layer
• Presentation Layer
• Application Layer

04-Dec-15 90
Physical layer

04-Dec-15 91
Physical layer

• Provides physical interface for transmission of information.


• Defines rules for bits transfer from one system to another on a
physical communication medium.
• Covers all - mechanical, electrical, functional and procedural -
aspects for physical communication.
• Characteristics include

• Voltage levels

• Timing of voltage changes

• Physical data rates


• Maximum transmission distances
• Physical connectors
• Other similar attributes are defined by physical layer
specifications.
04-Dec-15 92
Data link layer

04-Dec-15 93
Data link layer

• Data link layer attempts to provide reliable communication over


the physical layer interface.
• Breaks the outgoing data into frames and reassemble the received
frames.
• Create and detect frame boundaries.
• Handle errors by implementing an acknowledgement and
retransmission scheme.
• Implement flow control.
• Supports points-to-point as well as broadcast communication.
• Supports simplex, half-duplex or full-duplex communication.

04-Dec-15 94
Hop-to-hop delivery

04-Dec-15 95
Network layer

04-Dec-15 96
Network layer

• Implements routing of frames (packets) through the network.


• Defines the most optimum path the packet should take from the
source to the destination
• Defines logical addressing so that any endpoint can be identified.
• Handles congestion in the network.
• Facilitates interconnection between heterogeneous networks
(Internetworking).
• The network layer also defines how to fragment a packet into
smaller packets to accommodate different media.

04-Dec-15 97
Source-to-destination delivery

04-Dec-15 98
Transport layer

04-Dec-15 99
Reliable process-to-process delivery of a message

04-Dec-15 100
Transport layer

• Purpose of this layer is to provide a reliable mechanism for the


exchange of data between two processes in different computers.
• Ensures that the data units are delivered error free.
• Ensures that data units are delivered in sequence.
• Ensures that there is no loss or duplication of data units.
• Provides connectionless or connection oriented service.
• Provides for the connection management.
• Multiplex multiple connection over a single channel.

04-Dec-15 101
Session layer

04-Dec-15 102
Session layer

• Session layer provides mechanism for controlling the dialogue


between the two end systems. It defines how to start, control and
end conversations (called sessions) between applications.
• This layer requests for a logical connection to be established on an
end-user’s request.
• Any necessary log-on or password validation is also handled by
this layer.
• Session layer is also responsible for terminating the connection.
• This layer provides services like dialogue discipline which can be
full duplex or half duplex.
• Session layer can also provide check-pointing mechanism such
that if a failure of some sort occurs between checkpoints, all data
can be retransmitted from the last checkpoint.

04-Dec-15 103
Presentation layer

04-Dec-15 104
Presentation layer

• Presentation layer defines the format in which the data is to be


exchanged between the two communicating entities.
• Also handles data compression and data encryption
(cryptography).

04-Dec-15 105
Application layer

04-Dec-15 106
Application layer

• Application layer interacts with application programs and is the


highest level of OSI model.
• Application layer contains management functions to support
distributed applications.
• Examples of application layer are applications such as file
transfer, electronic mail, remote login etc.

04-Dec-15 107
Summary of layers

04-Dec-15 108
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.

Topics discussed in this section:


Physical and Data Link Layers
Network Layer
Transport Layer
Application Layer
04-Dec-15 109
TCP/IP and OSI model

04-Dec-15 110
ADDRESSING

Four levels of addresses 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

04-Dec-15 111
Addresses in TCP/IP

04-Dec-15 112
Relationship of layers and addresses in TCP/IP

04-Dec-15 113
Example 2.1

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.

04-Dec-15 114
Physical addresses

04-Dec-15 115
Example 2.2

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:

07:01:02:01:2C:4B

A 6-byte (12 hexadecimal digits) physical address.

04-Dec-15 116
Example 2.3

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.

04-Dec-15 117
IP addresses

04-Dec-15 118
Example 2.4

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.

04-Dec-15 119
Port addresses

04-Dec-15 120
Note

The physical addresses will change from hop to hop,


but the logical addresses usually remain the same.

04-Dec-15 121
Figure 8.1 Switched network
Figure 8.2 Taxonomy of switched networks
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.
Note
A circuit-switched network is made of a set of switches connected by physical links,
in which each link is
divided into n channels.
Figure 8.3 A trivial circuit-switched network
Note

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.
Example 8.1

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.
Figure 8.4 Circuit-switched network used in Example 8.1
Example 8.2

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 8.5 shows the situation.
Figure 8.5 Circuit-switched network used in Example 8.2
Figure 8.6 Delay in a circuit-switched network
Note
Switching at the physical layer in the traditional telephone network uses
the circuit-switching approach.
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.
Note
In a packet-switched network, there
is no resource reservation;
resources are allocated on demand.
Figure 8.7 A datagram network with four switches (routers)
Figure 8.8 Routing table in a datagram network
Note
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.
Figure 8.9 Delay in a datagram network
Note
Switching in the Internet is done by using the datagram approach
to packet switching at
the network layer.
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.
Figure 8.10 Virtual-circuit network
Figure 8.11 Virtual-circuit identifier
Figure 8.12 Switch and tables in a virtual-circuit network
Figure 8.13 Source-to-destination data transfer in a virtual-circuit network
Figure 8.14 Setup request in a virtual-circuit network
Figure 8.15 Setup acknowledgment in a virtual-circuit network
Note
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.
Figure 8.16 Delay in a virtual-circuit network
Note
Switching at the data link layer in a switched WAN is normally
implemented by using
virtual-circuit techniques.
Books
1. Data Communication and Networking by Forouzan
2. Computer Networks by Andrew S. Tanenbaum
3. References: Data Communication and Networking by Forouzan

Dr. Uttam Ghosh, CDAC, KP, Bangalore 152