You are on page 1of 85

CS8591 – COMPUTER

NETWORKS
PAVETHRA MANIVEL AP/CSE
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – PROTOCOL LAYERING
• A Protocol defines the rules that both the sender and receiver and all
intermediate devices need to follow.
• When the communication is simple, one simple protocol is enough.
• When the communication is complex, it is required to divide the task
between layers.
• Thus we need a protocol at each layer. This mechanism is called
Protocol Layering.
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – PROTOCOL LAYERING
• Scenarios – First Scenario
• In the first scenario, communication is so simple. The communication
occurs in one single layer.
• Assume John and Peter are neighbors with a lot of common ideas.
• Communication between John and Peter takes place in one layer, face
to face in same language.
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – PROTOCOL LAYERING

John Peter

Layer 1 Listen / Talk Listen / Talk

•Second Scenario
•In the second scenario, assume Peter has higher level position in the
company.
•Now Peter needs to move to another branch located in a city very far
from John.
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – PROTOCOL LAYERING
• The two friends still want to communicate and exchange their ideas to
start a new business.
• The two friends do not want their ideas to be revealed by other people.
They agree on common encryption/decryption technique.
• Communication between John and Peter takes place in 3 layers.
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – PROTOCOL LAYERING

John Peter

Layer 3 Listen / Talk Listen / Talk Layer 3


Plain text Plain text
Encrypt / Encrypt / Layer 2
Layer 2 Decrypt
Cipher text
Decrypt

Send / Receive Send / Receive


Layer 1 Layer 1
mail mail
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – PROTOCOL LAYERING
• Protocol layering enables us to divide a complex task into several and
simpler tasks.
• Advantages of Protocol Layering
• Allow us to separate the services from implementation.
• If we are not using protocol layering, each intermediate system had made
complex systems.
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – PROTOCOL LAYERING
• Principles of Protocol Layering:
• The first principle dictates that if we want bidirectional communication, we
need to make each layer so that it is able to perform two opposite tasks, one in
each direction
• Eg: Third Layer has to listen in one direction and talk in another direction.
• The second principle in protocol layering is that the two objects under each
layer at both sites should be identical.
• Eg: Object under layer 3 should be plain text at both ends.
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• International Standards Organization is a multinational body dedicated
to worldwide agreement on international standards.
• An ISO standard that covers all aspects of network communication is
Open Systems Interconnections (OSI) model.
• The OSI model is a layered framework for the design of network
systems that allows for communication across all types of computer
systems.
• OSI layers consists of seven separate layers.
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Physical Layer: The Physical layer coordinates the functions required
to transmit a bit stream over a physical medium.
• It deals with electrical and mechanical specifications of transmission
media.
• The Physical Layer is concerned with the following special
responsibilities:
a) Physical characteristics of interfaces and media: Defines the type of
transmission medium
b) Representation of bits: The physical layer consist of stream of bits(0’s &
1’s). Bits must be encoded into signals.
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• The Physical Layer is concerned with the following special
responsibilities:
c) Data Rate: The number of bits sent each second.
d) Synchronization of bits: The sender and receiver must be synchronized at the
bit level.
e) Line Configuration: The Physical layer is concerned with connection of
devices to the medium
Point to Point configuration: Two devices are connected through dedicated link.
Multi Point configuration: A link is shared between several devices.
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• The Physical Layer is concerned with the following special
responsibilities:
f) Physical Topology: Topology defines how devices are connected to make a
network.
g) Transmission mode: Physical layer defines the direction of transmission
between two devices.
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Physical Layer
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Data Link Layer is responsible for node to node delivery.
• Specific responsibilities of data link layer includes the following:
• Framing: The data link layer divides the stream of bits received from the
network layer into manageable data units called frames.
• Physical addressing: If frames are distributed to different systems on the
network, the data link layer adds a header to the frame. The header contains
the address of sender and receiver.
• Flow control: If the rate at which the data absorbed by the receiver is less than
the rate produced
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Specific responsibilities of data link layer includes the following:
• Flow control: If the rate at which the data absorbed by the receiver is less than
the rate produced in the sender, the data link layer imposes a flow control
mechanism.
• Error control: Normally achieved through adding trailer at the end of the
frame.
• To detect and retransmit damaged or lost frames.
• To prevent duplication of frames
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Data Link Layer
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Network Layer is responsible for source to destination delivery of a
packet.
• If two systems are connected to the same link, there is usually no need
for a network layer.
• If two systems are attached to different networks with connecting
devices, then there is a need for Network layer to accomplish source to
destination delivery.
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Special Responsibilities of Network Layer includes:
• Logical addressing
• The physical addressing implemented by the data link layer handles the
addressing problem locally.
• If a packet passes the network boundary, another addressing system is required
to identify the source and destination.
• The Network layer adds header which includes the address of sender and
receiver.
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Special Responsibilities of Network Layer includes:
• Routing:
• Independent networks are connected together to create an inter - network.
• Connecting devices (Routers) route the packets to their final destination.
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Network Layer
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Transport Layer is responsible for end to end delivery of the entire
message.
• Network layer does not recognize any relationship between those
packets.
• The transport layer ensures that the whole message arrives intact and
in order.
• Transport layer creates connection between two end points.
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Special responsibilities:
• Service Point addressing:
• Computers often run several programs at the same time.
• End to End delivery means, delivering the message from a specific process on
one computer to a specific process on another computer.
• Transport layer includes type of address called service point address.
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Special responsibilities:
• Segmentation and reassembly:
• A message is divided into transmittable segments.
• Each segment contains a sequence number.
• These numbers enables the transport layer to reassemble the message correctly
upon arriving at the destination.
• Sequence number is also used to identify the lost packets during transmission
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Flow Control:
• Imposes mechanism to control the data rate.
• Connection Control:
• Transport Layer can be either connectionless or connection oriented.
• Connectionless Transport layer treats each segment as an independent packet.
• Connection oriented Transport layer makes a connection with destination
machine before delivering the packets.
• After all data is transferred the connection is terminated.
• Error Control: Makes sure that the entire message arrives at the
receiving end without error.(damage, loss or duplication)
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Transport Layer:
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Transport Layer:
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Session Layer – Network dialog controller.
• Establishes, maintains and synchronizes the interaction between
communicating systems.
• Special responsibilities:
• Dialog control: Allows two systems to enter into a dialog. This dialog
allows the communication between two processes.
• Synchronization: Allow a process to add check points into a stream of
data.
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Special responsibilities:
• Eg: If a system is sending a file of 1000 pages, it is advisable to insert
checkpoints after every 100 pages ensure that each 100 pages are
received.
• If a crash happens at 567 page, retransmission begins from page 501.
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Session Layer:
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Presentation Layer – Concerned with syntax and semantics of the
information exchanged between two systems.
• Special responsibilities:
• Translation:
• Two systems usually exchange information in the form of character, strings,
numbers and so on.
• Different computers use different encoding systems.
• Presentation layer is responsible for interoperability between these different
encoding methods.
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Special responsibilities:
• Encryption:
• Sender transforms the original information to another form. These process is
called encryption.
• Decryption is the process of getting the original message from another form.
• Compression:
• Data compression reduces the number of bits to be transmitted.
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Presentation Layer:
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
• Application Layer – Enables the user to access the network.
• Provides user interface and support for services such as electronic
mail, remote file access and transfer.
• Special responsibilities:
• Network virtual terminal: Allows the user to log on to a remote host.
• File transfer, access and management: Allows a user to access files in a remote
computer to retrieve files.
• Mail services: Provides basis for email forwarding and storage.
• Directory services: Provides distributed database and access for global
information.
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – OSI LAYER
UNIT I
INTRODUCTION & PHYSICAL LAYER
TOPIC – SUMMARY OF OSI LAYER
SWITCHING
INTRODUCTION
• A switched network consists of a series of interlinked nodes called
switches.
• Switches are devices capable of creating temporary connections
between two or more devices linked to a switch.
• In a switched network, some of these nodes are connected to the end
systems (computers or telephones).
• Other nodes are used for routing
Figure 8.1 Switched network

8.40
8.41
SWITCHING AND TCP/IP LAYERS
• At the physical layer, circuit switching only is possible.
• No packets are exchanged at physical layer.
• Switches at physical layer allow signals to travel in one path or
another.
• At the data link layer, packet switching is possible.
• Packet switching is done using a virtual – circuit approach.
SWITCHING AND TCP/IP LAYERS
• At the Network layer, packet switching is used.
• Virtual – Circuit approach is used.
• At the application layer, message switching is used.
• Communication at the application layer occurs by exchanging
messages.
CIRCUIT SWITCHED NETWORKS
• Consists of set of switches connected by physical links.
• A connection between two stations is a dedicated path made of one or
more links.
• Each connection uses only one dedicated channel on each link.
• Each link is normally divided into n channels by using FDM or TDM
Figure 8.3 A trivial circuit-switched network

8.45
CIRCUIT SWITCHED NETWORKS
• In the diagram, the end systems such as computers or telephones are
directly connected to a switch.
• When end system A wants to communicate with end system M, system
A needs to request a connection to M.
• This request must be accepted by all switches.
• The above process is called Setup Phase.
CIRCUIT SWITCHED NETWORKS
• After the dedicated path is established, the data transfer phase takes
place.
• After all data have been transferred, the circuits are torn down.
• Circuit switching takes place at the physical layer.
• Before starting communication, the stations must make a reservation
for the resources to be used during the communication.
CIRCUIT SWITCHED NETWORKS
• The resources such as channels, switch buffers, switch processing time,
switch input/output ports must remain dedicated during the entire duration
of data transfer until the teardown phase.
• Data transferred between the two stations are not packetized.
• Data are continuous flow sent by source station and received by destination
station.
• No addressing is involved during data transfer.
• The switch route the data based on their occupied band (FDM) or time slot
(TDM).
CIRCUIT SWITCHED NETWORKS – THREE PHASES
• The three phases are
• Connection setup
• Data transfer
• Connection teardown
THREE PHASES OF SWITCHING

8.50
CIRCUIT SWITCHED NETWORKS – THREE PHASES
• Setup Phase:
• Dedicated circuit needs to be established.
• End systems are normally connected through dedicated lines to the switches.
• Connection setup – creating dedicated channels between the switches.
• When system A needs to connect with M, it sends a setup request that includes the
address of system M, to switch I.
• Switch I finds a channel between itself and switch IV that can be dedicated for
this purpose.
CIRCUIT SWITCHED NETWORKS – THREE PHASES
• Setup Phase:
• Switch I finds a channel between itself and switch IV. Switch I sends the request
to switch IV.
• Switch IV finds a dedicated channel between itself and switch III. Switch III
informs system M about system A’s intention.
• To establish a connection, an acknowledgement from system M needs to be sent in
the opposite direction to system A.
• Only after system A receives the acknowledgement, the connection is established.
CIRCUIT SWITCHED NETWORKS – THREE PHASES
• Data Transfer Phase
• After the establishment of the dedicated circuit, two parties can transfer data.
• Teardown Phase
• When one system wants to disconnect, a signal is sent to each switch to release
the resource.
CIRCUIT SWITCHED NETWORKS – EFFICIENCY &
DELAY
• EFFICIENCY
• Circuit switch networks not efficient as the other two networks.
• Resources are allocated during the entire duration of the connection.
• Resources are unavailable to other connections.
CIRCUIT SWITCHED NETWORKS – EFFICIENCY &
DELAY
• DELAY
• Circuit switched network has low efficiency.
• Delay is minimal.
• During data transfer the data are not delayed at each switch.
• No waiting time at each switch.
• Total delay is due to the time needed to create the connection, transfer data and
disconnect the circuit.
• Delay caused by setup is sum of four parts:
CIRCUIT SWITCHED NETWORKS – EFFICIENCY &
DELAY
• DELAY
• Delay caused by setup is sum of four parts:
• Propagation time of the source computer request
• The request signal transfer time
• The Propagation time of the acknowledgment from the destination.
• Signal transfer time of the acknowledgement
• Delay caused by data transfer is sum of two parts:
• Propagation time
• Data transfer
Figure 8.6 Delay in a circuit-switched network

8.57
PACKET SWITCHING
• In data communications, we need to send messages from one end system
to another.
• In packet switched network, the messages must be divided into packets of
fixed or variable size.
• The size of the packet is determined by the network and governing
protocol.
PACKET SWITCHING
• In packet switching, there is no resource allocation for a packet.
• No reserved bandwidth on the links.
• No scheduled processing time for each packet.
• Resources are allocated on demand.
• The allocation is done on first come first serve basis.
• When a switch receives a packet, the packet must wait if there are other packets
being processed.
• This lack of reservation causes delay.
PACKET SWITCHING – DATAGRAM NETWORKS
• In a Datagram network, each packet is treated independently. Packets are
referred as datagrams.
• Datagram switching is done at Network Layer.
• The following figure explains how datagram approach is used to deliver
four packets from station A to station X.
• Switches in a Datagram network is referred to as Routers.
Figure 8.7 A datagram network with four switches (routers)

8.61
PACKET SWITCHING – DATAGRAM NETWORKS
• All four datagrams belong to the same message. But they may travel in different paths
to reach their destination.
• This approach can cause the datagrams of a transmission to arrive at their destination
out of order with different delays between the packets.
• Packets may be lost or dropped because of a lack of resources.
• It is responsibility of the upper layer to reorder the datagrams.
• Datagram Networks – Connectionless networks – switch does not keep information
about the connection state.
PACKET SWITCHING – DATAGRAM NETWORKS
• Routing Table
• No setup phase and tear down phase.
• Each switch has a routing table which is based on destination address.
• Routing tables are dynamic and updated periodically.
• Routing table consists of destination address and forwarding output ports
Figure 8.8 Routing table in a datagram network

8.64
PACKET SWITCHING – DATAGRAM NETWORKS
• Destination Address
• Every packet carries a header that contains the destination address of the packet.
• When the switch receives the packet, this destination address is examined.
• The routing table is consulted to find the corresponding port through which the
packet should be forwarded.
PACKET SWITCHING – DATAGRAM NETWORKS
• Efficiency
• Better than circuit switching.
• Resources are allocated only when there are packets to be transferred.
• Delay
• Greater delay than circuit switching
• Each packet may experience a wait at a switch before it is forwarded.
• Since all packets do not travel through same switches, the delay is not uniform
Figure 8.9 Delay in a datagram network

8.67
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Virtual circuit network is a cross between circuit switched network and datagram network.
• Setup and teardown phase available.
• Resources can be allocated during the setup phase or on demand.
• Data’s are packetized and each packet carries an address in the header.
• The address in the header has local jurisdiction – it defines the next switch and the channel on
which the packet is carried. (Not end to end Jurisdiction)
• All the packets follow the same path established during the connection.
• Virtual circuit network is implemented in data link layer.
Figure 8.10 Virtual-circuit network

8.69
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Addressing
• Global addressing
• Local addressing
• Global Addressing
• An address that can be unique in the scope of network
• Global address is used to only create a virtual circuit identifier.
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Virtual Circuit Identifier
• The identifier is actually used for data transfer is called virtual circuit identifier
(VCI) or Label.
• VCI is a small number that has only switch scope.
• It is used by a frame between two switches.
• When a frame arrives at a switch it has a VCI.
• When it leaves, it has different VCI
Figure 8.11 Virtual-circuit identifier

8.72
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Three Phases
• In the setup phase, the source and destination use their global addresses to help
switches for connection.
• In teardown phase, the source and destination inform the switches to delete the
corresponding entry.
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Data Transfer phase
• To transfer a frame from source to destination, all switches need to have a table
entry for this virtual circuit.
• The table has four columns. Incoming Port and VCI, Outgoing Port and VCI.
• The figure shows a frame arriving at port 1 with a VCI of 14.
• When the frame arrives, the switch looks in its table to find port1 and a VCI of 14.
• When it is found, the switch knows to change the VCI to 22 and send out the
frame from port 3.
Figure 8.12 Switch and tables in a virtual-circuit network

8.75
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Setup Phase
• A Switch creates an entry for virtual circuit.
• Suppose source A needs to create a virtual circuit to B.
• Two steps: Setup Request and Ackno
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Setup Request
• Source A sends a frame to switch I.
• Switch I receives the setup request frame.
• It knows that a frame going from A to B goes out through port 3.
• The switch has the routing table.
• The switch creates an entry in its table and fills three of four columns.
• The switch assigns the incoming port as 1 and chooses an available incoming VCI (14)
and outgoing port as 3.
• It does not know the outgoing VCI. This will be found in acknowledgement step.
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Setup Request
• The switch then forwards the frame through port 3 to switch 2.
• Switch 2 receives the setup request frame. The same events happen here as at
switch 1. In this case incoming port (1), VCI as 66 and outgoing port as 2.
• Switch 3 receives the setup request frame. Again three fields are filled. Incoming
port (2), VCI as 22 and outgoing port (3)
• Destination B receives the setup frame and if it is ready to receive frame from A it
assigns VCI.
Figure 8.13 Source-to-destination data transfer in a virtual-circuit network

8.79
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Acknowledgement
• Destination sends an ACK to switch 3.
• The ACK carries the global source and destination address so the switch knows which
entry in the table is to be completed.
• The frame carries VCI 77 chosen by destination as the incoming VCI for frames from A.
• Switch 3 sends an ACK to switch 2 that contains its incoming VCI table.
• Switch 3 sends an ACK to switch 1 that contains its incoming VCI
• Finally switch 1 sends an ACK to system A.
Figure 8.14 Setup request in a virtual-circuit network

8.81
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Teardown Phase
• Source A after sending all frames to B sends a special frame called a teardown
request.
• Destination B responds with a teardown confirmation frame.
• All switches delete the entry from their tables.
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Efficiency
• Resource reservation can be made setup or on demand.
• In first case delay for each packet is same.
• In second case, each packet may encounter different delays.
• Source can check the availability of resources
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Delay
• The packet is travelling through two switches.
• There are three transmission times, Three propagation times, data transfer, setup
delay and teardown delay
Total delay = 3T+3Propagation Time + setup delay + teardown delay
PACKET SWITCHING – MESSAGE SWITCHING
• Message switching is known by store and forward mechanism.
• In this mechanism, a node receives a message, stores it until the
appropriate route is free and then sends the message.

You might also like