DCN Unit-4 SBS
DCN Unit-4 SBS
The OSI Model (Open System Interconnection) is a logical and conceptual model that defines
network communication used by systems open to interconnection and communication with
other systems.
In 1984, the OSI architecture was formally adopted by ISO as an international standard
Organization.
OSI Model has 7 layers. All these seven layers work collaboratively to transmit the data from
one layer to another.
The Upper Layers: It deals with application issues and mostly implemented only in software.
The highest is closest to the end system user. In this layer, communication from one end-
user to another begins by using the interaction between the application layers.
The Lower Layers: These layers handle activities related to data transport. The physical layer
and data link layers also implemented in software and hardware.
Physical Layer: The physical layer helps you to define the electrical and physical specifications of the
data connection. This level establishes the relationship between a device and a physical transmission
medium. The physical layer is not concerned with protocols or other such higher-layer items.
Examples of hardware in the physical layer are network adapters, Ethernet, repeaters, networking
hubs, Transmission Media etc.
Data link layer corrects errors which can occur at the physical layer.
The layer allows you to define the protocol to establish and terminates a connection
between two connected network devices.
It is IP address understandable layer, which helps you to define logical addressing so that
any endpoint should be identified.
The layer also helps you implement routing of packets through a network. It helps you to
define the best path, which allows you to take data from the source to the destination.
Framing which divides the data from Network layer into frames.
Allows you to add header to the frame to define the physical address of the source and
the destination machine.
Adds Logical addresses of the sender and receivers.
It is also responsible for the sourcing process to the destination process delivery of the
entire message.
Transport Layer:
The transport layer builds on the network layer to provide data transport from a process on
a source machine to a process on a destination machine.
It determines how much data should be sent where and at what rate.
It divides the message received from the session layer into segments and numbers them to
make a sequence.
Transport layer makes sure that the message is delivered to the correct process on the
destination machine.
It also makes sure that the entire message arrives without any error else it should be
retransmitted.
TCP is the best-known example of the transport layer.
The network layer makes sure that the data is delivered to the receiver despite multiple
intermediate devices.
The network layer at the sending side accepts data from the transport layer, divides it into
packets, adds addressing information in the header and passes it to the data link layer. At
the receiving end the network layer receives the frames sent by data link layer, converts
them back into packets, verifies the physical address (verifies if the receiver address matches
with its own address) and the send the packets to the transport layer.
The network layer is responsible for source to destination of delivery of data. Hence it may
have to route the data through multiple networks via multiple intermediate devices. In order
to achieve this the network layer relies on two things: a. Logical Addressing b. Routing
Session Layer:
Presentation layer allows you to define the form in which the data is to exchange between
the two communicating entities.
This layer transforms data into the form which is accepted by the application.
This layer is also known as a syntax layer.
Character code translation from ASCII to EBCDIC.
Data compression: Allows reducing the number of bits that needs to be transmitted on the
network.
Data encryption: Helps you to encrypt data for security purposes — for example, password
encryption.
It provides a user interface and support for services like email and file transfer.
Application Layer:
Application layer interacts with an application program, which is the highest level of OSI
model.
The application layer is the OSI layer, which is closest to the end-user. It means OSI
application layer allows users to interact with other software application.
The interpretation of data by the application program is always outside the scope of the OSI
model.
Example of the application layer is an application such as file transfer, email, remote login,
etc.
Now, the data will travel down and reach the Network layer. Here, layer 3 header is added.
That contains information like source IP, destination IP, and so on. This information
combines into a new form. The encapsulated data in the network layer is called Packets.
Now, the network layer sends the packet to the Data Link layer when it enters into the data
link layer, a new header (Layer 2) is added.
Also, a trailer is added. It contains information like source MAC address, destination MAC
address, and so on. The trailer is used for error checking. The encapsulated data in the data
link layer is called Frames.
The physical layer takes frames from Data Link layer. The encapsulated data in the physical
layer is called Bits.
That is how encapsulation takes place.
Protocol Data Unit (PDU):
The encapsulated data is called by different names when it travels down following layers. Those
names are called Protocol Data Unit. The following table shows the name of encapsulated data in
each layer.
All the applications need not use all the 7 layers. The lower 3 layers are enough for most of
the applications.
Protocol layers may be defined in such a way that the communications within a layer is
independent of the operation of the layer being used. This is known as "peer-to-peer"
communication and is an important goal of the OSI Reference Model.
Each layer provides a protocol to communicate with its peer.
When a packet is transmitted by a layer, a header is added to the data to be sent. The
protocol data unit so-formed is passed via a service access point to the layer below. This is
then sent using the service of the next lower protocol layer.
The TCP/IP model is a fundamental framework for computer networking. It stands for
Transmission Control Protocol/Internet Protocol, which are the core protocols of the
Internet.
This model defines how data is transmitted over networks, ensuring reliable
communication between devices.
It consists of four layers: the Link Layer, the Internet Layer, the Transport Layer, and the
Application Layer.
TCP/IP was designed and developed by the Department of Defense (DOD) in the 1960s and
is based on standard protocols.
Application Layer:
The Application Layer in the TCP/IP model combines the functions of three layers from
the OSI model: the Application, Presentation, and Session layers.
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.
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 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 TCP/IP transport layer protocols exchange data receipt acknowledgments and
retransmit missing packets to ensure that packets arrive in order and without error.
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.
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 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.
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 datagram’s 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.
Host-to-Network Layer:
The host-to-network layer is the lowest layer of the TCP/IP model and is concerned with the
physical transmission of data.
It is also called a network Access layer. It can be considered as the combination of physical
layer and data link layer of the OSI model.
The functions of this layer are :
It defines how bits are to be encoded into optical or electrical pulses.
It accepts IP packets from the network layer and encapsulates them into frames. It
synchronizes the transmission of the frames as well as the bits making up the
frames, between the sender and the receiver.
It states the transmission mode, i.e. simplex, half duplex or full duplex
It states the topology of the network, i.e. bus, star, ring etc.
The protocols that this layer supports are Ethernet, Frame Relay, Token Ring, ATM etc.
SLIP:
PPP:
Point-to-point Protocol (PPP) is a communication protocol of the data link layer that 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.
The main services provided by Point-to-Point Protocol are –
Defining the frame format of the data to be transmitted.
Defining the procedure of establishing link between two points and exchange of
data.
Stating the method of encapsulation of network layer data in the frame.
Stating authentication rules of the communicating devices.
Providing address for network communication.
Providing connections over multiple links.
Supporting a variety of network layer protocols by providing a range os services.
Protocols of Internet Layer:
IP:
Internet protocols are a set of rules that allow computers and other devices to
communicate over the Internet.
These protocols ensure that data is sent, received, and understood correctly between
different systems.
It is like the address system used for sending data. Every device connected to the internet
has a unique IP address that helps data know where to go and where it is coming from.
There are many types of internet protocols, each serving a specific purpose, such as
transferring files, sending emails, or securing data.
Working of Internet Protocol:-
Dividing Data into Packets.
Addressing.
Routing the Packets.
Reassemble the Data.
Handling Missing Packets.
ARP (Address Resolution Protocol) is an important protocol that plays an important role in
the networking world.
ARP is a network layer protocol. This is a very important protocol in the TCP/IP protocol
suite.
ARP stands for “Address Resolution Protocol”. It is a network protocol used to determine
the MAC address (hardware address) from any IP address.
In other words, ARP is used to mapping the IP Address into MAC Address. When one
device wants to communicate with another device in a LAN (local area network) network,
the ARP protocol is used.
This protocol is used when a device wants to communicate with another device over a
local area network or Ethernet.
There are four types of ARP protocol they are as follows:-
Proxy ARP
Gratuitous ARP
Reverse ARP
Inverse ARP
RARP:
The Reverse Address Resolution Protocol (RARP) is a networking protocol that is used to
map a physical (MAC) address to an Internet Protocol (IP) address.
It is the reverse of the more commonly used Address Resolution Protocol (ARP), which
maps an IP address to a MAC address.
Reverse ARP is a network protocol a client machine uses in a local area network to request
its Internet Protocol address (IPv4) from the gateway router’s ARP table.
The network administrator creates a table in the gateway router, which maps the MAC
address to the corresponding IP address.
When a new machine is set up or any machine which doesn’t have a memory to store the
IP address, needs an IP address for its use.
So the machine sends a RARP broadcast packet which contains its own MAC address in
both the sender and receiver hardware address fields.
ICMP:
TCP:
It is used across the internet for time-sensitive transmissions such as video playback
or DNS lookups.
Protocols of Application Layer:
FTP:
FTP or File Transfer Protocol is said to be one of the earliest and also the most common
forms of transferring files on the internet. FTP is Located in the application layer.
FTP is a basic system that helps in transferring files between a client and a server.
FTP can transfer ASCII, EBCDIC, or image files.
There are different ways through which a server and a client do a file transfer using FTP.
Some of them are mentioned below:
Anonymous FTP: Anonymous FTP is enabled on some sites whose files are
available for public access. A user can access these files without having any
username or password.
Password Protected FTP: This type of FTP is similar to the previous one,
but the change in it is the use of username and password.
FTP Secure (FTPS): It is also called as FTP Secure Sockets Layer (FTP SSL). It
is a more secure version of FTP data transfer.
HTTP stands for Hypertext Transfer Protocol. It is the main way web browsers and servers
communicate to share information on the internet.
It is a set of rules for sharing data on the World Wide Web (WWW).
When you visit a website, HTTP helps your browser request and receives the data needed
to display the web pages you see.
Hypertext is the type of text that is specially coded with the help of some standard coding
language called Hypertext Markup Language (HTML). HTTP/2 is the new version of
HTTP. HTTP/3 is the latest version of HTTP, which is published in 2022.
SMTP:
Simple Mail Transfer mechanism (SMTP) is a mechanism for exchanging email messages
between servers.
It is an essential component of the email communication process and operates at the
application layer of the TCP/IP protocol stack.
SMTP is a protocol for transmitting and receiving email messages.
The client who wants to send the mail opens a TCP connection to the SMTP server and
then sends the mail across the connection. The SMTP server is an always-on listening
mode. As soon as it listens for a TCP connection from any client, the SMTP process initiates
a connection through port 25. After successfully establishing a TCP connection the client
process sends the mail instantly.
The SMTP is of two types:
End-to-End Method
Store-and-Forward Method
TELNET:
TELNET is a type of protocol that enables one computer to connect to the local computer.
It is used as a standard TCP/IP protocol for virtual terminal service which is provided
by ISO.
The computer which starts the connection is known as the local computer.
The computer which is being connected to i.e. which accepts the connection known as
the remote computer.
During telnet operation, whatever is being performed on the remote computer will be
displayed by the local computer. Telnet operates on a client/server principle.
The logging process can be further categorized into two parts:
Local Login
Remote Login
BOOTP:
Addressing: IP addressing is the process of assigning unique numerical labels, called IP addresses, to
devices connected to a computer network using the Internet Protocol (IP). These addresses enable
devices to communicate with each other across networks, including the internet. Classification of
addresses in TCP/IP is given below.
Physical Address:
The physical address is also known as the MAC (Media Access Control) address or link
address.
It is the address of a node which is defined by its LAN or WAN.
It is used by the data link layer and is the lowest level of addresses.
MAC address is the unique address of a device. The size of a physical address is 48 bits (6
bytes). Below is the format for representing a physical address:
XX: XX: XX: YY: YY: YY, where 1 octant = 8 bits.
Example: 16: 1A: BB: 6F: 90: E5
The first 24 bits of a MAC address XX: XX: XX is decided by OUI (Organizationally Unique
Identifier). It represents the identity of the manufacturer.
The next 24 bits of a MAC address YY: YY: YY represents the unique identity of the device.
It is assigned by the manufacturer. They represent NIC (Network Interface Card).
Physical address can only be passed in the same network and not in different networks.
The purpose of using Physical address is to identify devices in the same network.
Logical Address:
Port Address:
Port addressing refers to using the port numbers assigned to every process to exchange data
between them.
Port is a logical address of a 16-bit unsigned integer that is allotted to every application on
the computer that uses the internet to send or receive data.
Now, for processes that send and receive data over the internet, the following information
must be assigned to every process:
The IP address: We use this to uniquely identify the machines that run the processes
over the internet.
The port address (port number): We use this to identify the processes uniquely on a
machine. This number can range from 0–65535.
Collectively, the IP address and port number forms a socket address (socket number). This enables
every single process to be uniquely identified over the internet.
Specific Address:
IP Address: An Internet Protocol (IP) address is the unique identifying number assigned to every
device connected to the internet. An IP address definition is a numeric label assigned to devices that
use the internet to communicate. Computers that communicate over the internet or via local
networks share information to a specific location using IP addresses.
An IP address is a string of numbers separated by periods. IP addresses are expressed as a set of four
numbers — an example address might be 192.158.1.38. Each number in the set can range from 0 to
255. So, the full IP addressing range goes from 0.0.0.0 to 255.255.255.255.
Based on addressing scheme there are two types of IP address as IPV4 and IPV6. Based on usage
there are two types IP address as Public IP address and Private IP address.
IP Address notation: There are three notations to show an IP address which are as follows −
Dotted-decimal notation: Here, IP addresses are written in decimal form with a decimal point
separating the bytes. Each number in the dotted-decimal notation is between 0 and 255.
Hexadecimal notation: Each hexadecimal digit is equivalent to four bits. This means a 32-bit address
that has 8 hexadecimal digits. This notation is often used in network programming.
Address Space: Address space is the amount of memory allocated for all possible addresses for a
computational entity -- for example, a device, a file, a server or a networked computer. The system
provides each device and process address space that holds a specific portion of the processor's
address space. This can include either physical or virtual addresses accessible to a processor or
reserved for a particular process.
IPV4 Addressing: An IPv4 address consists of series of four eight-bit binary numbers which are
separated by decimal point. Although any numbering system can be used to represent a unique
32- bit number, most commonly you see IP address expressed in dot decimal notation. Some of
the examples are:
Site Dot-decimal
Twitter.com 104.244.42.129
Reddit.com 151.101.65.140
Linkedin.com 108.174.10.10
This is the most common form of IP Address. It consists of four sets of numbers separated by dots.
For example, 192.158.1.38. Each set of numbers can range from 0 to 255. This format can support
over 4 billion unique addresses. Here’s how the structure is broken down:
Four Octets: Each octet represents eight bits, and can take a value from 0 to 255. This range is
derived from the possible combinations of eight bits (2^8 = 256 combinations).
Example of IPv4 Address: 192.168.1.1
192 is the first octet
168 is the second octet
1 is the third octet
1 is the fourth octet
Each part of the IP address can indicate various aspects of the network configuration, from the
network itself to the specific device within that network. In most cases, the network part of the
address is represented by the first one to three octets, while the remaining section identifies the
host (device).
Classful Addressing:
Class A:
In a class A address, the first bit of the first octet is always ‘0’. Thus, class A addresses range from
0.0.0.0 to 127.255.255.255(as 01111111 in binary converts to 127 in decimal). The first 8 bits or
the first octet denote the network portion and the rest 24 bits or the 3 octets belong to the host
portion. Its Subnet mask is 255.0.0.0.
Example: 10.1.1.1
Class B:
In a class B address, the first octet would always start with ’10’. Thus, class B addresses range from
128.0.0.0 to 191.255.255.255. The first 16 bits or the first two octets denote the network portion
and the remaining 16 bits or two octets belong to the host portion. Its Subnet mask is 255.255.0.0.
Example: 172.16.1.1
Class C:
In a class C address, the first octet would always start with ‘110’. Thus, class C addresses range
from 192.0.0.0 to 223.255.255.255. The first 24 bits or the first three octets denote the network
portion and the rest 8 bits or the remaining one octet belongs to the host portion. Its Subnet mask
is 255.255.255.0.
Example: 192.168.1.1
Classless Addressing:
Classless addressing came to replace the classful addressing and to handle the issue of
allocation of IP Address.
There is no such restriction of class in classless addressing.
It supports the Variable Length Subnet Mask (VLSM).
It requires less bandwidth. Thus, fast and less expensive as compared to classful
addressing.
Troubleshooting and problem detection is not as easy compared to classful addressing.
Address is divided in Host and subnet.
Classless Addressing or Classless Inter-Domain Routing (CIDR) is a method for efficiently
allocating IP addresses and routing Internet Protocol (IP) packets. CIDR allows for variable-
length subnet masks (VLSM). This means that networks can be divided into smaller, more
flexible subnets according to their specific needs, rather than being constrained by
predefined class boundaries.
In CIDR subnet masks are denoted by /X. For example a subnet of 255.255.255.0 would be
denoted by /24. To work a subnet mask in CIDR, we have to first convert each octet into its
respective binary value. For example, if the subnet is of 255.255.255.0. then :
First Octet
255 has 8 binary 1's when converted to binary
Second Octet
255 has 8 binary 1's when converted to binary
Third Octet
255 has 8 binary 1's when converted to binary
Fourth Octet
0 has 0 binary 1's when converted to binary
Therefore, in total there are 24 binary 1’s, so the subnet mask is /24.
While creating a network in CIDR, a person has to make sure that the masks are
contiguous, i.e. a subnet mask like 10111111.X.X.X can’t exist. With CIDR, we can create
Variable Length Subnet Masks, leading to less wastage of IP addresses. It is not necessary
Prof. Sanjay Satpute - 9175888123
18
that the divider between the network and the host portions is at an octet boundary. For
example, in CIDR a subnet mask like 255.224.0.0 or
11111111.11100000.00000000.00000000 can exist.
Subnet Mask:
A subnet mask is a 32-bit number that separates an IP address into two parts:
the network ID and the host ID.
It tells devices which portion of the address belongs to the network and which
identifies individual devices.
By doing this it helps to determine which devices belong to the same local network
and which devices reside on different networks.
Technically, subnet masks are used internally within a network. Routing devices or
switches rely on subnet masks to route data packets to suitable destinations. Data
packets that traverse over the internet or any network do not indicate the subnet mask
but only reveal the IP address of the destination. However, the routers match this
destination IP address to the data packet’s subnet mask to deliver the data packet to the
right place.
Suppose a user named ‘Davis’ writes a letter to his friend ‘Tom’. Davis sends this letter
to Tom’s office rather than his residence. Tom’s place of employment is a large
enterprise with several co-located departments. The administrative team at Tom’s office
sorts the mail by department rather than by employee name to ensure that the
correspondence isn’t missed and there is no confusion in the process. On receiving
Davis’s letter, the team identifies that Tom works in the HR department. As a result, the
letter is sent to the HR department instead of Tom. The HR department then hands the
letter over to Tom.
In the above example, Tom represents an IP address while the HR department serves as
a subnet mask.
Now let’s look at a real-world example. A data packet addresses the IP address
192.0.4.16, representing a class C network. Since the IP address is split into a network
and host address, here, in a class C network, the network portion is represented by
‘192.0.4’. Thus, the network routers deliver the data packet to the network identified by
192.0.4.
Upon arrival at the right network, the router within the network then consults the
routing table for forwarding the packet further. It uses the data packet’s subnet mask of
255.255.255.0 to perform some binary mathematics, observe the device address ‘16’,
and thereby calculate which subnet it should forward the data packet to. On
determining the target subnet, it sends the packet to the router that is responsible for
delivering data packets within that very subnet. As such, the data packet is eventually
delivered to the destination IP address of 192.0.4.16.
Supernetting:
Subnetting:
An IPv6 address is made of 128 bits divided into eight 16-bits blocks. Each block is then
converted into 4-digit Hexadecimal numbers separated by colon symbols.
For example, given below is a 128 bit IPv6 address represented in binary format and divided
into eight 16-bits blocks:
0010000000000001 0000000000000000 0011001000111000 1101111111100001
0000000001100011 0000000000000000 0000000000000000 1111111011111011
Each block is then converted into Hexadecimal and separated by: symbol.
2001:0000:3238:DFE1:0063:0000:0000:FEFB
Even after converting into Hexadecimal format, IPV6 address remains long. IPV6 provides
some rules to shorten the address. The rules are as follows:
Rule1: Discard leading Zeros (es).
In Block 5, 0063, the leading two 0s can be omitted, such as (5th block).
2001:0000:3238:DFE1:63:0000:0000:FEFB
Rule2: If two of more blocks contain consecutive zeroes, omit them all and replace with
double colon sign ::, such as (6th and 7th block).
2001:0000:3238:DFE1:63::FEFB
Consecutive blocks of zeroes can be replaced only once by :: so if there are still blocks of
zeroes in the address, they can be shrunk down to a single zero, such as (2nd block).
2001:0:3238:DFE1:63::FEFB
IPv4 addresses are 32-bit long i.e it IPv6 addresses are 128 bits long i.e it contains 8 fields or
includes 4 octets and each octet or octets and each octet is 16-bit in size.
field is 8-bit in size.
Encryption and authentication are not Encryption and authentication are implemented in
implemented in Protocol Version 4. Internet Protocol Version 6.
IPv4 possesses checksum fields. IPv6 does not possess checksum fields.
In IPv4 the number that every field In IPv6, each hexadecimal character denotes 4 bits. So, a
holds should be in the range of 0-255. user is required to convert 4 bits to a hexadecimal number
at a time.
IPv4 has five distinct classes of IP IPv6 does not include classes of IP addresses but enables
address that includes Class A to Class E. storing an unlimited number of IP Addresses.
Internet Protocol Version 4 supports Internet Protocol Version 6 does not support VLSM.
VLSM i.e Variable Length Subnet Mask.
In IPv4 Sender and forwarding routers Fragmentation is executed only by the sender in IPv6.
perform fragmentation.
IPv4 is a numeric addressing method, IPv6 is an alphanumeric addressing method, where binary
where the binary bits are separated by bits are separated by a colon (:)
a dot (.)
It is less reliable than TCP/IP Model It is more reliable than OSI Model
Built into Data Link and Transport layers Built into protocols like TCP
ARP RARP
ARP stands for Address Resolution Whereas RARP stands for Reverse Address
Protocol. Resolution Protocol.
In ARP, broadcast MAC address is used. While in RARP, broadcast IP address is used.
ARP is used in sender’s side to map the RARP is used in receiver’s side to map the sender’s
receiver’s MAC address. IP.