Jump to content

IP forwarding algorithm

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 24.44.237.148 (talk) at 22:26, 21 May 2010. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The IP Forwarding Algorithm is related to the topic of routing and gives a more directed approach in forwarding datagrams over a network. In order to achieve a successful transfer of data the algorithm uses a routing table to select a next-hop router as the next destination for a datagram. The IP address that is selected is known as the next-hop address.[1]

The IP Forwarding Algorithm states:

Given a destination IP address, D, and network prefix, N:


if (N matches a directly connected network address)

 Deliver datagram to D over that network;

else if (N does not match a network address and routing table contains route for N)

 Send datagram to next-hop address listed in the routing table;

else if (N does not match a network and routing table does not contain route for N and there exists a default route)

 Send datagram to default route;

else

 Send forwarding error message;



  1. ^ Internetworking with TCP/IP: Principles, protocols, and architecture By Douglas Comer