SlideShare a Scribd company logo
2
Most read
4
Most read
6
Most read
Yarmouk University – Faculty of Information 
Technology and CS Computer Science 
Department 
Network Layer Protocols
Internet Protocol (IPv4) 
• It is a layer 3 protocol 
– Host-to-host network layer 
delivery protocol for the 
internet. 
– It is unreliable and 
connectionless protocol. 
• No error control. 
• No flow control. 
• It has error detection (discard) 
– If reliability is of concern, 
the IP has to be tied to a 
connection-oriented 
protocol (i.e. TCP) 
- In reality, each packet (datagram) is 
handled independently: 
- Each packet can follow different 
rout to destination. 
-Thus, Packets may arrive out 
of order, dropped and/or lost. 
 IP relies on above layers to take care 
of the above issue.
Internet Protocol (IPv4): Header Format 
Layer 3 PDU
Internet Protocol (IPv4): Header Format 
Field Length Description 
Version 4 bit Identifies the version of IP used to generate the datagram 
HLEN 4 bit Specifies the length of the IP header, including the length of any 
options and padding. The normal value of this field when no options 
are used is (20 bytes) value must be multiplied by 4 to give the length in bytes 
Service 
(TOS) 
8 bit Type of Service (TOS): A field designed to carry information to 
provide quality of service features, such as prioritized delivery, for IP 
datagram. 
Total Length (TL) 16 bit Specifies the total length of the IP datagram, in bytes. Since this field 
is 16 bits, the maximum length of an IP datagram is 65,535 bytes 
(2^16 – 1) of which 20-60 byte is the header. 
Identification 16 bit This field is used by the receiver to reassemble messages without 
mixing fragments from different messages. 
Flags 3 bit Control flags to manage fragmentation 
Fragmentation 
offset 
13 bit This field specifies the offset, or position, in the overall message 
where the data in this fragment goes. 
Time to live (TTL) 8 bits Specifies how long the datagram is allowed to “live” on the network, 
in terms of router hops. Each router decrements the value of the TTL 
by one prior to transmitting it. If the TTL =0, the datagram is 
discarded.
Internet Protocol (IPv4): Header Format 
Field Length Description 
Protocol 8 bit Identifies the higher layers protocols (transport or encapsulated 
network layer protocols) carried in the datagram 
Header checksum 16 A checksum computed over the header to provide basic protection 
against corruption in transmission 
Source address 32 bit The 32-bit IP address of the originator of the datagram 
(intermediate device will not change it) 
Destination address 32 bit The 32-bit IP address of the intended recipient of the datagram. 
(intermediate device will not change it) 
options var One or more of several types of options may be included after the 
standard headers in certain IP datagram 
• The header length (HLEN) value must be multiplied by 4 to give the length in bytes 
• Total Length (TL) defines the total datagram length including the data part in bytes. 
• to find the length of the data coming from the upper layer (upper layer PDU) 
Length of data = total length (Tl) – [header length (HLEN)*4]
Internet Protocol (IPv4): Header Format 
8 bit 8 bit 
Transport 
layer 
protocols
Internet Protocol (IPv4): Header Format 
• The datagram has to be less then the defined MTU (L2). Otherwise a fragmentation is a must 
• To make the IP independent of the physical network, the maximum length of the IP 
datagram has to be equal to the MTU (65,535 bytes). Otherwise a fragmentation has to occur 
• at the host if the IP datagram > the host MTU. 
• at the router if the IP datagram > the router MTU. 
•Can we guarantee that the fragmented datagram travel using the same route? 
•NO
Internet Protocol (IPv4): Header Format 
Data has to be always equal to MTU, if less then the MTU, then packet is padded 
with 0’s until it is equal to the MTU.
Network Protocol: ICMP 
• The IP protocol has no error-reporting or error-correcting 
mechanism (unreliable and connectionless 
delivery). 
• The IP protocol also lacks a mechanism for host 
and management queries ( a host need to know if a 
router or another host is alive). 
• The Internet Control Message Protocol (ICMP) 
has been designed to compensate for the above 
two deficiencies. 
– It is a companion to the IP protocol.
Network Protocol: ICMP: Encapsulation 
• ICMP is Layer 3 protocol. 
– It is crafted in the network layer itself. 
• ICMP Packets are encapsulated within the IP 
datagram. 
• The IP datagram is passed directly to Layer 2.
Network Protocol: ICMP: Message Format 
• The Protocol field within the IP header is 1 to indicate it is an ICMP Message. 
• ICMP always reports error messages to the original source.
Network Protocol: ICMP: Error Reporting 
• Error Messages are always sent back to the source, WHY? 
– The only information available in the datagram about the route is the 
source and destination IP. 
Important points about ICMP error messages: 
❏ No ICMP error message will be generated in response to a datagram 
carrying an ICMP error message. 
❏ No ICMP error message will be generated for a fragmented 
datagram that is not the first fragment. 
❏ No ICMP error message will be generated for a datagram having a 
multicast address. 
❏ No ICMP error message will be generated for a datagram having a 
special address such as 127.0.0.0 or 0.0.0.0.
Network Protocol: ICMP: Error Reporting 
• Type 3: when a router cannot route a datagram, or a host cannot deliver a datagram, the 
datagram is discarded and the sender is notified through ICMP message type 3. 
•Type 4: when a router or a host discard a datagram due to congestion in the path from 
source to destination. Thus the sender is notified on the error and quenched to slow down 
the transmission. 
• Type 11: to notify the sender when a router discard a datagram with TTL =0 and/or 
when all fragments did not reach the destination within a certain time window. 
• Type 12: to notify the sender when a router or any host discarded a datagram because 
there is an error/ missing info from any field of the datagram. 
• Type 5: to notify the sender when he sends a datagram to the wrong router. The 
receiving router will forward the datagram to the correct router and notify the host to 
update his routing table.
14 
Network Protocol: ICMP: Types 
Type Code Meaning 
0 0 echo reply 
3 0 network unreachable 
3 1 host is unreachable 
3 3 port is unreachable 
4 0 source quench 
5 0 redirect 
8 0 echo request 
9/10 0 router discovery/advertisement 
11 0 time exceed 
12 0 parameter problem 
13/14 0 time stamp request 
17/18 0 network request/reply
Network Protocol: ICMP: Echo Request/Reply 
• PING sends icmp type 8 echo request to a 
node and expects an icmp type 0 echo reply 
Send 
Reply 
8 
0 
0 
0
Network Protocol: ICMP: Destination unreachable 
• Router is unable to deliver datagram, it can 
return the ICMP type 3 with failure code 
Destination unreachable Reply 
3 
0/1/3 
Sent
Network Protocol: ICMP: Source Quench 
• Router detected hosts were overloaded would send 
this message to hosts to reduce the rate at which 
subsequence message are sent 
Source quench 
4 0 
Sent

More Related Content

PPT
Internet control message protocol
asimnawaz54
 
PPT
Tcp Udp Icmp And The Transport Layer
tmavroidis
 
PPT
Icmp
swarna sudha
 
PPTX
CoAP - Web Protocol for IoT
Aniruddha Chakrabarti
 
PPT
5. icmp
Swati Arora
 
Internet control message protocol
asimnawaz54
 
Tcp Udp Icmp And The Transport Layer
tmavroidis
 
CoAP - Web Protocol for IoT
Aniruddha Chakrabarti
 
5. icmp
Swati Arora
 

What's hot (20)

PPTX
Address resolution protocol (ARP)
NetProtocol Xpert
 
PPTX
UART(universal asynchronous receiver transmitter ) PPT
Sai_praneeth
 
PPTX
ICMP
Ruhollah Arabi
 
PPT
User Datagram protocol For Msc CS
Thanveen
 
PPTX
Tcp header/IP Header/Authentication header
Faizan Shaikh
 
PPTX
EIGRP Overview
NetProtocol Xpert
 
PPT
TDMA, FDMA, CDMA
Keerthana Nambiar
 
PDF
An introduction to MQTT
Alexandre Moreno
 
PPT
User datagram protocol
Mohd Arif
 
PPTX
TCP protocol flow control
anuragjagetiya
 
PPT
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
Jayaprasanna4
 
PPTX
Presentation on arp protocol
Mohd. Ahmad Siddiqi
 
PPTX
Multicast routing
Gunasekara Reddy
 
PPTX
What is Ping
Disha Dudhal
 
PPT
Chapter 20
Faisal Mehmood
 
PPTX
Ports and protocols
siva rama
 
PPTX
TCP vs UDP / Sumiet23
Sumiet Talekar
 
PPTX
User datagram protocol (udp)
Ramola Dhande
 
Address resolution protocol (ARP)
NetProtocol Xpert
 
UART(universal asynchronous receiver transmitter ) PPT
Sai_praneeth
 
User Datagram protocol For Msc CS
Thanveen
 
Tcp header/IP Header/Authentication header
Faizan Shaikh
 
EIGRP Overview
NetProtocol Xpert
 
TDMA, FDMA, CDMA
Keerthana Nambiar
 
An introduction to MQTT
Alexandre Moreno
 
User datagram protocol
Mohd Arif
 
TCP protocol flow control
anuragjagetiya
 
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
Jayaprasanna4
 
Presentation on arp protocol
Mohd. Ahmad Siddiqi
 
Multicast routing
Gunasekara Reddy
 
What is Ping
Disha Dudhal
 
Chapter 20
Faisal Mehmood
 
Ports and protocols
siva rama
 
TCP vs UDP / Sumiet23
Sumiet Talekar
 
User datagram protocol (udp)
Ramola Dhande
 
Ad

Similar to Ip and icmp (20)

PPT
W13L25 Network Laye..r IPv4 and IPv6.ppt
eagledevil137
 
PPT
Transport Layer
tmavroidis
 
PDF
C. N. II Lec.4.pdf h
abdnazar2003
 
PDF
IP Datagram Structure
Hitesh Mohapatra
 
PPT
Internet Protocol
Ghaffar Khan
 
PDF
Unit-2_CN.pdf
MayankRaj687571
 
DOCX
As the packet travels through the TCP.docx
laraibshaheen
 
PDF
TCPIP
sangusajjan
 
PPT
_82da32bf61da4d1d5d36ceb3c9e4d5f2_CS5220-C4-M1-L1.ppt
SandaliJayawardhana
 
PPTX
10 coms 525 tcpip - internet protocol - ip
Palanivel Kuppusamy
 
PPT
Ipspk1
supriya kurlekar
 
PPTX
Internet protocols Report Slides
Bassam Kanber
 
PPT
Network Layer
Ghaffar Khan
 
PDF
Basic ip and networking ver 3 kl
Azhar Ali
 
PPTX
Internet Protocol Version 4
Purushottam Kamble
 
PPTX
Ch 19 Network-layer protocols - section 2
Hossam El-Deen Osama
 
PDF
Network Layer & Transport Layer
Sweta Kumari Barnwal
 
PPTX
REMnux tutorial 4.1 - Datagrams, Fragmentation & Anomalies
Rhydham Joshi
 
PDF
networking IPv4.pdf
omgupta189586
 
PPT
IPV4 Frame Format
Aditya Rawat
 
W13L25 Network Laye..r IPv4 and IPv6.ppt
eagledevil137
 
Transport Layer
tmavroidis
 
C. N. II Lec.4.pdf h
abdnazar2003
 
IP Datagram Structure
Hitesh Mohapatra
 
Internet Protocol
Ghaffar Khan
 
Unit-2_CN.pdf
MayankRaj687571
 
As the packet travels through the TCP.docx
laraibshaheen
 
_82da32bf61da4d1d5d36ceb3c9e4d5f2_CS5220-C4-M1-L1.ppt
SandaliJayawardhana
 
10 coms 525 tcpip - internet protocol - ip
Palanivel Kuppusamy
 
Internet protocols Report Slides
Bassam Kanber
 
Network Layer
Ghaffar Khan
 
Basic ip and networking ver 3 kl
Azhar Ali
 
Internet Protocol Version 4
Purushottam Kamble
 
Ch 19 Network-layer protocols - section 2
Hossam El-Deen Osama
 
Network Layer & Transport Layer
Sweta Kumari Barnwal
 
REMnux tutorial 4.1 - Datagrams, Fragmentation & Anomalies
Rhydham Joshi
 
networking IPv4.pdf
omgupta189586
 
IPV4 Frame Format
Aditya Rawat
 
Ad

More from Programmer (7)

PPTX
Tcp udp
Programmer
 
PDF
Protocols
Programmer
 
DOCX
Phishing
Programmer
 
PPT
Network monotoring
Programmer
 
PDF
Intrusion detection
Programmer
 
PPT
Deployment guide1
Programmer
 
PPT
monotoring Basics2
Programmer
 
Tcp udp
Programmer
 
Protocols
Programmer
 
Phishing
Programmer
 
Network monotoring
Programmer
 
Intrusion detection
Programmer
 
Deployment guide1
Programmer
 
monotoring Basics2
Programmer
 

Recently uploaded (20)

PPTX
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
 
PPTX
CDH. pptx
AneetaSharma15
 
PPTX
Kanban Cards _ Mass Action in Odoo 18.2 - Odoo Slides
Celine George
 
PPTX
A Smarter Way to Think About Choosing a College
Cyndy McDonald
 
PPTX
Care of patients with elImination deviation.pptx
AneetaSharma15
 
PPTX
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
PDF
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
PDF
Health-The-Ultimate-Treasure (1).pdf/8th class science curiosity /samyans edu...
Sandeep Swamy
 
DOCX
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
PPTX
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
PPTX
Artificial Intelligence in Gastroentrology: Advancements and Future Presprec...
AyanHossain
 
PDF
Biological Classification Class 11th NCERT CBSE NEET.pdf
NehaRohtagi1
 
PDF
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
PPTX
How to Apply for a Job From Odoo 18 Website
Celine George
 
PPTX
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
PPTX
An introduction to Prepositions for beginners.pptx
drsiddhantnagine
 
PPTX
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
PPTX
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
PPTX
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
PPTX
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
 
CDH. pptx
AneetaSharma15
 
Kanban Cards _ Mass Action in Odoo 18.2 - Odoo Slides
Celine George
 
A Smarter Way to Think About Choosing a College
Cyndy McDonald
 
Care of patients with elImination deviation.pptx
AneetaSharma15
 
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
Health-The-Ultimate-Treasure (1).pdf/8th class science curiosity /samyans edu...
Sandeep Swamy
 
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
Artificial Intelligence in Gastroentrology: Advancements and Future Presprec...
AyanHossain
 
Biological Classification Class 11th NCERT CBSE NEET.pdf
NehaRohtagi1
 
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
How to Apply for a Job From Odoo 18 Website
Celine George
 
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
An introduction to Prepositions for beginners.pptx
drsiddhantnagine
 
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 

Ip and icmp

  • 1. Yarmouk University – Faculty of Information Technology and CS Computer Science Department Network Layer Protocols
  • 2. Internet Protocol (IPv4) • It is a layer 3 protocol – Host-to-host network layer delivery protocol for the internet. – It is unreliable and connectionless protocol. • No error control. • No flow control. • It has error detection (discard) – If reliability is of concern, the IP has to be tied to a connection-oriented protocol (i.e. TCP) - In reality, each packet (datagram) is handled independently: - Each packet can follow different rout to destination. -Thus, Packets may arrive out of order, dropped and/or lost.  IP relies on above layers to take care of the above issue.
  • 3. Internet Protocol (IPv4): Header Format Layer 3 PDU
  • 4. Internet Protocol (IPv4): Header Format Field Length Description Version 4 bit Identifies the version of IP used to generate the datagram HLEN 4 bit Specifies the length of the IP header, including the length of any options and padding. The normal value of this field when no options are used is (20 bytes) value must be multiplied by 4 to give the length in bytes Service (TOS) 8 bit Type of Service (TOS): A field designed to carry information to provide quality of service features, such as prioritized delivery, for IP datagram. Total Length (TL) 16 bit Specifies the total length of the IP datagram, in bytes. Since this field is 16 bits, the maximum length of an IP datagram is 65,535 bytes (2^16 – 1) of which 20-60 byte is the header. Identification 16 bit This field is used by the receiver to reassemble messages without mixing fragments from different messages. Flags 3 bit Control flags to manage fragmentation Fragmentation offset 13 bit This field specifies the offset, or position, in the overall message where the data in this fragment goes. Time to live (TTL) 8 bits Specifies how long the datagram is allowed to “live” on the network, in terms of router hops. Each router decrements the value of the TTL by one prior to transmitting it. If the TTL =0, the datagram is discarded.
  • 5. Internet Protocol (IPv4): Header Format Field Length Description Protocol 8 bit Identifies the higher layers protocols (transport or encapsulated network layer protocols) carried in the datagram Header checksum 16 A checksum computed over the header to provide basic protection against corruption in transmission Source address 32 bit The 32-bit IP address of the originator of the datagram (intermediate device will not change it) Destination address 32 bit The 32-bit IP address of the intended recipient of the datagram. (intermediate device will not change it) options var One or more of several types of options may be included after the standard headers in certain IP datagram • The header length (HLEN) value must be multiplied by 4 to give the length in bytes • Total Length (TL) defines the total datagram length including the data part in bytes. • to find the length of the data coming from the upper layer (upper layer PDU) Length of data = total length (Tl) – [header length (HLEN)*4]
  • 6. Internet Protocol (IPv4): Header Format 8 bit 8 bit Transport layer protocols
  • 7. Internet Protocol (IPv4): Header Format • The datagram has to be less then the defined MTU (L2). Otherwise a fragmentation is a must • To make the IP independent of the physical network, the maximum length of the IP datagram has to be equal to the MTU (65,535 bytes). Otherwise a fragmentation has to occur • at the host if the IP datagram > the host MTU. • at the router if the IP datagram > the router MTU. •Can we guarantee that the fragmented datagram travel using the same route? •NO
  • 8. Internet Protocol (IPv4): Header Format Data has to be always equal to MTU, if less then the MTU, then packet is padded with 0’s until it is equal to the MTU.
  • 9. Network Protocol: ICMP • The IP protocol has no error-reporting or error-correcting mechanism (unreliable and connectionless delivery). • The IP protocol also lacks a mechanism for host and management queries ( a host need to know if a router or another host is alive). • The Internet Control Message Protocol (ICMP) has been designed to compensate for the above two deficiencies. – It is a companion to the IP protocol.
  • 10. Network Protocol: ICMP: Encapsulation • ICMP is Layer 3 protocol. – It is crafted in the network layer itself. • ICMP Packets are encapsulated within the IP datagram. • The IP datagram is passed directly to Layer 2.
  • 11. Network Protocol: ICMP: Message Format • The Protocol field within the IP header is 1 to indicate it is an ICMP Message. • ICMP always reports error messages to the original source.
  • 12. Network Protocol: ICMP: Error Reporting • Error Messages are always sent back to the source, WHY? – The only information available in the datagram about the route is the source and destination IP. Important points about ICMP error messages: ❏ No ICMP error message will be generated in response to a datagram carrying an ICMP error message. ❏ No ICMP error message will be generated for a fragmented datagram that is not the first fragment. ❏ No ICMP error message will be generated for a datagram having a multicast address. ❏ No ICMP error message will be generated for a datagram having a special address such as 127.0.0.0 or 0.0.0.0.
  • 13. Network Protocol: ICMP: Error Reporting • Type 3: when a router cannot route a datagram, or a host cannot deliver a datagram, the datagram is discarded and the sender is notified through ICMP message type 3. •Type 4: when a router or a host discard a datagram due to congestion in the path from source to destination. Thus the sender is notified on the error and quenched to slow down the transmission. • Type 11: to notify the sender when a router discard a datagram with TTL =0 and/or when all fragments did not reach the destination within a certain time window. • Type 12: to notify the sender when a router or any host discarded a datagram because there is an error/ missing info from any field of the datagram. • Type 5: to notify the sender when he sends a datagram to the wrong router. The receiving router will forward the datagram to the correct router and notify the host to update his routing table.
  • 14. 14 Network Protocol: ICMP: Types Type Code Meaning 0 0 echo reply 3 0 network unreachable 3 1 host is unreachable 3 3 port is unreachable 4 0 source quench 5 0 redirect 8 0 echo request 9/10 0 router discovery/advertisement 11 0 time exceed 12 0 parameter problem 13/14 0 time stamp request 17/18 0 network request/reply
  • 15. Network Protocol: ICMP: Echo Request/Reply • PING sends icmp type 8 echo request to a node and expects an icmp type 0 echo reply Send Reply 8 0 0 0
  • 16. Network Protocol: ICMP: Destination unreachable • Router is unable to deliver datagram, it can return the ICMP type 3 with failure code Destination unreachable Reply 3 0/1/3 Sent
  • 17. Network Protocol: ICMP: Source Quench • Router detected hosts were overloaded would send this message to hosts to reduce the rate at which subsequence message are sent Source quench 4 0 Sent