What is Packet Forwarding?
The process of packet forwarding simply implies the forwarding of incoming packets to their intended destination.
- Internet is made up of generally two terms- Interconnection and Network. So, it is a connection to a large collection of networks. A packet that is to be forwarded may be associated with the same network as the source host or may belong to a destination host in a different network. Thus, it depends on the destination how much a packet may need to travel before arriving at its destination.
- The router is responsible for the process of packet forwarding. It accepts the packet from the origin host or another router in the packet’s path and places it on the route leading to the target host.
- The routing table is maintained by the router which is used for deciding the packet forwarding.
Packet Forwarding in Router:
Routers are used on the network for forwarding a packet from the local network to the remote network. So, the process of routing involves the packet forwarding from an entry interface out to an exit interface.
The following steps are included in the packet forwarding in the router-
- The router takes the arriving packet from an entry interface and then forwards that packet to another interface.
- The router needs to select the best possible interface for the packet to reach the intended destination as there exist multiple interfaces in the router.
- The forwarding decision is made by the router based on routing table entries. The entries in the routing table comprise destination networks and exit interfaces to which the packet is to be forwarded.
- The selection of exit interface relies on- firstly, the interface must lead to the target network to which the packet is intended to send, and secondly, it must be the best possible path leading to the destination network.
Packet Forwarding Techniques:
Following are the packet forwarding techniques based on the destination host:
- Next-Hop Method: By only maintaining the details of the next hop or next router in the packet’s path, the next-hop approach reduces the size of the routing table. The routing table maintained using this method does not have the information regarding the whole route that the packet must take.
- Network-Specific Method: In this method, the entries are not made for all of the destination hosts in the router’s network. Rather, the entry is made of the destination networks that are connected to the router.
- Host-Specific Method: In this method, the routing table has the entries for all of the destination hosts in the destination network. With the increase in the size of the routing table, the efficiency of the routing table decreases. It finds its application in the process of verification of route and security purposes.
- Default Method: Let’s assume- A host in network N1 is connected to two routers, one of which (router R1) is connected to network N2 and the other router R2 to the rest of the internet. As a result, the routing table only has one default entry for the router R2.