0% found this document useful (0 votes)
106 views36 pages

DCN Unit 4

The document explains the OSI Model, a framework for understanding network communication, consisting of seven layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application. Each layer has specific functions, such as data transmission, error control, and addressing, facilitating the communication between different devices. The document also describes the processes of data encapsulation and de-encapsulation as data moves through these layers during transmission.

Uploaded by

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

DCN Unit 4

The document explains the OSI Model, a framework for understanding network communication, consisting of seven layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application. Each layer has specific functions, such as data transmission, error control, and addressing, facilitating the communication between different devices. The document also describes the processes of data encapsulation and de-encapsulation as data moves through these layers during transmission.

Uploaded by

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

1

Unit - IV Network Communication Models


4.1 THE OSI MODEL: Layered Architecture, Encapsulation
What is OSI Model? – Layers of OSI Model
The OSI (Open Systems Interconnection) Model is a set of rules that explains how different computer systems
communicate over a network. OSI Model was developed by the International Organization for Standardization
(ISO). The OSI Model consists of 7 layers and each layer has specific functions and responsibilities. This
layered approach makes it easier for different devices and technologies to work together. OSI Model provides
a clear structure for data transmission and managing network issues. The OSI Model is widely used as a
reference to understand how network systems function.
There are 7 layers in the OSI Model and each layer has its specific role in handling data. All the layers are
mentioned below:
1. Physical Layer
2. Data Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer
Layer 1 – Physical Layer
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. Physical Layer
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. Common physical layer devices are Hub, Repeater, Modem, and Cables.
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 topology, star topology, or mesh topology.
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.
Layer 2 – Data Link Layer (DLL)
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. Packet
in the Data Link layer is referred to as Frame. Switches and Bridges are common Data Link Layer devices.
The Data Link Layer is divided into two sublayers:
1. Logical Link Control (LLC)
2. Media Access Control (MAC)
DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane
2

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.
Layer 3 – Network Layer
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 and receiver’s IP address are placed in the header by the network layer.
Segment in the Network layer is referred to as Packet. Network layer is implemented by networking devices
such as routers and switches.
Functions of the Network Layer
Routing: The network layer protocols determine which route is suitable from source to destination. This
function of the network layer is known as routing.
Logical Addressing: To identify each device inter-network uniquely, the network layer defines an addressing
scheme. The sender and receiver’s IP addresses are placed in the header by the network layer. Such an address
distinguishes each device uniquely and universally.
Layer 4 – Transport Layer
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. Protocols used in Transport Layer are TCP, UDP NetBIOS,
PPTP.
At the sender’s side, the transport layer receives the formatted data from the upper layers, performs
Segmentation, and also implements Flow and error control to ensure proper data transmission. It also adds
Source and Destination port number in its header and forwards the segmented data to the Network Layer.

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


3

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 trans port
layer makes sure that the message is delivered to the correct process.
Services Provided by Transport Layer
 Connection-Oriented Service
 Connectionless Service
Layer 5 – Session Layer
Session Layer in the OSI Model is responsible for the establishment of connections, management of
connections, terminations of sessions between two devices. It also provides authentication and security.
Protocols used in the Session Layer are NetBIOS, PPTP.
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.
Example
Let us consider a scenario where a user wants to send a message through some Messenger application running
in their 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, optionally encrypted (if the data is sensitive),
and converted into bits (0’s and 1’s) so that it can be transmitted.
Layer 6 – Presentation Layer
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. Protocols used in the Presentation
Layer are JPEG, MPEG, GIF, TLS/SSL, etc.
Functions of the Presentation Layer
DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane
4

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.

Layer 7 – Application Layer


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 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. Protocols used in the Application layer are SMTP, FTP, DNS,
etc.
Functions of the Application Layer
Network Virtual Terminal (NVT): It allows a user to log on to a remote host.
File Transfer Access and Management (FTAM): This application allows a user to access files in a remote host,
retrieve files in a 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.
How Data Flows in the OSI Model?
When we transfer information from one device to another, it travels through 7 layers of OSI model. First data
travels down through 7 layers from the sender’s end and then climbs back 7 layers on the receiver’s end.
Data flows through the OSI model in a step-by-step process:
Application Layer: Applications create the data.
Presentation Layer: Data is formatted and encrypted.
Session Layer: Connections are established and managed.
Transport Layer: Data is broken into segments for reliable delivery.
Network Layer: Segments are packaged into packets and routed.
Data Link Layer: Packets are framed and sent to the next device.
Physical Layer: Frames are converted into bits and transmitted physically.
Each layer adds specific information to ensure the data reaches its destination correctly, and these steps are
reversed upon arrival.
Let us suppose, Person A sends an e-mail to his friend Person B.
Step 1: Person A interacts with e-mail application like Gmail, outlook, etc. Writes his email to send. (This
happens at Application Layer).
DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane
5

Step 2: At Presentation Layer, Mail application prepares for data transmission like encrypting data and
formatting it for transmission.
Step 3: At Session Layer, there is a connection established between the sender and receiver on the internet.
Step 4: At Transport Layer, Email data is broken into smaller segments. It adds sequence number and error -
checking information to maintain the reliability of the information.
Step 5: At Network Layer, addressing of packets is done in order to find the best route for transfer.
Step 6: At Data Link Layer, data packets are encapsulated into frames, then MAC address is added for local
devices and then it checks for error using error detection.

Step 7: At Physical Layer, Frames are transmitted in the form of electrical/ optical signals over a physical
network medium like ethernet cable or WiFi.
After the email reaches the receiver i.e. Person B, the process will reverse and decrypt the e -mail content. At
last, the email will be shown on Person B email client.
Data Encapsulation and De-encapsulation .
In a networking model, the term encapsulation refers to a process in which protocol information is added to
the data. The term de-encapsulation refers to a process in which information added through the encapsulation
process is removed.
Protocol information can be added before and after the data. If the information is added before the data, it is
known as a header. If the information is added after the data, it is known as a trailer.
The following image explains the data encapsulation and de-encapsulation process.

The header and trailer added by a layer on the sending computer can only be removed by the peer layer on the
receiving computer. For example, the header and trailer added by the Transport layer on the sending computer
can only be removed by the Transport layer on the receiving computer.

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


6

Data encapsulated by a layer on the sending computer is de-encapsulated by the same layer on the receiving
computer. This process is known as the same layer interaction.
The encapsulation process takes place on the sending computer. The de-encapsulation process takes place on
the receiving computer. After doing the encapsulation, each layer uses a specific name or term to represent
the encapsulated data.

The following table lists the terms used by the layers in both models to represent the encapsulated data.

Term OSI layer TCP/IP layer

Data Application Application

Data Presentation

Data Session

Segment Transport Transport

Packet Network Network

Frame Data Link Data Link

Bits Physical Physical

The upper layer (the Application layer in the TCP/IP model) or the layers (the Application, Presentation, and
Session layers in the OSI model) create a data stream and transfer it to the Transport layer.
The upper layers do not attach headers and trailers to the data. But if required, the application that initiates the
connection can add a header and trailer to the data. For example, browsers use the HTTP protocol to fetch
websites from webservers. The HTTP protocol uses a header to transfer the data.
The encapsulation process describes the headers and trailers that are added by the layers. It does not describe
application-specific headers and trailers. Since the upper layers do not add any header or trailer to the data,
the encapsulation process does not use any particular term to refer to the encapsulated data in the upper
layers.
Segment
The Transport layer receives the data stream from the upper layers. It breaks the received data stream into
smaller pieces. This process is known as segmentation. After segmentation, it creates a header for each data
piece and attaches that header to the data piece. Headers contain the information that the remote host needs to
reassemble all data pieces. Once the header is attached, a data piece is known as the segment. The Transport
layer transfers segments to the Network layer for further processing.
Packet
DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane
7

The Network layer creates a header for each received segment from the Transport layer. This header contains
the information that is required for addressing and routing, such as the source software address and destination
software address. Once the header is attached, a segment is known as the packet. Packets are handed down to
the Data link layer.
In the original TCP/IP model, the term packet is mentioned as the term datagram. Both terms are identical
and interchangeable. A packet or a datagram contains a network layer header and an encapsulated segment.
Frame
The Data link layer receives packets from the Network layer. Unlike the Transport layer and Network layer
which only create a header, it also creates a trailer along with the header for each received packet. The header
contains information that is required for the switching, such as the source hardware address and destination
hardware address. The trailer contains information that is required to detect and drop the corrupt data packages
in the earliest stage of the de-encapsulation. Once the header and trailer are attached, a packet is known as
the frame. Frames are passed down to the Physical layer.

Bits
The Physical layer receives frames from the Data link layer and converts them into a format that the attached
media can carry. For example, if the host is connected through a copper wire, the Physical layer converts
frames into voltages. And if the host is connected through a wireless network, the physical layer converts them
into radio signals.
De-encapsulation
De-encapsulation takes place on the receiving computer. The de-encapsulation process is the opposite of the
encapsulation process. In this process, the headers and trailers that are attached by the encapsulation process
are removed.
The Physical layer picks encoded signals from the media and converts them into frames and hands them over
to the Data link layer.
The Data-link layer reads the trailer of the frame and confirms that the received frame is in the correct shape.
If the frame is in the correct shape, it reads the destination hardware address of the frame to determine whether
the fame is intended for it.
If the frame is not intended for it, it will discard the frame. If the frame is intended for it, it will remove the
header and the trailer from the frame. Once the data link layer’s header and trailer are removed from the frame,
it becomes the packet. Packets are handed over to the Network layer.
The Network layer checks the destination software address in the header of each packet. If the packet is not
intended for it, it will discard the packet. If the packet is intended for it, it will remove the header. Once the
network layer’s header is removed, the packet becomes the segment. Segments are handed over to the
Transport layer.
The Transport layer receives segments from the Network layer. From segment headers, it collects all necessary
information, and based on that information it arranges all segments back to the correct order. Next, it removes
the segment header from all segments and reassembles them in the original data stream. The data stream is
handed over to the upper layers.
Upper layers convert the data stream in such a format that the target application can understand.
The following figure shows the encapsulation and de-encapsulation process in the OSI model.
DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane
8

The following figure shows the encapsulation and de-encapsulation process in the TCP/IP model.

TCP/IP model
o The TCP/IP model was developed prior to the OSI model.
o The TCP/IP model is not exactly similar to the OSI model.
o The TCP/IP model consists of five layers: the application layer, transport layer, network layer, data
link layer and physical layer.

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


9

o The first four layers provide physical standards, network interface, internetworking, and transport
functions that correspond to the first four layers of the OSI model and these four layers are represented
in TCP/IP model by a single layer called the application layer.
o TCP/IP is a hierarchical protocol made up of interactive modules, and each of them provides specific
functionality.
Here, hierarchical means that each upper-layer protocol is supported by two or more lower-level protocols.
Functions of TCP/IP layers:

Network Access Layer


o A network layer is the lowest layer of the TCP/IP model.
o A network layer is the combination of the Physical layer and Data Link layer defined in the OSI
reference model.
o It defines how the data should be sent physically through the network.
o This layer is mainly responsible for the transmission of the data between two devices on the same
network.
o The functions carried out by this layer are encapsulating the IP datagram into frames transmitted by
the network and mapping of IP addresses into physical addresses.
o The protocols used by this layer are ethernet, token ring, FDDI, X.25, frame relay.
Internet Layer
o An internet layer is the second layer of the TCP/IP model.
o An internet layer is also known as the network layer.
o The main responsibility of the internet layer is to send the packets from any network, and they arrive
at the destination irrespective of the route they take.
Following are the protocols used in this layer are:
IP Protocol: IP protocol is used in this layer, and it is the most significant part of the entire TCP/IP suite.
Following are the responsibilities of this protocol:

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


10

o IP Addressing: This protocol implements logical host addresses known as IP addresses. The IP
addresses are used by the internet and higher layers to identify the device and to provide internetwork
routing.
o Host-to-host communication: It determines the path through which the data is to be transmitted.
o Data Encapsulation and Formatting: An IP protocol accepts the data from the transport layer
protocol. An IP protocol ensures that the data is sent and received securely, it encapsulates the data
into message known as IP datagram.
o Fragmentation and Reassembly: The limit imposed on the size of the IP datagram by data link layer
protocol is known as Maximum Transmission unit (MTU). If the size of IP datagram is greater than
the MTU unit, then the IP protocol splits the datagram into smaller units so that they can travel over
the local network. Fragmentation can be done by the sender or intermediate router. At the receiver
side, all the fragments are reassembled to form an original message.
o Routing: When IP datagram is sent over the same local network such as LAN, MAN, WAN, it is
known as direct delivery. When source and destination are on the distant network, then the IP datagram
is sent indirectly. This can be accomplished by routing the IP datagram through various devices such
as routers.
ARP Protocol
o ARP stands for Address Resolution Protocol.
o ARP is a network layer protocol which is used to find the physical address from the IP address.
o The two terms are mainly associated with the ARP Protocol:
o ARP request: When a sender wants to know the physical address of the device, it broadcasts
the ARP request to the network.
o ARP reply: Every device attached to the network will accept the ARP request and process the
request, but only recipient recognize the IP address and sends back its physical address in the
form of ARP reply. The recipient adds the physical address both to its cache memory and to
the datagram header
ICMP Protocol
o ICMP stands for Internet Control Message Protocol.
o It is a mechanism used by the hosts or routers to send notifications regarding datagram problems back
to the sender.
o A datagram travels from router-to-router until it reaches its destination. If a router is unable to route
the data because of some unusual conditions such as disabled links, a device is on fire or network
congestion, then the ICMP protocol is used to inform the sender that the datagram is undeliverable.
o An ICMP protocol mainly uses two terms:
o ICMP Test: ICMP Test is used to test whether the destination is reachable or not.
o ICMP Reply: ICMP Reply is used to check whether the destination device is responding or
not.
o The core responsibility of the ICMP protocol is to report the problems, not correct them. The
responsibility of the correction lies with the sender.
DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane
11

o ICMP can send the messages only to the source, but not to the intermediate routers because the IP
datagram carries the addresses of the source and destination but not of the router that it is passed to.

Transport Layer
The transport layer is responsible for the reliability, flow control, and correction of data which is being sent
over the network.
The two protocols used in the transport layer are User Datagram protocol and Transmission control
protocol.
o User Datagram Protocol (UDP)
o It provides connectionless service and end-to-end delivery of transmission.
o It is an unreliable protocol as it discovers the errors but not specify the error.
o User Datagram Protocol discovers the error, and ICMP protocol reports the error to the sender
that user datagram has been damaged.
o UDP consists of the following fields:
Source port address: The source port address is the address of the application program that
has created the message.
Destination port address: The destination port address is the address of the application
program that receives the message.
Total length: It defines the total number of bytes of the user datagram in bytes.
Checksum: The checksum is a 16-bit field used in error detection.
o UDP does not specify which packet is lost. UDP contains only checksum; it does not contain
any ID of a data segment.

o Transmission Control Protocol (TCP)


o It provides a full transport layer services to applications.
o It creates a virtual circuit between the sender and receiver, and it is active for the duration of
the transmission.

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


12

o TCP is a reliable protocol as it detects the error and retransmits the damaged frames. Therefore,
it ensures all the segments must be received and acknowledged before the transmission is
considered to be completed and a virtual circuit is discarded.
o At the sending end, TCP divides the whole message into smaller units known as segment, and
each segment contains a sequence number which is required for reordering the frames to form
an original message.
o At the receiving end, TCP collects all the segments and reorders them based on sequence
numbers.

Application Layer
o An application layer is the topmost layer in the TCP/IP model.
o It is responsible for handling high-level protocols, issues of representation.
o This layer allows the user to interact with the application.
o When one application layer protocol wants to communicate with another application layer, i t forwards
its data to the transport layer.
o There is an ambiguity occurs in the application layer. Every application cannot be placed inside the
application layer except those who interact with the communication system. For example: text editor
cannot be considered in application layer while web browser using HTTP protocol to interact with the
network where HTTP protocol is an application layer protocol.
Following are the main protocols used in the application layer:
o HTTP: HTTP stands for Hypertext transfer protocol. This protocol allows us to access the data over
the World Wide Web. It transfers the data in the form of plain text, audio, video. It is known as a
Hypertext transfer protocol as it has the efficiency to use in a hypertext environment where ther e are
rapid jumps from one document to another.
o SNMP: SNMP stands for Simple Network Management Protocol. It is a framework used for managing
the devices on the internet by using the TCP/IP protocol suite.
o SMTP: SMTP stands for Simple mail transfer protocol. The TCP/IP protocol that supports the e-mail
is known as a Simple mail transfer protocol. This protocol is used to send the data to another e -mail
address.
o DNS: DNS stands for Domain Name System. An IP address is used to identify the connection of a
host to the internet uniquely. But, people prefer to use the names instead of addresses. Therefore, the
system that maps the name to the address is known as Domain Name System.
o TELNET: It is an abbreviation for Terminal Network. It establishes the connection between the local
computer and remote computer in such a way that the local terminal appears to be a terminal at the
remote system.
o FTP: FTP stands for File Transfer Protocol. FTP is a standard internet protocol used for transmitting
the files from one computer to another computer.
4.4 Protocols:
1) Host to Network Layer-SLIP, PPP,
DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane
13

The SLIP (Serial Line Internet Protocol) and PPP (Point-to-Point Protocol) are both protocols used for
establishing direct connections over serial links, such as dial-up lines, or point-to-point connections between
two nodes. However, they differ significantly in terms of features, capabilities, and use cases.
SLIP (Serial Line Internet Protocol)
Overview: SLIP is a simple, older protocol designed to encapsulate IP packets over a serial link. It’s largely
obsolete now, having been replaced by PPP, but it served as the precursor to more modern protocols.
Key Features of SLIP:
a. Simple Design: SLIP is quite simple and lightweight, with minimal overhead. It was designed
primarily to send IP packets over serial connections.
b. Lack of Framing and Error Detection: SLIP doesn't have any mechanism for error checking or data
integrity. It relies on lower layers (like the physical layer or data link layer) for error detection.
c. No Link Control: SLIP doesn’t have built-in mechanisms for configuring or maintaining the
connection. There’s no negotiation of options or link management.
d. No Addressing Mechanism: SLIP doesn’t support multiplexing multiple IP addresses over a single
serial connection. Only one IP address is associated with the link.
e. No Compression or Encryption: SLIP doesn’t offer any support for compression or encryption of the
data being transmitted.
f. Packet Encapsulation: SLIP encapsulates IP packets in a very straightforward manner by pl acing the
packet directly after a special byte sequence, without any other encapsulation overhead.
g. End-of-Frame Marker: SLIP uses a special byte (0xC0) to indicate the end of a frame. If this byte
appears within the data, it has to be "escaped" using a special escape sequence.
h. No Error Recovery: It doesn’t offer any automatic retransmission or recovery mechanisms if a packet
is lost during transmission.
i. Limited Protocol Support: SLIP is designed specifically for IP packets and cannot support other
network protocols or multiple protocols (e.g., it can't easily carry Ethernet or other non-IP protocols).
j. Obsolescence: SLIP is no longer widely used due to its lack of features, security vulnerabilities, and
better alternatives like PPP.
PPP (Point-to-Point Protocol)
Overview: PPP is a more robust protocol than SLIP and is still widely used today for establishing
direct connections over serial lines. It provides support for a wide range of network layer protocols,
error detection, and configuration management.
Key Features of PPP:
a) Multiprotocol Support: PPP supports multiple network layer protocols, not just IP. This means it can
be used to carry IP, IPv6, IPX, AppleTalk, and more across a serial link.
b) Framing and Error Detection: PPP uses a more complex frame structure with checksums (FCS – Frame
Check Sequence) to provide error detection. It ensures that transmitted data is checked for integrity
and helps detect errors in transmission.
c) Link Control Protocol (LCP): PPP includes LCP, which is responsible for the configuration,
negotiation, and management of the data link connection. This includes:
d) Authentication: PPP can be configured to use different authentication methods (e.g., PAP, CHAP).
e) Link Quality Monitoring: PPP can monitor and manage the quality of the link, such as detecting
whether a link is still functional.
f) Option Negotiation: It allows the negotiation of options (e.g., maximum transmission unit (MTU), IP
address configuration).

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


14

g) Error Recovery: PPP supports error recovery mechanisms, so it can retransmit data if a frame is
corrupted or lost, ensuring reliability.
h) Compression and Encryption Support: PPP can use several compression protocols (e.g., TCP header
compression) to reduce the size of the data. It also supports encryption for secure transmission of data
over the link.
i) Authentication: PPP supports two main types of authentication:
j) PAP (Password Authentication Protocol): A simple authentication method that sends the username
and password in cleartext.
k) CHAP (Challenge Handshake Authentication Protocol): A more secure authentication method that
uses a challenge-response mechanism to verify the identity of the peer without sending passwords in
cleartext.
l) Network Control Protocols (NCPs): After the link is established, PPP uses NCPs to configure the
network layer protocols (such as IP or IPX) to run over the link. Different NCPs are used for different
network protocols.
m) Addressing and IP Assignment: PPP can dynamically assign an IP address to each end of the link
through the IPCP (IP Control Protocol), which is a part of NCP.
n) Link Quality Monitoring: PPP allows the monitoring of the quality of the link and supports termination
if the link becomes unreliable.
o) Authentication, Encryption, and Security: PPP supports stronger security mechanisms such as PAP
and CHAP authentication and encryption protocols like ECP (Encryption Control Protocol).
p) Efficiency and Flexibility: PPP can be configured with various parameters (MTU size, header
compression, etc.) to ensure optimal performance over the link.
q) Extensibility: PPP is designed to be extensible and can support additional features, including new
network protocols or specific link requirements.
r) Standardization: PPP is defined by the RFC 1661 (Point-to-Point Protocol) and is widely supported
across different platforms and networking equipment.
s) Network Layer Protocol Negotiation: PPP allows for the negotiation of various network layer
protocols, enabling it to be used in various scenarios where SLIP cannot function.
t) Error-Free Data Transmission: PPP ensures error-free data transmission using the Frame Check
Sequence (FCS), offering robust detection of errors in transmitted data.
Key Differences between SLIP and PPP:
Feature SLIP PPP
Protocol Support Only IP Multiple protocols (IP, IPv6,
IPX, etc.)
Framing Simple, no error detection Structured frames with FCS for
error detection
Error Detection None Frame Check Sequence (FCS)
for error checking
Link Management None Link Control Protocol (LCP) for
negotiation and management
Authentication None PAP, CHAP for secure
authentication
Compression None Supports data compression
Security No encryption Supports encryption (ECP)
Configuration Manual configuration Automatic configuration via
LCP and NCP
Protocol Flexibility Limited to IP Supports multiple network
protocols

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


15

Obsolescence Obsolete Still widely used in modern


networking
2) Internet Layer-IP,ARP,RARP,ICMP,
Address Resolution Protocol ARP and RARP
IP addresses are assigned independently of the hardware addresses of the machines. To send a datagram on
the Internet, the network software must convert the IP address into a physical address, used to transmit the
frame.
Address resolution refers to the determination of the address of a device from the address of that equipment
to another protocol level. We solve, for example, an IP address in an Ethernet address or an ATM address.
It’s ARP (Address Resolution Protocol) performing this translation between the IP world and Ethernet based
on the physical network. ARP enables machines to resolve addresses without using static table that lists all
addresses of both worlds. A machine uses ARP to determine the recipient’s physical address by broadcasting
an ARP request to the subnet containing the IP address to be translated. The machine with the relevant IP
address responds with its physical address. To make ARP more efficient, each machine maintains in memory
a table of addresses resolved and thus reduces the number of Broadcast emissions.
At the time of initialization (bootstrap), a mass storage without the machine (diskl ess) should contact their
server to determine its IP address and to use the TCP / IP services.
RARP (Reverse ARP) allows a machine to use its physical address to determine its logical address on the
Internet. The RARP mechanism allows a computer to be identified as a target on the network by broadcasting
a RARP request. The servers receiving the message examine their table and meet. Once the IP address
obtained, the machine stores it in memory and no longer uses RARP until it is reset.
The ARP protocol is based on the physical network to perform address translation. To determine the
recipient’s physical address, a machine broadcasts an ARP request on the subnet that contains the IP address
to be translated. The machine with the relevant IP address responds with its physical address. This process is
illustrated in Figure.
Operation ARP

Inversely, a station that connects to the network can know its own physical address without an IP address.
Upon initialization, the machine will contact the server to determine its IP address and can use the TCP / IP
services.

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


16

ICMP (Internet Control Message Protocol) is a network layer error-reporting protocol that's used to
communicate data transmission problems. Network devices, such as routers, use ICMP to generate e rror
messages to the source Internet Protocol address when network problems prevent the delivery of IP packets.
ICMP creates and sends messages to the source IP address indicating that a gateway to the internet, such as a
router, service or host, can't be reached for packet delivery. Any IP network device can send, receive or process
ICMP messages.
ICMP is not a transport protocol that sends data between systems.
While ICMP isn't used regularly in end-user applications, network administrators use it to troubleshoot internet
connections in diagnostic utilities, including traceroute and ping.
What is ICMP used for?
ICMP is a network layer protocol that routers, intermediary devices and hosts use to communicate error
information or updates to other routers, intermediary devices and hosts.
ICMP messages are sent in several scenarios. For example, if one device sends a message that's too large for
the recipient to process, the recipient drops that message and sends an ICMP message back to the source.
Another example is when the network gateway finds a shorter route for the message to travel. When this
happens, an ICMP message is sent, and the packet is redirected to the shorter route.
ICMP is also used for network diagnostics, specifically the traceroute and ping terminal utilities, in the
following ways:
Traceroute. The traceroute utility is used to display the physical routing path between two internet devices
communicating with each other. It maps out the journey from one router to another -- sometimes called a hop
-- and provides information on how long it took for data to get from source to destination. Using traceroute to
diagnose network problems can help administrators locate the source of a network delay.
Ping. The ping utility is a simpler traceroute. It sends out pings -- also referred to as ICMP echo request
messages -- and then measures the amount of time it takes the message to reach its destination and return to
the source host. These replies are called echo reply messages. Ping commands are useful for gathering latency
information about a specific device. Unlike traceroute, ping doesn't provide picture maps of the routing layout.
ICMP can also be misused in ways that negatively affect network performance. For example, the ping utility
is often exploited for certain denial of service (DoS) attacks, where an attacker targets a server by
overwhelming it with a flood of pings or ICMP packets. This excessive traffic can lead to server
unresponsiveness and disrupt normal operations.
Transport Layer-TCP and UDP : What is 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.

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


17

 TCP takes into account the level of congestion in the network.

Applications of TCP
 World Wide Web (WWW) : When you browse websites, TCP ensures reliable data transfer
between your browser and web servers.
 Email : TCP is used for sending and receiving emails. Protocols like SMTP (Simple Mail Transfer
Protocol) handle email delivery across servers.
 File Transfer Protocol (FTP) : FTP relies on TCP to transfer large files securely. Whether you’re
uploading or downloading files, TCP ensures data integrity.
 Secure Shell (SSH) : SSH sessions, commonly used for remote administration, rely on TCP for
encrypted communication between client and server.
 Streaming Media : Services like Netflix, YouTube, and Spotify use TCP to stream videos and
music. It ensures smooth playback by managing data segments and retransmissions.
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 Operating System .
 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.
What is 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.
DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane
18

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.
Application of UDP
 Real-Time Multimedia Streaming : UDP is ideal for streaming audio and video content. Its low-latency
nature ensures smooth playback, even if occasional data loss occurs.
 Online Gaming : Many online games rely on UDP for fast communication between players.
 DNS (Domain Name System) Queries : When your device looks up domain names (like converting
“www.example.com” to an IP address), UDP handles these requests efficiently .
 Network Monitoring : Tools that monitor network performance often use UDP for lightweight, rapid
data exchange.
 Multicasting : UDP supports packet switching, making it suitable for multicasting scenarios where
data needs to be sent to multiple recipients simultaneously.
 Routing Update Protocols : Some routing protocols, like RIP (Routing Information Protocol), utilize
UDP for exchanging routing information among routers.
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.

Where TCP is Used?


 Sending Emails
 Transferring Files
DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane
19

 Web Browsing
Where UDP is Used?
 Gaming
 Video Streaming
 Online Video Chats
Difference between TCP and UDP
Basis Transmission Control Protocol (TCP) User Datagram Protocol (UDP)
Type of Service TCP is a connection-oriented UDP is the Datagram-oriented
protocol. Connection orientation protocol. This is because there is no
means that the communicating overhead for opening a connection,
devices should establish a maintaining a connection, or
connection before transmitting data terminating a connection. UDP is
and should close the connection efficient for broadcast and multicast
after transmitting the data. types of network transmission.
Reliability TCP is reliable as it guarantees the The delivery of data to the
delivery of data to the destination destination cannot be guaranteed in
router. UDP.
Error checking mechanism TCP provides extensive error- UDP has only the basic error-
checking mechanisms. It is because checking mechanism using
it provides flow control and checksums.
acknowledgment of data.
Acknowledgment An acknowledgment segment is No acknowledgment segment.
present.
Sequence Sequencing of data is a feature of There is no sequencing of data in
Transmission Control Protocol UDP. If the order is required, it has
(TCP). this means that packets arrive to be managed by the application
in order at the receiver. layer.
Speed TCP is comparatively slower than UDP is faster, simpler, and more
UDP. efficient than TCP.
nsmission Retransmission of lost packets is There is no retransmission of lost
possible in TCP, but not in UDP. packets in the User Datagram
Protocol (UDP).
Header Length TCP has a (20-60) bytes variable UDP has an 8 bytes fixed-length
length header. header.
Weight TCP is heavy-weight. UDP is lightweight.
Handshaking Techniques Uses handshakes such as SYN, ACK, It’s a connectionless protocol i.e. No
SYN-ACK handshake
Broadcasting TCP doesn’t support Broadcasting. UDP supports Broadcasting.
Protocols TCP is used by HTTP, HTTPs , FTP , UDP is used by DNS , DHCP , TFTP,
SMTP and Telnet . SNMP , RIP , and VoIP .
Stream Type The TCP connection is a byte UDP connection is a message
stream. stream.

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


20

Application Layer-FTP,HTTP,SMTP,TELNET,BOOTP,DHCP
Application Layer
The application layer is the highest layer in the seven-layer OSI (Open Systems Interconnection) model, and
it is responsible for providing application-specific communication services to end-user applications. These
services are provided by the Application layer protocols and APIs, which define the methods that applications
use to communicate with one another.
The main function of the Application layer is to provide an interface between the end-user applications and
the underlying communication infrastructure. It allows applications to send and receive messages, access
resources, and perform other operations without having to know the details of the underlying communication
technologies.
Protocols of Application Layer
In computer networks, application layer protocols are a set of standards and rules that govern the
communication between end-user applications over a network. Specific services and functionality are
provided by these protocols to support various types of application-level communication, such as file transfers,
email, remote terminal connections, and web browsing.
Here is the list of commonly used application layer protocols in computer networks
1) HTTP
HTTP is an application-level protocol that is widely used for transmitting data over the internet. It is used by
the World Wide Web, and it is the foundation of data communication for the web.
HTTP defines a set of rules and standards for transmitting data over the internet. It allows clients, such as web
browsers, to send requests to servers, such as web servers, and receive responses. HTTP requests contain a
method, a URI, and a set of headers, and they can also contain a payload, which is the data being sent. HTTP
responses contain a status code, a set of headers, and a payload, which is the data being returned.
HTTP has several important features that make it a popular choice for transmitting data over the internet. For
example, it is stateless, which means that each request and response are treated as separate transactions, and
the server does not retain any information about previous requests. This makes it simple to implement, and it
allows for better scalability. HTTP is also extensible, which means that new headers and methods can be added
to accommodate new requirements as they arise.
HTTP is used by a wide range of applications and services, including websites, APIs, and streaming services.
It is a reliable and efficient way to transmit data, and it has proven to be a flexible and scalable solution for
the growing demands of the internet.
2) FTP
FTP, or File Transfer Protocol, is a standard network protocol used for the transfer of files from one host to
another over a TCP-based network, such as the Internet. FTP is widely used for transferring large files or
groups of files, as well as for downloading software, music, and other digital content from the Internet.
FTP operates in a client-server architecture, where a client establishes a connection to an FTP server and can
then upload or download files from the server. The client and server exchange messages to initiate transfers,
DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane
21

manage data transfers, and terminate the connection. FTP supports both active and passive modes, which
determine the way the data connection is established between the client and the server.
FTP is generally considered an insecure protocol, as it transmits login credentials and files contents in clear
text, which makes it vulnerable to eavesdropping and tampering. For this reason, it’s recommended to use
SFTP (Secure FTP), which uses SSL/TLS encryption to secure the data transfer.

3) SMTP
SMTP (Simple Mail Transfer Protocol) is a standard protocol for transmitting electronic mail (email)
messages from one server to another. It’s used by email clients (such as Microsoft Outlook, Gmail, Apple
Mail, etc.) to send emails and by mail servers to receive and store them.
SMTP is responsible for the actual transmission of email messages, which includes the following steps:
 The client connects to the server and establishes a secure connection.
 The client sends the recipient’s email address to the server and specifies the message to be sent.
 The server checks if the recipient’s email address is valid and if the sender has the proper authori zation
to send emails.
 The server forwards the message to the recipient’s email server, which stores the message in the
recipient’s inbox.
 The recipient’s email client retrieves the message from the server and displays it to the user.
4) DNS
DNS stands for "Domain Name System," and it is an essential component of the internet that translates domain
names into IP addresses. A domain name is a human-readable string of characters, such as "google.com," that
can be easily remembered, while an IP address is a set of numbers and dots that computers use to communicate
with each other over the internet.
The DNS system is a hierarchical, distributed database that maps domain names to IP addresses. When you
enter a domain name into your web browser, your computer sends a query to a DNS server, which then returns
the corresponding IP address. The browser can then use that IP address to send a request to the server hosting
the website you’re trying to access.
DNS has several benefits. It makes it possible for humans to access websites and other internet resources using
easy-to-remember domain names, rather than having to remember IP addresses. It also allows website owners
to change the IP address of their server without affecting the domain name, making it easier to mai ntain and
update their website.
DNS is maintained by a network of servers around the world, and it is constantly being updated and maintained
to ensure that it is accurate and up-to-date. This system of servers is organized into a hierarchy, with the root
DNS servers at the top and local DNS servers at the bottom. When a DNS query is made, it is passed from
one server to another until the correct IP address is found.
5) Telnet
Telnet is a protocol that was widely used in the past for accessing remote computer systems over the internet.
It allows a user to log in to a remote system and access its command line interface as if they were sitting at
the remote system’s keyboard. Telnet was one of the first widely used remote access protocols, and it was
particularly popular in the days of mainframe computers and timesharing systems.

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


22

Telnet operates on the Application Layer of the OSI model and uses a client-server architecture. The client
program, which is typically run on a user’s computer, establishes a connection to a Telnet server, which is
running on the remote system. The user can then send commands to the server and receive responses.
While Telnet was widely used in the past, it has largely been replaced by more secure protocols such as SSH
(Secure Shell). Telnet is not considered a secure protocol, as it sends all data, including passwords, in plain
text. This makes it vulnerable to eavesdropping and interception. In addition, Telnet does not provide any
encryption for data transmission, which makes it vulnerable to man-in-the-middle attacks.

Today, Telnet is primarily used for debugging and testing network services, and it is not typically used for
accessing remote systems for daily use. Instead, most users access remote systems using protocols such as
SSH, which provide stronger security and encryption.
6) SNMP
SNMP (Simple Network Management Protocol) is a standard protocol used for managing and monitoring
network devices, such as routers, switches, servers, and printers. It provides a common framework for network
management and enables network administrators to monitor and manage network devices from a ce ntral
location.
SNMP allows network devices to provide information about their performance and status to a network
management system (NMS), which can then use this information to monitor the health and performance of
the network. This information can also be used to generate reports, identify trends, and detect problems.
SNMP operates using a client-server model, where the network management system acts as the client and the
network devices act as servers. The client sends SNMP requests to the servers, which respond with the
requested information. The information is stored in a management information base (MIB), which is a
database of objects that can be monitored and managed using SNMP.
SNMP provides a flexible and scalable way to manage and monitor large networks, and it’s supported by a
wide range of network devices and vendors. It’s an essential tool for network administrators and is widely
used in enterprise networks and service provider networks.
7) DHCP
DHCP stands for "Dynamic Host Configuration Protocol," and it is a network protocol used to dynamically
assign IP addresses to devices on a network. DHCP is used to automate the process of assigning IP addresses
to devices, eliminating the need for a network administrator to manually assign IP addresses to each device.
DHCP operates on the Application Layer of the OSI model and uses a client-server architecture. The DHCP
server is responsible for managing a pool of available IP addresses and assigning them to devices on the
network as they request them. The DHCP client, typically built into the network interface of a device, sends a
broadcast request for an IP address when it joins the network. The DHCP server then assigns an IP address to
the client and provides it with information about the network, such as the subnet mask, default gateway, and
DNS servers.
The DHCP protocol provides several benefits. It reduces the administrative overhead of managing IP
addresses, as the DHCP server automatically assigns and manages IP addresses. It also provides a flexible
way to manage IP addresses, as the DHCP server can easily reassign IP addresses to different devices if
needed. Additionally, DHCP provides a way to centrally manage IP addresses and network configuration,
making it easier to make changes to the network configuration.

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


23

DHCP is widely used in most networks today and is supported by many operating systems, including
Windows, Linux, and macOS. It is an essential component of most IP networks and is typically used in
conjunction with other network protocols, such as TCP/IP and DNS, to provide a complete solution for
network communication.
8) Bootstrap Protocol (BOOTP)
Bootstrap Protocol (BOOTP) is a basic protocol that automatically provides each participant in a network
connection with a unique IP address for identification and authentication as soon as it connects to the network.
This helps the server to speed up data transfers and connection requests.
BOOTP uses a unique IP address algorithm to provide each system on the network with a completely different
IP address in a fraction of a second.
This shortens the connection time between the server and the client. It starts the process of downloading and
updating the source code even with very little information.
BOOTP uses a combination of TFTP (Trivial File Transfer Protocol) and UDP (User Datagram Protocol) to
request and receive requests from various network-connected participants and to handle their responses.
In a BOOTP connection, the server and client just need an IP address and a gateway address to establish a
successful connection. Typically, in a BOOTP network, the server and client share the same LAN, and the
routers used in the network must support BOOTP bridging.
A great example of a network with a TCP / IP configuration is the Bootstrap Protocol network. Whenever a
computer on the network asks for a specific request to the server, BOOTP uses its unique IP address to quickly
resolve them.
How Bootstrap Protocol differs from DHCP:
DHCP network servers have much broader use than a BOOTP network server. It may be used for the purpose
when a user gives request to the server for a particular IP address and it gives the response of that particula r
IP address only, hence, time is not wasted for monitoring other addresses. BOOTP uses UDP (User Datagram
Protocol) through an IPv4 address connection to identify and authenticate each network user. Also, a BOOTP
connection has a stable static database of IP addresses which serves the client immediately with the required
IP address.
Working of Bootstrap Protocol:
 At the very beginning, each network participant does not have an IP address. The network
administrator then provides each host on the network with a unique IP address using the IPv4 protocol.
 The client installs the BOOTP network protocol using TCP / IP Intervention on its computer system
to ensure compatibility with all network protocols when connected to this network.
 The BOOTP network administrator then sends a message that contains a valid unicast address. This
unicast address is then forwarded to the BOOTP client by the master server.
Uses of Bootstrap Protocol:
 Bootstrap (BOOTP) is primarily required to check the system on a network the first time you start your
computer. Records the BIOS cycle of each computer on the network to allow the computer’s
motherboard and network manager to efficiently organize the data transfer on the computer as soon as
it boots up.
 BOOTP is mainly used in a diskless environment and requires no media as all data is stored in the
network cloud for efficient use.

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


24

 BOOTP is the transfer of a data between a client and a server to send and receive requests and
corresponding responses by the networking server.
 BOOTP supports the use of motherboards and network managers, so no external storage outside of the
cloud network is required.
4.5 Addressing: Physical Address, Logical Address, Port Address
What is Addressing?
Addressing simply means assigning an address to a client or process or server or any other device to
establish successful communication and to make the devices communicate with each other correctly.
Addressing is used in the TCP/IP model on the network to keep the network functioning properly.
Using addressing mechanisms, devices on the network find routes to other devices and establish
communication with them.
The TCP/IP model consists of 4 layers and each layer has an addressing mechanism to perform its
functions.
Types of Addressing
There are 4 types of addresses used in the TCP/IP model on the network for each TCP/IP model layer to
function correctly. They are as follows:
a) Physical (MAC) address
b) Logical (IP) address
c) Port address
d) Specific address
 Physical (MAC) address: If the sender and receiver devices are on the same network, MAC
addresses are used at the network access layer of the TCP/IP model to transmit data from one
device to another.
 The physical address is mainly used by the data link layer to transmit frames.
 Logical (IP) address: IP addresses are used at the Internet layer of the TCP/IP model to uniquely
identify hosts on the network.
 Port address: Port addresses are used at the transport layer of the TCP/IP model to identify
processes running on the host machine.
 Specific address: Specific addresses are user-friendly and commonly used by the user. An email
address such as “abc@example.in” and a website URL such as “www.example.com” are examples
of specific addresses.

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


25

Physical Address
The physical address is also known as the MAC address. It works at the network access layer of the TCP/IP
model. The physical address is responsible for NIC to NIC communication between devices on the same
network.
The physical address is a 48-bit number that is printed on the device’s NIC (Network Interface Card). The
size and format of the MAC address may vary depending on the type of network.
When the network access layer receives a segment from the transport layer it converts the segment into a
frame. After that, the header and trailer are attached to the frame which also contains the physical addresses
of the sender and receiver. The frame will be transmitted according to the physical addresses of the sender and
receiver.
“09:05:E2:07:3R:2A” is an example of a physical address.
Logical Address
The Logical address is also known as the IP address. This address works at the Internet layer of the TCP/IP
model. Whenever a host connects to the network, it gets a unique number known as an IP address to
communicate with other hosts.
The IP address helps in finding the path to transmit the data to the other host on the network. An IP address is
a 32-bit number that uniquely identifies an end device on a network.
IP addresses sent packets from sender to receiver and the receiver can be on the same network or another
network.
“192.168.1.1” is an example of an IP address.
Port Address
Typically, the port address is used at the transport layer of the TCP/IP model to identify the process running
on a device.
The transport layer receives data from the application layer and divides the data into segments. Then segments
are transmitted from sender to receiver using TCP or UDP.

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


26

There is a field in the TCP/UDP header known as the port number. Once the receiver has successfully received
the segment, the receiver will use the port address to determine the received segment belonging to which
particular process out of several processes running in the machine.
In short, the port address distributes the processes and labels them, so that the machine understands which
process will be used for the particular communication.
For example, when two devices on a network want to share files, they will use FTP which works on ports 20
and 21.
Specific Address
The specific address mainly interacts with the user. Sending an email using a mail address such as
“abc@gmail.com” and accessing the web by typing the URL of a website such as “www.example.com” are
examples of specific addresses.
The specific address changes based on the IP address and port numbers.
Specific addresses operate at the application layer of the TCP/IP model.
How Addressing work in a Network?
Now, we know about 4 types of addressing. So, let’s see how they all work together in a network.
The diagram below shows that how addressing works in a computer network.

Working of Addressing on the Network


As shown in the above diagram, PC-1 wants to communicate with PC-2. So, first of all, both will connect to
the network and get a unique IP address for communication.

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


27

After getting the IP address, PC-1 will start sending packets on the network. Now, the MAC address of the
intermediary devices will serve as the interface for a host. The source and destination MAC will change
continuously until the data is transmitted to the receiver, as shown in the figure.
When the data is successfully received by the receiver, the receiver will check the port number in the TCP
header and assign that data to the particular process based on the port number.

Physical
Key Logical Address Port Address Specific Address
Address

Physical A logical address The port


The specific
addresses uniquely identifies a address is used
Funct address provides an
are used for host on a network to identify the
ionali easy and human-
NIC-to-NIC and transmits packets process
ty understandable
communicat from sender to running on the
address.
ion. receiver. host machine.

Used in
Used in
Laye Network Used in Internet
Transport Used in
r Access Layer
Layer Application Layer
Layer

The port
address is
MAC
stored in the
address
TCP/UDP
helps
The IP address header, which
transmit
connects two devices is used to Varies according to
Servi data when
and finds the path to identify the port address and IP
ce communicat
send packets from process when address.
ion devices
sender to receiver. the segment
are on the
has been
same
successfully
network.
received by the
receiver.

Used Segments and Data and User-


Frames Packets
for Processes friendly address

Anything in Human
Defin 48-bit
32-bit number between 0-65, understandable
ition number
535 address

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


28

25: SMTP, 53:


Exam 09:1A:34:0 abc@gmail.com,
10.1.1.2 DNS, 80:
ple 8:2E:4F www.example.com
HTTP, etc

4.6 Internet Protocol (IP)


As we know that there are many devices present on a network. But how are they connected to each other,
what do they use to communicate with another device? For that, they have a unique number known as an
IP address which is used to hold the entire Internet together.
 Generally, Internet Protocol is the primary protocol of the network layer. It uses a best-effort
mechanism to transport packets from source to destination.
 In a network, IP provides only those functions which are required to send packets from source to
destination.
 IP does not care whether the network is wired or wireless. It cares about the delivery of packets. Also,
it does not guarantee that the packets sent by the sender will be received correctly by the receiver.
 IP does not track and maintain the flow of packets.
 On the sender side, when the network layer receives the segment from the transport layer, it adds the
IP header to the segment and forms the packet. Then, the sender sends the packet to the receiver.
 When the receiver receives the packet, its network layer forwards the packet to the transport layer, and
the transport layer decides to which process the packet should be assigned.
 Basically, there are two versions of IP, one is IPv4 (IP version-4), and the other is IPv6 (IP version-6).
The figure below shows IPv4 and IPv6 packet header or datagram.

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


29

 As shown in the figure, Version, Differentiated Services (DS), Header Checksum, Time to Live (TTL),
Protocol, and Source and Destination IPv4 Address are the fields of an IPv4 packet.
 Version, Traffic Class, Flow Label, Payload Length, Next Header, Hop Limit, and Source and
Destination IPv6 addresses are the fields of an IPv6 packet.
IPv4 Addressing
An IPv4 address is 32-bit number which means that there are a total of 2 32 (4,294,967,296) IPv4 addresses.
Here 4 means there are 4 octets separated by a dot. IPv4 consists of two portions, a network portion and a
host portion.
The figure below shows the structure of an IPv4 address.

 As shown in the figure, the IPv4 address consists of a network and a host portion. The size of the
network and host portion varies by network.
 In our case, 24 bits belong to the network portion, and the remaining 8 bits belong to the host portion.
The network portion is the same for all the devices residing in the same network.
 Each device on the network has a unique IPv4 address.

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


30

Subnet Mask: When a device receives a unique IPv4 address, it has a subnet mask that separates the
network and host portions of the IPv4 address. Using the subnet mask, the router determines the network
address of the device.
 The subnet mask guides the router to know how long the network portion is. The network portion and
the host portion can be identified by the AND method.
 In logical AND, the result is 1 if both the bits have the value 1. The possible results of AND operation
are given below:
o 0 AND 0 = 0
o 0 AND 1 = 0
o 1 AND 0 = 0
o 1 AND 1 = 1
The figure below shows the AND operation between an IPv4 address and a subnet mask.

 As shown in the figure, the host IP is 192.168.10.25, and the subnet mask is 255.255.255.0. The host
IP and subnet mask are converted to binary.
 Now, the AND operation is performed between 192.168.10.25 and 255.255.255.0, which gives
192.168.10.0 as the result.
 192.168.10.0 is the network address of 192.168.10.25 address.
IP Addresses: There are three types of IP addresses: network address, host address, and broadcast address.
The below diagram explains the IP Addresses.

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


31

 Network address: The network address represents a unique address in which multiple devices exist
along with the host IP address. In our case, 200.12.1.0/24 is the network address.
o A device belongs to the 200.12.1.0 network if its subnet is the same as the network address.
 Host Address: Host addresses are assigned to each device. This is unique to each device. The
200.12.1.0 network has a total of 256 IPs which range from 200.12.1.0-200.12.1.255.
o The first address 200.12.1.0 is used for the network address. The last address 200.12.1.255 is
used as the broadcast address.
o The addresses from 200.12.1.1to 200.12.1.254 are used as host addresses. Out of 256 IP
addresses, 254 addresses are used as host addresses.
 Broadcast Address: The last address of the network is used as the broadcast address. Generally, it is
used to broadcast packets.
o In a broadcast address, the host bits are all 1. In our example, 200.12.1.255/24 is the broadcast
address.
Prefix Length in IPv4 Address
We can identify the subnets of IPv4 by using the prefix length. In IP address subnet mask, number of bits
set to 1 is called the prefix length.
The diagram below shows the prefix length of an IPv4 address.

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


32

 As shown in the figure, the subnet mask is first written in binary format. The number of 1 bit is known
as the prefix bit.
 Basically, the prefix length of the subnet mask is written after the slash notation.
 Instead of writing like 192.156.12.3 255.255.255.0, the IPv4 address is written as 192.156.12.3/24.
Here /24 is 255.255.255.0.
Public, Private, and Special Use IPv4 Addresses
The network layer transmits IPv4 packets in different ways. Some specific IP addresses are used to
navigate the Internet, while others are allocated for routing over the Internet.
 Public IP Address: Public IP addresses are global, which means that these IP addresses are assigned
to any device on the global network.
 Private IP Address: Private IP addresses are mostly used by organizations. Private IP addresses are
allocated to organizations so that communication can take place only in that range of private IP
addresses. Basically, the private IPv4 address is not unique. It is used in the internal network.
o Generally, router didn’t communicate using private IP address. It uses network address
translation (NAT) to translate the private IP address to the public IP address.
The below diagram shows the private IPv4 addresses block.

 As shown in the figure, 10.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are the private addresses used for
the internal network.
Special Use IPv4 Addresses: Loopback addresses and Link-Local addresses are the special use IPv4
addresses.
 Loopback Addresses: Loopback addresses are used when the host wants to send traffic to itself.
Addresses ranging from 127.0.0.0/8 or 127.0.0.1 to 127.255.255.254 are known as loopback addresses.
 Link-Local Addresses: When the device does not get an IP dynamically, it is assigned one of the link-
local addresses. It is also known as Automatic Private IP Addressing (APIPA) or Self-Assigned
Address.
o Link-Local Addresses are 169.254.0.0/16 or 169.254.0.1 to 169.254.255.254.
Classful Addressing
IPv4 addresses are divided into five classes that are A, B, C, D, and E. Each class has a different number
of IPv4 addresses. By looking at the first byte of the IP address, we can determine the class of the IP
address.
The below diagram explains classful addressing.

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


33

 As shown in the figure, class-A IP addresses range from 0 (0.0.0.0/8) to 127 (127.0.0.0/8). Similarly,
Class-B, Class-C, Class-D and Class-E IP addresses range from 128 (128.0.0.0/16) to 191
(191.255.0.0/16), 192 (192.0.0.0/24) to 223 (223.255.255.0/24), 224 (224.0.0.0) to 239 (239.0.0.0),
and 240 (240.0.0.0) to 255 (255.0.0.0), respectively.
 It also shows that, as the subnet mask increases, the number of host decreases.
The below diagram explains the calculation of hosts in an IP address.

 As shown in the figure, the IP address 192.168.12.0 has the /24 subnet mask. The first 24 bits belong
to the network portion, and the remaining 8 bits (32-24 = 8) belong to the host part.
 So the total number of hosts for 192.168.12.0 IP address is,
o Number of hosts = 28 – 2
o Number of hosts = 256 – 2
o Number of hosts = 254

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


34

o Here (-2) indicates that the first address of IP 192.168.12.0/24 defines the 192.168.12.0
network IP and the last IP of 192.168.12.0/24 defines the 192.168.12.255 broadcast address.
Both are reserved addresses.
Need For IPv6 Addresses
As we know that the population of the world is increasing and the number of devices on the internet is
also increasing. Because of this, IPv4 addresses are running out, as they have a total of 4.2 billion IP
addresses. So IPv6 is in trend, and it is the successor of IPv4. IPv4 has 32bit address space, whereas IPv6
has 128-bit address space, which means there are 2 128 IPv6 addresses available.
 The IETF (Internet Engineering Task Force) developed IPv6 to correct the limitations of IPv4 because
there are not enough IPv4 addresses to accommodate the development.
 There exist some protocols which are used by the network administrator if he wants to migrate his
IPv4 address network to the IPv6 address network.
 The tunnelling method is used to transport IPv6 packets over an IPv4 network because the IPv6 packet
is encapsulated in an IPv4 packet.
 It is also possible on the network that a device that has an IPv6 address can communicate with a device
with an IPv4 address using the NAT64 (Network Address Translation 64) method.

IPv6 Addressing
In an IPv6 address, there are 8 sections separated by colons (:), with 16 bits in each section. Let us
understand the format of the IPv6 address.
The figure below shows the format of an IPv6 address.

 As shown in the figure, 2001:0db8:0001:1111:0011:1010:fe9a:12ab is an example of an IPv6 address.


 As you can see, there are 8 segments of 16 bit, or you can call it Hextets.
Certain rules are used to shorten IPv6 addresses. They are as follows:
 Rule 1: Omit the leading zero of the IPv6 address. In this rule, to shorten the notation of IPv6, omit
the leading zero in any hextet.

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane


35

 Rule 2: In this rule, the double colon (::) replaces any single, continuous string of one or 16-bit hextets
containing all zeros.
The figure below explains the two rules for IPv6 address shortening.

 As shown in the figure, 2001:0011:0101:11AA:0AB3:0000:0000:123A is an IPv6 address. In the first


rule, leading zeros is omitted and the resulting shorten IPv6 address becomes
2001:11:101:11AA:AB3:0:0:123A.
 Now, as a second rule, replace the continuous string containing zeros with a single colon, as shown in
the figure. 2001:11:101:11AA:AB3:0:0:123A becomes 2001:11:101:11AA:AB3::123A.
 If there is more than one continuous string of all-0 hextets, use a double colon (::) on the longest string.
IPv6 Prefix Length: In IPv4, we identify the network portion by looking at the subnet mask. Similarly,
in an IPv6 address, the address is divided into two 64-bit portions.
 The first 64 bit portion is known as the prefix, and the remaining 64 bit portion is known as the interface
ID.
The below diagram explains the prefix length in IPv6 address.

As shown in the figure, the IP address 2001:0DB8:0101:11AA:23AD:0001:1000:EF2W is an IPv6


address. In which the first 64 bits (2001:0DB8:0101:11AA) define the prefix and the remaining 64 bits
(23AD:0001:1000:EF2W) define the interface ID.
DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane
36

Types of IPv6 Addresses


Unicast IPv6 addresses and Multicast IPv6 addresses are the types of IPv6 (IP – version 6) addresses. IPv6
unicast addresses are used to identify the interface of a device on a network. IPv6 multicast addresses are
used when a packet needs to be sent to multiple devices.
IPv6 Unicast Addresses: Global unicast, link-local, loopback, unspecified and unique local addresses are
IPv6 unicast addresses.
 Global Unicast Address (GUA): GUA is similar to a public IPv4 address in that it is globally unique
to the specific device, which can be assigned statically or dynamically. The range of GUA is from
2000::/3 to 3fff::/3.
o In GUA, the first 48 bits are known as the Global Routing Prefix, the middle 16 bits are known
as the Subnet ID, and the remaining 64 bits are known as the Interface ID.
 Link-Local Address (LUA): This address is used when two devices are on the same link and is
required for each device that has an IPv6 GUA address. Routers do not forward packets using LUA
packets. They only send packets using GUA addresses.
o LLAs are in the range of fe80::/10.
o The router sends routing updates to its neighboring routers using a link-local address. The host
device uses the router’s link-local address as the default gateway.
 Unique Local Address: This address can be used if the device should not be accessible from an
external network. Furthermore, it cannot be translated into IPv6 public addresses.
o They are in the range fc00::/7 to fdff::/7.
 Loopback Address: The loopback address is the IPv6 address of the device local-host. It
is ::1/128. The device uses a loopback address if it wants to send packets to itself.
 Unspecified Address: As the name suggests IPv6 address is unspecified. Unspecified IPv6 address
format is ::.
IPv6 Multicast Address: IPv6 multicast addresses are the same addresses as IPv4 multicast addresses. It
is used to send a packet from one source to multiple destinations. In the IPv6 multicast address, the prefix
for a multicast address is ff00::/8.
 Well-known and Solicited node addresses are the types of IPv6 Multicast Addresses.
 Well-known IPv6 Multicast Addresses: Well-known IPv6 Multicast addresses are reserved for pre-
defined groups of devices.
o The ff02::1 and ff02::2 address groups are used for multicast purposes. If packets sent by the
device are to be received by each IPv6 capable end device, the ff02::1 address is used. It is also
known as an all-nodes multicast group.
o If a packet is to be sent and processed by each IPv6-enabled router, the ff02::2 multicast address
is used. This address is also known as an all-router multicast group.
 Solicited-Node IPv6 Multicast Addresses: This address is used by the Ethernet NIC to filter packets.
If a sender sends a packet to 3 destinations, the destination Ethernet NIC decides whether this packet
sent by the sender is for me or not.

DCN 314318 Mrs. Archana Kalia VPM’s Polytechnic. Thane

You might also like