0% found this document useful (0 votes)
95 views77 pages

CN Typed Unit 1

Uploaded by

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

CN Typed Unit 1

Uploaded by

Palak Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

fCOMPUTER NETWORKS NOTES

UNIT-1

What is Computer Networking?

A computer network is a system that connects numerous independent


computers in order to share information (data) and resources. The integration
of computers and other different devices allows users to communicate more
easily.

A computer network is a collection of two or more computer systems that are


linked together. A network connection can be established using either cable or
wireless media. Hardware and software are used to connect computers and
tools in any network.

A computer network consists of various kinds of nodes. Servers, networking


hardware, personal computers, and other specialized or general-purpose
hosts can all be nodes in a computer network. Host names and network
addresses are used to identify them.

How Does a Computer Network Work?


Computer Networks simply work using nodes and links. Data communication
equipment is simply termed as Nodes. For example, Modems, Hubs, Switches,
etc. whereas links in Computer networks can be referred to as a connection
between two nodes. We have several types of links like cable wires, optical
fibers, etc.
Whenever a Computer Network is working, nodes have the work of sending
and receiving data via the links. Computer Network provides some set of
protocols that helps in following the rules and protocols.

What Do Computer Networks Do?


Computer Networks are one of the important aspects of Computer Science.
In the early days, it is used for data transmission on telephone lines and had
a very limited use, but nowadays, it is used in a variety of places.
Computer Networks help in providing better connectivity that helps
nowadays. Modern computer networks have the following functionality like
1. Computer Networks help in operating virtually.
2. Computer Networks integrate on a large scale.
3. Computer Networks respond very quickly in case of conditions change.
4. Computer Networks help in providing data security.
Criteria of a Good Network
1. Performance: It can be measured in many ways, including transmit time
and response time. Transit time is the amount of time required for a
message to travel from one device to another. Response time is the
elapsed time between an inquiry and a response. The performance of the
network depends on a number of factors, including the number of users,
the type of medium & Hardware
2. Reliability: In addition to accuracy is measured by frequency of failure,
the time it takes a link to recover from failure, and the network’s
robustness in catastrophe.
3. Security: Network security issues include protecting data from
unauthorized access, protecting data from damage and development, and
implementing policies and procedures for recovery from breaches and
data loss.

Goals of Computer Networking


 Programs do not have to execute on a single system because of resource
and load sharing.
 Reduced costs – Multiple machines can share printers, tape drives, and
other peripherals.
 Reliability – If one machine fails, another can take its place.
 Scalability (it’s simple to add more processors or computers)
 Communication and mail (people living apart can work together)
 Information Access (remote information access, access to the internet, e-
mail, video conferencing, and online shopping)
 Entertainment that is interactive (online games, videos, etc.)
 Social Networking

Types of Computer Networks

Division Based on the Communication Medium

 Wired Network: As we all know, “wired” refers to any physical medium


made up of cables. Copper wire, twisted pair, or fiber optic cables are all
options. A wired network employs wires to link devices to the Internet or
another network, such as laptops or desktop PCs.
 Wireless Network: “Wireless” means without wire, media that is made
up of electromagnetic waves (EM Waves) or infrared waves. Antennas or
sensors will be present on all wireless devices. Cellular phones, wireless
sensors, TV remotes, satellite dish receivers, and laptops with WLAN
cards are all examples of wireless devices. For data or voice
communication, a wireless network uses radio frequency waves rather
than wires.

Division Based on Area Covered

 Local Area Network (LAN): A LAN is a network that covers an area of


around 10 kilometers. For example, a college network or an office
network. Depending upon the needs of the organization, a LAN can be a
single office, building, or Campus. We can have two PCs and one printer
in-home office or it can extend throughout the company and include audio
and video devices. Each host in LAN has an identifier, an address that
defines hosts in LAN. A packet sent by the host to another host carries
both the source host’s and the destination host’s address.
 Metropolitan Area Network (MAN): MAN refers to a network that
covers an entire city. For example: consider the cable television network.
 Wide Area Network (WAN): WAN refers to a network that connects
countries or continents. For example, the Internet allows users to access a
distributed system called www from anywhere around the globe.WAN
interconnects connecting devices such as switches, routers, or modems. A
LAN is normally privately owned by an organization that uses it. We see
two distinct examples of WANs today: point-to-point WANs and Switched
WANs
 Point To Point: Connects two connecting devices through
transmission media.
 Switched: A switched WAN is a network with more than two
ends.
Based on Types of Communication

 Point To Point networks: Point-to-Point networking is a type of data


networking that establishes a direct link between two networking nodes.
A direct link between two devices, such as a computer and a printer, is
known as a point-to-point connection.
 Multipoint: is the one in which more than two specific devices share
links. In the multipoint environment, the capacity of the channel is shared,
either spatially or temporally. If several devices can use the link
simultaneously, it is a spatially shared connection.
 Broadcast networks: In broadcast networks, a signal method in which
numerous parties can hear a single sender. Radio stations are an excellent
illustration of the “Broadcast Network” in everyday life. The radio station
is a sender of data/signal in this scenario, and data is only intended to
travel in one direction. Away from the radio transmission tower, to be
precise.

Based on the Type of Architecture

 P2P Networks: Computers with similar capabilities and configurations


are referred to as peers.
“Peer to Peer” is the abbreviation for “peer to peer.” The “peers” in a peer-
to-peer network are computer systems that are connected to each other
over the Internet. Without the use of a central server, files can be shared
directly between systems on the network.
 Client-Server Networks: Each computer or process on the network is
either a client or a server in a client-server architecture (client/server).
The client asks for services from the server, which the server provides.
Servers are high-performance computers or processes that manage disc
drives (file servers), printers (print servers), or network traffic (network
servers)
 Hybrid Networks: The hybrid model refers to a network that uses a
combination of client-server and peer-to-peer architecture. Eg: Torrent.

Types of Computer Network Architecture


Computer Network Architecture is of two types. These types are mentioned
below.
1. Client-Server Architecture: Client-Server Architecture is basically the
architecture where the clients and the server are connected as two clients
can communicate with each other and the devices present work as servers in
the network.
2. Peer-to-Peer Architecture: Peer-to-Peer Architecture , computers are
connected to each other and each computer is equally capable of working as
there is no central server here. Each device present here can be used as a
client or server.

Types of Enterprise Computer Networks

There are three main types of Enterprise Computer Networks which are
mentioned below.
1. Local Area Network (LAN): Local Area Networks are small-scale
networks used in small companies or as test networks. It has a limited size.
2. Wide Area Networks (WAN): Wide Area Networks are networks that are
used for a larger area than local area networks and are used for long-
distance communication.
3. Service Provider Networks: Service Provider Networks are the networks
that help in wireless communication, high-speed internet access, etc.

Network Topology

Bus Topology
Every computer and network device is connected to a single cable in a bus
topology network. Linear Bus topology is defined as having exactly two
terminals.
Advantages
 Installation is simple.
 Compared to mesh, star, and tree topologies, the bus utilizes less cabling.
Disadvantages
 Difficulty in reconfiguring and isolating faults.
 A bus cable malfunction or break interrupts all communication.
Ring Topology
The topology is named ring topology because one computer is connected to
another, with the final one being connected to the first. Exactly two
neighbors for each device. A signal is passed along the ring in one direction.
Each ring incorporates a repeater.

Advantages
 Data transmission is relatively straightforward because packets only
move in one direction.
 There is no requirement for a central controller to manage
communication between nodes.
 Easy installation & Reconfiguration
 Simplified Faulty connections
Disadvantages
 In a Unidirectional Ring, a data packet must traverse through all nodes.
 All computers must be turned on in order for them to connect with one
another.

Star Topology
Each device in a star topology has a dedicated point-to-point link to a central
controller, which is commonly referred to as the HUB. There is no direct
connection between the devices. Traffic between the devices is not allowed
in this topology. As an exchange, the controller is used.
Advantages
 When attaching or disconnecting devices, there are no network
interruptions.
 It’s simple to set up and configure.
 Identifying and isolating faults is simple.
 Less Expensive than mesh
 Easy to install & configure
Disadvantages
 Nodes attached to the hub, switch, or concentrator is failed if they fail.
 Because of the expense of the hubs, it is more expensive than linear bus
topologies.
 More cable is required compared to a bus or ring
 Too much dependency on Hub
For more, you can refer to the Advantages and Disadvantages of Star
Topology.
Example: Used in high-speed LANs

Mesh Topology
Every device in a mesh topology has dedicated point-to-point connectivity to
every other device. The term “dedicated” refers to the fact that the link
exclusively transports data between the two devices it links. To connect n
devices, a fully connected mesh network contains n *(n-1)/2 physical
channels.
Advantages
 Data can be sent from multiple devices at the same time. This topology
can handle a lot of traffic.
 Even if one of the connections fails, a backup is always available. As a
result, data transit is unaffected.
 Physical boundaries prevent other users from gaining access to messages
 Point to Point links make fault transmission & fault isolation easy
Disadvantages
 The amount of cabling and the number of I/O ports that are necessary.
 The sheer bulk of wiring can be greater than the available space can
accommodate.
 It is difficult to install and reconfigure.

Tree Topology
The topology of a tree is similar to that of a star. Nodes in a tree, like those in
a star, are connected to a central hub that manages network traffic. It has a
root node, which is connected to all other nodes, producing a hierarchy.
Hierarchical topology is another name for it. The number of Star networks is
connected via Bus in Tree Topology.
Advantages
 Network expansion is both possible and simple.
 We partition the entire network into pieces (star networks) that are
easier to manage and maintain.
 Other segments are unaffected if one segment is damaged.
Disadvantages
 Tree topology relies largely on the main bus cable because of its basic
structure, and if it fails, the entire network is handicapped.
 Maintenance becomes more challenging when more nodes and segments
are added.
Networking Devices

Basic hardware interconnecting network nodes, such as Network Interface


Cards (NICs), Bridges, Hubs, Switches, and Routers, are used in all networks.
In addition, a mechanism for connecting these building parts is necessary,
which is usually galvanic cable and optical cable are less popular (“optical
fiber”)The following are the network devices :
 NIC (Network Interface Card): A network card, often known as a
network adapter or NIC (network interface card), is computer hardware
that enables computers to communicate via a network. It offers physical
access to networking media and, in many cases, MAC addresses serve as a
low-level addressing scheme. Each network interface card has a distinct
identifier. This is stored on a chip that is attached to the card.

 Repeater: A repeater is an electrical device that receives a signal, cleans


it of unwanted noise, regenerates it, and retransmits it at a higher power
level or to the opposite side of an obstruction, allowing the signal to travel
greater distances without degradation. In the majority of twisted pair
Ethernet networks, Repeaters are necessary for cable lengths longer than
100 meters in some systems. Repeaters are based on physics.

 Hub: A hub is a device that joins together many twisted pairs or fiber
optic Ethernet devices to give the illusion of a formation of a single
network segment. The device can be visualized as a multiport repeater. A
network hub is a relatively simple broadcast device. Any packet entering
any port is regenerated and broadcast out on all other ports, and hubs do
not control any of the traffic that passes through them. Packet collisions
occur as a result of every packet being sent out through all other ports,
substantially impeding the smooth flow of communication.

 Bridges: Bridges broadcast data to all the ports but not to the one that
received the transmission. Bridges, on the other hand, learn which MAC
addresses are reachable through specific ports rather than copying
messages to all ports as hubs do. Once a port and an address are
associated, the bridge will only transport traffic from that address to that
port.

 Switches: A switch differs from a hub in that it only forwards frames to


the ports that are participating in the communication, rather than all of
the ports that are connected. The collision domain is broken by a switch,
yet the switch depicts itself as a broadcast domain. Frame-forwarding
decisions are made by switches based on MAC addresses.

 Routers: Routers are networking devices that use headers and


forwarding tables to find the optimal way to forward data packets
between networks. A router is a computer networking device that links
two or more computer networks and selectively exchanges data packets
between them. A router can use address information in each data packet
to determine if the source and destination are on the same network or if
the data packet has to be transported between networks. When numerous
routers are deployed in a wide collection of interconnected networks, the
routers share target system addresses so that each router can develop a
table displaying the preferred pathways between any two systems on the
associated networks.

 Gateways: To provide system compatibility, a gateway may contain


devices such as protocol translators, impedance-matching devices, rate
converters, fault isolators, or signal translators. It also necessitates the
development of administrative procedures that are acceptable to both
networks. By completing the necessary protocol conversions, a protocol
translation/mapping gateway joins networks that use distinct network
protocol technologies.

Components of Computer Network

1. NIC(Network Interface Card)


2. HUB
3. Router
4. Modem
5. Switch
6. Nodes
7. Media

1. NIC(Network Interface Card): NIC or network interface card is a


network adapter that is used to connect the computer to the network. It is
installed in the computer to establish a LAN. It has a unique id that is written
on the chip, and it has a connector to connect the cable to it. The cable acts as
an interface between the computer and the router or modem. NIC card is a
layer 2 device which means that it works on both the physical and data link
layers of the network model. There are two types of NIC:
 Wired NIC: Cables and Connectors use Wired NIC to transfer data.
 Wireless NIC: These connect to a wireless network such as Wifi,
Bluetooth, etc.

2. HUB: A HUB is a basically multi-port repeater. A hub connects multiple


wires coming from different branches, for example, the connector in star
topology which connects different stations. Hubs cannot filter data, so data
packets are sent to all connected devices. In other words, the collision
domain of all hosts connected through Hub remains one.

3. Router: A Router is a device like a switch that routes data packets based
on their IP addresses. The router is mainly a Network Layer device. Routers
normally connect LANs and WANs and have a dynamically updating routing
table based on which they make decisions on routing the data packets. The
router divides the broadcast domains of hosts connected through it.
4. Modem: A Modem is a short form of Modulator/Demodulator. The
Modem is a hardware component/device which can connect
computers and other devices such as routers and switches to the
internet. Modems convert or modulate the analog signals coming from
telephone wire into a digital form that is in form of 0s and 1s.

5. Switch: A Switch is a multiport bridge with a buffer and a design that


can boost its efficiency(a large number of ports imply less traffic) and
performance. A switch is a data link layer device. The switch can
perform error checking before forwarding data, which makes it very
efficient as it does not forward packets that have errors and forward
good packets selectively to the correct port only.

6. Nodes: Node is a term used to refer to any computing devices such as


computers that send and receive network packets across the network. Two
Types of nodes are :
 End Nodes: These type of nodes is going to be the starting point or the
end point of communication. E.g., computers, security cameras, network
printers, etc.
 Intermediary Nodes: These nodes are going to be in between starting
point or end point of the end nodes. E.g., Switches, Bridges, Routers, cell
towers, etc.

7. Media: Also known as Link which is going to carry data from one side to
another side. This link can be Wired Medium (Guided Medium) and Wireless
Medium (Unguided Medium). It is of two types:
1. Wired Media
2. Wireless Media
Examples of Wired media are as follows:
Ethernet: Ethernet is the most widely used LAN technology, which is defined
under IEEE standards 802.3. There are two types of Ethernet:
1. Ethernet straight-through cable (used for two different devices).
2. Ethernet crossover cable (used for two same devices).
Fibre Optic Cable: In this data is transferred in the form of light waves.
Optic Fibre Cable

Coaxial Cable: Mainly used for audio and video communications.

Coaxial Cable

USB Cable: USB Stands for Universal Serial Bus. Mainly used to connect PC
and smartphones.
Examples of Wireless media are as follows:
 Infrared (E.g. short-range communication – TV remote control).
 Radio (E.g. Bluetooth, Wi-Fi).
 Microwaves (E.g. Cellular system).
 Satellite (E.g. Long range communications – GPS).

Internet

The Internet is a larger network that allows computer networks controlled


by enterprises, governments, colleges, and other organizations all over the
world to communicate with one another. As a result, there is a tangle of
cables, computers, data centers, routers, servers, repeaters, satellites, and
Wi-Fi towers that allow digital data to go around the world.
The Internet is a vast network of networks that functions as a networking
infrastructure. It links millions of computers throughout the world, creating
a network in which any computer can talk with any other computer as long
as they are both linked to the Internet.
The Internet is a global network of interconnected computers that
communicate and share information using a standardized Internet Protocol
Suite.

List the ways to connect to the internet.


Solution:
We can connect to the internet in the following ways:
 Dial-Up – In order to access the Internet, in this type of connection, users
must connect their phone line to a computer. This link prevents the user
from using tier home phone service to make or receive calls.
 Broadband – Broadband is a high-speed internet connection that is
frequently utilized nowadays and is provided by cable or phone companies.
 Wireless connections – Internet access is accomplished by radio waves, thus
it is possible to connect to the Internet from any location. Wi-Fi and mobile
service providers are examples of wireless connections.

Applications of Computer Networking


Some of the applications of Computer Networking are discussed below:
 Resource Sharing: Resource Sharing is one of the important applications
of Computer Networking. You can share a single software among Multiple
users. We can also share Hardware Devices via this technique.

 Communication: Communication Medium means various ways through


which we can communicate like Email Calls, broadcasts, etc.

 Home Applications: Home Applications are an important application of


Computer Networking. Examples are User-to-User Communication,
Entertainment, E-Commerce, etc.

 Business Applications: Business Application is also an important


application of Computer Networking. Almost all companies are doing
business online with the help of Computer Networking.
 Social Media: Social Media is one of the recent and widely used
applications of Computer Networking. It helps people in getting news,
feed, current trending topics of all types, etc.

 Access to Remote Information: Computer Networking helps in


accessing remote information from the end-users. For Example. details
required for train tickets, plane tickets, etc.

 Cloud Computing: Computer Networking has facilitated the development


of cloud computing, which allows users to store and access data and
applications from remote servers via the internet.
 Virtualization: Networking technologies also enable virtualization, which
allows multiple virtual machines to run on a single physical machine,
improving resource utilization and reducing costs.

 Online Education: Computer Networking has revolutionized education


by providing online learning platforms, distance education, and virtual
classrooms.

 Remote Working: Networking technologies have enabled remote


working, allowing employees to work from home or other locations
outside of the office. This has become especially important during the
COVID-19 pandemic.

 E-commerce: Computer Networking has facilitated the growth of e-


commerce by allowing businesses to sell their products and services
online and reach a global market.

 Telemedicine: Networking technologies have also enabled telemedicine,


allowing doctors and healthcare providers to provide remote medical
consultations and diagnosis to patients in remote locations.
 Real-time Collaboration: Networking technologies enable real-time
collaboration, allowing people to work together on projects and share
information in real-time, no matter where they are located.

Advantages of Computer Networking


Some of the main advantages of Computer Networking are discussed below:
 Central Storage of Data: Files can be stored on a central node (the file
server) that can be shared and made available to every user in an
organization.
 Connectivity: There is a negligible range of abilities required to connect
to a modern computer network. The effortlessness of joining makes it
workable for even youthful kids to start exploring the data.
 Faster Problem-solving: Since an extensive procedure is disintegrated
into a few littler procedures and each is taken care of by all the associated
gadgets, an explicit issue can be settled in lesser time.
 Reliability: Reliability implies backing up information. Due to some
reason equipment crashes, and so on, the information gets undermined or
inaccessible on one PC, and another duplicate of similar information is
accessible on another workstation for future use, which prompts smooth
working and further handling without interruption.
 Flexible: This innovation is known to be truly adaptable, as it offers
clients the chance to investigate everything about fundamental things, for
example, programming without influencing their usefulness.
 Security through Authorization: Security and protection of information
are additionally settled through the system. As just the system clients are
approved to get to specific records or applications, no other individual
can crack the protection or security of information.
 Storage capacity: Since you will share data, records, and assets with
other individuals, you need to guarantee all information and substance
are legitimately put away in the framework. With this systems
administration innovation, you can do most of this with no issue, while
having all the space you require for capacity.

Disadvantages of Computer Networking


Some of the main disadvantages of Computer Networking are discussed
below:
 Expensive: Execution of the network can be expensive in the case of an
initial setup, as the wires and the cost of the cable are high and sometimes
equipment is also costly.
 Virus and Malware: Computer Networking can lead to the spreading of
viruses to another computer through the network.
 Management of the network: Management of the Network is quite
difficult as it requires skilled persons to handle that large network. It
requires training of people who are employed in this work.
 Loss of Information: In case of a crash of the Computer Network, it can
lead to the loss of information or not being able to access information for
some time.

 The system can be Hacked: In the case of Wide Area Networks(WAN),


there is a threat of Hacking of the System. Some security features should
be added to prevent such things.

Layered Architecture in Computer Networks

Every network consists of a specific number of functions, layers, and tasks to


perform. Layered Architecture in a computer network is defined as a model
where a whole network process is divided into various smaller sub-tasks.
These divided sub-tasks are then assigned to a specific layer to perform only
the dedicated tasks. A single layer performs only s specific type of task. To run
the application and provide all types of services to clients a lower layer adds
its services to the higher layer present above it. Therefore layered
architecture provides interactions between the sub-systems. If any type of
modification is done in one layer it does not affect the next layer.

Layered Architecture
As shown in the above diagram, there are five different layers. Therefore it is a
five-layered architecture. Each layer performs a dedicated task. The lower
level data for example from layer 1 data is transferred to layer 2. Below all the
layers Physical Medium is present. The physical medium is responsible for the
actual communication to take place. For the transfer of data and
communication layered architecture provides with a clean cut interface.

Features of Layered Architecture

 Use of Layered architecture in computer network provides with the feature


of modularity and distinct interfaces.
 Layered architecture ensures independence between layers, by offering
services to higher layers from the lower layers and without specifying how
this services are implemented.
 Layered architecture segments as larger and unmanageable design into
small sub tasks.
 In layer architecture every network has different number of functions,
layers and content.
 In layered architecture, the physical route provides with communication
which is available under the layer 1.
 In layered architecture, the implementation done by one layer can be
modified by the another layer.

Elements of Layered Architecture

There are three different types of elements of a layered architecture. They are
described below:
 Service: Service is defined as a set of functions and tasks being provided by
a lower layer to a higher layer. Each layer performs a different type of task.
Therefore, actions provided by each layer are different.
 Protocol: Protocol is defined as a set rules used by the layer for exchanging
and transmission of data with its peer entities. This rules can consists
details regarding a type of content and their order passed from one layer to
another.
 Interface: Interface is defined as a channel that allows to transmit the
messages from one layer to the another.

Need of Layered Architecture


 Divide and Conquer Approach: Layered architecture supports divide and
conquer approach. The unmanageable and complex task is further divided
into smaller sub tasks. Each sub task is then carried out by the different
layer. Therefore using this approach reduces the complexity of the problem
or design process.

 Easy to Modify: The layers are independent of each other in layered


architecture. If any sudden change occurs in the implementation of one
layer, it can be changed. This change does not affect the working of other
layers involved in the task. Therefore layered architectures are required to
perform any sudden update or change.

 Modularity: Layered architecture is more modular as compared to other


architecture models in computer network. Modularity provides with more
independence between the layers and are more easier to understand.

 Easy to Test: Each layer in layered architecture performs a different and


dedicated task. Therefore each layer can be analyzed and tested
individually. It helps to analyze the problem and solve them more
efficiently as compared to solving all the problems at a time.

Application of Layered Architecture in computer Networks

In computer networks, layered architecture is majorly used for


communication. The two network models that makes use of layered
architecture are:
 OSI Model
 TCP/IP Model

OSI Model
OSI stands for Open Systems Interconnection. OSI is a seven layered
architecture. All these seven layers work collaboratively to transmit data from
one layer to another. Below are the layers of OSI Model.

1. Physical Layer: Physical layer is the lowest layer of OSI model and is
responsible for the physical connection between all the required devices. The
information present in physical layer is in the form of bits. Physical layer
performs various functions such as bit rate control, bit synchronization,
transmission mode etc.
2. Data Link Layer: Data Link layer provides with successful delivery of
message from one node to the another. It checks whether this delivery of
message is error free. Other functions performed by data link layer are error
control, framing, flow control etc.

3. Network Layer: Network Layer is responsible for the transmission of data


from one host to the another host that is connected in different network. It
performs other tasks such routing and logical addressing.

4. Transport Layer: Transport Layer is defined as a layer that takes services


from network layer and provides services to application layer. Other tasks
performed by transport layer are service point addressing, segmentation and
reassembling.

5. Session Layer: Session layer is defined as a layer that is responsible for


establishing a connection, maintenance of session and to provide with
security. Other functions of session Layer are to establish session, termination
and synchronisation.

6. Presentation Layer: The data from application layer is extracted at the


presentation layer. This layer is also known as translation layer. The functions
of presentation layer are encryption, decryption, compression and translation.

6. Application Layer: Application layer is the topmost layer of OSI Model.


Application layer is also known as desktop layer. It provides with other
functions such as directory services, mail services, network virtual
terminal etc.

Protocol Hierarchies

A
protocol
is simply defined as a set of rules and regulations for data communication.
Rules are basically defined for each and every step and process at time of
communication among two or more computers. Networks are needed to
follow these protocols to transmit the data successfully. All protocols might
be implemented using hardware, software, or combination of both of them.
There are three aspects of protocols given below :
 Syntax – It is used to explain data format that is needed to be sent or
received.
 Semantics – It is used to explain exact meaning of each of sections of bits
that are usually transferred.
 Timings – It is used to explain exact time at which data is generally
transferred along with speed at which it is transferred.

Protocol Hierarchies :

Generally, Computer networks are comprised of or contain a large number of


pieces of hardware and software. To just simplify network design, various
networks are organized and arranged as a stack of layers of hardware and
software, one on top of another. The number, name, content, and function of
each layer might vary and can be different from one network to another. The
main purpose of each of layers is just to offer and provide services to higher
layers that are present. Each and every layer has some particular task or
function. In programming, this concept is very common. The networks are
organized and arranged as different layers or levels simply to reduce and
minimize complexity of design of network software.
Example :
Below is diagram representing a five-layer network. The diagram shows
communication between Host 1 and Host 2. The data stream is passed
through a number of layers from one host to other. Virtual communication is
represented using dotted lines between peer layers. Physical communication
is represented using solid arrows between adjacent layers. Through physical
medium, actual communication occurs. The layers at same level are
commonly known as peers. The peer basically has a set of communication
protocols. An interface is present between each of layers that are used to
explain services provided by lower layer to higher layer.

Advantages :
 The layers generally reduce complexity of communication between
networks
 It increases network lifetime.
 It also uses energy efficiently.
 It does not require overall knowledge and understanding of network.

Difference between Connection-oriented and Connection-less Services

Both Connection-oriented service and Connection-less service are used for the
connection establishment between two or more two devices. These types of
services are offered by the network layer.
Connection-oriented service is related to the telephone system. It includes
connection establishment and connection termination. In a connection-
oriented service, the Handshake method is used to establish the connection
between sender and receiver.

Connection-less service is related to the postal system. It does not include


any connection establishment and connection termination. Connection-less
Service does not give a guarantee of reliability. In this, Packets do not follow
the same path to reach their destination.

Difference between Connection-oriented and Connection-less Services:


S.N
O Connection-oriented Service Connection-less Service

Connection-oriented service is Connection-less service is


1. related to the telephone system. related to the postal system.

Connection-oriented service is Connection-less Service is


preferred by long and steady preferred by bursty
2. communication. communication.

Connection-oriented Service is Connection-less Service is not


3. necessary. compulsory.

Connection-oriented Service is Connection-less Service is not


4. feasible. feasible.

In connection-oriented Service, In connection-less Service,


5. Congestion is not possible. Congestion is possible.

6. Connection-oriented Service gives Connection-less Service does


S.N
O Connection-oriented Service Connection-less Service

not give a guarantee of


the guarantee of reliability.
reliability.

In connection-less Service,
In connection-oriented Service,
Packets do not follow the same
Packets follow the same route.
7. route.

Connection-less Service
Connection-oriented services
requires a bandwidth of low
require a bandwidth of a high range.
8. range.

Ex: TCP (Transmission Control Ex: UDP (User Datagram


9. Protocol) Protocol)

Connection-oriented requires Connection-less Service does


10. authentication. not require authentication.

What are the Service Primitives in Computer Network?


A service is a set of primitives or we call it as operations where a user can
invoke to access the service.

The selective primitives tell the service to perform an action taken by peer
nodes.

 The initiating node wants to establish a connection send CONNECT.


o Request − A node wants to do some work or a packet is being sent.
 The receiver accepts the request and CONNECT.
o Indication − A node is saying that it wants to set up a connection
to it.
 The CONNECT. The node issuing the initial CONNECT. request finds out
what happened via a CONNECT. Confirm primitive.
Response is primitive to tell whether it wants to accept or reject the
proposed connection.

Types of Service Primitives

Generally service primitives are divided into four classes −

 Request − A service node wants some service from its adjacent layer to
pass the parameters to mention the requested service.
 Indication − Another Service node or receiver node gets an indication
that a procedure has been invoked by the adjacent service node.
 Response − A receiver service node acknowledges or completes some
procedure.
 Confirm − service nodes acknowledge the permission to get connected
or not.

The different types of service primitives are explained below −

Primitive Explanation

Indicatio Information given by an node of an event


n Example − The receiver just received a connection request.

Request Service is requested by the node.


Example − Requesting for a connection to a remote
computer.

Response Node is responding to an event.


Example − the receiver sending the permission to connect.

Confirm A node acknowledges the response to its request.


Primitive Explanation

Example − receiver acknowledge after receiving the data


from sender

Parameters of Service Primitives

The parameters of primitives are: CONNECT, DATA, DISCONNECT which are


used to establish a connection, to send data, and Disconnect a connection.

Generally services can be either confirmed or unconfirmed.

 Confirmed service − the connection oriented services are called


confirmed services.
 Unconfirmed service − the connectionless services are called
unconfirmed services.

Design Issues for the Layers of Computer Networks

A number of design issues exist for the layer to layer approach of computer
networks. Some of the main design issues are as follows −

Reliability

Network channels and components may be unreliable, resulting in loss of bits


while data transfer. So, an important design issue is to make sure that the
information transferred is not distorted.

Scalability

Networks are continuously evolving. The sizes are continually increasing


leading to congestion. Also, when new technologies are applied to the added
components, it may lead to incompatibility issues. Hence, the design should be
done so that the networks are scalable and can accommodate such additions
and alterations.

Addressing

At a particular time, innumerable messages are being transferred between


large numbers of computers. So, a naming or addressing system should exist
so that each layer can identify the sender and receivers of each message.

Error Control

Unreliable channels introduce a number of errors in the data streams that are
communicated. So, the layers need to agree upon common error detection and
error correction methods so as to protect data packets while they are
transferred.

Flow Control

If the rate at which data is produced by the sender is higher than the rate at
which data is received by the receiver, there are chances of overflowing the
receiver. So, a proper flow control mechanism needs to be implemented.

Resource Allocation

Computer networks provide services in the form of network resources to the


end users. The main design issue is to allocate and deallocate resources to
processes. The allocation/deallocation should occur so that minimal
interference among the hosts occurs and there is optimal usage of the
resources.

Statistical Multiplexing

It is not feasible to allocate a dedicated path for each message while it is being
transferred from the source to the destination. So, the data channel needs to
be multiplexed, so as to allocate a fraction of the bandwidth or time to each
host.

Routing
There may be multiple paths from the source to the destination. Routing
involves choosing an optimal path among all possible paths, in terms of cost
and time. There are several routing algorithms that are used in network
systems.

Security

A major factor of data communication is to defend it against threats like


eavesdropping and surreptitious alteration of messages. So, there should be
adequate mechanisms to prevent unauthorized access to data through
authentication and cryptography.

What is OSI Model?


The OSI Model is a logical and conceptual model that defines network
communication used by systems open to interconnection and
communication with other systems. The Open System Interconnection
(OSI Model) also defines a logical network and effectively describes
computer packet transfer by using various layers of protocols.

Characteristics of OSI Model


Here are some important characteristics of the OSI model:

 A layer should only be created where the definite levels of


abstraction are needed.
 The function of each layer should be selected as per the
internationally standardized protocols.
 The number of layers should be large so that separate functions
should not be put in the same layer. At the same time, it should
be small enough so that architecture doesn’t become very
complicated.
 In the OSI model, each layer relies on the next lower layer to
perform primitive functions. Every level should able to provide
services to the next higher layer
 Changes made in one layer should not need changes in other
lavers.
Why of OSI Model?
 Helps you to understand communication over a network
 Troubleshooting is easier by separating functions into different
network layers.
 Helps you to understand new technologies as they are
developed.
 Allows you to compare primary functional relationships on
various network layers.

Protocols supported at various levels


Layer Name Protocols
Layer 7 Application SMTP, HTTP, FTP, POP3, SNMP
Layer 6 Presentation MPEG, ASCH, SSL, TLS
Layer 5 Session NetBIOS, SAP
Layer 4 Transport TCP, UDP
Layer 3 Network IPV5, IPV6, ICMP, IPSEC, ARP, MPLS.
Layer 2 Data Link RAPA, PPP, Frame Relay, ATM, Fiber Cable, etc.
Layer Name Protocols
Layer 1 Physical RS232, 100BaseTX, ISDN, 11.

What is OSI Model?


The OSI model, created in 1984 by ISO, is a reference framework that
explains the process of transmitting data between computers. It is divided
into seven layers that work together to carry out specialised network
functions, allowing for a more systematic approach to networking.

What are the 7 layers of the OSI Model?


The OSI model consists of seven abstraction layers arranged in a top-down
order:
1. Physical Layer
2. Data Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer

1. Physical Layer – Layer 1

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.

Functions of the Physical Layer

 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 the bit level.

 Bit rate control: The Physical layer also defines the transmission rate i.e.
the number of bits sent per second.

 Physical topologies: Physical layer specifies how the different,


devices/nodes are arranged in a network i.e. bus, star, or mesh topology.

Network Topology

Bus Topology
Every computer and network device is connected to a single cable in
a bus topology network. Linear Bus topology is defined as having
exactly two terminals.
Advantages
 Installation is simple.
 Compared to mesh, star, and tree topologies, the bus utilizes less
cabling.
Disadvantages
 Difficulty in reconfiguring and isolating faults.
 A bus cable malfunction or break interrupts all communication.

Ring Topology
The topology is named ring topology because one computer is
connected to another, with the final one being connected to the first.
Exactly two neighbors for each device. A signal is passed along the ring
in one direction. Each ring incorporates a repeater.
Advantages
 Data transmission is relatively straightforward because packets
only move in one direction.
 There is no requirement for a central controller to manage
communication between nodes.
 Easy installation & Reconfiguration
 Simplified Faulty connections
Disadvantages
 In a Unidirectional Ring, a data packet must traverse through all
nodes.
 All computers must be turned on in order for them to connect with
one another.

Star Topology
Each device in a star topology has a dedicated point-to-point link to a
central controller, which is commonly referred to as the HUB. There is
no direct connection between the devices. Traffic between the devices
is not allowed in this topology. As an exchange, the controller is used.
Advantages
 When attaching or disconnecting devices, there are no network
interruptions.
 It’s simple to set up and configure.
 Identifying and isolating faults is simple.
 Less Expensive than mesh
 Easy to install & configure
Disadvantages
 Nodes attached to the hub, switch, or concentrator is failed if they
fail.
 Because of the expense of the hubs, it is more expensive than linear
bus topologies.
 More cable is required compared to a bus or ring
 Too much dependency on Hub
For more, you can refer to the Advantages and Disadvantages of Star
Topology.
Example: Used in high-speed LANs

Mesh Topology
Every device in a mesh topology has dedicated point-to-point
connectivity to every other device. The term “dedicated” refers to the
fact that the link exclusively transports data between the two devices it
links. To connect n devices, a fully connected mesh network contains n
*(n-1)/2 physical channels.
Advantages
 Data can be sent from multiple devices at the same time. This
topology can handle a lot of traffic.
 Even if one of the connections fails, a backup is always available. As
a result, data transit is unaffected.
 Physical boundaries prevent other users from gaining access to
messages
 Point to Point links make fault transmission & fault isolation easy
Disadvantages
 The amount of cabling and the number of I/O ports that are
necessary.
 The sheer bulk of wiring can be greater than the available space can
accommodate.
 It is difficult to install and reconfigure.

Tree Topology
The topology of a tree is similar to that of a star. Nodes in a tree, like
those in a star, are connected to a central hub that manages network
traffic. It has a root node, which is connected to all other nodes,
producing a hierarchy. Hierarchical topology is another name for it.
The number of Star networks is connected via Bus in Tree Topology.
Advantages
 Network expansion is both possible and simple.
 We partition the entire network into pieces (star networks) that are
easier to manage and maintain.
 Other segments are unaffected if one segment is damaged.
Disadvantages
 Tree topology relies largely on the main bus cable because of its
basic structure, and if it fails, the entire network is handicapped.
 Maintenance becomes more challenging when more nodes and
segments are added.

 Transmission mode: Physical layer also defines how the data flows
between the two connected devices. The various transmission modes
possible are Simplex, half-duplex and full-duplex

 It provides two types of configuration Point Point configuration and


Multi-Point configuration.

 Point-to-Point configuration: In Point-to-Point configuration, there is a line (link) that is


fully dedicated to carrying the data between two devices.
 Multi-Point configuration: In a Multi-Point configuration, there is a line (link) through
which multiple devices are connected.

 It provides an interface between devices (like PCs or computers)


and transmission medium.

Modes of Transmission Medium


1. Simplex mode: In this mode, out of two devices, only one device can transmit the
data, and the other device can only receive the data. Example- Input from
keyboards, monitors, TV broadcasting, Radio broadcasting, etc.
2. Half Duplex mode: In this mode, out of two devices, both devices can send and
receive the data but only one at a time not simultaneously. Examples- Walkie-
Talkie, Railway Track, etc.
3. Full-Duplex mode: In this mode, both devices can send and receive the data
simultaneously. Examples- Telephone Systems, Chatting applications, etc.

Note:
1. Hub, Repeater, Modem, and Cables are Physical Layer devices.
2. 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 the DLL to transmit it to the
Host using its MAC address.
The Data Link Layer is divided into two sublayers:

1. Logical Link Control (LLC) - the upper sublayer of the data link layer
(layer 2) of the seven-layer OSI model. The LLC sublayer acts as an
interface between the media access control (MAC) sublayer and the
network layer.
2. Media Access Control (MAC) - an adaptation layer between the physical
layer and the upper protocol layers. Its main task is to receive MAC
service data units (MSDUs) from the layer above, encapsulate them into
MAC protocol data units (MPDUs) and pass them down to the physical
layer for transmission.

The packet received from the Network layer is further divided into frames
depending on the frame size of the 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.

Functions of the Data Link Layer

 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.
 Physical addressing: After creating frames, the Data link layer adds
physical addresses (MAC addresses) of the sender and/or receiver in the
header of each frame.
 Error control: The data link layer provides the mechanism of error
control in which it detects and retransmits damaged or lost frames.
 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 an acknowledgment.
 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.

Note:
1. Packet in the Data Link layer is referred to as Frame.
2. Data Link layer is handled by the NIC (Network Interface Card) and device
drivers of host machines.
3. Switch & Bridge are Data Link Layer devices.

 Synchronous Data Link Protocol


(SDLC) − SDLC was developed by IBM
in the 1970s as part of Systems
Network Architecture. It was used to
connect remote devices to mainframe
computers. It ascertained that data
units arrive correctly and with right
flow from one network point to the
next.
 High Level Data Link Protocol
(HDLC) − HDLC is based upon SDLC
and provides both unreliable service
and reliable service. It is a bit –
oriented protocol that is applicable for
both point – to – point and multipoint
communications.
 Serial Line Interface Protocol
(SLIP) − This is a simple protocol for
transmitting data units between an
Internet service provider (ISP) and
home user over a dial-up link. It does
not provide error detection / correction
facilities.
 Point - to - Point Protocol (PPP) −
This is used to transmit multiprotocol
data between two directly connected
(point-to-point) computers. It is a byte
– oriented protocol that is widely used
in broadband communications having
heavy loads and high speeds.
 Link Control Protocol (LCP) − It one
of PPP protocols that is responsible for
establishing, configuring, testing,
maintaining and terminating links for
transmission. It also imparts
negotiation for set up of options and
use of features by the two endpoints
of the links.
 Network Control Protocol (NCP) −
These protocols are used for
negotiating the parameters and
facilities for the network layer. For
every higher-layer protocol supported
by PPP, one NCP is there.

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 transmit the packet, from the number of
routes available. The sender & receiver’s IP addresses are placed in the
header by the network layer.
Functions of Network Layer
The network layer is responsible for providing the below-given tasks:

1. Logical Addressing: Each device on the network needs to be identified


uniquely. Therefore network layer provides an addressing scheme to
identify the device. It places the IP address of every sender and the
receiver in the header. This header consists of the network ID and host ID
of the network.
2. Host-to-host Delivery of Data: The network layer ensures that the
packet is being delivered successfully from the sender to the receiver.
This layer makes sure that the packet reaches the intended recipient
only.
3. Fragmentation: In order to transmit the larger data from sender to
receiver, the network layer fragments it into smaller packets.
Fragmentation is required because every node has its own fixed capacity
for receiving data.
4. Congestion Control: Congestion is defined as a situation where the
router is not able to route the packets property which results in
aggregation of packets in the network. Congestion occurs when a large
amount of packets are flooded in the network. Therefore network layer
controls the congestion of data packets in the network.
5. Routing and Forwarding: Routing is the process that decides the route
for transmission of packets from sender to receiver. It mostly chooses the
shortest path between the sender and the receiver. Routing protocols
that are mostly used are path vector, distance vector routing, link state
routing, etc.

Network Layer Protocols


There are various protocols used in the network layer. Each protocol is used for
a different task. Below are the protocols used in the network layer:

Protocols at each Layer


Protocols at each Layer

1. IP
IP stands for Internet Protocol. Internet Protocol helps to uniquely identify
each device on the network. Internet protocol is responsible for transferring
the data from one node to another node in the network. Internet protocol is a
connectionless protocol therefore it does not guarantee the delivery of data.
For the successful delivery higher level protocols such as TCP are used to
guarantee the data transmission. The Internet Protocol is divided in two types.
They are:

IPv4: IPv4 provides with the 32 bit address scheme. IPv4 addressing has four
numeric fields and are separated by dot. IPv4 can be configured either using
DHCP or manually. IPv4 does not provide with more security features as it does
not support authentication or encryption techniques. IPv4 is further divided
into five classes as Class A, Class B, Class C, Class D and Class E.
IPv6: IPv6 is the most recent version of IP. If provided with a 128 but
addressing scheme. IP adress has eight fields that are separated by colon, and
these fields are alphanumeric. The IPv6 address is represented in hexadecimal.
IPv6 provides with more security features such as authentication and
encryption. IPv6 supports end-to-end connection integrity. IPv6 provides with
more range of IP adress as compared to IPv4.
Difference between IPv4 and IPv6: IPv4 vs IPv6

Benefits of IPv6
The recent Version of IP IPv6 has a
greater advantage over IPv4. Here are
some of the mentioned benefits:
Larger Address Space: IPv6 has a
greater address space than IPv4,
which is required for expanding the IP
Connected Devices. IPv6 has 128 bit
IP Address rather and IPv4 has a 32-
bit Address.
Improved Security: IPv6 has some
improved security which is built in with
it. IPv6 offers security like Data
Authentication, Data Encryption, etc.
Here, an Internet Connection is more
Secure.
Simplified Header Format: As
compared to IPv4, IPv6 has a simpler
and more effective header Structure,
which is more cost-effective and also
increases the speed of Internet
Connection.
 Prioritize: IPv6 contains stronger and
more reliable support for QoS
features, which helps in increasing
traffic over websites and increases
audio and video quality on pages.
 Improved Support for Mobile
Devices: IPv6 has increased and
better support for Mobile Devices. It
helps in making quick connections
over other Mobile Devices and in a
safer way than IPv4.

Difference Between IPv4


and IPv6
IPv4 IPv6
IPv4 has a 32-bit
IPv6 has a 128-bit address length
address length
IPv4 IPv6
It Supports Manual and
It supports Auto and renumbering address
DHCP address
configuration
configuration

In IPv4 end to end,


In IPv6 end-to-end, connection integrity is
connection integrity is
Achievable
Unachievable

It can generate The address space of IPv6 is quite large it can


4.29×109 address space produce 3.4×1038 address space

The Security feature is


IPSEC is an inbuilt security feature in the IPv6
dependent on the
protocol
application

Address representation Address Representation of IPv6 is in


of IPv4 is in decimal hexadecimal

Fragmentation
In IPv6 fragmentation is performed only by the
performed by Sender
sender
and forwarding routers

In IPv4 Packet flow


In IPv6 packet flow identification are Available
identification is not
and uses the flow label field in the header
available
IPv4 IPv6
In IPv4 checksum field
In IPv6 checksum field is not available
is available

It has a broadcast
In IPv6 multicast and anycast message
Message Transmission
transmission scheme is available
Scheme

In IPv4 Encryption and In IPv6 Encryption and Authentication are


Authentication facility provided
not provided

IPv4 has a header of 20- IPv6 has a header of 40 bytes fixed


60 bytes.

IPv4 can be converted


Not all IPv6 can be converted to IPv4
to IPv6

IPv4 consists of 4 fields


IPv6 consists of 8 fields, which are separated by
which are separated by
a colon (:)
addresses dot (.)

IPv4’s IP addresses are


divided into five different
IPv6 does not have any classes of the IP
classes. Class A , Class
address.
B, Class C, Class D ,
Class E.
IPv4 IPv6
IPv4 supports
VLSM(Variable Length IPv6 does not support VLSM.
subnet mask).

Example of IPv4: Example of IPv6:


66.94.29.13 2001:0000:3238:DFE1:0063:0000:0000:FEFB

2. ARP
ARP stands for Address Resolution Protocol. ARP is used to convert the logical
address ie. IP address into physical address ie. MAC address. While
communicating with other nodes, it is necessary to know the MAC address or
physical address of the destination node. If any of the node in a network wants
to know the physical address of another node in the same network, the host
then sends an ARP query packet. This ARP query packet consists of IP address
and MAC address of source host and only the IP address of destination host.
This ARP packet is then received to every node present in the network. The
mode with its own IP address recognises it and sends it MAC address to the
requesting node. But sending and receiving such packets to know the MAC
address of destination node it increases the traffic load. Therefore in order to
reduce this traffic and improve the performance, the systems that makes use of
ARP maintain a cache of recently acquired IP into MAC address bindings.

3. RARP
RARP stands for Reverse Address Resolution Protocol. RARP works opposite of
ARP. Reverse Address Resolution Protocol is used to convert MAC address ie.
physical address into IP address ie. logical address. RARP provides with a
feature for the systems and applications to get their own IP address from a
DNS( Domain Name System) or router. This type of resolution is required for
various tasks such as executing reverse DNS lookup. As Reverse Address
Resolution Protocol works at low level it requires direct network addresses.
The reply from the server mostly carries a small information but the 32 bit
internet address is used and it does not exploit the full potential of a network
such as ethernet.

Difference between ARP and RARP: ARP vs RARP

ARP RARP

A protocol used to map an IP


A protocol used to map a physical
address to a physical (MAC)
(MAC) address to an IP address
address

To obtain the MAC address of a To obtain the IP address of a network


network device when only its IP device when only its MAC address is
address is known known

Client broadcasts its IP address Client broadcasts its MAC address


and requests a MAC address, and and requests an IP address, and the
the server responds with the server responds with the
corresponding MAC address corresponding IP address

IP addresses MAC addresses

Widely used in modern networks Rarely used in modern networks as


to resolve IP addresses to MAC most devices have a pre-assigned IP
addresses address
ARP RARP

ARP stands for Address Whereas RARP stands for Reverse


Resolution Protocol. Address Resolution Protocol.

Through ARP, (32-bit) IP address Whereas through RARP, (48-bit) MAC


mapped into (48- address of 48 bits mapped into (32-
bit) MAC address. bit) IP address.

In ARP, broadcast MAC address is While in RARP, broadcast IP address


used. is used.

While in RARP, RARP table is


In ARP, ARP table is managed or
managed or maintained by RARP
maintained by local host.
server.

In Address Resolution Protocol,


Receiver’s MAC address is While in RARP, IP address is fetched.
fetched.

While in RARP, RARP table uses


In ARP, ARP table uses ARP reply
RARP reply for configuration of IP
for its updation.
addresses .
ARP RARP

Hosts and routers uses ARP for


While RARP is used by small users
knowing the MAC address of other
having less facilities.
hosts and routers in the networks.

ARP is used in sender’s side to RARP is used in receiver’s side to


map the receiver’s MAC address. map the sender’s IP.

4. ICMP
ICMP stands for Internet Control Message Protocol. ICMP is a part of IP
protocol suite. ICMP is an error reporting and network diagnostic protocol.
Feedback in the network is reported to the designated host. Meanwhile, if any
kind of error occur it is then reported to ICMP. ICMP protocol consists of many
error reporting and diagnostic messages. ICMP protocol handles various kinds
of errors such as time exceeded, redirection, source quench, destination
unreachable, parameter problems etc. The messages in ICMP are divided into
two types. They are given below:

Error Message: Error message states about the issues or problems that are
faced by the host or routers during processing of IP packet.
Query Message: Query messages are used by the host in order to get
information from a router or another host.

5. IGMP
IGMP stands for Internet Group Message Protocol. ICMP is a multicasting
communication protocol. It utilizes the resources efficiently while broadcasting
the messages and data packets. ICMP is also a protocol used by TCP/IP. Other
hosts connected in the network and routers makes use of ICMP for multicasting
communication that have IP networks. In many networks multicast routers are
used in order to transmit the messages to all the nodes. Multicast routers
therefore receives large number of packets that needs to be sent. But to
broadcast this packets is difficult as it would increase the overall network load.
Therefore ICMP helps the multicast routers by addressing them while
broadcasting. As multicast communication consists of more than one senders
and receivers the Internet Group Message Protocol is majorly used in various
applications such as streaming media, web conference tools, games, etc.

ICMP IGMP

ICMP stands for Internet While IGMP stands for Internet


1.
Control Message Protocol. Group Message Protocol.

While it has
2. ICMP has PING features.
the Multicast feature.

Internet control message While internet group message


3.
protocol is unicasting. protocol is multicasting.

ICMP can be operate between While IGMP can be used


4. host to host or host to router or between client to multicast
router to router. router.

IGMP is also a network layer or


5. ICMP is a layer3 protocol.
layer3 protocol.

It controls the unicast


It controls the multicast
6. communication and used for
communication.
reporting error.
ICMP IGMP

ICMP could be a mechanism While IGMP is employed to


employed by hosts and gateway facilitate the synchronal
7.
to send notification of datagram transmission of a message to a
downside back to sender. bunch of recipients.

ICMP is used to test While IGMP is used in group


8. reachability to a host or packet transmission like DTS
network. service.

ICMP is primarily used for


IGMP is primarily used for
9. diagnostic and error reporting
multicasting purposes.
purposes.

ICMP messages are typically IGMP messages are sent by


10. sent in response to errors or hosts to multicast routers to join
diagnostic requests. or leave multicast groups.

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 acknowledgment of the
successful data transmission and re-transmits the data if an error is found.
At the sender’s side: The 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 requests a web server, it
typically uses port number 80, because this is the default port assigned to web
applications. Many applications have default ports assigned.
At the 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.

Functions of the Transport Layer

 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.
 Service Point Addressing: 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.
Services Provided by Transport Layer
1. Connection-Oriented Service
2. Connectionless Service
1. 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 acknowledgment,
back to the source after a packet or group of packets is received. This type of
transmission is reliable and secure.
2. 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.
Note:
1. Data in the Transport Layer is called Segments.
2. 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.

3. The transport layer is called as Heart of the OSI model.


4. Device or Protocol Use : TCP, UDP NetBIOS, PPTP

Transmission Control Protocol (TCP)

TCP (Transmission Control Protocol) is one of the main protocols of the


Internet protocol suite. It lies between the Application and Network Layers
which are used in providing reliable delivery services. It is a connection-
oriented protocol for communications that helps in the exchange of
messages between different devices over a network. The Internet Protocol
(IP), which establishes the technique for sending data packets between
computers, works with TCP.

Features of TCP

 TCP keeps track of the segments being transmitted or received by


assigning numbers to every single one of them.
 Flow control limits the rate at which a sender transfers data. This is done
to ensure reliable delivery.
 TCP implements an error control mechanism for reliable data transfer.
 TCP takes into account the level of congestion in the network.
Advantages of TCP

 It is reliable for maintaining a connection between Sender and Receiver.


 It is responsible for sending data in a particular sequence.
 Its operations are not dependent on OS.
 It allows and supports many routing protocols.
 It can reduce the speed of data based on the speed of the receiver.
Disadvantages of TCP

 It is slower than UDP and it takes more bandwidth.


 Slower upon starting of transfer of a file.
 Not suitable for LAN and PAN Networks.
 It does not have a multicast or broadcast category.
 It does not load the whole page if a single data of the page is missing.

User Datagram Protocol (UDP)

User Datagram Protocol (UDP) is a Transport Layer protocol. UDP is a part of


the Internet Protocol suite, referred to as the UDP/IP suite. Unlike TCP, it is
an unreliable and connectionless protocol. So, there is no need to establish a
connection before data transfer. The UDP helps to establish low-latency and
loss-tolerating connections establish over the network. The UDP enables
process-to-process communication.
Features of UDP

 Used for simple request-response communication when the size of data is


less and hence there is lesser concern about flow and error control.
 It is a suitable protocol for multicasting as UDP supports packet
switching.
 UDP is used for some routing update protocols like RIP(Routing
Information Protocol) .
 Normally used for real-time applications which can not tolerate uneven
delays between sections of a received message.
Advantages of UDP

 It does not require any connection for sending or receiving data.


 Broadcast and Multicast are available in UDP.
 UDP can operate on a large range of networks.
 UDP has live and real-time data.
 UDP can deliver data if all the components of the data are not complete.
Disadvantages of UDP

 We can not have any way to acknowledge the successful transfer of data.
 UDP cannot have the mechanism to track the sequence of data.
 UDP is connectionless, and due to this, it is unreliable to transfer data.
 In case of a Collision, UDP packets are dropped by Routers in comparison
to TCP.
 UDP can drop packets in case of detection of errors.
Differences between TCP and UDP

The main differences between TCP (Transmission Control Protocol) and UDP
(User Datagram Protocol) are:

Transmission Control Protocol User Datagram


Basis (TCP) Protocol (UDP)

UDP is the
Datagram-oriented
protocol. This is
because
TCP is a connection-oriented there is no overhead
protocol. Connection for opening a
orientation means that the connection,
communicating devices should maintaining a
Type of Service establish a connection before connection, or
transmitting data and should terminating a
close the connection after connection. UDP is
transmitting the data. efficient for
broadcast and
multicast types of
network
transmission.

The delivery of data


TCP is reliable as it guarantees
to the destination
Reliability the delivery of data to the
cannot be
destination router.
guaranteed in UDP.

TCP provides extensive error-


checking mechanisms. UDP has only the
Error checking basic error-checking
It is because it provides flow
mechanism mechanism using
control and acknowledgment of
checksums.
data.
Transmission Control Protocol User Datagram
Basis (TCP) Protocol (UDP)

An acknowledgment segment is No acknowledgment


Acknowledgment
present. segment.

Sequencing of data is a feature of There is no


Transmission Control sequencing of data
in UDP. If the order
Sequence Protocol (TCP). this means that
is required, it has to
packets arrive in order at the
be managed by the
receiver.
application layer.

UDP is faster,
TCP is comparatively slower
Speed simpler, and more
than UDP.
efficient than TCP.

There is no
retransmission of
Retransmission of lost packets is
Retransmission lost packets in the
possible in TCP, but not in UDP.
User Datagram
Protocol (UDP).

TCP has a (20-60) bytes variable UDP has an 8 bytes


Header Length
length header. fixed-length header.

Weight TCP is heavy-weight. UDP is lightweight.

It’s a connectionless
Handshaking Uses handshakes such as SYN,
protocol i.e. No
Techniques ACK, SYN-ACK
handshake

TCP doesn’t support UDP supports


Broadcasting
Broadcasting. Broadcasting.
Transmission Control Protocol User Datagram
Basis (TCP) Protocol (UDP)

UDP is used
TCP is used by HTTP, by DNS, DHCP,
Protocols
HTTPs, FTP, SMTP and Telnet. TFTP, SNMP, RIP,
and VoIP.

The TCP connection is a byte UDP connection is a


Stream Type
stream. message stream.

Overhead Low but higher than UDP. Very low.

This protocol is used


in situations where
This protocol is primarily quick
utilized in situations when a safe communication is
and trustworthy communication necessary but where
Applications
procedure is necessary, such as dependability is not
in email, on the web surfing, and a concern, such as
in military services. VoIP, game
streaming, video,
and music stream

Session Layer – Layer 5

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


sessions, and authentication, and also ensures security.

Functions of the Session Layer

 Session establishment, maintenance, and termination: The layer


allows the two processes to establish, use and terminate a connection.
 Synchronization: This layer allows a process to add checkpoints that are
considered synchronization points in 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.
 Dialog Controller: The session layer allows two systems to start
communication with each other in half-duplex or full-duplex.
Note:
1. All the below 3 layers(including Session Layer) are integrated as a single
layer in the TCP/IP model as the ????pplication Layer”.
2. Implementation of these 3 layers is done by the network application itself.
These are also known as Upper Layers or Software Layers.
3. Device or Protocol Use : NetBIOS, PPTP.
for Example:-
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.

Communication in Session Layer

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 network.
Functions of the Presentation Layer

 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.
Note: Device or Protocol Use : JPEG, MPEG, GIF

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.
Note: 1. The application Layer is also called Desktop Layer.
2. Device or Protocol Use : SMTP

Functions of the Application Layer

The main functions of application layer are given below.


 Network Virtual Terminal: It allows a user to log on to a remote host.
 FTAM- File transfer access and management : This application allows a
user to
access file in a remote host, retrieve files in remote host and manage or
control files from a remote computer.
 Mail Services : Provide email service.
 Directory Services : This application provides distributed database
sources
and access for global information about various objects and services.
Note: OSI model acts as a reference model and is not implemented on the
Internet because of its late invention. The current model being used is the
TCP/IP model.
PROTOCOLS OF APPLICATION LAYER

1. TELNET

Telnet stands for


the TELetype NETwork. It helps in
terminal emulation. It allows Telnet
clients to access the resources of the
Telnet server. It is used for managing
files on the internet. It is used for the
initial setup of devices like switches. The
telnet command is a command that uses
the Telnet protocol to communicate with
a remote device or system. Port number
of telnet is 23.
Command
telnet [\\RemoteServer]

\\RemoteServer

: Specifies the name of the server

to which you want to connect


2. FTP

FTP stands for File Transfer Protocol . It


is the protocol that actually lets us
transfer files. It can facilitate this
between any two machines using it. But
FTP is not just a protocol but it is also a
program.FTP promotes sharing of files
via remote computers with reliable and
efficient data transfer. The Port number
for FTP is 20 for data and 21 for control.
Command
ftp machinename

3. TFTP

The Trivial File Transfer Protocol (TFTP)


is the stripped-down, stock version of
FTP, but it’s the protocol of choice if you
know exactly what you want and where
to find it. It’s a technology for transferring
files between network devices and is a
simplified version of FTP. The Port
number for TFTP is 69.
Command
tftp [ options... ] [host [port]] [-c command]

4. NFS

It stands for a Network File System. It


allows remote hosts to mount file
systems over a network and interact with
those file systems as though they are
mounted locally. This enables system
administrators to consolidate resources
onto centralized servers on the network.
The Port number for NFS is 2049.
Command
service nfs start
5. SMTP

It stands for Simple Mail Transfer


Protocol. It is a part of the TCP/IP
protocol. Using a process called “store
and forward,” SMTP moves your email
on and across networks. It works closely
with something called the Mail Transfer
Agent (MTA) to send your
communication to the right computer and
email inbox. The Port number for SMTP
is 25.
Command
MAIL FROM:<mail@abc.com?

6. LPD

It stands for Line Printer Daemon. It is


designed for printer sharing. It is the part
that receives and processes the request.
A “daemon” is a server or agent. The
Port number for LPD is 515.
Command
lpd [ -d ] [ -l ] [ -D DebugOutputFile]

7. X window

It defines a protocol for the writing of


graphical user interface–based
client/server applications. The idea is to
allow a program, called a client, to run on
one computer. It is primarily used in
networks of interconnected mainframes.
Port number for X window starts from
6000 and increases by 1 for each server.
Command
Run xdm in runlevel 5
8. SNMP

It stands for Simple Network


Management Protocol. It gathers data by
polling the devices on the network from a
management station at fixed or random
intervals, requiring them to disclose
certain information. It is a way that
servers can share information about their
current state, and also a channel through
which an administrate can modify pre-
defined values. The Port number of
SNMP is 161(TCP) and 162(UDP).
Command
snmpget -mALL -v1 -cpublic snmp_agent_Ip_address sysName.0

9. DNS

It stands for Domain Name System.


Every time you use a domain name,
therefore, a DNS service must translate
the name into the corresponding IP
address. For example, the domain name
www.abc.com might translate to
198.105.232.4.
The Port number for DNS is 53.
Command
ipconfig /flushdns

10. DHCP

It stands for Dynamic Host Configuration


Protocol (DHCP). It gives IP addresses
to hosts. There is a lot of information a
DHCP server can provide to a host when
the host is registering for an IP address
with the DHCP server. Port number for
DHCP is 67, 68.
Command
clear ip dhcp binding {address | * }
11. HTTP/HTTPS

HTTP stands for Hypertext Transfer


Protocol and HTTPS is the more secured
version of HTTP, that’s why HTTPS
stands for Hypertext Transfer Protocol
Secure. This protocol is used to access
data from the World Wide Web. The
Hypertext is the well-organized
documentation system that is used to link
pages in the text document.
 HTTP is based on the client-server
model.
 It uses TCP for establishing
connections.
 HTTP is a stateless protocol, which
means the server doesn’t maintain
any information about the previous
request from the client.
 HTTP uses port number 80 for
establishing the connection.
12. POP

POP stands for Post Office Protocol and


the latest version is known as POP3
(Post Office Protocol version 3). This is a
simple protocol used by User agents for
message retrieval from mail servers.
 POP protocol work with Port number
110.
 It uses TCP for establishing
connections.
POP works in dual mode- Delete mode,
Keep Mode.
In Delete mode, it deletes the message
from the mail server once they are
downloaded to the local system.
In Keep mode, it doesn’t delete the
message from the mail server and also
facilitates the users to access the mails
later from the mail server.
13. IRC

IRC stands for Internet Relay Chat. It is a


text-based instant messaging/chatting
system. IRC is used for group or one-to-
one communication. It also supports file,
media, data sharing within the chat. It
works upon the client-server model.
Where users connect to IRC server or
IRC network via some web/ standalone
application program.
 It uses TCP or TLS for connection
establishment.
 It makes use of port number 6667.

14. MIME

MIME stands for Multipurpose Internet


Mail Extension. This protocol is designed
to extend the capabilities of the existing
Internet email protocol like SMTP. MIME
allows non-ASCII data to be sent via
SMTP. It allows users to send/receive
various kinds of files over the Internet
like audio, video, programs, etc. MIME is
not a standalone protocol it works in
collaboration with other protocols to
extend their capabilities.

OSI Model in a Nutshell

Information
Layer Form(Data Device or
No Layer Name Responsibility Unit) Protocol

Helps in identifying
Application the client and
Message SMTP
Layer synchronizing
7 communication.

Data from the


application layer is
Presentation extracted and JPEG,
Message
Layer manipulated in the MPEG, GIF
required format for
6 transmission.

5 Session Establishes Message Gateway


Information
Layer Form(Data Device or
No Layer Name Responsibility Unit) Protocol

Connection,
Maintenance, Ensures
Layer
Authentication, and
Ensures security.

Take Service from


Transport Network Layer and
Segment Firewall
Layer provide it to the
4 Application Layer.

Transmission of data
Network from one host to
Packet Router
Layer another, located in
3 different networks.

Data Link Node to Node Delivery Switch,


Frame
2 Layer of Message. Bridge

Hub,
Establishing Physical
Physical cables,
Connections between Bits
Layer Repeater,
Devices.
1 Modem,
OSI Model TCP/IP Model

It stands for Open System Interconnection. It stands for Transmission Control


Protocol.

OSI model has been developed by ISO It was developed by ARPANET (Advanced
(International Standard Organization). Research Project Agency Network).

It is an independent standard and generic It consists of standard protocols that lead


protocol used as a communication gateway to the development of an internet. It is a
between the network and the end user. communication protocol that provides the
connection among the hosts.

In the OSI model, the transport layer provides The transport layer does not provide the
a guarantee for the delivery of the packets. surety for the delivery of packets. But still,
we can say that it is a reliable model.

This model is based on a vertical approach. This model is based on a horizontal


approach.

In this model, the session and presentation In this model, the session and
layers are separated, i.e., both the layers are presentation layer are not different layers.
different. Both layers are included in the application
layer.

It is also known as a reference model through It is an implemented model of an OSI


which various networks are built. For model.
example, the TCP/IP model is built from the
OSI model. It is also referred to as a guidance
tool.

In this model, the network layer provides both The network layer provides only
connection-oriented and connectionless connectionless service.
service.

Protocols in the OSI model are hidden and can In this model, the protocol cannot be
be easily replaced when the technology easily replaced.
changes.

It consists of 7 layers. It consists of 4 layers.

OSI model defines the services, protocols, and In the TCP/IP model, services, protocols,
interfaces as well as provides a proper and interfaces are not properly separated.
distinction between them. It is protocol It is protocol dependent.
independent.

The usage of this model is very low. This model is highly used.

It provides standardization to the devices like It does not provide the standardization to
router, motherboard, switches, and other the devices. It provides a connection
What Does TCP/IP Do?
The main work of TCP/IP is to transfer the data of a computer from one
device to another. The main condition of this process is to make data
reliable and accurate so that the receiver will receive the same
information which is sent by the sender. To ensure that, each message
reaches its final destination accurately, the TCP/IP model divides its
data into packets and combines them at the other end, which helps in
maintaining the accuracy of the data while transferring from one end to
another end.
What is the Difference between TCP and IP?
TCP and IP are different protocols of Computer Networks. The basic
difference between TCP (Transmission Control Protocol) and IP
(Internet Protocol) is in the transmission of data. In simple words, IP
finds the destination of the mail and TCP has the work to send and
receive the mail. UDP is another protocol, which does not require IP to
communicate with another computer. IP is required by only TCP. This is
the basic difference between TCP and IP.
How Does the TCP/IP Model Work?
Whenever we want to send something over the internet using the
TCP/IP Model, the TCP/IP Model divides the data into packets at the
sender’s end and the same packets have to be recombined at the
receiver’s end to form the same data, and this thing happens to maintain
the accuracy of the data. TCP/IP model divides the data into a 4-layer
procedure, where the data first go into this layer in one order and again
in reverse order to get organized in the same way at the receiver’s end.
For more, you can refer to TCP/IP in Computer Networking .
Layers of TCP/IP Model
1. Application Layer
2. Transport Layer(TCP/UDP)
3. Network/Internet Layer(IP)
4. Data Link Layer (MAC)
5. Physical Layer
The diagrammatic comparison of the TCP/IP and OSI model is as
follows:
TCP/IP and OSI

1. Physical Layer
It is a group of applications requiring network communications. This
layer is responsible for generating the data and requesting connections.
It acts on behalf of the sender and the Network Access layer on the
behalf of the receiver. During this article, we will be talking on the behalf
of the receiver.
2. Data Link Layer
The packet’s network protocol type, in this case, TCP/IP, is identified by
the data-link layer. Error prevention and “framing” are also provided by
the data-link layer. Point-to-Point Protocol (PPP) framing and Ethernet
IEEE 802.2 framing are two examples of data-link layer protocols.
3. Internet Layer
This layer parallels the functions of OSI’s Network layer. It defines the
protocols which are responsible for the logical transmission of data over
the entire network. The main protocols residing at this layer are as
follows:
 IP: 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 websites are
using currently. But IPv6 is growing as the number of IPv4
addresses is limited in number when compared to the number of
users.
 ICMP: ICMP stands for Internet Control Message Protocol. It is
encapsulated within IP datagrams and is responsible for providing
hosts with information about network problems.
 ARP: 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.
The Internet Layer is a layer in the Internet Protocol (IP) suite, which is
the set of protocols that define the Internet. The Internet Layer is
responsible for routing packets of data from one device to another
across a network. It does this by assigning each device a unique IP
address, which is used to identify the device and determine the route
that packets should take to reach it.
Example: Imagine that you are using a computer to send an email to a
friend. When you click “send,” the email is broken down into smaller
packets of data, which are then sent to the Internet Layer for routing.
The Internet Layer assigns an IP address to each packet and uses
routing tables to determine the best route for the packet to take to reach
its destination. The packet is then forwarded to the next hop on its route
until it reaches its destination. When all of the packets have been
delivered, your friend’s computer can reassemble them into the original
email message.
In this example, the Internet Layer plays a crucial role in delivering the
email from your computer to your friend’s computer. It uses IP
addresses and routing tables to determine the best route for the packets
to take, and it ensures that the packets are delivered to the correct
destination. Without the Internet Layer, it would not be possible to send
data across the Internet.
4. Transport Layer
The TCP/IP transport layer protocols exchange data receipt
acknowledgments and retransmit missing packets to ensure that packets
arrive in order and without error. End-to-end communication is referred
to as such. Transmission Control Protocol (TCP) and User Datagram
Protocol are transport layer protocols at this level (UDP).
 TCP: Applications can interact with one another using TCP as
though they were physically connected by a circuit. TCP transmits
data in a way that resembles character-by-character transmission
rather than separate packets. A starting point that establishes the
connection, the whole transmission in byte order, and an ending
point that closes the connection make up this transmission.
 UDP: The datagram delivery service is provided by UDP, the other
transport layer protocol. Connections between receiving and
sending hosts are not verified by UDP. Applications that transport
little amounts of data use UDP rather than TCP because it
eliminates the processes of establishing and validating
connections.
5. Application 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 three main protocols present in this layer are:
 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 needs to fill out
forms, sign in, authenticate, and carry out bank transactions.
 SSH: SSH stands for Secure Shell. It is a terminal emulations
software similar to Telnet. The reason SSH is preferred is because
of its ability to maintain the encrypted connection. It sets up a
secure session over a TCP/IP connection.
 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.
The host-to-host layer is a layer in the OSI (Open Systems
Interconnection) model that is responsible for providing communication
between hosts (computers or other devices) on a network. It is also
known as the transport layer.
Some common use cases for the host-to-host layer include:
1. Reliable Data Transfer: The host-to-host layer ensures that data
is transferred reliably between hosts by using techniques like error
correction and flow control. For example, if a packet of data is lost
during transmission, the host-to-host layer can request that the
packet be retransmitted to ensure that all data is received
correctly.
2. Segmentation and Reassembly: The host-to-host layer is
responsible for breaking up large blocks of data into smaller
segments that can be transmitted over the network, and then
reassembling the data at the destination. This allows data to be
transmitted more efficiently and helps to avoid overloading the
network.
3. Multiplexing and Demultiplexing: The host-to-host layer is
responsible for multiplexing data from multiple sources onto a
single network connection, and then demultiplexing the data at the
destination. This allows multiple devices to share the same
network connection and helps to improve the utilization of the
network.
4. End-to-End Communication: The host-to-host layer provides a
connection-oriented service that allows hosts to communicate with
each other end-to-end, without the need for intermediate devices
to be involved in the communication.
Example: Consider a network with two hosts, A and B. Host A wants to
send a file to host B. The host-to-host layer in host A will break the file
into smaller segments, add error correction and flow control information,
and then transmit the segments over the network to host B. The host-to-
host layer in host B will receive the segments, check for errors, and
reassemble the file. Once the file has been transferred successfully, the
host-to-host layer in host B will acknowledge receipt of the file to host A.
In this example, the host-to-host layer is responsible for providing a
reliable connection between host A and host B, breaking the file into
smaller segments, and reassembling the segments at the destination. It
is also responsible for multiplexing and demultiplexing the data and
providing end-to-end communication between the two hosts.
Other Common Internet Protocols
TCP/IP Model covers many Internet Protocols. The main rule of these
Internet Protocols is how the data is validated and sent over the Internet.
Some Common Internet Protocols include:
 HTTP (Hypertext Transfer Protocol): HTTP takes care of Web
Browsers and Websites.
 FTP (File Transfer Protocol): FTP takes care of how the file is to
be sent over the Internet.
 SMTP (Simple Mail Transfer Protocol): SMTP is used to send
and receive data.

You might also like