0% found this document useful (0 votes)
19 views144 pages

CC and Network Merged Notes PDF

The document provides an overview of computer communication and networks, detailing the components, uses, network structures, architectures, topologies, and types of computer networks. It highlights the advantages and disadvantages of various network configurations, including peer-to-peer and client/server models, as well as different topologies like bus, ring, star, and mesh. The document emphasizes the importance of distributed processing and resource sharing in enhancing security and efficiency in network operations.

Uploaded by

imvrsk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views144 pages

CC and Network Merged Notes PDF

The document provides an overview of computer communication and networks, detailing the components, uses, network structures, architectures, topologies, and types of computer networks. It highlights the advantages and disadvantages of various network configurations, including peer-to-peer and client/server models, as well as different topologies like bus, ring, star, and mesh. The document emphasizes the importance of distributed processing and resource sharing in enhancing security and efficiency in network operations.

Uploaded by

imvrsk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 144

Computer Communication and Networks

1. INTRODUCTION

A computer network is a set of devices connected through links. A node can be computer,
printer, or any other device capable of sending or receiving the data. The links connecting the
nodes are known as communication channels.

Computer Network uses distributed processing in which task is divided among several
computers. Instead, a single computer handles an entire task, each separate computer handles
a subset.

Following are the advantages of Distributed processing:

o Security: It provides limited interaction that a user can have with the entire system.
For example, a bank allows the users to access their own accounts through an ATM
without allowing them to access the bank's entire database.
o Faster problem solving: Multiple computers can solve the problem faster than a
single machine working alone.

o Security through redundancy: Multiple computers running the same program at the
same time can provide the security through redundancy. For example, if four
computers run the same program and any computer has a hardware error, then other
computers can override it.

What is a Computer Network?


o Computer Network is a group of computers connected with each other through
wires, optical fibres or optical links so that various devices can interact with each
other through a network.
o The aim of the computer network is the sharing of resources among various devices.
o In the case of computer network technology, there are several types of networks that
vary from simple to complex level.

Page 1
Computer Communication and Networks

Components Of Computer Network:

Major components of a computer network are:

NIC(National interface card)

NIC is a device that helps the computer to communicate with another device. The network
interface card contains the hardware addresses, the data-link layer protocol use this address to
identify the system on the network so that it transfers the data to the correct destination.

There are two types of NIC: wireless NIC and wired NIC.

o Wireless NIC: All the modern laptops use the wireless NIC. In Wireless NIC, a
connection is made using the antenna that employs the radio wave technology.

o Wired NIC: Cables use the wired NIC to transfer the data over the medium.

Hub

Hub is a central device that splits the network connection into multiple devices. When
computer requests for information from a computer, it sends the request to the Hub. Hub
distributes this request to all the interconnected computers.

Switches

Switch is a networking device that groups all the devices over the network to transfer the data
to another device. A switch is better than Hub as it does not broadcast the message over the

Page 2
Computer Communication and Networks

network, i.e., it sends the message to the device for which it belongs to. Therefore, we can
say that switch sends the message directly from source to the destination.

Cables and connectors

Cable is a transmission media that transmits the communication signals. There are three
types of cables:

o Twisted pair cable: It is a high-speed cable that transmits the data over 1Gbps or
more.
o Coaxial cable: Coaxial cable resembles like a TV installation cable. Coaxial cable is
more expensive than twisted pair cable, but it provides the high data transmission
speed.
o Fibre optic cable: Fibre optic cable is a high-speed cable that transmits the data using
light beams. It provides high data transmission speed as compared to other cables. It is
more expensive as compared to other cables, so it is installed at the government level.

Router

Router is a device that connects the LAN to the internet. The router is mainly used to connect
the distinct networks or connect the internet to multiple computers.

Modem

Modem connects the computer to the internet over the existing telephone line. A modem is
not integrated with the computer motherboard. A modem is a separate part on the PC slot
found on the motherboard.

Page 3
Computer Communication and Networks

Uses Of Computer Network


o Resource sharing: Resource sharing is the sharing of resources such as programs,
printers, and data among the users on the network without the requirement of the
physical location of the resource and user.
o Server-Client model: Computer networking is used in the server-client model. A
server is a central computer used to store the information and maintained by the
system administrator. Clients are the machines used to access the information stored
in the server remotely.
o Communication medium: Computer network behaves as a communication medium
among the users. For example, a company contains more than one computer has an
email system which the employees use for daily communication.
o E-commerce: Computer network is also important in businesses. We can do the
business over the internet. For example, amazon.com is doing their business over the
internet, i.e., they are doing their business over the internet.

Network Structures:

Network structure is a term used to describe the method of how data on a network is
organized and viewed.

A computer network is a structure that makes available to a data processing user at one place
some data processing function or service performed at another place. Such a computer
network is exemplified superficially in Fig. 1. In this case one of the end users is a person
sitting at a terminal. The other end user is a specific application program running on a
computer. The network consists of a number of boxes or nodes, among them the terminal (A)
and the computer (B), and includes also the intervening transmission lines connecting the
nodes

Page 4
Computer Communication and Networks

Network Architectures:

Computer Network Architecture is defined as the physical and logical design of the software,
hardware, protocols, and media of the transmission of data. Simply we can say that how
computers are organized and how tasks are allocated to the computer.

The two types of network architectures are used:

o Peer-To-Peer network
o Client/Server network

Peer-To-Peer network
o Peer-To-Peer network is a network in which all the computers are linked together
with equal privilege and responsibilities for processing the data.

o Peer-To-Peer network is useful for small environments, usually up to 10 computers.


o Peer-To-Peer network has no dedicated server.
o Special permissions are assigned to each computer for sharing the resources, but this
can lead to a problem if the computer with the resource is down.

Page 5
Computer Communication and Networks

Advantages Of Peer-To-Peer Network:

o It is less costly as it does not contain any dedicated server.


o If one computer stops working but, other computers will not stop working.
o It is easy to set up and maintain as each computer manages itself.

Disadvantages Of Peer-To-Peer Network:

o In the case of Peer-To-Peer network, it does not contain the centralized system .
Therefore, it cannot back up the data as the data is different in different locations.

o It has a security issue as the device is managed itself.

Client/Server Network
o Client/Server network is a network model designed for the end users called clients, to
access the resources such as songs, video, etc. from a central computer known as
Server.
o The central controller is known as a server while all other computers in the network
are called clients.

o A server performs all the major operations such as security and network management.
o A server is responsible for managing all the resources such as files, directories,
printer, etc.
o All the clients communicate with each other through a server. For example, if client1
wants to send some data to client 2, then it first sends the request to the server for the

Page 6
Computer Communication and Networks

permission. The server sends the response to the client 1 to initiate its communication
with the client 2.

Advantages Of Client/Server network:

o A Client/Server network contains the centralized system. Therefore we can back up


the data easily.

o A Client/Server network has a dedicated server that improves the overall performance
of the whole system.
o Security is better in Client/Server network as a single server administers the shared
resources.
o It also increases the speed of the sharing resources.

Disadvantages Of Client/Server network:

o Client/Server network is expensive as it requires the server with large memory.


o A server has a Network Operating System(NOS) to provide the resources to the
clients, but the cost of NOS is very high.

o It requires a dedicated network administrator to manage all the resources.

Topologies:

Page 7
Computer Communication and Networks

A Network Topology is the arrangement with which computer systems or network devices
are connected to each other.

Topology defines the structure of the network of how all the components are interconnected
to each other. There are two types of topology: physical and logical topology.

Physical topology is the geometric representation of all the nodes in a network.

Bus Topology:

Bus topology is a network type in which every computer and network device is connected
to a single cable. It transmits the data from one end to another in a single direction. No bi-
directional feature is in bus topology. It is a multi-point connection and a non-robust
topology because if the backbone fails the topology crashes.

Page 8
Computer Communication and Networks

o The bus topology is designed in such a way that all the stations are connected through
a single cable known as a backbone cable.
o Each node is either connected to the backbone cable by drop cable or directly
connected to the backbone cable.
o When a node wants to send a message over the network, it puts a message over the
network. All the stations available in the network will receive the message whether it
has been addressed or not.
o The bus topology is mainly used in 802.3 (ethernet) and 802.4 standard networks.
o The configuration of a bus topology is quite simpler as compared to other topologies.
o The backbone cable is considered as a "single lane" through which the message is
broadcast to all the stations.

Advantages of this topology:


 If N devices are connected to each other in a bus topology, then the number of cables
required to connect them is 1, which is known as backbone cable, and N drop lines are
required.
 Coaxial or twisted pair cables are mainly used in bus based networks that support up to
10 Mbps.
 The cost of the cable is less compared to other topologies, but it is used to build small
networks.
 Bus topology is familiar technology as installation and troubleshooting techniques are
well known.

Problems with this topology:


 A bus topology is quite simpler , but still it requires a lot of cabling.
 If the common cable fails, then the whole system will crash down.
 If the network traffic is heavy, it increases collisions in the network. To avoid this,
various protocols are used in the MAC layer known as Pure Aloha, Slotted Aloha,
CSMA/CD, etc.
 Adding new devices to network would slow down networks.
 Security is very low.

Page 9
Computer Communication and Networks

Ring Topology:

o Ring topology is like a bus topology, but with connected ends.


o The node that receives the message from the previous computer will retransmit to the
next node.
o The data flows in one direction, i.e., it is unidirectional.
o The data flows in a single loop continuously known as an endless loop.
o It has no terminated ends, i.e., each node is connected to other node and having no
termination point.
o The data in a ring topology flow in a clockwise direction.

Advantages of this topology:


 The data transmission is high-speed.
 The possibility of collision is minimum in this type of topology.
 Cheap to install and expand.
 It is less costly than a star topology.
Problems with this topology:
 The failure of a single node in the network can cause the entire network to fail.
 Troubleshooting is difficult in this topology.
 The addition of stations in between or removal of stations can disturb the whole
topology.

Page 10
Computer Communication and Networks

 Less secure.

Tree topology:

o Tree topology combines the characteristics of bus topology and star topology.
o A tree topology is a type of structure in which all the computers are connected with
each other in hierarchical fashion.
o The top-most node in tree topology is known as a root node, and all other nodes are
the descendants of the root node.
o There is only one path exists between two nodes for the data transmission. Thus, it
forms a parent-child hierarchy.

Advantages of this topology :


 It allows more devices to be attached to a single central hub thus it decreases the
distance that is traveled by the signal to come to the devices.
 It allows the network to get isolated and also prioritize from different computers.
 We can add new device to existing network.
 The Error detection and error correction is very easy in tree topology.
Problems with this topology :
 If the central hub gets fails the entire system fails.
 The cost is high because of cabling.
 If new devices are added, it becomes difficult to reconfigure.

Star topology:

Page 11
Computer Communication and Networks

o Star topology is an arrangement of the network in which every node is connected to


the central hub, switch or a central computer.
o The central computer is known as a server, and the peripheral devices attached to the
server are known as clients.
o Coaxial cable or RJ-45 cables are used to connect the computers.
o Hubs or Switches are mainly used as connection devices in a physical star topology.
o Star topology is the most popular topology in network implementation.

Advantages of this topology:


 If N devices are connected to each other in a star topology, then the number of cables
required to connect them is N. So, it is easy to set up.
 Each device requires only 1 port i.e. to connect to the hub, therefore the total number of
ports required is N.
 It is Robust. If one link fails only that link will affect and not other than that.
 Easy to fault identification and fault isolation.
 Star topology are cost-effective as it uses inexpensive coaxial cable.
Problems with this topology:
 If the concentrator (hub) on which the whole topology relies fails, the whole system will
crash down.
 The cost of installation is high.
 Performance is based on the single concentrator i.e. hub.

Mesh Topology:

Page 12
Computer Communication and Networks

o Mesh technology is an arrangement of the network in which computers are


interconnected with each other through various redundant connections.
o There are multiple paths from one computer to another computer.
o It does not contain the switch, hub or any central computer which acts as a central
point of communication.

o The Internet is an example of the mesh topology.


o Mesh topology is mainly used for WAN implementations where communication
failures are a critical concern.
o Mesh topology is mainly used for wireless networks.

Advantages of this topology:


 Communication is very fast between at the nodes.
 It is robust.
 The fault is diagnosed easily. Data is reliable because data is transferred among the
devices through dedicated channels or links.
 Provides security and privacy.
Problems with this topology:
 Installation and configuration are difficult.
 The cost of cables is high as bulk wiring is required, hence suitable for less number of
devices.
 The cost of maintenance is high.

Page 13
Computer Communication and Networks

Hybrid topology:

o The combination of various different topologies is known as Hybrid topology.


o A Hybrid topology is a connection between different links and nodes to transfer the
data.
o When two or more different topologies are combined together is termed as Hybrid
topology and if similar topologies are connected with each other will not result in
Hybrid topology. For example, if there exist a ring topology in one branch of ICICI
bank and bus topology in another branch of ICICI bank, connecting these two
topologies will result in Hybrid topology.

Advantages of this topology :


 This topology is very flexible.
 the size of network can be easily expanded by adding new device.
Problems with this topology :
 It is very difficult to design the architecture of the Hybrid Network.
 Hubs used in this topology are very expensive.

Page 14
Computer Communication and Networks

 The infrastructure cost is very high as hybrid network requires a lot of cabling,
network devices.

Computer Network Types

A computer network is a group of computers linked to each other that enables the computer
to communicate with another computer and share their resources, data, and applications.

A computer network can be categorized by their size. A computer network is mainly of four
types:

o LAN(Local Area Network)


o PAN(Personal Area Network)
o MAN(Metropolitan Area Network)
o WAN(Wide Area Network)

LAN(Local Area Network)


o Local Area Network is a group of computers connected to each other in a small area
such as building, office.
o LAN is used for connecting two or more personal computers through a
communication medium such as twisted pair, coaxial cable, etc.

o It is less costly as it is built with inexpensive hardware such as hubs, network


adapters, and ethernet cables.
o The data is transferred at an extremely faster rate in Local Area Network.
o Local Area Network provides higher security.

Page 15
Computer Communication and Networks

PAN(Personal Area Network)


o Personal Area Network is a network arranged within an individual person, typically
within a range of 10 meters.
o Personal Area Network is used for connecting the computer devices of personal use is
known as Personal Area Network.
o Thomas Zimmerman was the first research scientist to bring the idea of the Personal
Area Network.
o Personal Area Network covers an area of 30 feet.
o Personal computer devices that are used to develop the personal area network are the
laptop, mobile phones, media player and play stations.

Page 16
Computer Communication and Networks

There are two types of Personal Area Network:

o Wired Personal Area Network


o Wireless Personal Area Network

Wireless Personal Area Network: Wireless Personal Area Network is developed by simply
using wireless technologies such as WiFi, Bluetooth. It is a low range network.

Wired Personal Area Network: Wired Personal Area Network is created by using the USB.

Examples Of Personal Area Network:

o Body Area Network: Body Area Network is a network that moves with a
person. For example, a mobile network moves with a person. Suppose a person
establishes a network connection and then creates a connection with another device to
share the information.
o Offline Network: An offline network can be created inside the home, so it is also
known as a home network. A home network is designed to integrate the devices such
as printers, computer, television but they are not connected to the internet.
o Small Home Office: It is used to connect a variety of devices to the internet and to a
corporate network using a VPN

MAN(Metropolitan Area Network)


o A metropolitan area network is a network that covers a larger geographic area by
interconnecting a different LAN to form a larger network.

o Government agencies use MAN to connect to the citizens and private industries.

Page 17
Computer Communication and Networks

o In MAN, various LANs are connected to each other through a telephone exchange
line.
o The most widely used protocols in MAN are RS-232, Frame Relay, ATM, ISDN, OC-
3, ADSL, etc.
o It has a higher range than Local Area Network(LAN).

Uses Of Metropolitan Area Network:

o MAN is used in communication between the banks in a city.


o It can be used in an Airline Reservation.
o It can be used in a college within a city.
o It can also be used for communication in the military.

WAN(Wide Area Network)


o A Wide Area Network is a network that extends over a large geographical area such
as states or countries.

Page 18
Computer Communication and Networks

o A Wide Area Network is quite bigger network than the LAN.


o A Wide Area Network is not limited to a single location, but it spans over a large
geographical area through a telephone line, fibre optic cable or satellite links.
o The internet is one of the biggest WAN in the world.
o A Wide Area Network is widely used in the field of Business, government, and
education.

Examples Of Wide Area Network:

o Mobile Broadband: A 4G network is widely used across a region or country.


o Last mile: A telecom company is used to provide the internet services to the
customers in hundreds of cities by connecting their home with fiber.

o Private network: A bank provides a private network that connects the 44 offices.
This network is made by using the telephone leased line provided by the telecom
company.

Page 19
Computer Communication and Networks

Advantages Of Wide Area Network:

Following are the advantages of the Wide Area Network:

o Geographical area: A Wide Area Network provides a large geographical area.


Suppose if the branch of our office is in a different city then we can connect with
them through WAN. The internet provides a leased line through which we can
connect with another branch.
o Centralized data: In case of WAN network, data is centralized. Therefore, we do not
need to buy the emails, files or back up servers.
o Get updated files: Software companies work on the live server. Therefore, the
programmers get the updated files within seconds.
o Exchange messages: In a WAN network, messages are transmitted fast. The web
application like Facebook, Whatsapp, Skype allows you to communicate with friends.
o Sharing of software and resources: In WAN network, we can share the software
and other resources like a hard drive, RAM.
o Global business: We can do the business over the internet globally.
o High bandwidth: If we use the leased lines for our company then this gives the high
bandwidth. The high bandwidth increases the data transfer rate which in turn
increases the productivity of our company.

Disadvantages of Wide Area Network:

The following are the disadvantages of the Wide Area Network:

o Security issue: A WAN network has more security issues as compared to LAN and
MAN network as all the technologies are combined together that creates the security
problem.
o Needs Firewall & antivirus software: The data is transferred on the internet which
can be changed or hacked by the hackers, so the firewall needs to be used. Some
people can inject the virus in our system so antivirus is needed to protect from such a
virus.
o High Setup cost: An installation cost of the WAN network is high as it involves the
purchasing of routers, switches.

Page 20
Computer Communication and Networks

o Troubleshooting problems: It covers a large area so fixing the problem is difficult.

OSI Reference Model:


OSI stands for Open Systems Interconnection. It has been developed by ISO –
‘International Organization for Standardization‘, in the year 1984. It is a 7 layer
architecture with each layer having specific functionality to perform. All these 7 layers
work collaboratively to transmit the data from one person to another across the globe.
Prerequisite: Basics of Computer Networking

1. Physical Layer (Layer 1) :

Page 21
Computer Communication and Networks

The lowest layer of the OSI reference model is the physical layer. It is responsible for the
actual physical connection between the devices. The physical layer contains information in
the form of bits. It is responsible for transmitting individual bits from one node to the next.
When receiving data, this layer will get the signal received and convert it into 0s and 1s and
send them to the Data Link layer, which will put the frame back together.

The functions of the physical layer are as follows:

1. Bit synchronization: The physical layer provides the synchronization of the bits by
providing a clock. This clock controls both sender and receiver thus providing
synchronization at bit level.
2. Bit rate control: The Physical layer also defines the transmission rate i.e. the number of
bits sent per second.
3. Physical topologies: Physical layer specifies the way in which the different,
devices/nodes are arranged in a network i.e. bus, star, or mesh topology.
4. Transmission mode: Physical layer also defines the way in which the data flows
between the two connected devices. The various transmission modes possible are
Simplex, half-duplex and full-duplex.
* Hub, Repeater, Modem, Cables are Physical Layer devices.

** Network Layer, Data Link Layer, and Physical Layer are also known as Lower Layers
or Hardware Layers.

2. Data Link Layer (DLL) (Layer 2) :


The data link layer is responsible for the node-to-node delivery of the message. The main
function of this layer is to make sure data transfer is error-free from one node to another,
over the physical layer. When a packet arrives in a network, it is the responsibility of DLL
to transmit it to the Host using its MAC address.
Data Link Layer is divided into two sublayers:

1. Logical Link Control (LLC)


2. Media Access Control (MAC)

Page 22
Computer Communication and Networks

The packet received from the Network layer is further divided into frames depending on the
frame size of NIC(Network Interface Card). DLL also encapsulates Sender and Receiver’s
MAC address in the header.

The Receiver’s MAC address is obtained by placing an ARP(Address Resolution Protocol)


request onto the wire asking “Who has that IP address?” and the destination host will reply
with its MAC address.

The functions of the Data Link layer are :

1. Framing: Framing is a function of the data link layer. It provides a way for a sender to
transmit a set of bits that are meaningful to the receiver. This can be accomplished by
attaching special bit patterns to the beginning and end of the frame.
2. Physical addressing: After creating frames, the Data link layer adds physical addresses
(MAC address) of the sender and/or receiver in the header of each frame.
3. Error control: Data link layer provides the mechanism of error control in which it
detects and retransmits damaged or lost frames.
4. Flow Control: The data rate must be constant on both sides else the data may get
corrupted thus, flow control coordinates the amount of data that can be sent before
receiving acknowledgement.
5. Access control: When a single communication channel is shared by multiple devices,
the MAC sub-layer of the data link layer helps to determine which device has control
over the channel at a given time.
* Packet in Data Link layer is referred to as Frame.
** Data Link layer is handled by the NIC (Network Interface Card) and device drivers of
host machines.
*** Switch & Bridge are Data Link Layer devices.

3. Network Layer (Layer 3) :


The network layer works for the transmission of data from one host to the other located in
different networks. It also takes care of packet routing i.e. selection of the shortest path to

Page 23
Computer Communication and Networks

transmit the packet, from the number of routes available. The sender & receiver’s IP
addresses are placed in the header by the network layer.

The functions of the Network layer are :

1. Routing: The network layer protocols determine which route is suitable from source to
destination. This function of the network layer is known as routing.
2. Logical Addressing: In order to identify each device on internetwork uniquely, the
network layer defines an addressing scheme. The sender & receiver’s IP addresses are
placed in the header by the network layer. Such an address distinguishes each device
uniquely and universally.
* Segment in Network layer is referred to as Packet.

** Network layer is implemented by networking devices such as routers.

4. Transport Layer (Layer 4) :


The transport layer provides services to the application layer and takes services from the
network layer. The data in the transport layer is referred to as Segments. It is responsible for
the End to End Delivery of the complete message. The transport layer also provides the
acknowledgement of the successful data transmission and re-transmits the data if an error is
found.
At sender’s side: Transport layer receives the formatted data from the upper layers,
performs Segmentation, and also implements Flow & Error control to ensure proper data
transmission. It also adds Source and Destination port numbers in its header and forwards
the segmented data to the Network Layer.
Note: The sender needs to know the port number associated with the receiver’s
application.

Generally, this destination port number is configured, either by default or manually. For
example, when a web application makes a request to a web server, it typically uses port

Page 24
Computer Communication and Networks

number 80, because this is the default port assigned to web applications. Many applications
have default ports assigned.

At receiver’s side: Transport Layer reads the port number from its header and forwards the
Data which it has received to the respective application. It also performs sequencing and
reassembling of the segmented data.
The functions of the transport layer are as follows:

1. Segmentation and Reassembly: This layer accepts the message from the (session)
layer, and breaks the message into smaller units. Each of the segments produced has a
header associated with it. The transport layer at the destination station reassembles the
message.
2. Service Point Addressing: In order to deliver the message to the correct process, the
transport layer header includes a type of address called service point address or port
address. Thus by specifying this address, the transport layer makes sure that the message
is delivered to the correct process.
The services provided by the transport layer :

A. Connection-Oriented Service: It is a three-phase process that includes


– Connection Establishment
– Data Transfer
– Termination / disconnection

In this type of transmission, the receiving device sends an acknowledgement, back to the
source after a packet or group of packets is received. This type of transmission is reliable
and secure.

B. Connectionless service: It is a one-phase process and includes Data Transfer. In this


type of transmission, the receiver does not acknowledge receipt of a packet. This approach
allows for much faster communication between devices. Connection-oriented service is
more reliable than connectionless Service.
* Data in the Transport Layer is called as Segments.
** Transport layer is operated by the Operating System. It is a part of the OS and
communicates with the Application Layer by making system calls.
Transport Layer is called as Heart of OSI model.

5. Session Layer (Layer 5) :

Page 25
Computer Communication and Networks

This layer is responsible for the establishment of connection, maintenance of sessions,


authentication, and also ensures security.
The functions of the session layer are :

1. Session establishment, maintenance, and termination: The layer allows the two
processes to establish, use and terminate a connection.
2. Synchronization: This layer allows a process to add checkpoints which are considered
synchronization points into the data. These synchronization points help to identify the
error so that the data is re-synchronized properly, and ends of the messages are not cut
prematurely and data loss is avoided.
3. Dialog Controller: The session layer allows two systems to start communication with
each other in half-duplex or full-duplex.
**All the below 3 layers(including Session Layer) are integrated as a single layer in the
TCP/IP model as “Application Layer”.
**Implementation of these 3 layers is done by the network application itself. These are also
known as Upper Layers or Software Layers.

Scenario:

Let us consider a scenario where a user wants to send a message through some Messenger
application running in his browser. The “Messenger” here acts as the application layer
which provides the user with an interface to create the data. This message or so-called Data
is compressed, encrypted (if any secure data), and converted into bits (0’s and 1’s) so that it
can be transmitted.

6. Presentation Layer (Layer 6):


The presentation layer is also called the Translation layer. The data from the application
layer is extracted here and manipulated as per the required format to transmit over the

Page 26
Computer Communication and Networks

network.
The functions of the presentation layer are :
 Translation: For example, ASCII to EBCDIC.
 Encryption/ Decryption: Data encryption translates the data into another form or code.
The encrypted data is known as the ciphertext and the decrypted data is known as plain
text. A key value is used for encrypting as well as decrypting data.
 Compression: Reduces the number of bits that need to be transmitted on the network.
7. Application Layer (Layer 7) :
At the very top of the OSI Reference Model stack of layers, we find the Application layer
which is implemented by the network applications. These applications produce the data,
which has to be transferred over the network. This layer also serves as a window for the
application services to access the network and for displaying the received information to
the user.

Example: Application – Browsers, Skype Messenger, etc.

**Application Layer is also called Desktop Layer.

The functions of the Application layer are :

1. Network Virtual Terminal


2. FTAM-File transfer access and management
3. Mail Services
4. Directory Services

TCP/IP Reference Model:

The OSI Model we just looked at is just a reference/logical model. It was designed to
describe the functions of the communication system by dividing the communication
procedure into smaller and simpler components. But when we talk about the TCP/IP model,
it was designed and developed by Department of Defense (DoD) in 1960s and is based on
standard protocols. It stands for Transmission Control Protocol/Internet Protocol.

Page 27
Computer Communication and Networks

The TCP/IP model is a concise version of the OSI model. It contains four layers, unlike
seven layers in the OSI model. The layers are:
1. Process/Application Layer
2. Host-to-Host/Transport Layer
3. Internet Layer
4. Network Access/Link Layer
The diagrammatic comparison of the TCP/IP and OSI model is as follows :

Difference between TCP/IP and OSI Model:

TCP/IP OSI

TCP refers to Transmission OSI refers to Open Systems


Control Protocol. Interconnection.

TCP/IP has 4 layers. OSI has 7 layers.

TCP/IP is more reliable OSI is less reliable

TCP/IP does not have very


strict boundaries. OSI has strict boundaries

TCP/IP follow a horizontal OSI follows a vertical approach.

Page 28
Computer Communication and Networks

TCP/IP uses both session


and presentation layer in the OSI uses different session and
application layer itself. presentation layers.

TCP/IP developed protocols


then model. OSI developed model then protocol.

Transport layer in TCP/IP In OSI model, transport layer


does not provide assurance provides assurance delivery of
delivery of packets. packets.

TCP/IP model network layer Connection less and connection


only provides connection oriented both services are provided
less services. by network layer in OSI model.

While in OSI model, Protocols are


Protocols cannot be replaced better covered and is easy to replace
easily in TCP/IP model. with the change in technology.

The first layer is the Process layer on the behalf of the sender and Network Access layer on
the behalf of the receiver. During this article, we will be talking on the behalf of the
receiver.

1. Network Access Layer –

This layer corresponds to the combination of Data Link Layer and Physical Layer of the
OSI model. It looks out for hardware addressing and the protocols present in this layer
allows for the physical transmission of data.
We just talked about ARP being a protocol of Internet layer, but there is a conflict about
declaring it as a protocol of Internet Layer or Network access layer. It is described as
residing in layer 3, being encapsulated by layer 2 protocols.

2. Internet Layer –

Page 29
Computer Communication and Networks

This layer parallels the functions of OSI’s Network layer. It defines the protocols which are
responsible for logical transmission of data over the entire network. The main protocols
residing at this layer are :

1. IP – stands for Internet Protocol and it is responsible for delivering packets from the
source host to the destination host by looking at the IP addresses in the packet headers.
IP has 2 versions:
IPv4 and IPv6. IPv4 is the one that most of the websites are using currently. But IPv6 is
growing as the number of IPv4 addresses are limited in number when compared to the
number of users.
2. ICMP – stands for Internet Control Message Protocol. It is encapsulated within IP
datagrams and is responsible for providing hosts with information about network
problems.
3. ARP – stands for Address Resolution Protocol. Its job is to find the hardware address of
a host from a known IP address. ARP has several types: Reverse ARP, Proxy ARP,
Gratuitous ARP and Inverse ARP.

3. Host-to-Host Layer –

This layer is analogous to the transport layer of the OSI model. It is responsible for end-to-
end communication and error-free delivery of data. It shields the upper-layer applications
from the complexities of data. The two main protocols present in this layer are :

1. Transmission Control Protocol (TCP) – It is known to provide reliable and error-free


communication between end systems. It performs sequencing and segmentation of data.
It also has acknowledgment feature and controls the flow of the data through flow
control mechanism. It is a very effective protocol but has a lot of overhead due to such
features. Increased overhead leads to increased cost.
2. User Datagram Protocol (UDP) – On the other hand does not provide any such
features. It is the go-to protocol if your application does not require reliable transport as
it is very cost-effective. Unlike TCP, which is connection-oriented protocol, UDP is
connectionless.

4. Application Layer –

Page 30
Computer Communication and Networks

This layer performs the functions of top three layers of the OSI model: Application,
Presentation and Session Layer. It is responsible for node-to-node communication and
controls user-interface specifications. Some of the protocols present in this layer are:
HTTP, HTTPS, FTP, TFTP, Telnet, SSH, SMTP, SNMP, NTP, DNS, DHCP, NFS, X
Window, LPD. Have a look at Protocols in Application Layer for some information about
these protocols. Protocols other than those present in the linked article are :
1. HTTP and HTTPS – HTTP stands for Hypertext transfer protocol. It is used by the
World Wide Web to manage communications between web browsers and servers.
HTTPS stands for HTTP-Secure. It is a combination of HTTP with SSL(Secure Socket
Layer). It is efficient in cases where the browser need to fill out forms, sign in,
authenticate and carry out bank transactions.
2. SSH – SSH stands for Secure Shell. It is a terminal emulations software similar to
Telnet. The reason SSH is more preferred is because of its ability to maintain the
encrypted connection. It sets up a secure session over a TCP/IP connection.
3. NTP – NTP stands for Network Time Protocol. It is used to synchronize the clocks on
our computer to one standard time source. It is very useful in situations like bank
transactions. Assume the following situation without the presence of NTP. Suppose you
carry out a transaction, where your computer reads the time at 2:30 PM while the server
records it at 2:28 PM. The server can crash very badly if it’s out of sync.

Page 31
Computer Communication and Networks

2.PHYSICAL LAYER
Transmission media:
o Transmission media is a communication channel that carries the information from the
sender to the receiver. Data is transmitted through the electromagnetic signals.
o The main functionality of the transmission media is to carry the information in the
form of bits through LAN(Local Area Network).
o It is a physical path between transmitter and receiver in data communication.
o In a copper-based network, the bits in the form of electrical signals.
o In a fibre based network, the bits in the form of light pulses.
o In OSI(Open System Interconnection) phase, transmission media supports the Layer
1. Therefore, it is considered to be as a Layer 1 component.
o The electrical signals can be sent through the copper wire, fibre optics, atmosphere,
water, and vacuum.
o The characteristics and quality of data transmission are determined by the
characteristics of medium and signal.

o Transmission media is of two types are wired media and wireless media. In wired
media, medium characteristics are more important whereas, in wireless media, signal
characteristics are more important.
o Different transmission media have different properties such as bandwidth, delay, cost
and ease of installation and maintenance.
o The transmission media is available in the lowest layer of the OSI reference model,
i.e., Physical layer.

Some factors need to be considered for designing the transmission media:

o Bandwidth: All the factors are remaining constant, the greater the bandwidth of a
medium, the higher the data transmission rate of a signal.
o Transmission impairment: When the received signal is not identical to the
transmitted one due to the transmission impairment. The quality of the signals will get
destroyed due to transmission impairment.
o Interference: An interference is defined as the process of disrupting a signal when it
travels over a communication medium on the addition of some unwanted signal.

Page 32
Computer Communication and Networks

Classification of Transmission Media:

Guided Media

It is defined as the physical medium through which the signals are transmitted. It is also
known as Bounded media.

Types Of Guided media:

Twisted pair:

Twisted pair is a physical media made up of a pair of cables twisted with each other. A
twisted pair cable is cheap as compared to other transmission media. Installation of the
twisted pair cable is easy, and it is a lightweight cable. The frequency range for twisted pair
cable is from 0 to 3.5KHz.

A twisted pair consists of two insulated copper wires arranged in a regular spiral pattern.

Page 33
Computer Communication and Networks

The degree of reduction in noise interference is determined by the number of turns per foot.
Increasing the number of turns per foot decreases noise interference.

Types of Twisted pair:

Unshielded Twisted Pair:

An unshielded twisted pair is widely used in telecommunication. Following are the categories
of the unshielded twisted pair cable:

o Category 1: Category 1 is used for telephone lines that have low-speed data.
o Category 2: It can support upto 4Mbps.
o Category 3: It can support upto 16Mbps.
o Category 4: It can support upto 20Mbps. Therefore, it can be used for long-distance
communication.

o Category 5: It can support upto 200Mbps.

Advantages Of Unshielded Twisted Pair:

o It is cheap.
o Installation of the unshielded twisted pair is easy.
o It can be used for high-speed LAN.

Page 34
Computer Communication and Networks

Disadvantage:

o This cable can only be used for shorter distances because of attenuation.

Shielded Twisted Pair

A shielded twisted pair is a cable that contains the mesh surrounding the wire that allows the
higher transmission rate.

Characteristics Of Shielded Twisted Pair:

o The cost of the shielded twisted pair cable is not very high and not very low.
o An installation of STP is easy.
o It has higher capacity as compared to unshielded twisted pair cable.
o It has a higher attenuation.
o It is shielded that provides the higher data transmission rate.

Disadvantages

o It is more expensive as compared to UTP and coaxial cable.


o It has a higher attenuation rate.

Coaxial Cable
o Coaxial cable is very commonly used transmission media, for example, TV wire is
usually a coaxial cable.
o The name of the cable is coaxial as it contains two conductors parallel to each other.
o It has a higher frequency as compared to Twisted pair cable.
o The inner conductor of the coaxial cable is made up of copper, and the outer
conductor is made up of copper mesh. The middle core is made up of non-conductive
cover that separates the inner conductor from the outer conductor.
o The middle core is responsible for the data transferring whereas the copper mesh
prevents from the EMI(Electromagnetic interference).

Page 35
Computer Communication and Networks

Coaxial cable is of two types:

1. Baseband transmission: It is defined as the process of transmitting a single signal at


high speed.
2. Broadband transmission: It is defined as the process of transmitting multiple signals
simultaneously.

Advantages Of Coaxial cable:

o The data can be transmitted at high speed.


o It has better shielding as compared to twisted pair cable.
o It provides higher bandwidth.

Disadvantages Of Coaxial cable:

o It is more expensive as compared to twisted pair cable.


o If any fault occurs in the cable causes the failure in the entire network.

Fibre Optic
o Fibre optic cable is a cable that uses electrical signals for communication.
o Fibre optic is a cable that holds the optical fibres coated in plastic that are used to
send the data by pulses of light.
o The plastic coating protects the optical fibres from heat, cold, electromagnetic
interference from other types of wiring.
o Fibre optics provide faster data transmission than copper wires.

Diagrammatic representation of fibre optic cable:

Page 36
Computer Communication and Networks

Basic elements of Fibre optic cable:

o Core: The optical fibre consists of a narrow strand of glass or plastic known as a core.
A core is a light transmission area of the fibre. The more the area of the core, the more
light will be transmitted into the fibre.
o Cladding: The concentric layer of glass is known as cladding. The main functionality
of the cladding is to provide the lower refractive index at the core interface as to cause
the reflection within the core so that the light waves are transmitted through the fibre.
o Jacket: The protective coating consisting of plastic is known as a jacket. The main
purpose of a jacket is to preserve the fibre strength, absorb shock and extra fibre
protection.

Following are the advantages of fibre optic cable over copper:

o Greater Bandwidth: The fibre optic cable provides more bandwidth as compared
copper. Therefore, the fibre optic carries more data as compared to copper cable.
o Faster speed: Fibre optic cable carries the data in the form of light. This allows the
fibre optic cable to carry the signals at a higher speed.
o Longer distances: The fibre optic cable carries the data at a longer distance as
compared to copper cable.
o Better reliability: The fibre optic cable is more reliable than the copper cable as it is
immune to any temperature changes while it can cause obstruct in the connectivity of
copper cable.

o Thinner and Sturdier: Fibre optic cable is thinner and lighter in weight so it can
withstand more pull pressure than copper cable.

Page 37
Computer Communication and Networks

UnGuided Transmission
o An unguided transmission transmits the electromagnetic waves without using any
physical medium. Therefore it is also known as wireless transmission.
o In unguided media, air is the media through which the electromagnetic energy can
flow easily.

Unguided transmission is broadly classified into three categories:

Radio waves
o Radio waves are the electromagnetic waves that are transmitted in all the directions of
free space.

o Radio waves are omnidirectional, i.e., the signals are propagated in all the directions.
o The range in frequencies of radio waves is from 3Khz to 1 khz.
o In the case of radio waves, the sending and receiving antenna are not aligned, i.e., the
wave sent by the sending antenna can be received by any receiving antenna.

o An example of the radio wave is FM radio.

Applications Of Radio waves:

o A Radio wave is useful for multicasting when there is one sender and many receivers.
o An FM radio, television, cordless phones are examples of a radio wave.

Advantages Of Radio transmission:

Page 38
Computer Communication and Networks

o Radio transmission is mainly used for wide area networks and mobile cellular phones.
o Radio waves cover a large area, and they can penetrate the walls.
o Radio transmission provides a higher transmission rate.

Microwaves

Microwaves are of two types:

o Terrestrial microwave
o Satellite microwave communication.

Terrestrial Microwave Transmission

o Terrestrial Microwave transmission is a technology that transmits the focused beam of


a radio signal from one ground-based microwave transmission antenna to another.
o Microwaves are the electromagnetic waves having the frequency in the range from
1GHz to 1000 GHz.
o Microwaves are unidirectional as the sending and receiving antenna is to be aligned,
i.e., the waves sent by the sending antenna are narrowly focussed.

o In this case, antennas are mounted on the towers to send a beam to another antenna
which is km away.
o It works on the line of sight transmission, i.e., the antennas mounted on the towers are
the direct sight of each other.

Characteristics of Microwave:

Page 39
Computer Communication and Networks

o Frequency range: The frequency range of terrestrial microwave is from 4-6 GHz to
21-23 GHz.
o Bandwidth: It supports the bandwidth from 1 to 10 Mbps.
o Short distance: It is inexpensive for short distance.
o Long distance: It is expensive as it requires a higher tower for a longer distance.
o Attenuation: Attenuation means loss of signal. It is affected by environmental
conditions and antenna size.

Advantages Of Microwave:

o Microwave transmission is cheaper than using cables.


o It is free from land acquisition as it does not require any land for the installation of
cables.

o Microwave transmission provides an easy communication in terrains as the


installation of cable in terrain is quite a difficult task.

o Communication over oceans can be achieved by using microwave transmission.

Disadvantages of Microwave transmission:

o Eavesdropping: An eavesdropping creates insecure communication. Any malicious


user can catch the signal in the air by using its own antenna.
o Out of phase signal: A signal can be moved out of phase by using microwave
transmission.
o Susceptible to weather condition: A microwave transmission is susceptible to
weather condition. This means that any environmental change such as rain, wind can
distort the signal.
o Bandwidth limited: Allocation of bandwidth is limited in the case of microwave
transmission.

Satellite Microwave Communication

o A satellite is a physical object that revolves around the earth at a known height.
o Satellite communication is more reliable nowadays as it offers more flexibility than
cable and fibre optic systems.

Page 40
Computer Communication and Networks

o We can communicate with any point on the globe by using satellite communication.

How Does Satellite work?

The satellite accepts the signal that is transmitted from the earth station, and it amplifies the
signal. The amplified signal is retransmitted to another earth station.

Advantages Of Satellite Microwave Communication:

o The coverage area of a satellite microwave is more than the terrestrial microwave.
o The transmission cost of the satellite is independent of the distance from the centre of
the coverage area.

o Satellite communication is used in mobile and wireless communication applications.


o It is easy to install.
o It is used in a wide variety of applications such as weather forecasting, radio/TV
signal broadcasting, mobile communication, etc.

Disadvantages Of Satellite Microwave Communication:

o Satellite designing and development requires more time and higher cost.
o The Satellite needs to be monitored and controlled on regular periods so that it
remains in orbit.
o The life of the satellite is about 12-15 years. Due to this reason, another launch of the
satellite has to be planned before it becomes non-functional.

Infrared
o An infrared transmission is a wireless technology used for communication over short
ranges.
o The frequency of the infrared in the range from 300 GHz to 400 THz.
o It is used for short-range communication such as data transfer between two cell
phones, TV remote operation, data transfer between a computer and cell phone resides
in the same closed area.

Page 41
Computer Communication and Networks

Characteristics Of Infrared:

o It supports high bandwidth, and hence the data rate will be very high.
o Infrared waves cannot penetrate the walls. Therefore, the infrared communication in
one room cannot be interrupted by the nearby rooms.
o An infrared communication provides better security with minimum interference.
o Infrared communication is unreliable outside the building because the sun rays will
interfere with the infrared waves.

Multiplexing:

Multiplexing is a technique used to combine and send the multiple data streams over a single
medium. The process of combining the data streams is known as multiplexing and hardware
used for multiplexing is known as a multiplexer.

Multiplexing is achieved by using a device called Multiplexer (MUX) that combines n input
lines to generate a single output line. Multiplexing follows many-to-one, i.e., n input lines
and one output line.

Demultiplexing is achieved by using a device called Demultiplexer (DEMUX) available at


the receiving end. DEMUX separates a signal into its component signals (one input and n
outputs). Therefore, we can say that demultiplexing follows the one-to-many approach.

Why Multiplexing?
o The transmission medium is used to send the signal from sender to receiver. The
medium can only have one signal at a time.
o If there are multiple signals to share one medium, then the medium must be divided in
such a way that each signal is given some portion of the available bandwidth. For
example: If there are 10 signals and bandwidth of medium is100 units, then the 10
unit is shared by each signal.
o When multiple signals share the common medium, there is a possibility of collision.
Multiplexing concept is used to avoid such collision.
o Transmission services are very expensive.

Page 42
Computer Communication and Networks

History of Multiplexing
o Multiplexing technique is widely used in telecommunications in which several
telephone calls are carried through a single wire.
o Multiplexing originated in telegraphy in the early 1870s and is now widely used in
communication.

o George Owen Squier developed the telephone carrier multiplexing in 1910.

Concept of Multiplexing

o The 'n' input lines are transmitted through a multiplexer and multiplexer combines the
signals to form a composite signal.
o The composite signal is passed through a Demultiplexer and demultiplexer separates a
signal to component signals and transfers them to their respective destinations.

Advantages of Multiplexing:
o More than one signal can be sent over a single medium.
o The bandwidth of a medium can be utilized effectively.

Multiplexing Techniques

Multiplexing techniques can be classified as:

Page 43
Computer Communication and Networks

Frequency-division Multiplexing (FDM)


o It is an analog technique.
o Frequency Division Multiplexing is a technique in which the available bandwidth of
a single transmission medium is subdivided into several channels.

o In the above diagram, a single transmission medium is subdivided into several


frequency channels, and each frequency channel is given to different devices. Device
1 has a frequency channel of range from 1 to 5.
o The input signals are translated into frequency bands by using modulation techniques,
and they are combined by a multiplexer to form a composite signal.
o The main aim of the FDM is to subdivide the available bandwidth into different
frequency channels and allocate them to different devices.
o Using the modulation technique, the input signals are transmitted into frequency
bands and then combined to form a composite signal.
o The carriers which are used for modulating the signals are known as sub-carriers.
They are represented as f1,f2..fn.

o FDM is mainly used in radio broadcasts and TV networks.

Page 44
Computer Communication and Networks

Advantages Of FDM:

o FDM is used for analog signals.


o FDM process is very simple and easy modulation.
o A Large number of signals can be sent through an FDM simultaneously.
o It does not require any synchronization between sender and receiver.

Disadvantages Of FDM:

o FDM technique is used only when low-speed channels are required.


o It suffers the problem of crosstalk.
o A Large number of modulators are required.
o It requires a high bandwidth channel.

Applications Of FDM:

o FDM is commonly used in TV networks.


o It is used in FM and AM broadcasting. Each FM radio station has different
frequencies, and they are multiplexed to form a composite signal. The multiplexed
signal is transmitted in the air.

Page 45
Computer Communication and Networks

Wavelength Division Multiplexing (WDM)

o Wavelength Division Multiplexing is same as FDM except that the optical signals are
transmitted through the fibre optic cable.
o WDM is used on fibre optics to increase the capacity of a single fibre.
o It is used to utilize the high data rate capability of fibre optic cable.
o It is an analog multiplexing technique.
o Optical signals from different source are combined to form a wider band of light with
the help of multiplexer.
o At the receiving end, demultiplexer separates the signals to transmit them to their
respective destinations.
o Multiplexing and Demultiplexing can be achieved by using a prism.
o Prism can perform a role of multiplexer by combining the various optical signals to
form a composite signal, and the composite signal is transmitted through a fibre
optical cable.

o Prism also performs a reverse operation, i.e., demultiplexing the signal.

Page 46
Computer Communication and Networks

Time Division Multiplexing


o It is a digital technique.
o In Frequency Division Multiplexing Technique, all signals operate at the same time
with different frequency, but in case of Time Division Multiplexing technique, all
signals operate at the same frequency with different time.

o In Time Division Multiplexing technique, the total time available in the channel is
distributed among different users. Therefore, each user is allocated with different time
interval known as a Time slot at which data is to be transmitted by the sender.
o A user takes control of the channel for a fixed amount of time.
o In Time Division Multiplexing technique, data is not transmitted simultaneously
rather the data is transmitted one-by-one.
o In TDM, the signal is transmitted in the form of frames. Frames contain a cycle of
time slots in which each frame contains one or more slots dedicated to each user.

o It can be used to multiplex both digital and analog signals but mainly used to
multiplex digital signals.

There are two types of TDM:

o Synchronous TDM
o Asynchronous TDM

Synchronous TDM
o A Synchronous TDM is a technique in which time slot is preassigned to every device.
o In Synchronous TDM, each device is given some time slot irrespective of the fact that
the device contains the data or not.
o If the device does not have any data, then the slot will remain empty.
o In Synchronous TDM, signals are sent in the form of frames. Time slots are organized
in the form of frames. If a device does not have data for a particular time slot, then the
empty slot will be transmitted.
o The most popular Synchronous TDM are T-1 multiplexing, ISDN multiplexing, and
SONET multiplexing.
o If there are n devices, then there are n slots.

Page 47
Computer Communication and Networks

Concept Of Synchronous TDM

In the above figure, the Synchronous TDM technique is implemented. Each device is
allocated with some time slot. The time slots are transmitted irrespective of whether the
sender has data to send or not.

Disadvantages Of Synchronous TDM:

o The capacity of the channel is not fully utilized as the empty slots are also transmitted
which is having no data. In the above figure, the first frame is completely filled, but in
the last two frames, some slots are empty. Therefore, we can say that the capacity of
the channel is not utilized efficiently.
o The speed of the transmission medium should be greater than the total speed of the
input lines. An alternative approach to the Synchronous TDM is Asynchronous Time
Division Multiplexing.

Page 48
Computer Communication and Networks

Asynchronous TDM
o An asynchronous TDM is also known as Statistical TDM.
o An asynchronous TDM is a technique in which time slots are not fixed as in the case
of Synchronous TDM. Time slots are allocated to only those devices which have the
data to send. Therefore, we can say that Asynchronous Time Division multiplexor
transmits only the data from active workstations.
o An asynchronous TDM technique dynamically allocates the time slots to the devices.
o In Asynchronous TDM, total speed of the input lines can be greater than the capacity
of the channel.
o Asynchronous Time Division multiplexor accepts the incoming data streams and
creates a frame that contains only data with no empty slots.
o In Asynchronous TDM, each slot contains an address part that identifies the source of
the data.

o The difference between Asynchronous TDM and Synchronous TDM is that many
slots in Synchronous TDM are unutilized, but in Asynchronous TDM, slots are fully
utilized. This leads to the smaller transmission time and efficient utilization of the
capacity of the channel.
o In Synchronous TDM, if there are n sending devices, then there are n time slots. In
Asynchronous TDM, if there are n sending devices, then there are m time slots where
m is less than n (m<n).
o The number of slots in a frame depends on the statistical analysis of the number of
input lines.

Concept Of Asynchronous TDM

Page 49
Computer Communication and Networks

In the above diagram, there are 4 devices, but only two devices are sending the data, i.e., A
and C. Therefore, the data of A and C are only transmitted through the transmission line.

Frame of above diagram can be represented as:

The above figure shows that the data part contains the address to determine the source of the
data.

Switching:

Switching is process to forward packets coming in from one port to a port leading towards the
destination. When data comes on a port it is called ingress, and when data leaves a port or
goes out it is called egress. A communication system may include number of switches and
nodes. At broad level, switching can be divided into two major categories:

 Connectionless: The data is forwarded on behalf of forwarding tables. No previous


handshaking is required and acknowledgements are optional.

Page 50
Computer Communication and Networks

 Connection Oriented: Before switching data to be forwarded to destination, there is a


need to pre-establish circuit along the path between both endpoints. Data is then
forwarded on that circuit. After the transfer is completed, circuits can be kept for future
use or can be turned down immediately.

In large networks, there can be multiple paths from sender to receiver. The switching
technique will decide the best route for data transmission.

Switching technique is used to connect the systems for making one-to-one communication.

Circuit Switching
o Circuit switching is a switching technique that establishes a dedicated path between
sender and receiver.
o In the Circuit Switching Technique, once the connection is established then the
dedicated path will remain to exist until the connection is terminated.
o Circuit switching in a network operates in a similar way as the telephone works.
o A complete end-to-end path must exist before the communication takes place.
o In case of circuit switching technique, when any user wants to send the data, voice,
video, a request signal is sent to the receiver then the receiver sends back the
acknowledgment to ensure the availability of the dedicated path. After receiving the
acknowledgment, dedicated path transfers the data.
o Circuit switching is used in public telephone network. It is used for voice
transmission.
o Fixed data can be transferred at a time in circuit switching technology.

Page 51
Computer Communication and Networks

Communication through circuit switching has 3 phases:

o Circuit establishment
o Data transfer
o Circuit Disconnect

Advantages Of Circuit Switching:

o In the case of Circuit Switching technique, the communication channel is dedicated.


o It has fixed bandwidth.

Disadvantages Of Circuit Switching:

o Once the dedicated path is established, the only delay occurs in the speed of data
transmission.
o It takes a long time to establish a connection approx 10 seconds during which no data
can be transmitted.
o It is more expensive than other switching techniques as a dedicated path is required
for each connection.
o It is inefficient to use because once the path is established and no data is transferred,
then the capacity of the path is wasted.
o In this case, the connection is dedicated therefore no other data can be transferred
even if the channel is free.

Page 52
Computer Communication and Networks

Message Switching
o Message Switching is a switching technique in which a message is transferred as a
complete unit and routed through intermediate nodes at which it is stored and
forwarded.
o In Message Switching technique, there is no establishment of a dedicated path
between the sender and receiver.
o The destination address is appended to the message. Message Switching provides a
dynamic routing as the message is routed through the intermediate nodes based on the
information available in the message.
o Message switches are programmed in such a way so that they can provide the most
efficient routes.
o Each and every node stores the entire message and then forward it to the next node.
This type of network is known as store and forward network.

o Message switching treats each message as an independent entity.

Advantages Of Message Switching

o Data channels are shared among the communicating devices that improve the
efficiency of using available bandwidth.

o Traffic congestion can be reduced because the message is temporarily stored in the
nodes.
o Message priority can be used to manage the network.
o The size of the message which is sent over the network can be varied. Therefore, it
supports the data of unlimited size.

Page 53
Computer Communication and Networks

Disadvantages Of Message Switching

o The message switches must be equipped with sufficient storage to enable them to
store the messages until the message is forwarded.
o The Long delay can occur due to the storing and forwarding facility provided by the
message switching technique.

Packet Switching
o The packet switching is a switching technique in which the message is sent in one go,
but it is divided into smaller pieces, and they are sent individually.
o The message splits into smaller pieces known as packets and packets are given a
unique number to identify their order at the receiving end.
o Every packet contains some information in its headers such as source address,
destination address and sequence number.
o Packets will travel across the network, taking the shortest path as possible.
o All the packets are reassembled at the receiving end in correct order.
o If any packet is missing or corrupted, then the message will be sent to resend the
message.
o If the correct order of the packets is reached, then the acknowledgment message will
be sent.

Page 54
Computer Communication and Networks

Approaches Of Packet Switching:

There are two approaches to Packet Switching:

Datagram Packet switching:

o It is a packet switching technology in which packet is known as a datagram, is


considered as an independent entity. Each packet contains the information about the
destination and switch uses this information to forward the packet to the correct
destination.

o The packets are reassembled at the receiving end in correct order.


o In Datagram Packet Switching technique, the path is not fixed.
o Intermediate nodes take the routing decisions to forward the packets.
o Datagram Packet Switching is also known as connectionless switching.

Virtual Circuit Switching

o Virtual Circuit Switching is also known as connection-oriented switching.


o In the case of Virtual circuit switching, a preplanned route is established before the
messages are sent.

o Call request and call accept packets are used to establish the connection between
sender and receiver.
o In this case, the path is fixed for the duration of a logical connection.

Let's understand the concept of virtual circuit switching through a diagram:

Page 55
Computer Communication and Networks

o In the above diagram, A and B are the sender and receiver respectively. 1 and 2 are
the nodes.
o Call request and call accept packets are used to establish a connection between the
sender and receiver.
o When a route is established, data will be transferred.
o After transmission of data, an acknowledgment signal is sent by the receiver that the
message has been received.

o If the user wants to terminate the connection, a clear signal is sent for the termination.

Differences b/w Datagram approach and Virtual Circuit approach

Datagram approach Virtual Circuit approach

Node takes routing decisions to forward Node does not take any routing decision.
the packets.

Congestion cannot occur as all the packets Congestion can occur when the node is busy, and it
travel in different directions. does not allow other packets to pass through.

It is more flexible as all the packets are It is not very flexible.


treated as an independent entity.

Channegowda k BIHE, DVG Page 56


Computer Communication and Networks

Advantages Of Packet Switching:

o Cost-effective: In packet switching technique, switching devices do not require


massive secondary storage to store the packets, so cost is minimized to some extent.
Therefore, we can say that the packet switching technique is a cost-effective
technique.

o Reliable: If any node is busy, then the packets can be rerouted. This ensures that the
Packet Switching technique provides reliable communication.
o Efficient: Packet Switching is an efficient technique. It does not require any
established path prior to the transmission, and many users can use the same
communication channel simultaneously, hence makes use of available bandwidth very
efficiently.

Disadvantages Of Packet Switching:

o Packet Switching technique cannot be implemented in those applications that require


low delay and high-quality services.
o The protocols used in a packet switching technique are very complex and requires
high implementation cost.

o If the network is overloaded or corrupted, then it requires retransmission of lost


packets. It can also lead to the loss of critical information if errors are nor recovered.

Channegowda k BIHE, DVG Page 57


Computer Communication and Networks

3. DATA LINK LAYER

The data link layer is the hardware layer, and information at this layer is in the
form of frames. The datalink layer is mainly used to define the format of the
data. The position of the data link layer is second in the internet model and stays
between the network and physical layer as you can see in the following diagram.

It takes services from the physical layer and provides services to the network
layer. The primary function of this layer is data synchronization. The data link
layer is further divided into two sub- layers as follows.

 Logical link control sub- layer


 Media access control sub- layer.

Design Issues of Data Link Layer

The data link layer is supposed to carry out many specified functions. It is
responsible for effective data communication between two directly connected
transmitting and receiving stations.

The data link layer has to carry out several specific functions and the following
are the main design issues of data link layer:

Channegowda k BIHE, DVG Page 58


Computer Communication and Networks

 Data transfer
 Frame synchronization
 Flow control
 Error control
 Addressing
 Link management.

Provide Services to the Network Layer

The data link layer provides a well-defined service interface to the network
layer. The principle of services is to transfer data from the network layer on the
source machine to the network layer on the destination machine.

The transfer is done through DDL(Dynamic - link layer). The data link layer takes
services from the physical layer and provides well-defined services to the
network layer.

Datalink layer provides three types of services as follows:

 Unacknowledged connectionless service


 Acknowledged connection service
 Acknowledged connection-oriented service.

Frame Synchronization

Frame synchronization is one form the design issues of data link layer. The
source machine sends data in a block called frame to the destination machine.
The starting and ending of each frame must be recognized by the destination
machine.

For frame recognization, every frame comprises three parts, such as frame
header, payload field (contains data packet from the network layer) and trailer.

Flow Control

Channegowda k BIHE, DVG Page 59


Computer Communication and Networks

The source machine should not send a data frame at a fast data rate as compared
to the destination machine receiving data rate. When the sender sends the data at
a high speed, the slow receiver cannot able to handle it and the frame can lose in
such cases.

There are two types of techniques that are used for flow control as follows.

 Rate based flow control


 Feedback based flow control.

Error Control

The errors made in bits during transmission from source to destination machines
must be detected and corrected. The data link layer ensures error -free data
transmission. For this, two types of error control techniques are used in the data
link layer are as follows.

 Error detection techniques


 Error correction techniques

Addressing

Addressing is also one of the design issues of data link layer. On a multipoint
line, the identity of the individual machines must be specified while transmitting
the data frames. Each frame comprises a header in which the source and
destination addresses are placed.

Link Management

The initiation, maintenance and termination of the link between the source and
destination is required for the effective exchange of data. The data link layer of
the OSI Model handles proper link management of connected devices.

Channegowda k BIHE, DVG Page 60


Computer Communication and Networks

Error Detection

When data is transmitted from one device to another device, the system does not guarantee
whether the data received by the device is identical to the data transmitted by another device.
An Error is a situation when the message received at the receiver end is not identical to the
message transmitted.

Types Of Errors

Errors can be classified into two categories:

o Single-Bit Error
o Burst Error

Single-Bit Error:

The only one bit of a given data unit is changed from 1 to 0 or from 0 to 1.

In the above figure, the message which is sent is corrupted as single-bit, i.e., 0 bit is changed
to 1.

Single-Bit Error does not appear more likely in Serial Data Transmission. For example,
Sender sends the data at 10 Mbps, this means that the bit lasts only for 1 ?s and for a single-
bit error to occurred, a noise must be more than 1 ?s.

Channegowda k BIHE, DVG Page 61


Computer Communication and Networks

Single-Bit Error mainly occurs in Parallel Data Transmission. For example, if eight wires are
used to send the eight bits of a byte, if one of the wire is noisy, then single-bit is corrupted per
byte.

Burst Error:

The two or more bits are changed from 0 to 1 or from 1 to 0 is known as Burst Error.

The Burst Error is determined from the first corrupted bit to the last corrupted bit.

The duration of noise in Burst Error is more than the duration of noise in Single-Bit.

Burst Errors are most likely to occurr in Serial Data Transmission.

The number of affected bits depends on the duration of the noise and data rate.

Error Detecting Techniques:

The most popular Error Detecting Techniques are:

o Single parity check


o Checksum

Single Parity Check


o Single Parity checking is the simple mechanism and inexpensive to detect the errors.

Channegowda k BIHE, DVG Page 62


Computer Communication and Networks

o In this technique, a redundant bit is also known as a parity bit which is appended at
the end of the data unit so that the number of 1s becomes even. Therefore, the total
number of transmitted bits would be 9 bits.
o If the number of 1s bits is odd, then parity bit 1 is appended and if the number of 1s
bits is even, then parity bit 0 is appended at the end of the data unit.
o At the receiving end, the parity bit is calculated from the received data bits and
compared with the received parity bit.
o This technique generates the total number of 1s even, so it is known as even-parity
checking.

Drawbacks Of Single Parity Checking

o It can only detect single-bit errors which are very rare.


o If two bits are interchanged, then it cannot detect the errors.

Channegowda k BIHE, DVG Page 63


Computer Communication and Networks

Checksum

A Checksum is an error detection technique based on the concept of redundancy.

It is divided into two parts:

Checksum Generator

A Checksum is generated at the sending side. Checksum generator subdivides the data into
equal segments of n bits each, and all these segments are added together by using one's
complement arithmetic. The sum is complemented and appended to the original data, known
as checksum field. The extended data is transmitted across the network.

Suppose L is the total sum of the data segments, then the checksum would be ?L

Channegowda k BIHE, DVG Page 64


Computer Communication and Networks

1. The Sender follows the given steps:


2. The block unit is divided into k sections, and each of n bits.
3. All the k sections are added together by using one's complement to get the sum.
4. The sum is complemented and it becomes the checksum field.
5. The original data and checksum field are sent across the network.

Checksum Checker

A Checksum is verified at the receiving side. The receiver subdivides the incoming data into
equal segments of n bits each, and all these segments are added together, and then this sum is
complemented. If the complement of the sum is zero, then the data is accepted otherwise data
is rejected.

The Receiver follows the given steps:


 The block unit is divided into k sections and each of n bits.
 All the k sections are added together by using one's complement algorithm to get the
sum.
 The sum is complemented.
 If the result of the sum is zero, then the data is accepted otherwise the data is discard
ed.

Polynomial codes:

A polynomial code is a linear code having a set of valid code words that comprises of
polynomials divisible by a shorter fixed polynomial is known as generator polynomial.

They are used for error detection and correction during the transmission of data as well as
storage of data.

Cyclic redundancy check (CRC)


 Unlike checksum scheme, which is based on addition, CRC is based on binary division.
 In CRC, a sequence of redundant bits, called cyclic redundancy check bits, are appended
to the end of data unit so that the resulting data unit becomes exactly divisible by a
second, predetermined binary number.

Channegowda k BIHE, DVG Page 65


Computer Communication and Networks

 At the destination, the incoming data unit is divided by the same number. If at this step
there is no remainder, the data unit is assumed to be correct and is therefore accepted.
 A remainder indicates that the data unit has been damaged in transit and therefore must
be rejected.

Example :

Channegowda k BIHE, DVG Page 66


Computer Communication and Networks

Error Correction

Error Correction codes are used to detect and correct the errors when data is transmitted from
the sender to the receiver.

Error Correction can be handled in two ways:

o Backward error correction: Once the error is discovered, the receiver requests the
sender to retransmit the entire data unit.
o Forward error correction: In this case, the receiver uses the error-correcting code
which automatically corrects the errors.

A single additional bit can detect the error, but cannot correct it.

For correcting the errors, one has to know the exact position of the error. For example, If we
want to calculate a single-bit error, the error correction code will determine which one of
seven bits is in error. To achieve this, we have to add some additional redundant bits.

Suppose r is the number of redundant bits and d is the total number of the data bits. The
number of redundant bits r can be calculated by using the formula:

2r>=d+r+1

The value of r is calculated by using the above formula. For example, if the value of d is 4,
then the possible smallest value that satisfies the above relation would be 3.

To determine the position of the bit which is in error, a technique developed by R.W
Hamming is Hamming code which can be applied to any length of the data unit and uses the
relationship between data units and redundant units.

Hamming Code

Parity bits: The bit which is appended to the original data of binary bits so that the total
number of 1s is even or odd.

Channegowda k BIHE, DVG Page 67


Computer Communication and Networks

Even parity: To check for even parity, if the total number of 1s is even, then the value of the
parity bit is 0. If the total number of 1s occurrences is odd, then the value of the parity bit is
1.

Odd Parity: To check for odd parity, if the total number of 1s is even, then the value of
parity bit is 1. If the total number of 1s is odd, then the value of parity bit is 0.

Algorithm of Hamming code:

o An information of 'd' bits are added to the redundant bits 'r' to form d+r.
o The location of each of the (d+r) digits is assigned a decimal value.
o The 'r' bits are placed in the positions 1,2, ..... 2k-1.
o At the receiving end, the parity bits are recalculated. The decimal value of the parity
bits determines the position of an error.

Relationship b/w Error position & binary number.

Let's understand the concept of Hamming code through an example:

Suppose the original data is 1010 which is to be sent.

Total number of data bits 'd' = 4

Number of redundant bits r : 2r >= d+r+1

2r>= 4+r+1

Therefore, the value of r is 3 that satisfies the above relation.

Total number of bits = d+r = 4+3 = 7;

Channegowda k BIHE, DVG Page 68


Computer Communication and Networks

Determining the position of the redundant bits

The number of redundant bits is 3. The three bits are represented by r1, r2, r4. The position of
the redundant bits is calculated with corresponds to the raised power of 2. Therefore, their
corresponding positions are 1, 21, 22.

1. The position of r1 = 1
2. The position of r2 = 2
3. The position of r4 = 4

Representation of Data on the addition of parity bits:

Determining the Parity bits

Determining the r1 bit

The r1 bit is calculated by performing a parity check on the bit positions whose binary
representation includes 1 in the first position.

We observe from the above figure that the bit positions that includes 1 in the first position are
1, 3, 5, 7. Now, we perform the even-parity check at these bit positions. The total number of 1
at these bit positions corresponding to r1 is even, therefore, the value of the r1 bit is 0.

Determining r2 bit

Channegowda k BIHE, DVG Page 69


Computer Communication and Networks

The r2 bit is calculated by performing a parity check on the bit positions whose binary
representation includes 1 in the second position.

We observe from the above figure that the bit positions that includes 1 in the second position
are 2, 3, 6, 7. Now, we perform the even-parity check at these bit positions. The total number
of 1 at these bit positions corresponding to r2 is odd, therefore, the value of the r2 bit is 1.

Determining r4 bit

The r4 bit is calculated by performing a parity check on the bit positions whose binary
representation includes 1 in the third position.

We observe from the above figure that the bit positions that includes 1 in the third position
are 4, 5, 6, 7. Now, we perform the even-parity check at these bit positions. The total number
of 1 at these bit positions corresponding to r4 is even, therefore, the value of the r4 bit is 0.

Data transferred is given below:

Channegowda k BIHE, DVG Page 70


Computer Communication and Networks

Suppose the 4th bit is changed from 0 to 1 at the receiving end, then parity bits are
recalculated.

R1 bit

The bit positions of the r1 bit are 1,3,5,7

We observe from the above figure that the binary representation of r1 is 1100. Now, we
perform the even-parity check, the total number of 1s appearing in the r1 bit is an even
number. Therefore, the value of r1 is 0.

R2 bit

The bit positions of r2 bit are 2,3,6,7.

We observe from the above figure that the binary representation of r2 is 1001. Now, we
perform the even-parity check, the total number of 1s appearing in the r2 bit is an even
number. Therefore, the value of r2 is 0.

R4 bit

Channegowda k BIHE, DVG Page 71


Computer Communication and Networks

The bit positions of r4 bit are 4,5,6,7.

We observe from the above figure that the binary representation of r4 is 1011. Now, we
perform the even-parity check, the total number of 1s appearing in the r4 bit is an odd
number. Therefore, the value of r4 is 1.

o The binary representation of redundant bits, i.e., r4r2r1 is 100, and its corresponding
decimal value is 4. Therefore, the error occurs in a 4th bit position. The bit value must
be changed from 1 to 0 to correct the error.

Elementary Data Link protocols:

Elementary Data Link protocols are classified into three categories, as given below −

 Protocol 1 − Unrestricted simplex protocol


 Protocol 2 − Simplex stop and wait protocol
 Protocol 3 − Simplex protocol for noisy channels.
Let us discuss each protocol one by one.

Unrestricted Simplex Protocol


Data transmitting is carried out in one direction only. The transmission (Tx) and receiving
(Rx) are always ready and the processing time can be ignored. In this protocol, infinite buffer
space is available, and no errors are occurring that is no damage frames and no lost frames.

The Unrestricted Simplex Protocol is diagrammatically represented as follows −

Channegowda k BIHE, DVG Page 72


Computer Communication and Networks

Simplex Stop and Wait protocol


In this protocol we assume that data is transmitted in one direction only. No error occurs; the
receiver can only process the received information at finite rate. These assumptions imply
that the transmitter cannot send frames at rate faster than the receiver can process them.

The main problem here is how to prevent the sender from flooding the receiver. The general
solution for this problem is to have the receiver send some sort of feedback to sender, the
process is as follows −

Step1 − The receiver send the acknowledgement frame back to the sender telling the sender
that the last received frame has been processed and passed to the host.

Step 2 − Permission to send the next frame is granted.

Step 3 − The sender after sending the sent frame has to wait for an acknowledge frame from
the receiver before sending another frame.

This protocol is called Simplex Stop and wait protocol, the sender sends one frame and waits
for feedback from the receiver. When the ACK arrives, the sender sends the next frame.

The Simplex Stop and Wait Protocol is diagrammatically represented as follows −

Channegowda k BIHE, DVG Page 73


Computer Communication and Networks

Simplex Protocol for Noisy Channel


Data transfer is only in one direction, consider separate sender and receiver, finite processing
capacity and speed at the receiver, since it is a noisy channel, errors in data frames or
acknowledgement frames are expected. Every frame has a unique sequence number.

After a frame has been transmitted, the timer is started for a finite time. Before the timer
expires, if the acknowledgement is not received , the frame gets retransmitted, when the
acknowledgement gets corrupted or sent data frames gets damaged, how long the sender
should wait to transmit the next frame is infinite.

The Simplex Protocol for Noisy Channel is diagrammatically represented as follows −

Sliding window protocols:

Channegowda k BIHE, DVG Page 74


Computer Communication and Networks

Sliding window protocols are data link layer protocols for reliable and sequential delivery of
data frames. The sliding window is also used in Transmission Control Protocol.

In this protocol, multiple frames can be sent by a sender at a time before receiving an
acknowledgment from the receiver. The term sliding window refers to the imaginary boxes
to hold frames. Sliding window method is also known as windowing.

Working Principle
In these protocols, the sender has a buffer called the sending window and the receiver has
buffer called the receiving window.

The size of the sending window determines the sequence number of the outbound frames. If
the sequence number of the frames is an n-bit field, then the range of sequence numbers that
can be assigned is 0 to 2 −1. Consequently, the size of the sending window is 2 −1. Thus in
order to accommodate a sending window size of 2 −1, a n-bit sequence number is chosen.

The sequence numbers are numbered as modulo-n. For example, if the sending window size
is 4, then the sequence numbers will be 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, and so on. The number of
bits in the sequence number is 2 to generate the binary sequence 00, 01, 10, 11.

The size of the receiving window is the maximum number of frames that the receiver can
accept at a time. It determines the maximum number of frames that the sender can send
before receiving acknowledgment.

Example
Suppose that we have sender window and receiver window each of size 4. So the sequence
numbering of both the windows will be 0,1,2,3,0,1,2 and so on. The following diagram
shows the positions of the windows after sending the frames and receiving
acknowledgments.

Channegowda k BIHE, DVG Page 75


Computer Communication and Networks

Types of Sliding Window Protocols


The Sliding Window ARQ (Automatic Repeat reQuest) protocols are of two categories −

 Go – Back – N ARQ
Go – Back – N ARQ provides for sending multiple frames before receiving the
acknowledgment for the first frame. It uses the concept of sliding window, and so is
also called sliding window protocol. The frames are sequentially numbered and a finite
number of frames are sent. If the acknowledgment of a frame is not received within the
time period, all frames starting from that frame are retransmitted.

Channegowda k BIHE, DVG Page 76


Computer Communication and Networks

 Selective Repeat ARQ


This protocol also provides for sending multiple frames before receiving the
acknowledgment for the first frame. However, here only the erroneous or lost
frames are retransmitted, while the good frames are received and buffered.

Channegowda k BIHE, DVG Page 77


Computer Communication and Networks

NETWORK LAYER

The Network Layer is the third layer of the OSI model.

o It handles the service requests from the transport layer and further forwards the
service request to the data link layer.

o The network layer translates the logical addresses into physical addresses
o It determines the route from the source to the destination and also manages the traffic
problems such as switching, routing and controls the congestion of data packets.

o The main role of the network layer is to move the packets from sending host to the
receiving host.

The main functions performed by the network layer are:

o Routing: When a packet reaches the router's input link, the router will move the
packets to the router's output link. For example, a packet from S1 to R1 must be
forwarded to the next router on the path to S2.

o Logical Addressing: The data link layer implements the physical addressing and
network layer implements the logical addressing. Logical addressing is also used to
distinguish between source and destination system. The network layer adds a header
to the packet which includes the logical addresses of both the sender and the receiver.

o Internetworking: This is the main role of the network layer that it provides the
logical connection between different types of networks.

o Fragmentation: The fragmentation is a process of breaking the packets into the


smallest individual data units that travel through different networks.

Forwarding & Routing

In Network layer, a router is used to forward the packets. Every router has a forwarding table.
A router forwards a packet by examining a packet's header field and then using the header
field value to index into the forwarding table. The value stored in the forwarding table
corresponding to the header field value indicates the router's outgoing interface link to which
the packet is to be forwarded.

Channegowda k BIHE, DVG Page 78


Computer Communication and Networks

For example, the router with a header field value of 0111 arrives at a router, and then router
indexes this header value into the forwarding table that determines the output link interface is
2. The router forwards the packet to the interface 2. The routing algorithm determines the
values that are inserted in the forwarding table. The routing algorithm can be centralized or
decentralized.

Services Provided by the Network Layer

o Guaranteed delivery: This layer provides the service which guarantees that the
packet will arrive at its destination.

o Guaranteed delivery with bounded delay: This service guarantees that the packet
will be delivered within a specified host-to-host delay bound.

Channegowda k BIHE, DVG Page 79


Computer Communication and Networks

o In-Order packets: This service ensures that the packet arrives at the destination in
the order in which they are sent.

o Guaranteed max jitter: This service ensures that the amount of time taken between
two successive transmissions at the sender is equal to the time between their receipt at
the destination.
o Security services: The network layer provides security by using a session key
between the source and destination host. The network layer in the source host
encrypts the payloads of datagrams being sent to the destination host. The network
layer in the destination host would then decrypt the payload. In such a way, the
network layer maintains the data integrity and source authentication services.

Design Issues in Network Layer

Network layer is majorly focused on getting packets from the source to the destination,
routing error handling and congestion control.
Before learning about design issues in the network layer, let’s learn about it’s various
functions.

 Addressing:
Maintains the address at the frame header of both source and destination and performs
addressing to detect various devices in network.
 Packeting:
This is performed by Internet Protocol. The network layer converts the packets from its
upper layer.
 Routing:
It is the most important functionality. The network layer chooses the most relevant and
best path for the data transmission from source to destination.
 Inter-networking:
It works to deliver a logical connection across multiple devices.
Network layer design issues:
The network layer comes with some design issues they are described as follows:
1. Store and Forward packet switching:
The host sends the packet to the nearest router. This packet is stored there until it has fully

Channegowda k BIHE, DVG Page 80


Computer Communication and Networks

arrived once the link is fully processed by verifying the checksum then it is forwarded to
the next router till it reaches the destination. This mechanism is called “Store and Forward
packet switching.”
2. Services provided to Transport Layer:
Through the network/transport layer interface, the network layer transfers it’s services to
the transport layer. These services are described below.
But before providing these services to the transfer layer following goals must be kept in
mind :-
 Offering services must not depend on router technology.
 The transport layer needs to be protected from the type, number and topology of the
available router.
 The network addresses for the transport layer should use uniform numbering pattern
also at LAN and WAN connections.
Based on the connections there are 2 types of services provided :

 Connectionless – The routing and insertion of packets into subnet is done individually.
No added setup is required.
 Connection-Oriented – Subnet must offer reliable service and all the packets must be
transmitted over a single route.
3. Implementation of Connectionless Service:
Packet are termed as “datagrams” and corresponding subnet as “datagram subnets”. When
the message size that has to be transmitted is 4 times the size of the packet, then the
network layer divides into 4 packets and transmits each packet to router via. a few
protocol.Each data packet has destination address and is routed independently irrespective
of the packets.
4. Implementation of Connection Oriented service:
To use a connection-oriented service, first we establishes a connection, use it and then
release it. In connection-oriented services, the data packets are delivered to the receiver in
the same order in which they have been sent by the sender.
It can be done in either two ways :

 Circuit Switched Connection – A dedicated physical path or a circuit is established


between the communicating nodes and then data stream is transferred.
 Virtual Circuit Switched Connection – The data stream is transferred over a packet
switched network, in such a way that it seems to the user that there is a dedicated path

Channegowda k BIHE, DVG Page 81


Computer Communication and Networks

from the sender to the receiver. A virtual path is established here. While, other
connections may also be using the same path.

Routing algorithm
o In order to transfer the packets from source to the destination, the network layer must
determine the best route through which packets can be transmitted.

o Whether the network layer provides datagram service or virtual circuit service, the
main job of the network layer is to provide the best route. The routing protocol
provides this job.

o The routing protocol is a routing algorithm that provides the best path from the source
to the destination. The best path is the path that has the "least-cost path" from source
to the destination.
o Routing is the process of forwarding the packets from source to the destination but the
best route to send the packets is determined by the routing algorithm.

Classification of a Routing algorithm

The Routing algorithm is divided into two categories:

o Adaptive Routing algorithm


o Non-adaptive Routing algorithm

Adaptive Routing algorithm

o An adaptive routing algorithm is also known as dynamic routing algorithm.

Channegowda k BIHE, DVG Page 82


Computer Communication and Networks

o This algorithm makes the routing decisions based on the topology and network traffic.
o The main parameters related to this algorithm are hop count, distance and estimated
transit time.

An adaptive routing algorithm can be classified into three parts:

o Centralized algorithm: It is also known as global routing algorithm as it computes


the least-cost path between source and destination by using complete and global
knowledge about the network. This algorithm takes the connectivity between the
nodes and link cost as input, and this information is obtained before actually
performing any calculation. Link state algorithm is referred to as a centralized
algorithm since it is aware of the cost of each link in the network.
o Isolation algorithm: It is an algorithm that obtains the routing information by using
local information rather than gathering information from other nodes.
o Distributed algorithm: It is also known as decentralized algorithm as it computes the
least-cost path between source and destination in an iterative and distributed manner.
In the decentralized algorithm, no node has the knowledge about the cost of all the
network links. In the beginning, a node contains the information only about its own
directly attached links and through an iterative process of calculation computes the
least-cost path to the destination. A Distance vector algorithm is a decentralized
algorithm as it never knows the complete path from source to the destination, instead
it knows the direction through which the packet is to be forwarded along with the
least cost path.

Non-Adaptive Routing algorithm

o Non Adaptive routing algorithm is also known as a static routing algorithm.


o When booting up the network, the routing information stores to the routers.
o Non Adaptive routing algorithms do not take the routing decision based on the
network topology or network traffic.

The Non-Adaptive Routing algorithm is having following types

Channegowda k BIHE, DVG Page 83


Computer Communication and Networks

Flooding: In case of flooding, every incoming packet is sent to all the outgoing links except
the one from it has been reached. The disadvantage of flooding is that node may contain
several copies of a particular packet.

Shortest path: In this algorithm, to select a route, the algorithm discovers the shortest path
between two nodes. It can use multiple hops, the geographical area in kilometres or labelling
of arcs for measuring path length.

Shortest path routing algorithm:

In this algorithm, to select a route, the algorithm discovers the shortest path between two
nodes. It can use multiple hops, the geographical area in kilometres or labelling of arcs for
measuring path length.

The labelling of arcs can be done with mean queuing, transmission delay for a standard test
packet on an hourly basis, or computed as a function of bandwidth, average distance traffic,
communication cost, mean queue length, measured delay or some other factors.

In shortest path routing, the topology communication network is defined using a directed
weighted graph. The nodes in the graph define switching components and the directed arcs in
the graph define communication connection between switching components. Each arc has a
weight that defines the cost of sharing a packet between two nodes in a specific direction.

This cost is usually a positive value that can denote such factors as delay, throughput, error
rate, financial costs, etc. A path between two nodes can go through various intermediary
nodes and arcs. The goal of shortest path routing is to find a path between two nodes that has
the lowest total cost, where the total cost of a path is the sum of arc costs in that path.

For example, Dijikstra uses the nodes labelling with its distance from the source node along
the better-known route. Initially, all nodes are labelled with infinity, and as the algorithm
proceeds, the label may change. The labelling graph is displayed in the figure.

Given a graph and a source vertex in the graph, find the shortest paths from the source to
all vertices in the given graph.

Channegowda k BIHE, DVG Page 84


Computer Communication and Networks

Examples:
Input: src = 0, the graph is shown below.

Output: 0 4 12 19 21 11 9 8 14
Explanation: The distance from 0 to 1 = 4.
The minimum distance from 0 to 2 = 12. 0->1->2
The minimum distance from 0 to 3 = 19. 0->1->2->3
The minimum distance from 0 to 4 = 21. 0->7->6->5->4
The minimum distance from 0 to 5 = 11. 0->7->6->5
The minimum distance from 0 to 6 = 9. 0->7->6
The minimum distance from 0 to 7 = 8. 0->7
The minimum distance from 0 to 8 = 14. 0->1->2->8

Follow the steps below to solve the problem:

 Create a set sptSet (shortest path tree set) that keeps track of vertices included in the
shortest-path tree, i.e., whose minimum distance from the source is calculated and
finalized. Initially, this set is empty.
 Assign a distance value to all vertices in the input graph. Initialize all distance values
as INFINITE. Assign the distance value as 0 for the source vertex so that it is picked
first.
 While sptSet doesn’t include all vertices

Channegowda k BIHE, DVG Page 85


Computer Communication and Networks

 Pick a vertex u which is not there in sptSet and has a minimum distance
value.
 Include u to sptSet.
 Then update distance value of all adjacent vertices of u.
 To update the distance values, iterate through all adjacent
vertices.
 For every adjacent vertex v, if the sum of the distance value of u
(from source) and weight of edge u-v, is less than the distance
value of v, then update the distance value of v.

Below is the illustration of the above approach:

Illustration:
To understand the Dijkstra’s Algorithm lets take a graph and find the shortest path from
source to all nodes.
Consider below graph and src = 0

Step 1:
 The set sptSet is initially empty and distances assigned to vertices are {0, INF, INF,
INF, INF, INF, INF, INF} where INF indicates infinite.
 Now pick the vertex with a minimum distance value. The vertex 0 is picked, include it
in sptSet. So sptSet becomes {0}. After including 0 to sptSet, update distance values of
its adjacent vertices.

Channegowda k BIHE, DVG Page 86


Computer Communication and Networks

 Adjacent vertices of 0 are 1 and 7. The distance values of 1 and 7 are updated as 4 and
8.
The following subgraph shows vertices and their distance values, only the vertices with
finite distance values are shown. The vertices included in SPT are shown in green colour.

Step 2:
 Pick the vertex with minimum distance value and not already included in SPT (not in
sptSET). The vertex 1 is picked and added to sptSet.
 So sptSet now becomes {0, 1}. Update the distance values of adjacent vertices of 1.
 The distance value of vertex 2 becomes 12.

Step 3:
 Pick the vertex with minimum distance value and not already included in SPT (not in
sptSET). Vertex 7 is picked. So sptSet now becomes {0, 1, 7}.
 Update the distance values of adjacent vertices of 7. The distance value of vertex 6 and
8 becomes finite (15 and 9 respectively).

Step 4:
 Pick the vertex with minimum distance value and not already included in SPT (not in
sptSET). Vertex 6 is picked. So sptSet now becomes {0, 1, 7, 6}.

Channegowda k BIHE, DVG Page 87


Computer Communication and Networks

 Update the distance values of adjacent vertices of 6. The distance value of vertex 5 and
8 are updated.

We repeat the above steps until sptSet includes all vertices of the given graph. Finally, we
get the following Shortest Path Tree (SPT).

Dijkstra’s Algorithm

Input − A graph representing the network; and a source node, s

Output − A shortest path tree, spt[], with s as the root node.

Initializations −

 An array of distances dist[] of size |V| (number of nodes), where dist[s] =


0 and dist[u] = ∞ (infinite), where u represents a node in the graph except s.
 An array, Q, containing all nodes in the graph. When the algorithm runs into
completion, Q will become empty.
 An empty set, S, to which the visited nodes will be added. When the algorithm runs
into completion, S will contain all the nodes in the graph.
 Repeat while Q is not empty −

Channegowda k BIHE, DVG Page 88


Computer Communication and Networks

o Remove from Q, the node, u having the smallest dist[u] and which is not in S.
In the first run, dist[s] is removed.
o Add u to S, marking u as visited.
o For each node v which is adjacent to u, update dist[v] as −
 If (dist[u] + weight of edge u-v) < dist[v], Then
 Update dist[v] = dist[u] + weight of edge u-v
 The array dist[] contains the shortest path from s to every other node.

The following figure shows steps to find shortest using Dijkstra algorithm

Optimality principle:

It states that if router J is on the optimal path from router I to router K, then the
optimal path from J to K also falls along the same route. To see this, call the part
of the route from I to Jr1 and the rest of the route r2. If a route better than r2
existed from J to K, it could be concatenated with r1 to improve the route from I
to K, contradicting our statement that r1r2 isoptimal.

Channegowda k BIHE, DVG Page 89


Computer Communication and Networks

As a direct consequence of the optimality principle, we can see that the set of
optimal routesfrom all sources to a given destination form a tree rooted at the
destination. Such a tree is called a sink tree

Optimality principle can be defined with reference to following figure as below.

Flooding:

Another static algorithm is flooding, in which every incoming packet is sent out
on everyoutgoing line except the one it arrived on.

Flooding obviously generates vast numbers of duplicate packets. To avoid


duplication somemeasures has to be take. One such measure is to have a hop
counter contained in the header of each packet, which is decremented at each
hop, with the packet being discarded when thecounter reaches zero. Ideally, the
hop counter should be initialized to the length of the path from source to
destination. If the sender does not know how long the path is, it can initializethe
counter to the worst case, namely, the full diameter of the subnet.

Characteristics –
 All possible routes between Source and Destination are tried. A packet will always get
through if the path exists
 As all routes are tried, there will be at least one route which is the shortest

Channegowda k BIHE, DVG Page 90


Computer Communication and Networks

 All nodes directly or indirectly connected are visited


Limitations –
 Flooding generates a vast number of duplicate packets
 Suitable damping mechanism must be used

Hop-Count –
 A hop counter may be contained in the packet header which is decremented at each hop.
with the packet being discarded when the counter becomes zero
 The sender initializes the hop counter. If no estimate is known, it is set to the full
diameter of the subnet.
 Keep track of the packets which are responsible for flooding using a sequence number.
Avoid sending them out a second time.
Selective Flooding:

Routers do not send every incoming packet out on every line, only on those lines that go in
approximately in the direction of the destination.

Link state routing:

Link state routing is a technique in which each router shares the knowledge of its
neighborhood with every other router in the internetwork.

The three keys to understand the Link State Routing algorithm:

o Knowledge about the neighborhood: Instead of sending its routing table, a router
sends the information about its neighborhood only. A router broadcast its identities
and cost of the directly attached links to other routers.

o Flooding: Each router sends the information to every other router on the internetwork
except its neighbors. This process is known as Flooding. Every router that receives
the packet sends the copies to all its neighbors. Finally, each and every router receives
a copy of the same information.

o Information sharing: A router sends the information to every other router only when
the change occurs in the information.

Channegowda k BIHE, DVG Page 91


Computer Communication and Networks

Link State Routing has two phases:

Reliable Flooding

o Initial state: Each node knows the cost of its neighbors.


o Final state: Each node knows the entire graph.

Route Calculation

Each node uses Dijkstra's algorithm on the graph to calculate the optimal routes to all nodes.

o The Link state routing algorithm is also known as Dijkstra's algorithm which is used
to find the shortest path from one node to every other node in the network.

o The Dijkstra's algorithm is an iterative, and it has the property that after kth iteration of
the algorithm, the least cost paths are well known for k destination nodes.

Let's describe some notations:

o c( i , j): Link cost from node i to node j. If i and j nodes are not directly linked, then
c(i , j) = ∞.

o D(v): It defines the cost of the path from source code to destination v that has the least
cost currently.

o P(v): It defines the previous node (neighbor of v) along with current least cost path
from source to v.

o N: It is the total number of nodes available in the network.

Algorithm

Initialization
N = {A} // A is a root node.

for all nodes v

if v adjacent to A

then D(v) = c(A,v)

Channegowda k BIHE, DVG Page 92


Computer Communication and Networks

else D(v) = infinity

loop
find w not in N such that D(w) is a minimum.

Add w to N

Update D(v) for all v adjacent to w and not in N:

D(v) = min(D(v) , D(w) + c(w,v))

Until all nodes in N

In the above algorithm, an initialization step is followed by the loop. The number of times the
loop is executed is equal to the total number of nodes available in the network.

Let's understand through an example:

In the above figure, source vertex is A.

Step 1:

The first step is an initialization step. The currently known least cost path from A to its
directly attached neighbors, B, C, D are 2,5,1 respectively. The cost from A to B is set to 2,
from A to D is set to 1 and from A to C is set to 5. The cost from A to E and F are set to
infinity as they are not directly linked to A.

Channegowda k BIHE, DVG Page 93


Computer Communication and Networks

Step N D(B),P(B) D(C),P(C) D(D),P(D) D(E),P(E) D(F),P(F)

1 A 2,A 5,A 1,A ∞ ∞

Step 2:

In the above table, we observe that vertex D contains the least cost path in step 1. Therefore,
it is added in N. Now, we need to determine a least-cost path through D vertex.

a) Calculating shortest path from A to B

1. v = B, w = D
2. D(B) = min( D(B) , D(D) + c(D,B) )
3. = min( 2, 1+2)>
4. = min( 2, 3)
5. The minimum value is 2. Therefore, the currently shortest path from A to B is 2.

b) Calculating shortest path from A to C

1. v = C, w = D
2. D(B) = min( D(C) , D(D) + c(D,C) )
3. = min( 5, 1+3)
4. = min( 5, 4)

Channegowda k BIHE, DVG Page 94


Computer Communication and Networks

5. The minimum value is 4. Therefore, the currently shortest path from A to C is 4.</p>

c) Calculating shortest path from A to E

1. v = E, w = D
2. D(B) = min( D(E) , D(D) + c(D,E) )
3. = min( ∞, 1+1)
4. = min(∞, 2)
5. The minimum value is 2. Therefore, the currently shortest path from A to E is 2.
Note: The vertex D has no direct link to vertex E. Therefore, the value of D(F) is infinity.

Step N D(B),P(B) D(C),P(C) D(D),P(D) D(E),P(E) D(F),P(F)

1 A 2,A 5,A 1,A ∞ ∞

2 AD 2,A 4,D 2,D ∞

Step 3:

In the above table, we observe that both E and B have the least cost path in step 2. Let's
consider the E vertex. Now, we determine the least cost path of remaining vertices through E.

a) Calculating the shortest path from A to B.

Channegowda k BIHE, DVG Page 95


Computer Communication and Networks

1. v = B, w = E
2. D(B) = min( D(B) , D(E) + c(E,B) )
3. = min( 2 , 2+ ∞ )
4. = min( 2, ∞)
5. The minimum value is 2. Therefore, the currently shortest path from A to B is 2.

b) Calculating the shortest path from A to C.

1. v = C, w = E
2. D(B) = min( D(C) , D(E) + c(E,C) )
3. = min( 4 , 2+1 )
4. = min( 4,3)
5. The minimum value is 3. Therefore, the currently shortest path from A to C is 3.

c) Calculating the shortest path from A to F.

1. v = F, w = E
2. D(B) = min( D(F) , D(E) + c(E,F) )
3. = min( ∞ , 2+2 )
4. = min(∞ ,4)
5. The minimum value is 4. Therefore, the currently shortest path from A to F is 4.

Channegowda k BIHE, DVG Page 96


Computer Communication and Networks

Step N D(B),P(B) D(C),P(C) D(D),P(D) D(E),P(E) D(F),P(F)

1 A 2,A 5,A 1,A ∞ ∞

2 AD 2,A 4,D 2,D ∞

3 ADE 2,A 3,E 4,E

Step 4:

In the above table, we observe that B vertex has the least cost path in step 3. Therefore, it is
added in N. Now, we determine the least cost path of remaining vertices through B.

a) Calculating the shortest path from A to C.

1. v = C, w = B
2. D(B) = min( D(C) , D(B) + c(B,C) )
3. = min( 3 , 2+3 )
4. = min( 3,5)
5. The minimum value is 3. Therefore, the currently shortest path from A to C is 3.

b) Calculating the shortest path from A to F.

1. v = F, w = B
2. D(B) = min( D(F) , D(B) + c(B,F) )
3. = min( 4, ∞)
4. = min(4, ∞)
5. The minimum value is 4. Therefore, the currently shortest path from A to F is 4.

Channegowda k BIHE, DVG Page 97


Computer Communication and Networks

Step N D(B),P(B) D(C),P(C) D(D),P(D) D(E),P(E) D(F),P(F)

1 A 2,A 5,A 1,A ∞ ∞

2 AD 2,A 4,D 2,D ∞

3 ADE 2,A 3,E 4,E

4 ADEB 3,E 4,E

Step 5:

In the above table, we observe that C vertex has the least cost path in step 4. Therefore, it is
added in N. Now, we determine the least cost path of remaining vertices through C.

a) Calculating the shortest path from A to F

1. v = F, w = C
2. D(B) = min( D(F) , D(C) + c(C,F) )
3. = min( 4, 3+5)
4. = min(4,8)
5. The minimum value is 4. Therefore, the currently shortest path from A to F is 4.

Step N D(B),P(B) D(C),P(C) D(D),P(D) D(E),P(E) D(F),P(F)

1 A 2,A 5,A 1,A ∞ ∞

Channegowda k BIHE, DVG Page 98


Computer Communication and Networks

2 AD 2,A 4,D 2,D ∞

3 ADE 2,A 3,E 4,E

4 ADEB 3,E 4,E

5 ADEBC 4,E

Final table:

Step N D(B),P(B) D(C),P(C) D(D),P(D) D(E),P(E) D(F),P(F)

1 A 2,A 5,A 1,A ∞ ∞

2 AD 2,A 4,D 2,D ∞

3 ADE 2,A 3,E 4,E

4 ADEB 3,E 4,E

5 ADEBC 4,E

6 ADEBCF

Disadvantage:

Heavy traffic is created in Line state routing due to Flooding. Flooding can cause an infinite
looping, this problem can be solved by using Time-to-leave field

Channegowda k BIHE, DVG Page 99


Computer Communication and Networks

Congestion control algorithms:

A state occurring in network layer when the message traffic is so heavy that it slows down
network response time.

Effects of Congestion
 As delay increases, performance decreases.
 If delay increases, retransmission occurs, making situation worse.

Congestion control algorithms


 Congestion Control is a mechanism that controls the entry of data packets into the
network, enabling a better use of a shared network infrastructure and avoiding
congestive collapse.
 Congestive-Avoidance Algorithms (CAA) are implemented at the TCP layer as the
mechanism to avoid congestive collapse in a network.
How to correct the Congestion Problem:

Congestion Control refers to techniques and mechanisms that can either prevent congestion,
before it happens, or remove congestion, after it has happened. Congestion control
mechanisms are divided into two categories, one category prevents the congestion from
happening and the other category removes congestion after it has taken place.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

These two categories are:

1. Open loop

2.Closedloop

Open Loop Congestion Control

• In this method, policies are used to prevent the congestion before it happens.

• Congestion control is handled either by the source or by the destination.

• The various methods used for open loop congestion control are:

Retransmission Policy

• The sender retransmits a packet, if it feels that the packet it has sent is lost or corrupted.

• However retransmission in general may increase the congestion in the network. But we
need to implement good retransmission policy to prevent congestion.

• The retransmission policy and the retransmission timers need to be designed to optimize
efficiency and at the same time prevent the congestion.

Window Policy

• To implement window policy, selective reject window method is used for congestion
control.

• Selective Reject method is preferred over Go-back-n window as in Go-back-n method,


when timer for a packet times out, several packets are resent, although some may have
arrived safely at the receiver. Thus, this duplication may make congestion worse.

• Selective reject method sends only the specific lost or damaged packets.

Acknowledgement Policy

• The acknowledgement policy imposed by the receiver may also affect congestion.

• If the receiver does not acknowledge every packet it receives it may slow down the sender
and help prevent congestion.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

• Acknowledgments also add to the traffic load on the network. Thus, by sending fewer
acknowledgements we can reduce load on the network.

• To implement it, several approaches can be used:

1. A receiver may send an acknowledgement only if it has a packet to be sent.

2. A receiver may send an acknowledgement when a timer expires.

3. A receiver may also decide to acknowledge only N packets at a time.

Discarding Policy

• A router may discard less sensitive packets when congestion is likely to happen.

• Such a discarding policy may prevent congestion and at the same time may not harm the
integrity of the transmission.

Admission Policy

• An admission policy, which is a quality-of-service mechanism, can also prevent congestion


in virtual circuit networks.

• Switches in a flow first check the resource requirement of a flow before admitting it to the
network.

• A router can deny establishing a virtual circuit connection if there is congestion in the
“network or if there is a possibility of future congestion.

Closed loop congestion control

• Closed loop congestion control mechanisms try to remove the congestion after it happens.

• The various methods used for closed loop congestion control are:

Backpressure

• Back pressure is a node-to-node congestion control that starts with a node and propagates,
in the opposite direction of data flow.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

The backpressure technique can be applied only to virtual circuit networks. In such virtual
circuit each node knows the upstream node from which a data flow is coming.

n this method of congestion control, the congested node stops receiving data from the
immediate upstream node or nodes.

• This may cause the upstream node on nodes to become congested, and they, in turn, reject
data from their upstream node or nodes.

• As shown in fig node 3 is congested and it stops receiving packets and informs its
upstream node 2 to slow down. Node 2 in turns may be congested and informs node 1 to
slow down. Now node 1 may create congestion and informs the source node to slow down.
In this way the congestion is alleviated. Thus, the pressure on node 3 is moved backward to
the source to remove the congestion.

Choke Packet:

• In this method of congestion control, congested router or node sends a special type of
packet called choke packet to the source to inform it about the congestion.

• Here, congested node does not inform its upstream node about the congestion as in
backpressure method.

• In choke packet method, congested node sends a warning directly to the source
station i.e. the intermediate nodes through which the packet has traveled are not warned.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

Implicit Signaling

• In implicit signaling, there is no communication between the congested node or nodes and
the source.

• The source guesses that there is congestion somewhere in the network when it does not
receive any acknowledgment. Therefore the delay in receiving an acknowledgment is
interpreted as congestion in the network.

• On sensing this congestion, the source slows down.

• This type of congestion control policy is used by TCP.

Explicit Signaling

• In this method, the congested nodes explicitly send a signal to the source or destination to
inform about the congestion.

• Explicit signaling is different from the choke packet method. In choke packed method, a
separate packet is used for this purpose whereas in explicit signaling method, the signal is
included in the packets that carry data .

• Explicit signaling can occur in either the forward direction or the backward direction .

• In backward signaling, a bit is set in a packet moving in the direction opposite to the
congestion. This bit warns the source about the congestion and informs the source to slow
down.

• In forward signaling, a bit is set in a packet moving in the direction of congestion. This bit
warns the destination about the congestion. The receiver in this case uses policies such as
slowing down the acknowledgements to remove the congestion.

Congestion control algorithms

LeakyBucketAlgorithm

• It is a traffic shaping mechanism that controls the amount and the rate of the traffic sent to
the network.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

• A leaky bucket algorithm shapes bursty traffic into fixed rate traffic by averaging the data
rate.

• Imagine a bucket with a small hole at the bottom.

• The rate at which the water is poured into the bucket is not fixed and can vary but it leaks
from the bucket at a constant rate. Thus (as long as water is present in bucket), the rate at
which the water leaks does not depend on the rate at which the water is input to the bucket.

• Also, when
the bucket is full, any additional water that enters into the bucket spills over the sides and is
lost.

• The same concept can be applied to packets in the network. Consider that data is coming
from the source at variable speeds. Suppose that a source sends data at 12 Mbps for 4
seconds. Then there is no data for 3 seconds. The source again transmits data at a rate of 10
Mbps for 2 seconds. Thus, in a time span of 9 seconds, 68 Mb data has been transmitted.

If a leaky bucket algorithm is used, the data flow will be 8 Mbps for 9 seconds. Thus
constant flow is maintained.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

Token bucket Algorithm

• The leaky bucket algorithm allows only an average (constant) rate of data flow. Its major
problem is that it cannot deal with bursty data.

• A leaky bucket algorithm does not consider the idle time of the host. For example, if the
host was idle for 10 seconds and now it is willing to sent data at a very high speed for
another 10 seconds, the total data transmission will be divided into 20 seconds and average
data rate will be maintained. The host is having no advantage of sitting idle for 10 seconds.

• To overcome this problem, a token bucket algorithm is used. A token bucket algorithm
allows bursty data transfers.

• A token bucket algorithm is a modification of leaky bucket in which leaky bucket contains
tokens.

• In this algorithm, a token(s) are generated at every clock tick. For a packet to be
transmitted, system must remove token(s) from the bucket.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

• Thus, a token bucket algorithm allows idle hosts to accumulate credit for the future in formof tokens.

• For example, if a system generates 100 tokens in one clock tick and the host is idle for 100ticks. The
bucket will contain 10,000 tokens.

Now, if the host wants to send bursty data, it can consume all 10,000 tokens at once forsending 10,000
cells or bytes.

Thus a host can send bursty data as long as bucket is not empty.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

Transport Layer and Application layer

o The transport layer is a 4th layer from the top.


o The main role of the transport layer is to provide the communication services directly to
the application processes running on different hosts.
o The transport layer provides a logical communication between application processes
running on different hosts. Although the application processes on different hosts are not
physically connected, application processes use the logical communication provided by
the transport layer to send the messages to each other.
o The transport layer protocols are implemented in the end systems but not in the network
routers.
o A computer network provides more than one protocol to the network applications. For
example, TCP and UDP are two transport layer protocols that provide a different set of
services to the network layer.

o All transport layer protocols provide multiplexing/demultiplexing service. It also


provides other services such as reliable data transfer, bandwidth guarantees, and delay
guarantees.

o Each of the applications in the application layer has the ability to send a message by
using TCP or UDP. The application communicates by using either of these two protocols.
Both TCP and UDP will then communicate with the internet protocol in the internet
layer. The applications can read and write to the transport layer. Therefore, we can say
that communication is a two-way process.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

Services provided by the Transport Layer

The services provided by the transport layer are similar to those of the data link layer. The data
link layer provides the services within a single network while the transport layer provides the
services across an internetwork made up of many networks. The data link layer controls the
physical layer while the transport layer controls all the lower layers.

The services provided by the transport layer protocols can be divided into five categories:

o End-to-end delivery
o Addressing
o Reliable delivery
o Flow control
o Multiplexing

End-to-end delivery:

The transport layer transmits the entire message to the destination. Therefore, it ensures the end-
to-end delivery of an entire message from a source to the destination.

Reliable delivery:

The transport layer provides reliability services by retransmitting the lost and damaged packets.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

The reliable delivery has four aspects:

o Error control
o Sequence control
o Loss control
o Duplication control

Error Control

o The primary role of reliability is Error Control. In reality, no transmission will be 100
percent error-free delivery. Therefore, transport layer protocols are designed to provide
error-free transmission.
o The data link layer also provides the error handling mechanism, but it ensures only node-
to-node error-free delivery. However, node-to-node reliability does not ensure the end-to-
end reliability.

o The data link layer checks for the error between each network. If an error is introduced
inside one of the routers, then this error will not be caught by the data link layer. It only
detects those errors that have been introduced between the beginning and end of the link.
Therefore, the transport layer performs the checking for the errors end-to-end to ensure
that the packet has arrived correctly.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

Sequence Control

o The second aspect of the reliability is sequence control which is implemented at the
transport layer.
o On the sending end, the transport layer is responsible for ensuring that the packets
received from the upper layers can be used by the lower layers. On the receiving end, it
ensures that the various segments of a transmission can be correctly reassembled.

Loss Control

Loss Control is a third aspect of reliability. The transport layer ensures that all the fragments of a
transmission arrive at the destination, not some of them. On the sending end, all the fragments of
transmission are given sequence numbers by a transport layer. These sequence numbers allow
the receiver?s transport layer to identify the missing segment.

Duplication Control

Duplication Control is the fourth aspect of reliability. The transport layer guarantees that no
duplicate data arrive at the destination. Sequence numbers are used to identify the lost packets;
similarly, it allows the receiver to identify and discard duplicate segments.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

Flow Control

Flow control is used to prevent the sender from overwhelming the receiver. If the receiver is
overloaded with too much data, then the receiver discards the packets and asking for the
retransmission of packets. This increases network congestion and thus, reducing the system
performance. The transport layer is responsible for flow control. It uses the sliding window
protocol that makes the data transmission more efficient as well as it controls the flow of data so
that the receiver does not become overwhelmed. Sliding window protocol is byte oriented rather
than frame oriented.

Multiplexing

The transport layer uses the multiplexing to improve transmission efficiency.

Multiplexing can occur in two ways:

o Upward multiplexing: Upward multiplexing means multiple transport layer connections


use the same network connection. To make more cost-effective, the transport layer sends
several transmissions bound for the same destination along the same path; this is
achieved through upward multiplexing.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

o Downward multiplexing: Downward multiplexing means one transport layer connection


uses the multiple network connections. Downward multiplexing allows the transport
layer to split a connection among several paths to improve the throughput. This type of
multiplexing is used when networks have a low or slow capacity.

Addressing

o According to the layered model, the transport layer interacts with the functions of the
session layer. Many protocols combine session, presentation, and application layer
protocols into a single layer known as the application layer. In these cases, delivery to the
session layer means the delivery to the application layer. Data generated by an
application on one machine must be transmitted to the correct application on another
machine. In this case, addressing is provided by the transport layer.
o The transport layer provides the user address which is specified as a station or port. The
port variable represents a particular TS user of a specified station known as a Transport
Service access point (TSAP). Each station has only one transport entity.
o The transport layer protocols need to know which upper-layer protocols are
communicating.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

Transport Layer protocols


o The transport layer is represented by two protocols: TCP and UDP.
o The IP protocol in the network layer delivers a datagram from a source host to the
destination host.
o Nowadays, the operating system supports multiuser and multiprocessing environments,
an executing program is called a process. When a host sends a message to other host
means that source process is sending a process to a destination process. The transport
layer protocols define some connections to individual ports known as protocol ports.
o An IP protocol is a host-to-host protocol used to deliver a packet from source host to the
destination host while transport layer protocols are port-to-port protocols that work on the
top of the IP protocols to deliver the packet from the originating port to the IP services,
and from IP services to the destination port.
o Each port is defined by a positive integer address, and it is of 16 bits.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

UDP

o UDP stands for User Datagram Protocol.


o UDP is a simple protocol and it provides nonsequenced transport functionality.
o UDP is a connectionless protocol.
o This type of protocol is used when reliability and security are less important than speed
and size.
o UDP is an end-to-end transport level protocol that adds transport-level addresses,
checksum error control, and length information to the data from the upper layer.

o The packet produced by the UDP protocol is known as a user datagram.

User Datagram Format

The user datagram has a 16-byte header which is shown below:

Channegowda k BIHE, DVG Page


Computer Communication and Networks

Where,

o Source port address: It defines the address of the application process that has delivered
a message. The source port address is of 16 bits address.

o Destination port address: It defines the address of the application process that will
receive the message. The destination port address is of a 16-bit address.
o Total length: It defines the total length of the user datagram in bytes. It is a 16-bit field.
o Checksum: The checksum is a 16-bit field which is used in error detection.

Disadvantages of UDP protocol


o UDP provides basic functions needed for the end-to-end delivery of a transmission.
o It does not provide any sequencing or reordering functions and does not specify the
damaged packet when reporting an error.

o UDP can discover that an error has occurred, but it does not specify which packet has
been lost as it does not contain an ID or sequencing number of a particular data segment.

Differences b/w TCP & UDP

Basis for TCP UDP


Comparison

Channegowda k BIHE, DVG Page


Computer Communication and Networks

Definition TCP establishes a virtual circuit UDP transmits the data directly to the
before transmitting the data. destination computer without verifying
whether the receiver is ready to receive or
not.

Connection Type It is a Connection-Oriented It is a Connectionless protocol


protocol

Speed slow high

Reliability It is a reliable protocol. It is an unreliable protocol.

Header size 20 bytes 8 bytes

acknowledgement It waits for the acknowledgement It neither takes the acknowledgement, norit
of data and has the ability to retransmits the damaged frame.
resend the lost packets.

Transmission Control Protocol.(TCP)

TCP stands for Transmission Control Protocol. It is a transport layer protocol that facilitates
the transmission of packets from source to destination. It is a connection-oriented protocol that
means it establishes the connection prior to the communication that occurs between the
computing devices in a network. This protocol is used with an IP protocol, so together, they are
referred to as a TCP/IP.

The main functionality of the TCP is to take the data from the application layer. Then it divides
the data into a several packets, provides numbering to these packets, and finally transmits these

Channegowda k BIHE, DVG Page


Computer Communication and Networks

packets to the destination. The TCP, on the other side, will reassemble the packets and transmits
them to the application layer. As we know that TCP is a connection-oriented protocol, so the
connection will remain established until the communication is not completed between the sender
and the receiver.

Features of TCP protocol

The following are the features of a TCP protocol:

o Transport Layer Protocol

TCP is a transport layer protocol as it is used in transmitting the data from the sender to the
receiver.

o Reliable

TCP is a reliable protocol as it follows the flow and error control mechanism. It also supports the
acknowledgment mechanism, which checks the state and sound arrival of the data. In the
acknowledgment mechanism, the receiver sends either positive or negative acknowledgment to
the sender so that the sender can get to know whether the data packet has been received or needs
to resend.

o Order of the data is maintained

This protocol ensures that the data reaches the intended receiver in the same order in which it is
sent. It orders and numbers each segment so that the TCP layer on the destination side can
reassemble them based on their ordering.

o Connection-oriented

It is a connection-oriented service that means the data exchange occurs only after the connection
establishment. When the data transfer is completed, then the connection will get terminated.

o Full duplex

Channegowda k BIHE, DVG Page


Computer Communication and Networks

It is a full-duplex means that the data can transfer in both directions at the same time.

o Stream-oriented

TCP is a stream-oriented protocol as it allows the sender to send the data in the form of a stream
of bytes and also allows the receiver to accept the data in the form of a stream of bytes. TCP
creates an environment in which both the sender and receiver are connected by an imaginary
tube known as a virtual circuit. This virtual circuit carries the stream of bytes across the internet.

Need for Transport Control Protocol

In the layered architecture of a network model, the whole task is divided into smaller tasks. Each
task is assigned to a particular layer that processes the task. In the TCP/IP model, five layers
are application layer, transport layer, network layer, data link layer, and physical layer. The
transport layer has a critical role in providing end-to-end communication to the directly
application processes. It creates 65,000 ports so that the multiple applications can be accessed at
the same time. It takes the data from the upper layer, and it divides the data into smaller packets
and then transmits them to the network layer.

Working of TCP

Channegowda k BIHE, DVG Page


Computer Communication and Networks

In TCP, the connection is established by using three-way handshaking. The client sends the
segment with its sequence number. The server, in return, sends its segment with its own
sequence number as well as the acknowledgement sequence, which is one more than the client
sequence number. When the client receives the acknowledgment of its segment, then it sends the
acknowledgment to the server. In this way, the connection is established between the client and
the server.

Advantages of TCP

o It provides a connection-oriented reliable service, which means that it guarantees the


delivery of data packets. If the data packet is lost across the network, then the TCP will
resend the lost packets.

o It provides a flow control mechanism using a sliding window protocol.


o It provides error detection by using checksum and error control by using Go Back or
ARP protocol.
o It eliminates the congestion by using a network congestion avoidance algorithm that
includes various schemes such as additive increase/multiplicative decrease (AIMD), slow
start, and congestion window.

Disadvantage of TCP

Channegowda k BIHE, DVG Page


Computer Communication and Networks

It increases a large amount of overhead as each segment gets its own TCP header, so
fragmentation by the router increases the overhead.

TCP Header Format

o Source port: It defines the port of the application, which is sending the data. So, this
field contains the source port address, which is 16 bits.
o Destination port: It defines the port of the application on the receiving side. So, this
field contains the destination port address, which is 16 bits.
o Sequence number: This field contains the sequence number of data bytes in a particular
session.
o Acknowledgment number: When the ACK flag is set, then this contains the next
sequence number of the data byte and works as an acknowledgment for the previous data

Channegowda k BIHE, DVG Page


Computer Communication and Networks

received. For example, if the receiver receives the segment number 'x', then it responds
'x+1' as an acknowledgment number.
o HLEN: It specifies the length of the header indicated by the 4-byte words in the header.
The size of the header lies between 20 and 60 bytes. Therefore, the value of this field
would lie between 5 and 15.

o Reserved: It is a 4-bit field reserved for future use, and by default, all are set to zero.
o Flags
There are six control bits or flags:
1. URG: It represents an urgent pointer. If it is set, then the data is processed
urgently.
2. ACK: If the ACK is set to 0, then it means that the data packet does not contain
an acknowledgment.
3. PSH: If this field is set, then it requests the receiving device to push the data to
the receiving application without buffering it.
4. RST: If it is set, then it requests to restart a connection.
5. SYN: It is used to establish a connection between the hosts.

6. FIN: It is used to release a connection, and no further data exchange will happen.

o Window size
It is a 16-bit field. It contains the size of data that the receiver can accept. This field is
used for the flow control between the sender and receiver and also determines the amount
of buffer allocated by the receiver for a segment. The value of this field is determined by
the receiver.

o Checksum
It is a 16-bit field. This field is optional in UDP, but in the case of TCP/IP, this field is
mandatory.
o Urgentpointer
It is a pointer that points to the urgent data byte if the URG flag is set to 1. It defines a
value that will be added to the sequence number to get the sequence number of the last
urgent byte.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

o Options
It provides additional options. The optional field is represented in 32-bits. If this field
contains the data less than 32-bit, then padding is required to obtain the remaining bits.

Services of TCP:

Following are some of the services offered by the Transmission Control Protocol (TCP) to the
processes at the application layer:

 Stream Delivery Service.


 Sending and Receiving Buffers.
 Bytes and Segments.
 Full Duplex Service
 Connection Oriented Service.
 Reliable Service.
All the above mentioned TCP services are explained below in detail.

Stream Delivery Service

TCP is a stream-oriented protocol. It enables the sending process to deliver data as a stream of
bytes and the receiving process to acquire data as a stream of bytes.

TCP creates a working environment so that the sending and receiving procedures are connected
by an imaginary "tube", as shown in the figure below:

Channegowda k BIHE, DVG Page


Computer Communication and Networks

Sending and Receiving Buffers

The sending and receiving processes cannot produce and receive data at the same speed. Hence,
TCP needs a buffer for storage.

There are two methods of buffers used in each dissection, which are as follows:

 Sending Buffer
 Receiving Buffer
A buffer can be implemented by using a circular array of 1-byte location, as shown in the figure
below. The figure shows the movement of data in one direction on the sending side.

The buffer has three types of locations, which are as follows:

 Empty Locations.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

 Locations that contain the bytes which have been sent, but not acknowledged. These bytes
are kept in the buffer till an acknowledgment is received.
 The location that contains the bytes which are to be sent by the sending TCP

In practice, the TCP may send only a port of data due to the slowness of the receiving process or
congestion in the network.

The buffer at the receiver is divided into two parts as mentioned below:

 The part was containing empty locations.


 The part was containing the received bytes, which the sending process can consume.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

Bytes and Segments

Buffering is used to handle the difference between the speed of data transmission and data
consumption. But only buffering is not enough.

We need one more step before sending the data on the Internet Protocol (IP) layer as a TCP
service provider. It needs to send data in the form of packets and not as a stream of bytes.

At the transport layer, TCP groups several bytes into a packet and this is called a segment. A
header is added to each segment to exercise control.

The segment is encapsulated in an IP diagram and then transmitted. The entire operation is
transparent to the receiving process. The segment may be deceived out of order, lost or
corrupted when it receives the receiving end.

The figure given below shows how the segments are created from the bytes in the buffers:

The segments are not of the same size. Each segment can carry hundreds of bytes.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

Full-Duplex Service

TCP offers a full-duplex service where the data can flow in both directions simultaneously. Each
TCP will then have a sending buffer and receiving buffer. The TCP segments are sent in both
directions.

Connection-Oriented Service

We are already aware that the TCP is a connection-oriented protocol. When a process wants to
communicate (send and receive) with another process (process -2), the sequence of operations is
as follows:

 TCP of process-1 informs TCP of process-2 and gets its approval.


 TCP of process-1 tells TCP of process-2 exchange data in both directions.
 After completing the data exchange, when buffers on both sides are empty, the two TCPs
destroy their buffers
The type of connection in TCP is not physical, but it is virtual. The TCP segment encapsulated
in an IP datagram can be sent out of order. These segments can get lost or corrupted and may
have to be resend. Each segment may take a different path to reach the destination.

Reliable Service

TCP is a reliable transport protocol. It uses an acknowledgment mechanism for checking the
safe and sound arrival of data.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

Domain Name System (DNS)


DNS is a hostname for IP address translation service. DNS is a distributed database
implemented in a hierarchy of name servers. It is an application layer protocol for message
exchange between clients and servers.

Requirement: Every host is identified by the IP address but remembering numbers is very
difficult for the people also the IP addresses are not static therefore a mapping is required to
change the domain name to the IP address. So DNS is used to convert the domain name of the
websites to their numerical IP address.

An application layer protocol defines how the application processes running on different
systems, pass the messages to each other.

o DNS stands for Domain Name System.


o DNS is a directory service that provides a mapping between the name of a host on the
network and its numerical address.
o DNS is required for the functioning of the internet.
o Each node in a tree has a domain name, and a full domain name is a sequence of symbols
specified by dots.

o DNS is a service that translates the domain name into IP addresses. This allows the users
of networks to utilize user-friendly names when looking for other hosts instead of
remembering the IP addresses.

o For example, suppose the FTP site at EduSoft had an IP address of 132.147.165.50, most
people would reach this site by specifying ftp.EduSoft.com. Therefore, the domain name
is more reliable than IP address.

DNS is a TCP/IP protocol used on different platforms. The domain name space is divided into
three different sections: generic domains, country domains, and inverse domain.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

Generic Domains

o It defines the registered hosts according to their generic behavior.


o Each node in a tree defines the domain name, which is an index to the DNS database.
o It uses three-character labels, and these labels describe the organization type.

Label Description

aero Airlines and aerospace companies

biz Businesses or firms

com Commercial Organizations

coop Cooperative business Organizations

edu Educational institutions

gov Government institutions

Channegowda k BIHE, DVG Page


Computer Communication and Networks

info Information service providers

int International Organizations

mil Military groups

museum Museum & other nonprofit organizations

name Personal names

net Network Support centers

org Nonprofit Organizations

pro Professional individual Organizations

Channegowda k BIHE, DVG Page


Computer Communication and Networks

Country Domain

The format of country domain is same as a generic domain, but it uses two-character country
abbreviations (e.g., us for the United States) in place of three character organizational
abbreviations.

Inverse Domain

The inverse domain is used for mapping an address to a name. When the server has received a
request from the client, and the server contains the files of only authorized clients. To determine
whether the client is on the authorized list or not, it sends a query to the DNS server and ask for
mapping an address to the name.

Working of DNS

o DNS is a client/server network communication protocol. DNS clients send requests to


the. server while DNS servers send responses to the client.

o Client requests contain a name which is converted into an IP address known as a forward
DNS lookups while requests containing an IP address which is converted into a name
known as reverse DNS lookups.
o DNS implements a distributed database to store the name of all the hosts available on the
internet.
o If a client like a web browser sends a request containing a hostname, then a piece of
software such as DNS resolver sends a request to the DNS server to obtain the IP address
of a hostname. If DNS server does not contain the IP address associated with a hostname,
then it forwards the request to another DNS server. If IP address has arrived at the
resolver, which in turn completes the request over the internet protocol.

Electronic mail:

E-mail is defined as the transmission of messages on the Internet. It is one of the most commonly
used features over communications networks that may contain text, files, images, or other

Channegowda k BIHE, DVG Page


Computer Communication and Networks

attachments. Generally, it is information that is stored on a computer sent through a network to a


specified individual or group of individuals.

Email messages are conveyed through email servers; it uses multiple protocols within
the TCP/IP suite. For example, SMTP is a protocol, stands for simple mail transfer protocol and
used to send messages whereas other protocols IMAP or POP are used to retrieve messages from
a mail server. If you want to login to your mail account, you just need to enter a valid email
address, password, and the mail servers used to send and receive messages.

Although most of the webmail servers automatically configure your mail account, therefore, you
only required to enter your email address and password. However, you may need to manually
configure each account if you use an email client like Microsoft Outlook or Apple Mail. In
addition, to enter the email address and password, you may also need to enter incoming and
outgoing mail servers and the correct port numbers for each one.

Email messages include three components, which are as follows:

o Message envelope: It depicts the email's electronic format.


o Message header: It contains email subject line and sender/recipient information.
o Message body: It comprises images, text, and other file attachments.

The email was developed to support rich text with custom formatting, and the original email
standard is only capable of supporting plain text messages. In modern times, email
supports HTML (Hypertext markup language), which makes it capable of emails to support the
same formatting as websites. The email that supports HTML can contain links, images, CSS
layouts, and also can send files or "email attachments" along with messages. Most of the mail
servers enable users to send several attachments with each message. The attachments were
typically limited to one megabyte in the early days of email. Still, nowadays, many mail servers
are able to support email attachments of 20 megabytes or more in size.

In 1971, as a test e-mail message, Ray Tomlinson sent the first e-mail to himself. This email was
contained the text "something like QWERTYUIOP." However, the e-mail message was still

Channegowda k BIHE, DVG Page


Computer Communication and Networks

transmitted through ARPANET, despite sending the e-mail to himself. Most of the electronic
mail was being sent as compared to postal mail till 1996.

Advantages of Email

There are many advantages of email, which are as follows:

o Cost-effective: Email is a very cost-effective service to communicate with others as there


are several email services available to individuals and organizations for free of cost. Once
a user is online, it does not include any additional charge for the services.

o Email offers users the benefit of accessing email from anywhere at any time if they have
an Internet connection.

o Email offers you an incurable communication process, which enables you to send a
response at a convenient time. Also, it offers users a better option to communicate easily
regardless of different schedules users.

o Speed and simplicity: Email can be composed very easily with the correct information
and contacts. Also, minimum lag time, it can be exchanged quickly.
o Mass sending: You can send a message easily to large numbers of people through email.
o Email exchanges can be saved for future retrieval, which allows users to keep important
conversations or confirmations in their records and can be searched and retrieved when
they needed quickly.

o Email provides a simple user interface and enables users to categorize and filter their
messages. This can help you recognize unwanted emails like junk and spam mail. Also,
users can find specific messages easily when they are needed.

o As compared to traditional posts, emails are delivered extremely fast.


o Email is beneficial for the planet, as it is paperless. It reduces the cost of paper and helps
to save the environment by reducing paper usage.
o It also offers a benefit to attaching the original message at the time you reply to an email.
This is beneficial when you get hundreds of emails a day, and the recipient knows what
you are talking about.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

o Furthermore, emails are beneficial for advertising products. As email is a form of


communication, organizations or companies can interact with a lot of people and inform
them in a short time.

Disadvantages of Email

o Impersonal: As compared to other forms of communication, emails are less personal.


For example, when you talk to anyone over the phone or meeting face to face is more
appropriate for communicating than email.
o Misunderstandings: As email includes only text, and there is no tone of voice or body
language to provide context. Therefore, misunderstandings can occur easily with email. If
someone sends a joke on email, it can be taken seriously. Also, well-meaning information
can be quickly typed as rude or aggressive that can impact wrong. Additionally, if
someone types with short abbreviations and descriptions to send content on the email, it
can easily be misinterpreted.
o Malicious Use: As email can be sent by anyone if they have an only email address.
Sometimes, an unauthorized person can send you mail, which can be harmful in terms of
stealing your personal information. Thus, they can also use email to spread gossip or false
information.
o Accidents Will Happen: With email, you can make fatal mistakes by clicking the wrong
button in a hurry. For instance, instead of sending it to a single person, you can
accidentally send sensitive information to a large group of people. Thus, the information
can be disclosed, when you have clicked the wrong name in an address list. Therefore, it
can be harmful and generate big trouble in the workplace.
o Spam: Although in recent days, the features of email have been improved, there are still
big issues with unsolicited advertising arriving and spam through email. It can easily
become overwhelming and takes time and energy to control.

o Information Overload: As it is very easy to send email to many people at a time, which
can create information overload. In many modern workplaces, it is a major problem
where it is required to move a lot of information and impossible to tell if an email is
important. And, email needs organization and upkeep. The bad feeling is one of the other

Channegowda k BIHE, DVG Page


Computer Communication and Networks

problems with email when you returned from vacation and found hundreds of unopened
emails in your inbox.
o Viruses: Although there are many ways to travel viruses in the devices, email is one of
the common ways to enter viruses and infect devices. Sometimes when you get a mail, it
might be the virus come with an attached document. And, the virus can infect the system
when you click on the email and open the attached link. Furthermore, an anonymous
person or a trusted friend or contact can send infected emails.
o Pressure to Respond: If you get emails and you do not answer them, the sender can get
annoyed and think you are ignoring them. Thus, this can be a reason to make pressure on
your put to keep opening emails and then respond in some way.
o Time Consuming: When you get an email and read, write, and respond to emails that
can take up vast amounts of time and energy. Many modern workers spend their most
time with emails, which may be caused to take more time to complete work.

o Overlong Messages: Generally, email is a source of communication with the intention of


brief messages. There are some people who write overlong messages that can take much
time than required.

o Insecure: There are many hackers available that want to gain your important
information, so email is a common source to seek sensitive data, such as political,
financial, documents, or personal messages. In recent times, there have various high-
profile cases occurred that shown how email is insecure about information theft.

SMTP(Simple mail transfer protocol):

o SMTP stands for Simple Mail Transfer Protocol.


o SMTP is a set of communication guidelines that allow software to transmit an electronic
mail over the internet is called Simple Mail Transfer Protocol.

o It is a program used for sending messages to other computer users based on e-mail
addresses.
o It provides a mail exchange between users on the same or different computers, and it also
supports:

Channegowda k BIHE, DVG Page


Computer Communication and Networks

o It can send a single message to one or more recipients.


o Sending message can include text, voice, video or graphics.
o It can also send the messages on networks outside the internet.
o The main purpose of SMTP is used to set up communication rules between servers. The
servers have a way of identifying themselves and announcing what kind of
communication they are trying to perform. They also have a way of handling the errors
such as incorrect email address. For example, if the recipient address is wrong, then
receiving server reply with an error message of some kind.

Model of SMTP system


In the SMTP model user deals with the user agent (UA), for example, Microsoft Outlook,
Netscape, Mozilla, etc. In order to exchange the mail using TCP, MTA is used. The user
sending the mail doesn’t have to deal with MTA as it is the responsibility of the system admin
to set up a local MTA. The MTA maintains a small queue of mails so that it can schedule
repeat delivery of mails in case the receiver is not available. The MTA delivers the mail to the
mailboxes and the information can later be downloaded by the user agents.

Both the SMTP-client and SMTP-server should have 2 components:


1. User-agent (UA)
2. Local MTA

Channegowda k BIHE, DVG Page


Computer Communication and Networks

Communication between sender and the receiver :


The sender’s user agent prepares the message and sends it to the MTA. The MTA’s
responsibility is to transfer the mail across the network to the receiver’s MTA. To send mails, a
system must have a client MTA, and to receive mails, a system must have a server MTA.
SENDING EMAIL:
Mail is sent by a series of request and response messages between the client and the server.
The message which is sent across consists of a header and a body. A null line is used to
terminate the mail header and everything after the null line is considered as the body of the
message, which is a sequence of ASCII characters. The message body contains the actual
information read by the receipt.
RECEIVING EMAIL:
The user agent at the server-side checks the mailboxes at a particular time of intervals. If any
information is received, it informs the user about the mail. When the user tries to read the mail
it displays a list of emails with a short description of each mail in the mailbox. By selecting
any of the mail users can view its contents on the terminal.
Some SMTP Commands:
 HELO – Identifies the client to the server, fully qualified domain name, only sent once per
session
 MAIL – Initiate a message transfer, fully qualified domain of originator
 RCPT – Follows MAIL, identifies an addressee, typically the fully qualified name of the
addressee, and for multiple addressees use one RCPT for each addressee
 DATA – send data line by line
Advantages of SMTP:
 If necessary, the users can have a dedicated server.
 It allows for bulk mailing.
 Low cost and wide coverage area.
 Offer choices for email tracking.
 reliable and prompt email delivery.
Disadvantages of SMTP:
 SMTP’s common port can be blocked by several firewalls.
 SMTP security is a bigger problem.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

 Its simplicity restricts how useful it can be.


 Just 7 bit ASCII characters can be used.
 If a message is longer than a certain length, SMTP servers may reject the entire message.
 Delivering your message will typically involve additional back-and-forth processing
between servers, which will delay sending and raise the likelihood that it won’t be sent.

WWW(World Wide Web):

World Wide Web, which is also known as a Web, is a collection of websites or web pages stored
in web servers and connected to local computers through the internet. These websites contain
text pages, digital images, audios, videos, etc. Users can access the content of these sites from
any part of the world over the internet using their devices such as computers, laptops, cell
phones, etc. The WWW, along with internet, enables the retrieval and display of text and media
to your device.

The building blocks of the Web are web pages which are formatted in HTML and connected by
links called "hypertext" or hyperlinks and accessed by HTTP. These links are electronic
connections that link related pieces of information so that users can access the desired
information quickly. Hypertext offers the advantage to select a word or phrase from text and thus
to access other pages that provide additional information related to that word or phrase.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

A web page is given an online address called a Uniform Resource Locator (URL). A particular
collection of web pages that belong to a specific URL is called a website,
e.g., www.facebook.com, www.google.com, etc. So, the World Wide Web is like a huge
electronic book whose pages are stored on multiple servers across the world.

Small websites store all of their WebPages on a single server, but big websites or organizations
place their WebPages on different servers in different countries so that when users of a country
search their site they could get the information quickly from the nearest server.

So, the web provides a communication platform for users to retrieve and exchange information
over the internet. Unlike a book, where we move from one page to another in a sequence, on
World Wide Web we follow a web of hypertext links to visit a web page and from that web page
to move to other web pages. You need a browser, which is installed on your computer, to access
the Web.

Difference between World Wide Web and Internet:

Some people use the terms 'internet' and 'World Wide Web' interchangeably. They think they are
the same thing, but it is not so. Internet is entirely different from WWW. It is a worldwide
network of devices like computers, laptops, tablets, etc. It enables users to send emails to other
users and chat with them online. For example, when you send an email or chatting with someone
online, you are using the internet.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

But, when you have opened a website like google.com for information, you are using the World
Wide Web; a network of servers over the internet. You request a webpage from your computer
using a browser, and the server renders that page to your browser. Your computer is called a
client who runs a program (web browser), and asks the other computer (server) for the
information it needs.

History of the World Wide Web:

The World Wide Web was invented by a British scientist, Tim Berners-Lee in 1989. He was
working at CERN at that time. Originally, it was developed by him to fulfill the need of
automated information sharing between scientists across the world, so that they could easily
share the data and results of their experiments and studies with each other.

Components of the Web: There are 3 components of the web:

1. Uniform Resource Locator (URL): serves as a system for resources on the web.
2. HyperText Transfer Protocol (HTTP): specifies communication of browser and server.
3. Hyper Text Markup Language (HTML): defines the structure, organisation and content
of a webpage.

How the World Wide Web Works?

Now, we have understood that WWW is a collection of websites connected to the internet so that
people can search and share information. Now, let us understand how it works!

Channegowda k BIHE, DVG Page


Computer Communication and Networks

The Web works as per the internet's basic client-server format as shown in the following image.
The servers store and transfer web pages or information to user's computers on the network when
requested by the users. A web server is a software program which serves the web pages
requested by web users using a browser. The computer of a user who requests documents from a
server is known as a client. Browser, which is installed on the user' computer, allows users to
view the retrieved documents.

Channegowda k BIHE, DVG Page


Computer Communication and Networks

All the websites are stored in web servers. Just as someone lives on rent in a house, a website
occupies a space in a server and remains stored in it. The server hosts the website whenever a
user requests its WebPages, and the website owner has to pay the hosting price for the same.

The moment you open the browser and type a URL in the address bar or search something on
Google, the WWW starts working. There are three main technologies involved in transferring
information (web pages) from servers to clients (computers of users). These technologies include
Hypertext Markup Language (HTML), Hypertext Transfer Protocol (HTTP) and Web browsers.

Hypertext Markup Language (HTML):

Channegowda k BIHE, DVG Page


Computer Communication and Networks

HTML is a standard markup language which is used for creating web pages. It describes the
structure of web pages through HTML elements or tags. These tags are used to organize the
pieces of content such as 'heading,' 'paragraph,' 'table,' 'Image,' and more. You don't see HTML
tags when you open a webpage as browsers don't display the tags and use them only to render the
content of a web page. In simple words, HTML is used to display text, images, and other
resources through a Web browser.

Web Browser:

A web browser, which is commonly known as a browser, is a program that displays text, data,
pictures, videos, animation, and more. It provides a software interface that allows you to click
hyperlinked resources on the World Wide Web. When you double click the Browser icon
installed on your computer to launch it, you get connected to the World Wide Web and can
search Google or type a URL into the address bar.

In the beginning, browsers were used only for browsing due to their limited potential. Today,
they are more advanced; along with browsing you can use them for e-mailing, transferring
multimedia files, using social media sites, and participating in online discussion groups and
more. Some of the commonly used browsers include Google Chrome, Mozilla Firefox, Internet
Explorer, Safari, and more.

Hypertext Transfer Protocol (HTTP):

Hyper Text Transfer Protocol (HTTP) is an application layer protocol which enables WWW to
work smoothly and effectively. It is based on a client-server model. The client is a web browser
which communicates with the web server which hosts the website. This protocol defines how
messages are formatted and transmitted and what actions the Web Server and browser should

Channegowda k BIHE, DVG Page


Computer Communication and Networks

take in response to different commands. When you enter a URL in the browser, an HTTP
command is sent to the Web server, and it transmits the requested Web Page.

When we open a website using a browser, a connection to the web server is opened, and
the browser communicates with the server through HTTP and sends a request. HTTP is
carried over TCP/IP to communicate with the server. The server processes the browser's
request and sends a response, and then the connection is closed. Thus, the browser
retrieves content from the server for the user.

Channegowda k BIHE, DVG Page

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy