# Gateway
## What is a Gateway
A gateway is a network device that connects two networks that use different protocols or technologies. Unlike a router, which connects networks using the same protocol suite, a gateway translates between fundamentally different communication protocols, enabling devices that would otherwise be incompatible to communicate with each other. A gateway operates at multiple layers of the OSI model, potentially up to the Application layer, because it may need to translate data formats, protocols, and addressing schemes.
## Types of Gateways
A protocol gateway converts data from one protocol to another. For example, an email gateway converts email messages from one email format or protocol to another, allowing email systems that use different protocols to exchange messages. A network gateway connects networks that use different network layer protocols. For example, a gateway might connect an IPv4 network to an IPv6 network. A media gateway converts voice calls between different network types, such as converting traditional telephone network calls to Voice over IP. A cloud gateway connects an organization's on-premises network to cloud services. An IoT gateway collects data from IoT devices that use various proprietary communication protocols and translates the data into a standard format that can be sent over the internet.
## Default Gateway
In common networking terminology, the term default gateway is used to refer to the router that a device uses to send packets to networks outside its local network. This usage of the term gateway is technically imprecise because the device is actually a router, but the term default gateway is universally understood and used this way in operating system network configuration. The default gateway is the IP address that devices send packets to when they want to communicate with addresses outside their local subnet.
## Gateway vs Router
A router is a specialized type of network device that routes packets between networks using the same protocol, specifically IP. A gateway is a more general term for any device that translates between different types of networks or protocols. Every router can be considered a gateway in the broad sense, but not every gateway is a router. The distinction matters primarily when dealing with legacy systems or specialized devices that use non-standard protocols.Back to Subject