Internet Control Message Protocol
Internet Control Message Protocol
Computer Networks
Since IP does not have a inbuilt mechanism for sending error and control messages. It depends
on Internet Control Message Protocol(ICMP) to provide an error control. It is used for reporting
errors and management queries. It is a supporting protocol and used by networks devices like
routers for sending the error messages and operations information.
e.g. the requested service is not available or that a host or router could not be reached.
When you send data from one device to another remote device, the IPv4 Datagram often travels through one
or more routers. There can be errors at routers while they try to forward the IPv4 Datagram to its final
destination. The Internet Control Message Protocol (ICMP) protocol is used to report problems with delivery
of IPv4 Datagrams within an IPv4network. ICMP is also used for other diagnosis and troubleshooting
functions.
An Internet Control Message Protocol (ICMP) packet header is 8 Bytes long. The first four bytes always have
the same meaning, and the contents of the remaining four depend on the ICMP packet type. An ICMP header
follows the IP header in an IP datagram packet and Internet Control Message Protocol (ICMP) is considered to
be an integral part of IPv4.
Source Quench: If a device is sending large amounts of data to another remote device, the volume can flood the
router with data. The router can use Internet Control Message Protocol (ICMP) to send a Source Quench message
to the source IPv4 address to ask it to slow down the rate at which it is sending data.
Destination Unreachable: If a router receives a datagram that cannot be delivered, Internet Control Message
Protocol (ICMP) returns a Destination Unreachable message to the source IPv4 address.
Time Exceeded: Internet Control Message Protocol (ICMP) sends this message to the source IP if a datagram is
discarded because Time-to-Live (TTL) value reaches zero. One reason is the destination device is too many router
hops away to reach with the current Time-to-Live (TTL) value or a routing loop (An undesirable condition when
the IP Datagrams loop infinitely between the routers, without reaching the destination).
The acronym ARP stands for Address Resolution Protocol which is one of the most
important protocols of the Network layer in the OSI model.
Note: ARP finds the hardware address, also known as Media Access Control (MAC)
address, of a host from its known IP address.
magine a device wants to communicate with the other over the internet. What ARP does? Is it
broadcast a packet to all the devices of the source network.
The devices of the network peel the header of the data link layer from the protocol data unit
(PDU) called frame and transfers the packet to the network layer (layer 3 of OSI) where the
network ID of the packet is validated with the destination IP’s network ID of the packet and if it’s
equal then it responds to the source with the MAC address of the destination, else the packet
reaches the gateway of the network and broadcasts packet to the devices it is connected with
and validates their network ID
Instead of using Layer-3 address (IP address) to find MAC address, Inverse ARP uses
MAC address to find IP address. As the name suggests, InARP is just inverse of ARP.
Reverse ARP has been replaced by BOOTP and later DHCP but Inverse ARP is solely
used for device configuration. Inverse ARP is enabled by default in ATM(Asynchronous
Transfer Mode) networks. InARP is used to find Layer-3 address from Layer-2 address
(DLCI in frame relay). Inverse ARP dynamically maps local DLCIs to remote IP
addresses when you configure Frame Relay. When using inverse ARP, we know the
DLCI of remote router but don’t know its IP address. InARP sends a request to obtain
that IP address and map it to the Layer-2 frame-relay DLCI.
DHCP will assign new IP addresses in each location when devices are moved
from place to place, which means network administrators do not have to
manually initially configure each device with a valid IP address or reconfigure
the device with a new IP address if it moves to a new location on the network.
Versions of DHCP are available for use in Internet Protocol version 4 (IPv4)
and Internet Protocol version 6 (IPv6).
How DHCP works
A computer, or any other device that connects to a network (local or internet), must be
properly configured to communicate on that network. Since DHCP allows that
configuration to happen automatically, it's used in almost every device that connects to
a network including computers, switches, smartphones, gaming consoles, etc.
Because of this dynamic IP address assignment, there's less of a chance that two
devices will have the same IP address, which is very easy to run into when using
manually-assigned, static IP addresses.
Using DHCP also makes a network much easier to manage. From an administrative
point of view, every device on the network can get an IP address with nothing more than
their default network settings, which is set up to obtain an address automatically. The
only other alternative is to manually assign addresses to each and every device on the
network.
Because these devices can get an IP address automatically, they can move freely from
one network to another (given that they're all set up with DHCP) and receive an IP
address automatically, which is super helpful with mobile devices.
In most cases, when a device has an IP address assigned by a DHCP server, that IP
address will change each time the device joins the network. If IP addresses are
assigned manually, it means administration must not only give out a specific address to
each new client, but existing addresses that are already assigned must be
manually unassigned for any other device to use that same address. This is not only
time-consuming, but manually configuring each device also increases the chance of
running into human-made errors.
Though there are plenty of advantages to using DHCP, there are certainly some
disadvantages as well. Dynamic, changing IP addresses should not be used for devices
that are stationary and need constant access, like printers and file servers.
Although devices like that exist predominantly in office environments, it's impractical to
assign them with an ever-changing IP address. For example, if a network printer has an
IP address that will change at some point in the future, then every computer that's
connected to that printer will have to regularly update their settings so their computers
will understand how to contact the printer.
Requirement of UDP
A question may arise, why do we need an unreliable protocol to transport the
data? We deploy UDP where the acknowledgement packets share significant
amount of bandwidth along with the actual data. For example, in case of
video streaming, thousands of packets are forwarded towards its users.
Acknowledging all the packets is troublesome and may contain huge amount
of bandwidth wastage. The best delivery mechanism of underlying IP protocol
ensures best efforts to deliver its packets, but even if some packets in video
streaming get lost, the impact is not calamitous and can be ignored easily.
Loss of few packets in video and voice traffic sometimes goes unnoticed.
Features
UDP is used when acknowledgement of data does not hold any significance.
UDP is stateless.
UDP Header
UDP header is as simple as its function.
Source Port - This 16 bits information is used to identify the source port of the
packet.
Length - Length field specifies the entire length of UDP packet (including
header). It is 16-bits field and minimum value is 8-byte, i.e. the size of UDP
header itself.
Checksum - This field stores the checksum value generated by the sender before
sending. IPv4 has this field as optional so when checksum field does not contain
any value it is made 0 and all its bits are set to zero.
Simple Mail Transfer Protocol (SMTP) is the standard protocol for email services on a
TCP/IP network. SMTP provides the ability to send and receive email messages.
SMTP is an application-layer protocol that enables the transmission and delivery of
email over the Internet. SMTP is created and maintained by the Internet Engineering
Task Force (IETF).
Simple Mail Transfer Protocol is also known as RFC 821 and RFC 2821.
SMTP is part of the application layer of the TCP/IP protocol. Using a process called "store
and forward," SMTP moves your email on and across networks. It works closely with
something called the Mail Transfer Agent (MTA) to send your communication to the right
computer and email inbox.
SMTP spells out and directs how your email moves from your computer's MTA to an MTA
on another computer, and even several computers. Using that "store and forward" feature
mentioned before, the message can move in steps from your computer to its destination. At
each step, Simple Mail Transfer Protocol is doing its job. Lucky for us, this all takes place
behind the scenes, and we don't need to understand or operate SMTP.
SMTP at work.
SMTP provides a set of codes that simplify the communication of email messages between
email servers (the network computer that handles email coming to you and going out). It's a
kind of shorthand that allows a server to break up different parts of a message into
categories the other server can understand. When you send a message out, it's turned into
strings of text that are separated by the code words (or numbers) that identify the purpose
of each section.
SMTP provides those codes, and email server software is designed to understand what
they mean. As each message travels towards its destination, it sometimes passes through a
number of computers as well as their individual MTAs. As it does, it's briefly stored before it
moves on to the next computer in the path. Think of it as a letter going through different
hands as it winds its way to the right mailbox.
What is a IMAP?
If you've ever set up an email account before, you've probably been asked which email
protocol you would like to use: POP or IMAP. To the uninitiated, this question can be
positively mind-boggling. However, the selection that you make will have a major impact on
your experience of sending, receiving and otherwise using email messages. While POP, or
Post Office Protocol, used to be the most popular type of email protocol, IMAP - or Internet
Message Access Protocol - is the go-to choice of most people these days. Learn more
about what IMAP is, how it works, how it compares to POP and its main advantages below.
Using IMAP
Unlike POP, IMAP allows you to access, organize, read and sort your email messages
without having to download them first. As a result, IMAP is very fast and efficient. The
server also keeps a record of all of the messages that you send, allowing you to access
your sent messages from anywhere. IMAP does not move messages from the server to
your computer; instead, it synchronizes the email that's on your computer with the email
that's on the server.
Main Advantages of IMAP
There are several advantages to using IMAP. First, it allows you to access your email
messages from anywhere, via as many different devices as you want. Second, it only
downloads a message when you click on it. As a result, you do not have to wait for all of
your new messages to download from the server before you can read them. Third,
attachments are not automatically downloaded with IMAP. As a result, you're able to check
your messages a lot more quickly and have greater control over which attachments are
opened. Finally, IMAP can be used offline just like POP - you can basically enjoy the
benefits of both protocols in one.
As the world becomes more mobile than ever, IMAP is becoming more and more popular.
The proliferation of smartphones, laptops, tablets and other devices is making the demand
for IMAP stronger than ever. While POP will remain popular with people who only access
their email via one or two devices - and those who have slow connections to the Internet -
IMAP is sure to remain the protocol of choice for most of today's busy people.