A network gateway is a device, system or logical function that provides a path between different networks or communication environments and, in a broader sense, serves as an entry or exit point through which traffic reaches another network or protocol domain. In ordinary IP networking, a default gateway is typically the router that a host sends packets to when the destination is outside the host's directly connected subnet.
For example, a computer might have an IP address such as 192.168.1.20 and a subnet configuration that identifies 192.168.1.1 as its default gateway. When the computer needs to reach an Internet destination rather than another device on its local subnet, it forwards the packet to the gateway, which then determines where the packet should go next. The gateway is therefore an important boundary between local and remote network communication.
The term gateway has historically had a broader meaning than default gateway. A gateway can connect networks that use different protocols or communication models and may perform translation or adaptation between them. In early and specialised networking, gateways could translate between substantially different protocol suites. In contemporary IP networks, many devices described as gateways are routers, although the terms are not technically identical in every context.
A router primarily forwards packets between networks using network-layer addressing and routing information, whereas a gateway can additionally provide translation, proxying, protocol conversion or other boundary functions. A default gateway on an ordinary Ethernet LAN is usually simply the local router's IP address, but specialised gateways may perform considerably more than packet forwarding.
A host determines whether a destination is local by comparing the destination IP address with its own address and subnet configuration. If the destination belongs to a directly connected subnet, the host normally attempts to resolve the destination's link-layer address and sends the frame directly. If the destination is outside that subnet, the host sends the packet to its configured default gateway.
On IPv4 Ethernet networks, Address Resolution Protocol can be used to discover the gateway's MAC address from its IPv4 address. With IPv6, neighbour discovery performs the corresponding local-link functions, and default routers can be learned through router advertisements. The IP destination remains the ultimate remote destination while the Ethernet destination is the gateway's link-layer address for that immediate hop.
The gateway is central to communication between a local network and the Internet. A typical home arrangement might contain client devices connected to an Ethernet switch or wireless access point, a router providing the local default gateway, and an upstream connection to an Internet service provider. The gateway receives packets from local clients and forwards them towards the ISP. In many home networks, the same appliance also performs network address translation, DHCP, firewalling, wireless access and Ethernet switching.
These combined functions can make the terms router, gateway, firewall and wireless router appear interchangeable to users, even though they describe different functions. A dedicated enterprise gateway may perform only some of these roles, with separate devices providing switching, wireless access, security and other services.
Network gateways also exist in enterprise, cloud and specialised environments. A data-centre network may use gateways between VLANs, subnets or security zones, allowing traffic to move between networks under routing and policy controls. Cloud environments use gateway services for functions such as Internet connectivity, private network connectivity, VPN termination, load-balanced application access and translation, depending on the provider.
Industrial and IoT gateways can collect data from devices using field-specific protocols and translate or aggregate that data before sending it to IP networks or cloud services. In these cases, the gateway may perform significant application or protocol processing rather than simply forwarding IP packets. The common characteristic is its role at a boundary between communication domains.
A gateway can also perform network address translation, commonly called NAT, which changes addressing information as traffic crosses a boundary. In a typical IPv4 home network, private addresses such as those from RFC 1918 address ranges are not globally routable on the public Internet. A gateway can translate multiple internal addresses to a public address and maintain state so that returning traffic is associated with the appropriate internal connection.
NAT is not synonymous with routing and is not inherently a firewall, although consumer gateways frequently combine all three functions. NAT can conserve IPv4 address space and provide a degree of address hiding, but it does not by itself constitute comprehensive security because malicious or unwanted traffic can still be permitted through explicitly established mappings or existing connections.
The phrase default gateway is especially important because a host normally does not need a separate route entry for every remote destination. Instead, the default route tells the operating system where to send packets when no more specific route exists. On IPv4, a default route is conventionally represented as 0.0.0.0/0, while IPv6 uses ::/0. Routing tables can contain more specific routes that override the default route through longest-prefix matching.
If a host has no valid route to a remote network and no usable default gateway, it may be unable to communicate beyond its local subnet even though its local Ethernet or Wi-Fi connection works correctly. Incorrect gateway configuration can therefore produce the common symptom of being connected to a LAN while unable to access remote networks or the Internet.
A network gateway should therefore be understood as a boundary and forwarding or translation point rather than a single mandatory hardware product. The gateway may be physical, virtual, software-defined or delivered as a managed cloud service. Its exact capabilities depend on the environment, but common functions include routing, address translation, protocol conversion, VPN termination, security enforcement, proxying and connectivity between network domains.
It is distinct from bandwidth, latency and network speed because those describe characteristics of communication performance rather than a network boundary device. It is also distinct from a DNS server, which resolves names to addresses, although a gateway may provide DNS forwarding as an additional service. The central role of a gateway is to provide the means by which traffic crosses from one communication domain into another.