top of page

What is Gateway?

Oct 5
14 min read

Updated: Oct 28

What is Gateway?

 

A gateway connects networks or systems. In IP networking, it is the router or next-hop address used to reach another network. On a typical home broadband network, the default gateway is the LAN address of your router and is used when no more-specific eligible route takes precedence. In IoT, a gateway can also translate device protocols or represent downstream devices to a remote service. These are related but distinct roles.

 

This guide separates the IP forwarding decision from application translation. A gateway is not automatically DNS, a subnet mask, NAT or the internet connection itself. Understanding the boundary helps a UK home user diagnose a routing problem and an IoT developer identify where messages, identities and acknowledgements change.

 

What does a gateway actually do?

 

A device does not send every packet to the default gateway. Its routing configuration selects a path for the destination. A directly connected route normally delivers to a neighbour on the local link; a route through a router identifies a next hop. A more-specific route or routing policy can change the expected path.

 

With IPv4, a host commonly uses its address and subnet mask to identify the local prefix. With IPv6, on-link prefixes and default routers are learned through mechanisms including Neighbor Discovery. In either case, the core idea is the same: local traffic can be delivered locally; traffic for elsewhere needs an appropriate next hop.

 

Default gateway vs gateway

 

Gateway is the broader term. A default gateway is the router a host normally uses when its routing table has no more specific route for a destination. A network can have many gateways and many specific routes, while still having one preferred default route.

 

On a simple home LAN, the distinction is easy to miss because the broadband router usually performs several jobs at once. It may be the default gateway, DHCP server, DNS forwarder, firewall, WiFi access point and NAT device. Those are separate functions even when one physical box provides all of them.

 

A practical IPv4 gateway example

 

Imagine a laptop with address 192.168.1.42/24 and a default gateway of 192.168.1.1. The /24 prefix - equivalent to subnet mask 255.255.255.0 - places 192.168.1.42 in the 192.168.1.0/24 network. For a deeper explanation of that boundary, see subnet mask.

 

  • Destination 192.168.1.80: local /24 network, so the laptop can deliver directly on the LAN.

  • Destination 192.168.2.80: different /24 network, so the laptop uses a router according to its routing table.

  • Destination 1.1.1.1: not local, so in a normal home setup the default route points the packet to 192.168.1.1.

 

The gateway does not magically know every destination. It receives the packet, examines the destination IP address, consults its own routing table and forwards the packet towards another next hop or directly connected network.

 

Techie Broadband route-decision model

 

A useful way to troubleshoot gateways is to separate the decision into three questions rather than treating ‘the internet is down’ as one problem.

 

  1. Which eligible route is selected for this destination? Check prefix specificity within the relevant table and account for routing policy.

  2. Does that route deliver directly on the link, or use a router? For direct delivery, the neighbour is the destination itself; otherwise it is the selected router next hop.

  3. Is that neighbour reachable through the selected interface? A route can exist while local delivery or neighbour resolution still fails.

 

This model explains why changing the default gateway cannot fix every connectivity problem. If a local neighbour cannot be reached, the fault can sit below the routing decision. If a VPN installs a more-specific route, traffic can bypass the normal home gateway even though the configured default gateway has not changed.

 

How a default route works

 

A routing table is evaluated using the most specific matching route. The default route is the least-specific fallback: it is used only when no more-specific route wins.

 

In IPv4, the default route is written as 0.0.0.0/0. In IPv6, it is ::/0. The /0 means that zero leading destination bits need to match, so every address can match - but any more-specific route should be preferred.

 

Techie Broadband worked routing example

 

The following illustrative routing table makes the decision concrete. It demonstrates longest-prefix matching within one table, assuming all listed routes are eligible. It is an explanatory example, not a measurement of a broadband service or a test of an operating system.

 

The example has a connected route for 192.168.1.0/24, a specific route for 198.51.100.0/24 through 192.168.1.254, and a default route through 192.168.1.1. The remote example prefixes are reserved for documentation under RFC 5737; they are not public reachability targets.

 

Destination

Selected route and next hop

192.168.1.80

192.168.1.0/24: send directly to 192.168.1.80 on the LAN.

198.51.100.9

198.51.100.0/24: send through 192.168.1.254. This specific route wins over the default.

203.0.113.5

0.0.0.0/0: send through 192.168.1.1 because no more-specific supplied route matches.

 

Remove the default route from this example and 198.51.100.9 still has its specific route; the local destination still has its connected route. The unmatched 203.0.113.5 destination has no route. Add an eligible /32 route for 198.51.100.9 and that host route wins over the /24 within this table. A working specific route therefore does not prove that a default route exists.

 

The historical IPv4 router requirements in RFC 1812 describe next-hop selection and longest matching prefixes. In a real host, policy can determine which table is consulted, and route eligibility, preferences and equal-cost handling depend on the implementation. Inspect the actual selected route for the failing destination rather than reading only a default gateway setting.

 

Gateway, router and modem are not the same thing

 

A router forwards packets between IP networks. A gateway describes the next-hop role used to reach another network. A modem or optical network terminal terminates an access technology. Consumer broadband equipment often combines functions, which is why the words are casually mixed together.

 

For FTTP, the ONT normally terminates the optical access connection while the customer router provides the home LAN's routing function. On some services the router may also establish PPPoE or DHCP-based WAN connectivity. The exact access and authentication method depends on the network and retail product.

 

Gateway vs subnet mask

 

The subnet mask or prefix tells an IPv4 host which addresses belong to its local network. The gateway is where off-link traffic is sent. A correct gateway paired with the wrong subnet mask can still break connectivity because the host can make the wrong local-versus-routed decision.

 

Gateway vs DNS

 

DNS translates names such as example.com into IP addresses. A gateway forwards IP packets between networks. If DNS fails, direct connectivity to an IP address may still work. If the gateway path fails, successful DNS resolution does not create a working route.

 

Gateway vs DHCP

 

DHCP can automatically provide an IPv4 client with addressing information including a router option. RFC 2132 defines DHCP option 3 as a list of router IP addresses on the client's subnet. DHCP distributes configuration; the gateway is the next hop that actually forwards traffic.

 

Gateway vs NAT

 

NAT changes address information as traffic crosses a translation boundary. Routing and NAT are different operations. A router can forward between networks without performing NAT, and a home broadband router commonly performs both because private IPv4 addresses need translation when sharing a public IPv4 address.

 

Gateway vs firewall

 

A firewall decides which traffic is permitted by policy. A gateway decides where off-link traffic should go. The same router can provide both functions, but a correct route does not imply the firewall will allow the packet, and a permissive firewall cannot compensate for a missing route.

 

The infographic separates local delivery from routed traffic and shows why the final IP destination differs from the first Ethernet frame destination. It also distinguishes the default-route fallback from DNS name resolution.

 

Gateway infographic comparing local delivery, routed traffic, final IP destination, Ethernet next hop, default routes and DNS

 

How IPv4 devices reach their gateway

 

On an Ethernet or WiFi LAN, an IPv4 host needs the link-layer address associated with its next-hop IPv4 address. It normally uses ARP for that local resolution. The IP packet still contains the final remote destination; the Ethernet frame is addressed to the next hop on the local link.

 

This distinction matters in packet captures. When a laptop sends an IPv4 packet to a remote website, the destination IP remains the website's address, while the local Ethernet destination is normally the router's MAC address.

 

Illustrative header field

Before and after ordinary forwarding without NAT

IPv4 source and destination

Source stays 192.168.1.42; final destination stays 203.0.113.5.

Local Ethernet destination

The first frame uses the gateway LAN MAC, 02:00:00:00:00:01. The outgoing link uses a different next-hop MAC.

IPv4 TTL and header checksum

For an illustrative single forwarding hop, TTL falls from 64 to 63. The IPv4 header checksum must be updated because a header field has changed.

 

This table describes ordinary forwarding between Ethernet links, without NAT or tunnelling. It is not a packet capture. The MAC address is an illustrative locally administered value. Other link types have their own framing, and the router can separately apply firewall rules or address translation.

 

How IPv6 gateways differ

 

IPv6 does not use ARP. IPv6 Neighbor Discovery lets hosts discover routers, prefixes and neighbour link-layer addresses. Router Advertisements can populate a host's default-router list, and the host selects an appropriate default router for off-link traffic.

 

IPv6 therefore preserves the next-hop idea but changes the discovery machinery. It also means that an IPv6 host can have more than one candidate default router and can react when a router becomes unreachable.

 

RFC 5942 clarifies an important IPv6 difference: assigning an address does not automatically establish a matching on-link prefix. On-link determination is separate from address configuration. Router Advertisements can supply relevant prefix information and router lifetimes; do not transfer an IPv4 address-and-mask shortcut blindly to IPv6.

 

An IPv6 default router commonly appears as a link-local next hop such as fe80::1. Record its interface or zone as well as its address, because link-local scope is tied to a link. A neighbour entry, a default-router entry and a global address each describe different state.

 

Can a network have more than one gateway?

 

Yes. Hosts and routers can have multiple routes and multiple possible next hops. Business networks commonly use redundant routers, policy routing or dynamic routing. IPv6 explicitly supports a Default Router List. Even a home device can have several route sources at once when a VPN, virtual machine platform or container network is installed.

 

The existence of several gateways does not mean traffic is duplicated across all of them. Route selection chooses a path according to prefix specificity, metrics, policy and implementation behaviour.

 

What is a gateway metric?

 

Operating systems can attach metrics or preferences to routes. When multiple routes are otherwise suitable, these values help choose which path to prefer. Exact behaviour varies by operating system and route type, so a low metric should be interpreted within the host's routing implementation rather than as a universal internet-quality score.

 

Why the gateway must normally be reachable locally

 

A next-hop router normally needs to be reachable on the interface through which the host intends to send. If a PC is configured with 192.168.50.10/24 but its gateway is entered as 192.168.60.1, that next hop is outside the PC's local /24. Without some special route or implementation-specific handling, the configuration is internally inconsistent.

 

This is one of the fastest checks when a manually configured static address cannot reach anything beyond the LAN: verify the IP address, prefix and gateway as one set rather than inspecting each value in isolation.

 

What happens when the default gateway is wrong?

 

  • Local devices may still work because their traffic never needs the default route.

  • Internet access and other remote networks can fail while the LAN appears healthy.

  • DNS may appear broken simply because the configured DNS server is remote and unreachable.

  • A host may ARP or route in unexpected ways if the prefix is also wrong.

  • A VPN can hide or complicate the symptom by installing its own routes.

 

Gateway behaviour with VPNs

 

A VPN commonly installs routes that direct some or all traffic into a tunnel. In a full-tunnel configuration, the effective path to internet destinations can therefore become the VPN interface and its virtual next hop. Split tunnelling installs more selective routes so only chosen destinations use the tunnel.

 

The physical home router has not disappeared. It can still carry the encrypted tunnel packets towards the VPN server, while the host's logical routing table sends protected traffic into the tunnel first. This is a good example of why ‘my gateway is 192.168.1.1’ does not fully describe the active network path.

 

Gateway behaviour with multiple routers

 

Two consumer routers connected carelessly can create nested networks, double NAT or conflicting DHCP configuration. A client might receive a gateway from the wrong DHCP server, or traffic may cross two routing and firewall boundaries before reaching the broadband connection.

 

When troubleshooting, draw the actual path: client → selected gateway → upstream router → access equipment → ISP. The physical cable layout alone does not reveal which Layer 3 next hop the host selected.

 

Does the gateway affect broadband speed?

 

A gateway can become a performance bottleneck if the router performing that role lacks enough forwarding, NAT, firewall, VPN or queue-management capacity for the broadband service. The word gateway itself does not imply a speed limit.

 

On multi-gigabit broadband, check the complete path: WAN interface rate, router forwarding capability, LAN interface rate, switches, Ethernet adapters and WiFi. A 2.5 Gbps broadband service cannot deliver 2.5 Gbps through a router path that is limited to 1 Gbps.

 

Gateway problems on UK broadband

 

Most UK home broadband users receive a router that automatically provides the LAN gateway through DHCP, so they rarely type a gateway address manually. Problems become more likely with a BYO router, static LAN configuration, multiple routers, VLANs, VPNs, homelabs or manually configured servers.

 

On FTTP, do not assume the ONT is your computer's default gateway simply because internet traffic physically passes through it. In a conventional routed home setup, the LAN client normally uses the customer's router as its local default gateway.

 

How to find your default gateway

 

  1. Open the device's network or routing information rather than relying on the address printed on the router.

  2. Identify the default route for the protocol you are troubleshooting. IPv4 and IPv6 can have different default routes.

  3. Note the interface as well as the next-hop address. This is particularly important with Ethernet, WiFi, VPN and virtual interfaces present together.

  4. Compare the gateway with the device's local address and prefix to confirm the next hop makes sense for that interface.

 

These read-only commands help inspect configuration without changing routes. Microsoft documents ipconfig and route print for current Windows clients and servers; the Linux commands use iproute2. Run them on the affected device. A route lookup describes a selected path, not successful end-to-end delivery.

 

System and read-only command

What to look for

Windows: ipconfig /all

Read the active adapter’s address, subnet mask, default gateway and DNS configuration. Ignore disconnected adapters.

Windows: route print

Inspect IPv4 and IPv6 routing tables, destination prefixes, gateways, interfaces and metrics.

Linux: ip route show default

Show default routes in the main IPv4 routing table. An empty result does not exclude routes in other policy-selected tables.

Linux: ip route get 1.1.1.1

Ask the kernel for its selected IPv4 route to this example destination. It performs a route lookup without sending a probe packet.

Linux: ip -6 route show default

Inspect IPv6 default routes in the main table, including the next-hop address and interface.

 

Gateway troubleshooting workflow

 

  1. Record the device's IPv4 address, prefix or subnet mask, default gateway and DNS settings.

  2. Test a known local address on the same subnet. If local connectivity fails, fix that before blaming the gateway.

  3. Check that the gateway address belongs on the expected local network and is not a typo or stale static setting.

  4. Test reachability to the gateway itself, while remembering that some devices can restrict diagnostic responses.

  5. Inspect the routing table and identify the route that should match the failing destination.

  6. Temporarily account for VPN, virtualisation and container routes that can override the normal path.

  7. Test a remote IP address separately from a hostname to distinguish routing from DNS resolution.

  8. Check router firewall, WAN status and upstream connectivity only after the local next-hop path is understood.

  9. For IPv6, inspect the default router and prefix information separately from IPv4.

  10. If the problem is intermittent, inspect neighbour/ARP state and route changes over time rather than relying on one snapshot.

 

Common gateway misconceptions

 

  • ‘The gateway is always 192.168.1.1.’ No. That is only a common private LAN convention.

  • ‘The gateway is the internet.’ No. It is a next hop towards another network.

  • ‘The gateway and DNS server are the same thing.’ They can share one device address, but the functions are different.

  • ‘All traffic goes through the default gateway.’ Local traffic and traffic matching more-specific routes can bypass it.

  • ‘The router is always the modem.’ Consumer hardware can combine roles, but the networking functions are distinct.

  • ‘A working ping to the gateway proves the internet is working.’ It proves only that a particular local exchange succeeded.

 

Gateway security and trust

 

The gateway is a traffic boundary, so protect the router’s administration interface and maintain supported firmware. A malicious or mistaken DHCP server can distribute the wrong IPv4 router address, while forged IPv6 Router Advertisements can influence default-router selection. On a managed network, DHCP snooping and RA Guard can help when supported and correctly configured; they are separate controls for different protocols.

 

An ordinary IP gateway does not automatically decrypt HTTPS traffic. TLS normally protects application data between its endpoints, although an authorised inspection proxy or a compromised endpoint changes that trust model. An IoT translation gateway may terminate application sessions and handle readable payloads, so its credentials, device permissions and update process need separate protection.

 

What does an IoT gateway translate?

 

An IoT gateway may do more than forward an IP packet. It can receive readings through a field protocol, decode their values, attach device identity and timing information, and publish a new application message. For example, mapping a serial instrument reading into an MQTT payload requires a defined data model; simply connecting the cables does not teach an MQTT broker the instrument’s units or meaning.

 

Gateway responsibility

Boundary to define

IP forwarding

Select an IP next hop. The final destination is still represented in the IP packet, subject to separate operations such as NAT or tunnelling.

Protocol translation

Decode one application or field protocol and create a message in another. Specify units, invalid values, timestamps and error handling.

Identity representation

Decide whether the remote platform sees each downstream device or an aggregate gateway identity.

Delivery and commands

Define queue limits, retries, authorisation, acknowledgement meaning and how a command maps to a permitted device action.

 

Microsoft’s IoT Edge gateway documentation distinguishes transparent connections, protocol translation and identity translation. Those product patterns illustrate why relaying communication and representing a device are separate design choices. Extra translation modules and suitable configuration are needed for downstream protocols the platform cannot consume directly.

 

In a translation design, a successful upstream publish does not prove that the original sensor reading was valid or that a downstream command took effect. Preserve the acquisition time and device identifier, report mapping failures and define the relevant acknowledgement boundary. If data is buffered during an outage, make capacity and expiry visible instead of promising unlimited retention.

 

Authoritative standards behind gateway behaviour

 

For IPv4 DHCP, RFC 2132 defines the router option used to supply router addresses to clients. For IPv6, RFC 4861 defines Neighbor Discovery, router discovery, default-router selection and next-hop determination.

 

Frequently asked questions

 

What is a gateway in networking?

 

A gateway is a device or next-hop address used to reach another network. In a home LAN, the default gateway is normally the local IP address of the broadband router.

 

Is a gateway the same as a router?

 

Not exactly. Router describes a device that forwards packets between IP networks. Gateway describes the role or next hop used to reach another network. A router commonly acts as a gateway.

 

What is a default gateway?

 

A default gateway is the router used when the routing table has no more-specific route for the destination. It is associated with the default route.

 

Does every device need a default gateway?

 

A device only needs a default route if it must reach destinations for which it has no more-specific route. An isolated device that communicates solely with its local network may not require one.

 

Can the default gateway and DNS server have the same IP address?

 

Yes. Home routers often act as both the default gateway and a DNS forwarder, so the same address can appear in both settings. The functions remain different.

 

Why can I reach local devices but not the internet?

 

One possibility is a missing or incorrect default route or unreachable gateway. Other causes include router WAN failure, firewall policy, DNS problems or upstream ISP connectivity, so the gateway should be tested as one stage in the path. Inspect the client's address, prefix and default route, then test the gateway and an external destination using suitable diagnostics. If IP connectivity works but names fail, investigate DNS. A gateway may ignore ping, so use its status interface or another supported check before declaring it unreachable.

 

Does IPv6 have a default gateway?

 

Yes, conceptually. IPv6 hosts maintain default routers and use ::/0 as the default route, but router discovery and neighbour resolution use IPv6 Neighbor Discovery rather than IPv4 ARP.

 

Is an IoT gateway the same as my default gateway?

 

Not necessarily. A default gateway is an IP routing next hop. An IoT gateway may translate protocols or represent downstream devices to an application platform. One appliance can perform both jobs, but they require separate configuration and verification.

 

Key takeaway

 

In IP networking, understand the gateway through route selection and next-hop reachability. Separate those functions from DNS, firewalling and NAT. For an IoT translation gateway, also trace message format, device identity and acknowledgement boundaries. The same box can perform several roles, but each needs its own configuration and evidence.

 

To explore the related technical concepts used in this Gateway guide, visit our broadband terminology guide.

 
 
UK Techie Broadband Providers
bottom of page