What is a Gateway ?
Gateway – Combination of hardware and software that links two different types of networks. A gateways may also be any device that passes packets from one network to another network across the Internet. For example, many commercial services have e-mail gateways for sending messages to Internet addresses. In a company network, a proxy server acts as a gateways between the internal network and the Internet.
A gateways device provides communication to a remote network or an autonomous system that is out of bounds for the host network nodes. it serve as the entry and exit point of a network; all data routed inward or outward must first pass through and communicate with the gateways in order to use routing paths. Generally, a router is configured to work as a gateways device in computer networks.
Pay2Amigos explains Gateway
Any network has a boundary or a limit, so all communication placed within that network is conducted using the devices attached to it, including switches and routers. If a network node wants to communicate with a node/network that resides outsides of that network or autonomous system, the network will require the services of a gateway, which is familiar with the routing path of other remote networks.
The gateway (or default gateway) is implemented at the boundary of a network to manage all the data communication that is routed internally or externally from that network. Besides routing packets, gateways also possess information about the host network’s internal paths and the learned path of different remote networks. If a network node wants to communicate with a foreign network, it will pass the data packet to the gateway, which then routes it to the destination using the best possible path.