Module 3 1
Module 3 1
Network Layer:
The Network Layer is the 5th Layer from the top and the 3rd layer from the Bottom of the OSI
Model. It is one of the most important layers which plays a key role in data transmission. The
main job of this layer is to maintain the quality of the data and pass and transmit it from its
source to its destination. It also handles routing, which means that it chooses the best path to
transmit the data from the source to its destination, not just transmitting the packet. There are
several important protocols that work in this layer.
Data is transmitted in the form of packets via various logical network pathways between various
devices. It offers routes for data packet transfers across the network. The network layer is also
responsible for organizing and controlling the available paths for data transfer.
Functions of Network Layer
Some of the most important functions of the network layer are given below :
1. Assigning Logical Address: It provides unique IP addresses to devices for identification
and communication across networks.
2. Packetizing: It encapsulates data into packets for efficient transmission.
3. Host-to-Host Delivery: It ensures data is delivered from the sender to the intended
receiver across networks.
4. Forwarding: It is the process of moving packets from the input to the appropriate output
interface in a router, based on the destination address
5. Fragmentation and Reassembly: It splits large packets into smaller fragments for
transmission and reassembles them at the destination.
6. Logical Subnetting: It divides larger networks into smaller subnetworks for better
management and routing efficiency.
7. Network Address Translation (NAT): Maps private IP addresses to a public IP for
internet access, conserving IPs and adding security.
8. Routing: It determines the best path for packets to travel to their destination across
multiple networks.
Switching concepts:
Switching is the process of transferring data packets from one device to another in a network, or
from one network to another, using specific devices called switches. A computer user
experiences switching all the time for example, accessing the Internet from your computer
device, whenever a user requests a webpage to open, the request is processed through switching
of data packets only.
A switch is a hardware device in a network that connects and helps multiple devices
share a network without their data interfering with each other.
A switch works like a traffic cop at a busy intersection. When a data packet arrives, the
switch decides where it needs to go and sends it through the right port.
Some data packets come from devices directly connected to the switch, like computers
or VoIP phones. Other packets come from devices connected through hubs or routers.
The switch knows which devices are connected to it and can send data directly between
them. If the data needs to go to another network, the switch sends it to a router, which
forwards it to the correct destination.
Types of Switching:
There are three types of switching methods:
Message Switching
Circuit Switching
Packet Switching
o Datagram Packet Switching
o Virtual Circuit Packet Switching
Message Switching: This is an older switching technique that has become obsolete. In message
switching technique, the entire data block/message is forwarded across the entire network thus,
making it highly inefficient.
Circuit Switching: In this type of switching, a connection is established between the source and
destination beforehand. This connection receives the complete bandwidth of the network until
the data is transferred completely.
This approach is better than message switching as it does not involve sending data to the entire
network, instead of its destination only.
Packet Switching: This technique requires the data to be broken down into smaller
components, data frames, or packets. These data frames are then transferred to their destinations
according to the available resources in the network at a particular time.
This switching type is used in modern computers and even the Internet. Here, each data frame
contains additional information about the destination and other information required for proper
transfer through network components.
Datagram Packet Switching: In Datagram Packet switching, each data frame is taken as an
individual entity and thus, they are processed separately. Here, no connection is established
before data transmission occurs. Although this approach provides flexibility in data transfer, it
may cause a loss of data frames or late delivery of the data frames.
Virtual-Circuit Packet Switching: In Virtual-Circuit Packet switching, a logical connection
between the source and destination is made before transmitting any data. These logical
connections are called virtual circuits. Each data frame follows these logical paths and provides
a reliable way of transmitting data with less chance of data loss.
Internet Protocol:
Internet Protocol (IP) is a set of rules that allows devices to communicate with each other over
the Internet. It is like the address system used for sending data. Every device connected to the
internet has a unique IP address.
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. There are many types of internet protocols, each serving a specific
purpose, such as transferring files, sending emails, or securing data.
3. PPP(Point-to-Point Protocol)
PPP is a communication protocol that is used to create a direct connection between two
communicating devices. This protocol defines the rules using which two devices will
authenticate with each other and exchange information with each other. For example, A user
connects his PC to the server of an Internet Service Provider and also uses PPP. Similarly, for
connecting two routers for direct communication it uses PPP.
8. TELNET(Terminal Network)
TELNET is a standard TCP/IP protocol used for virtual terminal service given by ISO. This
enables one local machine to connect with another. The computer which is being connected is
called a remote computer and which is connecting is called the local computer. TELNET
operation lets us display anything being performed on the remote computer in the local
computer. This operates on the client/server principle. The local computer uses the telnet client
program whereas the remote computer uses the telnet server program.
10. IPv4
The fourth and initially widely used version of the Internet Protocol is called IPv4 (Internet
Protocol version 4). It is the most popular version of the Internet Protocol and is in charge of
distributing data packets throughout the network. Maximum unique addresses for IPv4 are
4,294,967,296 (232), which are possible due to the use of 32-bit addresses. The network address
and the host address are the two components of each address. The host address identifies a
particular device within the network, whereas the network address identifies the network to
which the host belongs. In the “dotted decimal” notation, which is the standard for IPv4
addresses, each octet (8 bits) of the address is represented by its decimal value and separated by
a dot (e.g. 192.168.1.1).
11. IPv6
The most recent version of the Internet Protocol, IPv6, was created to address the IPv4
protocol’s drawbacks. A maximum of 4.3 billion unique addresses are possible with IPv4’s 32-
bit addresses. Contrarily, IPv6 uses 128-bit addresses, which enable a significantly greater
number of unique addresses. This is significant because IPv4 addresses were running out and
there are an increasing number of devices that require internet access. Additionally, IPv6 offers
enhanced security features like integrated authentication and encryption as well as better support
for mobile devices. IPv6 support has spread among websites and internet service providers, and
it is anticipated to gradually displace IPv4 as the main internet protocol.
12. ICMP
ICMP (Internet Control Message Protocol) is a network protocol that is used to send error
messages and operational information about network conditions. It is an integral part of the
Internet Protocol (IP) suite and is used to help diagnose and troubleshoot issues with network
connectivity. ICMP messages are typically generated by network devices, such as routers, in
response to errors or exceptional conditions encountered in forwarding a datagram.
13. UDP
UDP (User Datagram Protocol) is a connectionless, unreliable transport layer protocol. Unlike
TCP, it does not establish a reliable connection between devices before transmitting data, and it
does not guarantee that data packets will be received in the order they were sent or that they will
be received at all. Instead, UDP simply sends packets of data to a destination without any error
checking or flow control. UDP is typically used for real-time applications such as streaming
video and audio, online gaming, and VoIP (Voice over Internet Protocol) where a small amount
of lost data is acceptable and low latency is important. UDP is faster than TCP because it has
less overhead. It doesn’t need to establish a connection, so it can send data packets immediately.
It also doesn’t need to wait for confirmation that the data was received before sending more, so
it can transmit data at a higher rate.
14. IMAP
IMAP (Internet Message Access Protocol) is a protocol used for retrieving emails from a mail
server. It allows users to access and manage their emails on the server, rather than downloading
them to a local device. This means that the user can access their emails from multiple devices
and the emails will be synced across all devices. IMAP is more flexible than POP3 (Post Office
Protocol version 3) as it allows users to access and organize their emails on the server, and also
allows multiple users to access the same mailbox.
IPv4 is a connectionless protocol used for packet-switched networks. Internet Protocol Version
4 (IPv4) is the fourth revision of the Internet Protocol and a widely used protocol in data
communication over different kinds of networks. IPv4 is a connectionless protocol used in
packet-switched layer networks, such as Ethernet. It provides a logical connection between
network devices by providing identification for each device. There are many ways to configure
IPv4 with all kinds of devices – including manual and automatic configurations – depending on
the network type. IPv4 uses 32-bit addresses for Ethernet communication in five classes: A, B,
C, D and E. Classes A, B, and C have a different bit length for addressing the network host.
Class D addresses are reserved for multicasting, while class E addresses are reserved for
military purposes. IPv4 uses 32-bit (4-byte) addressing, which gives 232 addresses. IPv4
addresses are written in the dot-decimal notation, which comprises four octets of the address
expressed individually in decimal and separated by periods, for instance, 192.168.1.5.
Characteristics of IPv4
IPv4 could be a 32-Bit IP Address.
IPv4 could be a numeric address, and its bits are separated by a dot.
The number of header fields is twelve and the length of the header field is twenty.
It has Unicast, broadcast, and multicast style of addresses.
IPv4 supports VLSM (Virtual Length Subnet Mask).
IPv4 uses the Post Address Resolution Protocol to map to the MAC address.
RIP may be a routing protocol supported by the routed daemon.
Networks ought to be designed either manually or with DHCP.
Packet fragmentation permits from routers and causing host.
Version − Version no. of Internet Protocol used (e.g. IPv4).
IHL − Internet Header Length; Length of entire IP header.
DSCP − Differentiated Services Code Point; this is Type of Service.
ECN − Explicit Congestion Notification; It carries information about the congestion seen
in the route.
Total Length − Length of entire IP Packet (including IP header and IP Payload).
Identification − If IP packet is fragmented during the transmission, all the fragments
contain same identification number. to identify original IP packet they belong to.
Flags − As required by the network resources, if IP Packet is too large to handle, these
‘flags’ tells if they can be fragmented or not. In this 3-bit flag, the MSB is always set to ‘0’.
Fragment Offset − This offset tells the exact position of the fragment in the original IP
Packet.
Time to Live − To avoid looping in the network, every packet is sent with some TTL
value set, which tells the network how many routers (hops) this packet can cross. At each hop, its
value is decremented by one and when the value reaches zero, the packet is discarded.
Protocol − Tells the Network layer at the destination host, to which Protocol this packet
belongs to, i.e. the next level Protocol. For example protocol number of ICMP is 1, TCP is 6 and
UDP is 17.
Header Checksum − This field is used to keep checksum value of entire header which is
then used to check if the packet is received error-free.
Source Address − 32-bit address of the Sender (or source) of the packet.
Destination Address − 32-bit address of the Receiver (or destination) of the packet.
Options − This is optional field, which is used if the value of IHL is greater than 5. These
options may contain values for options such as Security, Record Route, Time Stamp, etc.
IP Addressing:
Types of IP Address
IP addresses can be classified in several ways based on their structure, purpose, and the type of
network they are used in. Here’s a breakdown of the different classifications of IP addresses:
IPv6:
IPv6 addresses were created to deal with the shortage of IPv4 addresses. They use 128 bits
instead of 32, offering a vastly greater number of possible addresses. These addresses are
expressed as eight groups of four hexadecimal digits, each group representing 16 bits. The
groups are separated by colons.
Example of IPv6 Address: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
o Each group (like 2001, 0db8, 85a3, etc.) represents a 16-bit block of the address.
Subnetting:
Subnetting is the process of dividing a large network into smaller networks called “subnets.”
Subnets provide each group of devices with their own space to communicate, which ultimately
helps the network to work easily.
A subnet is like a smaller group within a large network. It is a way to split a large network into
smaller networks so that devices present in one network can transmit data more easily. For
example, in a company, different departments can each have their own subnet, keeping their
data traffic separate from others. Subnet makes the network faster and easier to manage and also
improves the security of the network.
Use Subnetting:
Subnet Mask
A subnet mask determines which part of an IP address represents the network and which part
represents the host.
Example:
IP Address: 192.168.1.10
Subnet Mask: 255.255.255.0
Network Portion: 192.168.1
Host Portion: .10
Subnetting in IPv4
IPv4 addresses use a 32-bit structure, divided into 4 octets.
Subnetting is performed by borrowing bits from the host portion to create additional network
segments.
Subnet Mask Notation (CIDR)
Instead of writing the full subnet mask, CIDR (Classless Inter-Domain Routing) notation is used:
/8 = 255.0.0.0
/16 = 255.255.0.0
/24 = 255.255.255.0
/30 = 255.255.255.252
Example of Subnetting
Suppose you have a network 192.168.1.0/24 and want to create four subnets:
Convert /24 to /26 (borrowing 2 bits from the host portion).
New Subnets:
o 192.168.1.0/26 (Range: 192.168.1.1 - 192.168.1.62)
o 192.168.1.64/26 (Range: 192.168.1.65 - 192.168.1.126)
o 192.168.1.128/26 (Range: 192.168.1.129 - 192.168.1.190)
o 192.168.1.192/26 (Range: 192.168.1.193 - 192.168.1.254)
Subnetting in IPv6
IPv6 uses a 128-bit address and does not require traditional subnetting like IPv4. However, prefix
length (e.g., /64, /48) determines the subnet division.
Subnetting Formula
To calculate the number of subnets and hosts per subnet:
Number of Subnets: 2^borrowed bits
Number of Hosts per Subnet: 2^(remaining host bits) - 2 (subtract 2 for network and
broadcast addresses)
Better routing: CIDR allows for better routing of IP traffic, as it allows routers to aggregate
IP addresses based on their network prefix, reducing the size of routing tables.
Reduced administrative overhead: CIDR reduces administrative overhead by allowing
for the allocation and routing of IP addresses in a more efficient and flexible way.
CIDR is a method of IP address allocation and routing that allows for more efficient use
of IP addresses and better routing of IP traffic. It has several advantages over the traditional
class-based addressing system, including greater flexibility, better routing, and reduced
administrative overhead.
Advantages of CIDR
Efficient use of IP addresses: CIDR allows for more efficient use of IP addresses, which
is important as the pool of available IPv4 addresses continues to shrink.
Flexibility: CIDR allows for more flexible allocation of IP addresses, which can be
important for organizations with complex network requirements.
Better routing: CIDR allows for more efficient routing of IP traffic, which can lead to
better network performance. Reduced administrative overhead: CIDR reduces administrative
overhead by allowing for easier management of IP addresses and routing.
Features of CIDR:
Variable Length Subnet Mask (VLSM) is a technique used in IP network design to create
subnets with different subnet masks. VLSM allows network administrators to allocate IP
addresses more efficiently and effectively, by using smaller subnet masks for subnets with fewer
hosts and larger subnet masks for subnets with more hosts.
In a traditional subnetting scheme, a fixed subnet mask is applied to all subnets in the network,
which can lead to inefficient use of IP addresses. For example, if a network has two subnets, one
with 10 hosts and another with 50 hosts, a traditional subnet mask of 255.255.255.0 would be
used for both subnets, which means that each subnet would have 254 available IP addresses.
This would result in wasted IP addresses for the smaller subnet.
VLSM allows network administrators to create subnets with different subnet masks to more
effectively utilize IP addresses. Using the example above, VLSM could be used to assign a
subnet mask of 255.255.255.128 to the smaller subnet with 10 hosts, which would provide 126
available IP addresses, and a subnet mask of 255.255.255.192 to the larger subnet with 50 hosts,
which would provide 62 available IP addresses.
VLSM is widely used in modern networks to create subnets of different sizes and to optimize
the use of IP addresses.
VLSM stands for Variable Length Subnet Mask where the subnet design uses more than one
mask in the same network which means more than one mask is used for different subnets of a
single class A, B, C or a network. It is used to increase the usability of subnets as they can be of
variable size. It is also defined as the process of subnetting of a subnet. Procedure of
implementing VLSM – In VLSM, subnets use block size based on requirement so subnetting is
required multiple times. Suppose there is an administrator that has four departments to manage.
These are sales and purchase department with 120 computers, development department with 50
computers, accounts department with 26 computers and management department with 5
computers. If the administrator has IP 192.168.1.0/24, department wise IPs can be allocated by
following these steps:
1. For each segment select the block size that is greater than or equal to the actual
requirement which is the sum of host addresses, broadcast addresses and network addresses.
Make a list of subnets
2. Arrange all the segments in descending order based on the block size that is from highest
to lowest requirement.
Sales and Purchase: 120
Development: 50
Accounts: 26
Management: 5
1. The highest IP available has to be allocated to highest requirement so the sales and
purchase department gets 192.168.1.0/25 which has 126 valid addresses that can easily be
available for 120 hosts. The subnet mask used is 255.255.255.128
2. The next segment requires an IP to handle 50 hosts. The IP subnet with network number
192.168.1.128/26 is the next highest which can be assigned to 62 hosts thus fulfilling the
requirement of development department. The subnet mask used is 255.255.255.192
3. Similarly the next IP subnet 192.168.1.192/27 can fulfill the requirements of the
accounts department as it has 30 valid hosts IP which can be assigned to 26 computers. The
mask used is 255.255.255.224
4. The last segment requires 5 valid hosts IP which can be fulfilled by the subnet
192.168.1.224/29 which has the mask as 255.255.255.248 is chosen as per the requirement.
The IP with the mask 255.255.255.240 could be chosen but it has 14 valid host IPs and the
requirement is less in comparison so the one that is comparable with the requirement is
chosen. Thus there is less IP wastage in VLSM as compared to FLSM.
Features of VLSM:
1. Efficient IP Address Usage – Reduces wasted IP addresses by allocating only the
necessary number of addresses to each subnet.
2. Multiple Subnet Masks – Allows different subnet masks within the same network, unlike
traditional fixed-length subnetting.
3. Hierarchical Subnetting – Enables logical organization of a network with different subnet
sizes.
4. Enhanced Network Scalability – Useful for large networks with varying subnet
requirements, such as ISPs and enterprise networks.
Working of DHCP
As shown in the figure, the source MAC address (client PC) is 08002B2EAF2A, the destination
MAC address(server) is FFFFFFFFFFFF, the source IP address is 0.0.0.0(because the PC has
had no IP address till now) and the destination IP address is 255.255.255.255 (IP address used
for broadcasting). As they discover message is broadcast to find out the DHCP server or servers
in the network therefore broadcast IP address and MAC address is used.
2. DHCP Offers A Message: The server will respond to the host in this message specifying the
unleased IP address and other TCP configuration information. This message is broadcasted by
the server. The size of the message is 342 bytes. If there is more than one DHCP server present
in the network then the client host will accept the first DHCP OFFER message it receives. Also,
a server ID is specified in the packet in order to identify the server.
Now, for the offer message, the source IP address is 172.16.32.12 (server’s IP address in the
example), the destination IP address is 255.255.255.255 (broadcast IP address), the source MAC
address is 00AA00123456, the destination MAC address is 00:11:22:33:44:55 (client’s MAC
address). Here, the offer message is broadcast by the DHCP server therefore destination IP
address is the broadcast IP address and destination MAC address is 00:11:22:33:44:55 (client’s
MAC address)and the source IP address is the server IP address and the MAC address is the
server MAC address.
Also, the server has provided the offered IP address 192.16.32.51 and a lease time of 72
hours(after this time the entry of the host will be erased from the server automatically). Also,
the client identifier is the PC MAC address (08002B2EAF2A) for all the messages.
3. DHCP Request Message: When a client receives an offer message, it responds by
broadcasting a DHCP request message. The client will produce a gratuitous ARP in order to
find if there is any other host present in the network with the same IP address. If there is no
reply from another host, then there is no host with the same TCP configuration in the network
and the message is broadcasted to the server showing the acceptance of the IP address. A Client
ID is also added to this message.
DHCP Request Message
Now, the request message is broadcast by the client PC therefore source IP address is 0.0.0.0(as
the client has no IP right now) and destination IP address is 255.255.255.255 (the broadcast IP
address) and the source MAC address is 08002B2EAF2A (PC MAC address) and destination
MAC address is FFFFFFFFFFFF.
Note – This message is broadcast after the ARP request broadcast by the PC to find out whether
any other host is not using that offered IP. If there is no reply, then the client host broadcast the
DHCP request message for the server showing the acceptance of the IP address and Other
TCP/IP Configuration.
4. DHCP Acknowledgment Message: In response to the request message received, the server
will make an entry with a specified client ID and bind the IP address offered with lease time.
Now, the client will have the IP address provided by the server.
Now the server will make an entry of the client host with the offered IP address and lease time.
This IP address will not be provided by the server to any other host. The destination MAC
address is 00:11:22:33:44:55 (client’s MAC address) and the destination IP address is
255.255.255.255 and the source IP address is 172.16.32.12 and the source MAC address is
00AA00123456 (server MAC address).
5. DHCP Negative Acknowledgment Message: Whenever a DHCP server receives a request
for an IP address that is invalid according to the scopes that are configured, it sends a DHCP
Nak message to the client. Eg-when the server has no IP address unused or the pool is empty,
then this message is sent by the server to the client.
6. DHCP Decline: If the DHCP client determines the offered configuration parameters are
different or invalid, it sends a DHCP decline message to the server. When there is a reply to the
gratuitous ARP by any host to the client, the client sends a DHCP decline message to the server
showing the offered IP address is already in use.
7. DHCP Release: A DHCP client sends a DHCP release packet to the server to release the IP
address and cancel any remaining lease time.
8. DHCP Inform: If a client address has obtained an IP address manually then the client uses
DHCP information to obtain other local configuration parameters, such as domain name. In
reply to the DHCP inform message, the DHCP server generates a DHCP ack message with a
local configuration suitable for the client without allocating a new IP address. This DHCP ack
message is unicast to the client.
Features of DHCP:
Automatic IP Address Assignment: Eliminates the need for manually configuring each
device.
IP Lease System: Assigns IPs temporarily; after lease expiration, the client must renew the
address.
Subnet Mask, Default Gateway, and DNS Configuration: Along with IP addresses, DHCP
also provides network parameters.
Prevention of IP Conflicts: Ensures each device gets a unique IP address
Types of ARP
There are four types of ARP protocol they are as follows:-
1. Proxy ARP
2. Gratuitous ARP
3. Reverse ARP
4. Inverse ARP
1. Proxy ARP
This is a technique through which proxy ARP in a network can answer ARP queries of IP
addresses that are not in that network. That is, if we understand it in simple language, the Proxy
server can also respond to queries of IP-address of other networks.
Through this we can fool the other person because instead of the MAC address of the
destination device, the MAC address of the proxy server is used and the other person does not
even know.
2. Gratuitous ARP
This is an arp request of a host, which we use to check duplicate ip-address. And we can also
use it to update the arp table of other devices. That is, through this we can check whether the
host is using its original IP-address, or is using a duplicate IP-address.
This is a very important ARP. Which proves to be very helpful in protecting us from the wrong
person, and by using it we can check the ip-address.
3. Reverse ARP
This is also a networking protocol, which we can use through client computer. That is, it is used
to obtain information about one's own network from the computer network. That is, if
understood in simple language, it is a TCP/IP protocol which we use to obtain information about
the IP address of the computer server.
That is, to know the IP address of our computer server, we use Reverse ARP, which works
under a networking protocol.
4. Inverse ARP (InARP)
Inverse ARP, it is the opposite of ARP, that is, we use it to know the IP address of our device
through MAC Address, that is, it is such a networking technology, through this we convert
MAC Address into IP address. Can translate. It is mainly used in ATM machines.
Below is the working of address resolution protocol is being explained in some steps :-
When a sender wants to communicate with a receiver, the sender first checks its ARP
cache. Sender checks whether the receiver's MAC address is already present in the ARP
cache or not?
If the receiver's MAC address is already present in the ARP cache, the sender will
communicate with the receiver using that MAC address.
If the MAC address of the receiver device is not already present in the ARP cache, then
in such a situation an ARP request message is prepared by the sender device.This message
contains the MAC address of the sender, IP address of the sender and IP address of the
receiver. The field containing the MAC address of the receiver is left blank because it is
being searched.
Sender device broadcasts this ARP request message in the LAN. Because this is a
broadcast message, every device connected to the LAN receives this message.
All devices match the receiver IP address of this request message with their own IP
address. Devices whose IP address does not match drop this request message.
The device whose IP address matches the receiver IP address of this request message
receives this message and prepares an ARP reply message. This is a unicast message which
is sent only to the sender.
In ARP reply message, the sender's IP address and MAC address are used to send the
reply message. Besides, in this message the receiver also sends its IP address and MAC
address.
As soon as the sender device receives this ARP reply message, it updates its ARP cache
with the new information (Receiver's MAC address). Now the MAC address of the receiver
is present in the ARP cache of the sender. The sender can send and receive data without any
problem.
Advantages of ARP Protocol:
There are many Advantages of ARP protocol but below we have told you about some important
advantages.
By using this protocol we can easily find out the MAC Address of the device.
There is no need to configure the end nodes at all to extract the MAC address through
this protocol.
Through this protocol we can easily translate IP address into MAC Address.
There are four main types of this protocol. Which we can use in different ways, and they
prove to be very helpful.
ICMP Work:
ICMP is the primary and important protocol of the IP suite, but ICMP isn’t associated with any
transport layer protocol (TCP or UDP) as it doesn’t need to establish a connection with the
destination device before sending any message as it is a connectionless protocol.
The working of ICMP is just contrasting with TCP, as TCP is a connection-oriented protocol
whereas ICMP is a connectionless protocol. Whenever a connection is established before the
message sending, both devices must be ready through a TCP Handshake.
ICMP packets are transmitted in the form of datagrams that contain an IP header with ICMP
data. ICMP datagram is similar to a packet, which is an independent data entity.
In the ICMP packet format, the first 32 bits of the packet contain three fields:
Type (8-bit): The initial 8-bit of the packet is for message type, it provides a brief description
of the message so that receiving network would know what kind of message it is receiving and
how to respond to it. Some common message types are as follows:
Type 0 – Echo reply
Type 3 – Destination unreachable
Type 5 – Redirect Message
Type 8 – Echo Request
Type 11 – Time Exceeded
Type 12 – Parameter problem
Code (8-bit): Code is the next 8 bits of the ICMP packet format, this field carries some
additional information about the error message and type.
Checksum (16-bit): Last 16 bits are for the checksum field in the ICMP packet header.
The checksum is used to check the number of bits of the complete message and enable the
ICMP tool to ensure that complete data is delivered.
The next 32 bits of the ICMP Header are Extended Header which has the work of pointing out
the problem in IP Message. Byte locations are identified by the pointer which causes the
problem message and receiving device looks here for pointing to the problem.
The last part of the ICMP packet is Data or Payload of variable length. The bytes included in
IPv4 are 576 bytes and in IPv6, 1280 bytes.
Advantages of ICMP:
Network devices use ICMP to send error messages, and administrators can use the Ping
and Tracert commands to debug the network.
These alerts are used by administrators to identify issues with network connectivity.
A prime example is when a destination or gateway host notifies the source host via an
ICMP message if there is a problem or a change in network connectivity that needs to be
reported. Examples include when a destination host or networking becomes unavailable,
when a packet is lost during transmission, etc.
Furthermore, network performance and connection monitoring tools commonly employ
ICMP to identify the existence of issues that the network team has to resolve.
One quick and simple method to test connections and find the source is to use the ICMP
protocol.
SDN Architecture:
In a traditional network, each switch has its own control plane and data plane. Switches
exchange topology information to build a forwarding table that decides where to send data
packets. In Software-Defined Networking (SDN), the control plane is removed from switches
and assigned to a centralized SDN controller. This allows network administrators to manage
traffic from a single console instead of configuring each switch individually.
The data plane remains in the switch, forwarding packets based on flow tables set by the
controller. These tables contain match fields (like input port and packet header) and instructions
(forward, drop, or modify packets). If a packet doesn’t match any entry, the switch contacts the
controller, which provides a new flow entry to decide the packet’s path. A typical SDN
architecture consists of three layers.
SDN Architecture
Open SDN
SDN via APIs
In SDN via API, the functions in remote devices like switches are invoked using conventional
methods like SNMP or CLI or through newer methods like Rest API. Here, the devices are
provided with control points enabling the controller to manipulate the remote devices using
APIs.
SDN via Hypervisor-based Overlay Network
In SDN via the hypervisor, the configuration of physical devices is unchanged. Instead,
Hypervisor based overlay networks are created over the physical network. Only the devices at
the edge of the physical network are connected to the virtualized networks, thereby concealing
the information of other devices in the physical network.
Hybrid SDN
Hybrid Networking is a combination of Traditional Networking with software-defined
networking in one network to support different types of functions on a network.
Advantages of SDN:
The network is programmable and hence can easily be modified via the controller rather
than individual switches.
Switch hardware becomes cheaper since each switch only needs a data plane.
Hardware is abstracted, hence applications can be written on top of the controller
independent of the switch vendor.
Provides better security since the controller can monitor traffic and deploy security
policies. For example, if the controller detects suspicious activity in network traffic, it can
reroute or drop the packets.