When a network node wants to communicate with a destination IP address that is outside the LAN, it needs to forward the data packet to the appropriate network, where the gateway will play its role.

Gateway

If a destination is outside the LAN, the node sends the packet to a preconfigured gateway address that is inside the LAN. The gateway is typically a router that understands routing table and can make forwarding decisions based on the destination IP address.

Routing table

A routing table is used by network devices, such as router and computers to store information about the available routes to various destinations in a network (LAN or WAN).

The WAN routing table contains entries that specify how to reach specific network destinations, including IP addresses and the next hop interface to use for forwarding packets. The Unix command route can be used to view the routing table.

Back to parent node: Address Resolution Protocol (ARP)

Computer_networksINFO1112IPInternet_layerRoutingNetwork_Gateway