The method that a host uses to send messages to a destination on a remote network differs from the way a host sends messages to a destination on the same local network. When a host needs to send a message to another host located on the same network, it will forward the message directly. A host will use ARP to discover the MAC address of the destination host. It includes the destination IP address within the packet header and encapsulates the packet into a frame containing the MAC address of the destination and forwards it.
When a host needs to send a message to a remote network, it must use the router, also known as the default gateway. The default gateway is the IP address of an interface on a router on the same network as the sending host.
It is important that the address of the default gateway be configured on each host on the local network. If no default gateway address is configured in the host TCP/IP settings, or if the wrong default gateway is specified, messages addressed to hosts on remote networks cannot be delivered.
In the figure, the hosts on the LAN are using R1 as the default gateway with its 192.168.1.1 address configured in their TCP/IP settings. If the destination of a PDU is on a different IP network, the hosts send the PDUs to the default gateway on the router for further transmission.