In an intranet, any given subnet might have several routers that connect it to other subnets, both local and remote. You must configure one of the routers as the default gateway for local hosts. This enables the local hosts to transmit with hosts on remote networks.
When a host delivers an IPv4 packet, it uses the subnet mask to determine whether the destination host is on the same network or on a remote network. If the destination host is on the same network, the local host delivers the packet. If the destination host is on a different network, the host transmits the packet to a router for delivery.
When a host on the network uses IPv4 to transmit a packet to a destination subnet, IPv4 consults the internal routing table to determine the appropriate router for the packet to reach the destination subnet. If the routing table does not contain any routing information about the destination subnet, IPv4 forwards the packet to the default gateway. The host assumes that the default gateway contains the required routing information.
In most cases, use a Dynamic Host Configuration Protocol (DHCP) server to assign the default gateway automatically to a DHCP client. This is more straightforward than manually assigning a default gateway on each host.
|A default gateway is a device, usually a router a TCP/IP internet that forwards IP packets to other subnets|