SlideShare a Scribd company logo
UNIT-III
FORWARDING IP DATAGRAMS AND ICMP
Internet Protocol:
Forwarding IP Datagrams
Forwarding in an internet
• Routing was used with packet switching systems
• Forwarding refer to the process of choosing the path for a packet.
• Router performs forwarding.
• switched Ethernet-the switches are responsible for forwarding
Ethernet frames among computers.
• The major differences are that in place of frames the Internet accepts
and delivers IP datagrams, and in place of Ethernet addresses, the
Internet uses IP addresses. Therefore, throughout the chapter, we will
restrict the discussion to IP forwarding.
• The information IP software uses to make forwarding decisions is
known as a Forwarding Information Base(FIB).
• Each router has direct connections to two or more networks.
• Both hosts and routers participate in forwarding an IP datagram to its
destination.
• In the figure, two routers connect to the same network as the host.
Some internet destinations lie beyond router R1 and other
destinations lie beyond R2. The host must decide which router to use
for a given datagram.
• A router performs transit forwarding, which means the router will
accept incoming datagrams from any of the networks to which the
router attaches, and will forward each datagram on toward its
destination.
Direct and Indirect delivery
• forwarding into two forms:
• direct delivery
• indirect delivery.
• Direct delivery-the transmission of a datagram from one machine
across a single physical network directly to another(both connected
directly).
• Indirect delivery occurs when the destination of a datagram is not on
a directly attached network.
Transmission across a single network
• Transmission of an IP datagram between two machines on a single
physical network does not involve routers.
• The sender encapsulates the datagram in a physical frame, binds the
next-hop address to a physical hardware address, and sends the
resulting frame directly to the destination.
• To determine if a destination lies on one of the directly connected
networks, IP software extracts the network portion of the destination
IP address and compares the network ID to the network ID of its own
IP address(es).
Indirect delivery
• Indirect delivery is more difficult than direct delivery because the
sending machine must identify an initial router to handle the
datagram.
• The router must then forward the datagram on toward the
destination network.
• Routers in a TCP/IP internet form a cooperative, interconnected
structure. Datagrams pass from router to router until they reach a
router that can deliver the datagram directly.
• Finally,
• A host only knows about directly-connected networks; a host relies on routers
to transfer datagrams to remote destinations.
• Each router knows how to reach all possible destinations in the internet;
given a datagram, a router can forward it correctly.
Table driven IP forwarding
• IP performs datagram forwarding. The IP forwarding algorithm
employs a data structure that stores information about possible
destinations and how to reach them.
• The data structure is known formally as an Internet Protocol
forwarding table or IP forwarding table, and informally as simply a
forwarding table.
• Both hosts and routers have a forwarding table.
• If every forwarding table contained information about every possible
destination in an internet, it would be impossible to keep the tables
current.
• Because it allows forwarding to be based on network prefixes, the IP
addressing scheme controls the size of forwarding tables.
Next-Hop forwarding
• A forwarding table contains a set of pairs (N, R), where N is the
network prefix for a network in the internet and R is the IP address of
the “next” router along the path to network N.
• Router R is called the next hop, and the idea of using a forwarding
table to store a next hop for each destination is called next-hop
forwarding.
• the network portion of a destination IP address instead of the
complete address keeps forwarding tables small. It helps hide
information, keeping the details of specific hosts.
NP - Unit 3 - Forwarding Datagram and ICMP
Default Routes And A Host Example
• If no entry in the table matches the destination address, the
forwarding software takes a second step of checking for a default
route.
• We say that the next hop specified in a default route is a default
router.
• A default route can be incorporated into a forwarding table.
• A default route is especially useful when many destinations lie
beyond a single router.
• Default routing works especially well for typical host computers that
obtain service from an ISP.
NP - Unit 3 - Forwarding Datagram and ICMP
Host-Specific Routes
• Most IP forwarding software allows a host-specific route to be
specified as a special case.
• Having host-specific routes gives a network administrator more
control.
• The ability to specify a route for individual machines turns out to have
several possible uses:
• Control over network use
• Testing a new network.
• Security
The IP Forwarding Algorithm
Longest-Prefix Match Paradigm
• longest-prefix match - to describe the idea of examining the most
specific routes first.
NP - Unit 3 - Forwarding Datagram and ICMP
Forwarding Tables And IP Addresses
• It is important to understand that except
for decrementing the hop limit (TTL in
IPv4) and recomputing the checksum,
IP forwarding does not alter the
original datagram.
• In the algorithm, the IP address selected by the IP forwarding
algorithm is called a next-hop address because it tells where the
datagram must be sent next.
Handling Incoming Datagrams
• host software
• router software
• four reasons why a host should refrain from performing any
forwarding.
• Forwarding In The Presence Of Broadcast And Multicast
• Software Routers And Sequential Lookup
• Establishing Forwarding Tables
Internet Protocol: Error And
Control Messages (ICMP)
Introduction
• Connectionless system.
• When a datagram arrives, a router forwards or delivers the datagram
and then goes on to the next datagram; the router does not
coordinate with the original sender of a datagram.
• Failures of network and processor hardware, IP cannot deliver a
datagram if the destination machine is temporarily or permanently
disconnected from the network, if the hop limit expires before a
datagram reaches its destination, or if an intermediate router
becomes so overloaded that it must discard a datagram.
ICMP - Internet Control Message Protocol
• allows routers to send error or control messages back to the source of a
datagram that caused a problem.
• ICMP is primarily intended to inform a source when a datagram sent by the
source experiences problems.
• ICMP messages are not usually delivered to applications.
• ICMP messages are sent to Internet Protocol software on the source
computer. That is, when an ICMP error message arrives on a computer, the
ICMP software module on the computer handles the message.
• The chief advantage of allowing hosts to use ICMP is that it provides a
single mechanism used for all control and information messages.
Error Reporting Vs. Error Correction
• ICMP is an error reporting mechanism
• It provides a way for routers that encounter an error to report the
error to the original source, but ICMP does not interact with the host
nor does ICMP attempt to correct the error.
• When a datagram causes an error, ICMP can only report the error
condition back to the original source of the datagram; the source
must relate the error to an individual application program or take
other action to correct the problem.
ICMP Message Delivery
• Because each ICMP message travels in an IP datagram, two levels of
encapsulation are required.
• IPv4 uses the PROTOCOL field in the datagram header as a type field.
• When an ICMP message is carried in the payload area of an IPv4 datagram,
the PROTOCOL field is set to 1.
• IPv6 uses the NEXT HEADER field to specify the type of the item being
carried.
• When an ICMP message is carried in the payload area of an IPv6 datagram,
the NEXT HEADER field of the header that is previous to the ICMP message
contains 58.
ICMP Message Format
• Conceptual Layering
• TYPE
• CODE
• CHECKSUM
Example ICMP Message Types Used With IPv4
Example ICMPv6 message types and the
meaning of each.
Testing Destination Reachability And Status
(Ping)
• Ping sends an ICMP Echo Request message to a remote computer.
• Any computer that receives an ICMP Echo Request creates an ICMP
Echo Reply and returns the reply to the original sender.
Echo Request And Reply Message Format:
• IPv4 : TYPE 8 – request, 0-reply
• IPv6: TYPE request -128 reply-129
Checksum Computation And The IPv6
Pseudo-Header
Reports Of Unreachable Destinations
• Whenever an error prevents a router from forwarding or delivering a
datagram, the router sends an ICMP destination unreachable
message back to the source and then drops(i.e., discards) the
datagram.
• Both IPv4 and IPv6 use the same format for destination unreachable
messages.
The CODE values for an ICMP destination
unreachable message
ICMP Error Reports Regarding Fragmentation
Route Change Requests From Routers
• Routers are assumed to know correct routes; hosts begin with
minimal routing information and learn new routes from routers
Detecting Circular Or Excessively Long Routes
• ICMP time exceeded message
Reporting Other Problems
• parameter problem message
Older ICMP Messages Used At Startup
• ICMPv6 Router Discovery message

More Related Content

PPTX
NP - Unit 4 - Routing - RIP, OSPF and Internet Multicasting
PPTX
NP - Unit 5 - Bootstrap, Autoconfigurion and BGP
PPTX
PPTX
98 366 mva slides lesson 5
PPTX
PPT
Cs553 st7 ch18-internet_protocols
PPTX
PPTX
98 366 mva slides lesson 6
NP - Unit 4 - Routing - RIP, OSPF and Internet Multicasting
NP - Unit 5 - Bootstrap, Autoconfigurion and BGP
98 366 mva slides lesson 5
Cs553 st7 ch18-internet_protocols
98 366 mva slides lesson 6

What's hot (20)

PPTX
PPT
Network protocol
PPTX
TCP/IP Protocols
PPTX
98 366 mva slides lesson 7
PPT
Chapter07
PPTX
PPTX
PPT
PPT
TCP/IP(networking)
PPT
02 protocols and tcp-ip
PPT
presentation on TCP/IP protocols data comunications
PPT
Chapter05
DOC
Firewall
PDF
IP Routing
PDF
Module 1 slides
PPTX
02 coms 525 tcpip - introduction to tcpip
PPTX
98 366 mva slides lesson 8
PPT
TCP/IP Basics
PPT
PDF
Tcp ip-ppt
Network protocol
TCP/IP Protocols
98 366 mva slides lesson 7
Chapter07
TCP/IP(networking)
02 protocols and tcp-ip
presentation on TCP/IP protocols data comunications
Chapter05
Firewall
IP Routing
Module 1 slides
02 coms 525 tcpip - introduction to tcpip
98 366 mva slides lesson 8
TCP/IP Basics
Tcp ip-ppt
Ad

Similar to NP - Unit 3 - Forwarding Datagram and ICMP (20)

PPTX
Transport Layer, Network layer.pptx
PPTX
Internet Protocols
PPTX
Address Mapping includes ARP, RARP, ICMP
PPTX
icmp_error_reporting_icmp_protocols.pptx
PPT
IPV4 addressing and it applications and IPV6
PPT
TCPIP SLIDES.ppt
PPTX
Computer network coe351- part3-final
PPT
Nnnnnn
PPTX
Final Presentation on the Network layer
PPTX
TCP/IP and UDP protocols
PPT
ICMP.ppt
PPTX
data communication protocol
PPTX
474-22-DatagramForwarding.pptx
PPTX
Transport layer protocol
PDF
Internet Protocol.pdf
PDF
Chapter 4 internetworking [compatibility mode]
PPTX
IP HEADER_CLASSFUL Addressing and Classless addressing
PPT
Tcp ip
PPTX
IT307 Exploring the Networks.pptx
PPTX
Presentation on network_protocols
Transport Layer, Network layer.pptx
Internet Protocols
Address Mapping includes ARP, RARP, ICMP
icmp_error_reporting_icmp_protocols.pptx
IPV4 addressing and it applications and IPV6
TCPIP SLIDES.ppt
Computer network coe351- part3-final
Nnnnnn
Final Presentation on the Network layer
TCP/IP and UDP protocols
ICMP.ppt
data communication protocol
474-22-DatagramForwarding.pptx
Transport layer protocol
Internet Protocol.pdf
Chapter 4 internetworking [compatibility mode]
IP HEADER_CLASSFUL Addressing and Classless addressing
Tcp ip
IT307 Exploring the Networks.pptx
Presentation on network_protocols
Ad

More from hamsa nandhini (16)

PPTX
SOA - Unit 5 - SOA and Business Process Management
PPTX
SOA - Unit 4 - SOA & Web Services for integration and Multi-Channel access
PPTX
SOA - Unit 3 - SOA and Web Services
PPTX
SOA - Unit 2 - Service Oriented Architecture
PPTX
SOA - Unit 1 - Introduction to SOA with Web Services
PPTX
NP - Unit 2 - Internet Addressing, ARP and RARP
PPTX
Web application, cookies and sessions
PPTX
PHP with MySQL
PPTX
Database design and error handling
PPTX
Introduction to MySQL in PHP
PPTX
Basics of PHP
PPTX
XML Security
PPTX
SOAP and Web services
PPTX
XML Technologies
PPTX
XML DTD and Schema
PPTX
fundamentals of XML
SOA - Unit 5 - SOA and Business Process Management
SOA - Unit 4 - SOA & Web Services for integration and Multi-Channel access
SOA - Unit 3 - SOA and Web Services
SOA - Unit 2 - Service Oriented Architecture
SOA - Unit 1 - Introduction to SOA with Web Services
NP - Unit 2 - Internet Addressing, ARP and RARP
Web application, cookies and sessions
PHP with MySQL
Database design and error handling
Introduction to MySQL in PHP
Basics of PHP
XML Security
SOAP and Web services
XML Technologies
XML DTD and Schema
fundamentals of XML

Recently uploaded (20)

DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPT
Project quality management in manufacturing
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Construction Project Organization Group 2.pptx
PPTX
Welding lecture in detail for understanding
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Operating System & Kernel Study Guide-1 - converted.pdf
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Internet of Things (IOT) - A guide to understanding
UNIT 4 Total Quality Management .pptx
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Project quality management in manufacturing
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
Embodied AI: Ushering in the Next Era of Intelligent Systems
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Foundation to blockchain - A guide to Blockchain Tech
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
OOP with Java - Java Introduction (Basics)
Construction Project Organization Group 2.pptx
Welding lecture in detail for understanding
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...

NP - Unit 3 - Forwarding Datagram and ICMP

  • 3. Forwarding in an internet • Routing was used with packet switching systems • Forwarding refer to the process of choosing the path for a packet. • Router performs forwarding. • switched Ethernet-the switches are responsible for forwarding Ethernet frames among computers. • The major differences are that in place of frames the Internet accepts and delivers IP datagrams, and in place of Ethernet addresses, the Internet uses IP addresses. Therefore, throughout the chapter, we will restrict the discussion to IP forwarding. • The information IP software uses to make forwarding decisions is known as a Forwarding Information Base(FIB).
  • 4. • Each router has direct connections to two or more networks. • Both hosts and routers participate in forwarding an IP datagram to its destination. • In the figure, two routers connect to the same network as the host. Some internet destinations lie beyond router R1 and other destinations lie beyond R2. The host must decide which router to use for a given datagram. • A router performs transit forwarding, which means the router will accept incoming datagrams from any of the networks to which the router attaches, and will forward each datagram on toward its destination.
  • 5. Direct and Indirect delivery • forwarding into two forms: • direct delivery • indirect delivery. • Direct delivery-the transmission of a datagram from one machine across a single physical network directly to another(both connected directly). • Indirect delivery occurs when the destination of a datagram is not on a directly attached network.
  • 6. Transmission across a single network • Transmission of an IP datagram between two machines on a single physical network does not involve routers. • The sender encapsulates the datagram in a physical frame, binds the next-hop address to a physical hardware address, and sends the resulting frame directly to the destination. • To determine if a destination lies on one of the directly connected networks, IP software extracts the network portion of the destination IP address and compares the network ID to the network ID of its own IP address(es).
  • 7. Indirect delivery • Indirect delivery is more difficult than direct delivery because the sending machine must identify an initial router to handle the datagram. • The router must then forward the datagram on toward the destination network. • Routers in a TCP/IP internet form a cooperative, interconnected structure. Datagrams pass from router to router until they reach a router that can deliver the datagram directly. • Finally, • A host only knows about directly-connected networks; a host relies on routers to transfer datagrams to remote destinations. • Each router knows how to reach all possible destinations in the internet; given a datagram, a router can forward it correctly.
  • 8. Table driven IP forwarding • IP performs datagram forwarding. The IP forwarding algorithm employs a data structure that stores information about possible destinations and how to reach them. • The data structure is known formally as an Internet Protocol forwarding table or IP forwarding table, and informally as simply a forwarding table. • Both hosts and routers have a forwarding table. • If every forwarding table contained information about every possible destination in an internet, it would be impossible to keep the tables current. • Because it allows forwarding to be based on network prefixes, the IP addressing scheme controls the size of forwarding tables.
  • 9. Next-Hop forwarding • A forwarding table contains a set of pairs (N, R), where N is the network prefix for a network in the internet and R is the IP address of the “next” router along the path to network N. • Router R is called the next hop, and the idea of using a forwarding table to store a next hop for each destination is called next-hop forwarding. • the network portion of a destination IP address instead of the complete address keeps forwarding tables small. It helps hide information, keeping the details of specific hosts.
  • 11. Default Routes And A Host Example • If no entry in the table matches the destination address, the forwarding software takes a second step of checking for a default route. • We say that the next hop specified in a default route is a default router. • A default route can be incorporated into a forwarding table. • A default route is especially useful when many destinations lie beyond a single router. • Default routing works especially well for typical host computers that obtain service from an ISP.
  • 13. Host-Specific Routes • Most IP forwarding software allows a host-specific route to be specified as a special case. • Having host-specific routes gives a network administrator more control. • The ability to specify a route for individual machines turns out to have several possible uses: • Control over network use • Testing a new network. • Security
  • 14. The IP Forwarding Algorithm
  • 15. Longest-Prefix Match Paradigm • longest-prefix match - to describe the idea of examining the most specific routes first.
  • 17. Forwarding Tables And IP Addresses • It is important to understand that except for decrementing the hop limit (TTL in IPv4) and recomputing the checksum, IP forwarding does not alter the original datagram. • In the algorithm, the IP address selected by the IP forwarding algorithm is called a next-hop address because it tells where the datagram must be sent next.
  • 18. Handling Incoming Datagrams • host software • router software • four reasons why a host should refrain from performing any forwarding.
  • 19. • Forwarding In The Presence Of Broadcast And Multicast • Software Routers And Sequential Lookup • Establishing Forwarding Tables
  • 20. Internet Protocol: Error And Control Messages (ICMP)
  • 21. Introduction • Connectionless system. • When a datagram arrives, a router forwards or delivers the datagram and then goes on to the next datagram; the router does not coordinate with the original sender of a datagram. • Failures of network and processor hardware, IP cannot deliver a datagram if the destination machine is temporarily or permanently disconnected from the network, if the hop limit expires before a datagram reaches its destination, or if an intermediate router becomes so overloaded that it must discard a datagram.
  • 22. ICMP - Internet Control Message Protocol • allows routers to send error or control messages back to the source of a datagram that caused a problem. • ICMP is primarily intended to inform a source when a datagram sent by the source experiences problems. • ICMP messages are not usually delivered to applications. • ICMP messages are sent to Internet Protocol software on the source computer. That is, when an ICMP error message arrives on a computer, the ICMP software module on the computer handles the message. • The chief advantage of allowing hosts to use ICMP is that it provides a single mechanism used for all control and information messages.
  • 23. Error Reporting Vs. Error Correction • ICMP is an error reporting mechanism • It provides a way for routers that encounter an error to report the error to the original source, but ICMP does not interact with the host nor does ICMP attempt to correct the error. • When a datagram causes an error, ICMP can only report the error condition back to the original source of the datagram; the source must relate the error to an individual application program or take other action to correct the problem.
  • 24. ICMP Message Delivery • Because each ICMP message travels in an IP datagram, two levels of encapsulation are required. • IPv4 uses the PROTOCOL field in the datagram header as a type field. • When an ICMP message is carried in the payload area of an IPv4 datagram, the PROTOCOL field is set to 1. • IPv6 uses the NEXT HEADER field to specify the type of the item being carried. • When an ICMP message is carried in the payload area of an IPv6 datagram, the NEXT HEADER field of the header that is previous to the ICMP message contains 58.
  • 25. ICMP Message Format • Conceptual Layering • TYPE • CODE • CHECKSUM
  • 26. Example ICMP Message Types Used With IPv4
  • 27. Example ICMPv6 message types and the meaning of each.
  • 28. Testing Destination Reachability And Status (Ping) • Ping sends an ICMP Echo Request message to a remote computer. • Any computer that receives an ICMP Echo Request creates an ICMP Echo Reply and returns the reply to the original sender. Echo Request And Reply Message Format: • IPv4 : TYPE 8 – request, 0-reply • IPv6: TYPE request -128 reply-129
  • 29. Checksum Computation And The IPv6 Pseudo-Header
  • 30. Reports Of Unreachable Destinations • Whenever an error prevents a router from forwarding or delivering a datagram, the router sends an ICMP destination unreachable message back to the source and then drops(i.e., discards) the datagram. • Both IPv4 and IPv6 use the same format for destination unreachable messages.
  • 31. The CODE values for an ICMP destination unreachable message
  • 32. ICMP Error Reports Regarding Fragmentation
  • 33. Route Change Requests From Routers • Routers are assumed to know correct routes; hosts begin with minimal routing information and learn new routes from routers
  • 34. Detecting Circular Or Excessively Long Routes • ICMP time exceeded message
  • 35. Reporting Other Problems • parameter problem message
  • 36. Older ICMP Messages Used At Startup • ICMPv6 Router Discovery message