Gateway
A school has a boundary wall and a main gate. Everyone coming in or going out uses that gate, and a guard there decides who may enter. A network has a gate too.
1What a gateway is
2What “different protocols” means
Two devices can only talk if they agree on how to talk: how a message is packed, how it is addressed, and how to say “got it”. That agreed set of rules is called a protocol. Protocols have a chapter of their own later; for now, think of a protocol as a network’s language.
The same message, two different rules
Networks that follow different protocols cannot understand each other’s data directly, however well they are cabled together. Three real examples:
Many smart bulbs talk to each other by Zigbee, a low-power radio protocol. Your phone uses Wi-Fi and the Internet’s protocols. A small hub plugged into the home router is the gateway: it turns “switch on” from the app into a Zigbee message the bulb understands.
An internet calling app sends your voice as VoIP data over the Internet. An old landline follows the telephone network’s rules. A VoIP gateway converts one into the other, so the call can ring an ordinary telephone.
An SMS travels by the mobile network’s rules. Email travels by email protocols. An SMS-to-email gateway rewrites the text message as an email, so it can land in an inbox.
In the lab below, the school network and the network outside are imagined to follow different rules. Violet cubes are data packed the school’s way; cyan balls are data packed the outside network’s way. Watch the gateway convert one into the other.
Pick a case and press Play. Drag sideways to look round the gateway.
3What a gateway does
- Is the one way in and out. Every message between this network and any other network passes through it.
- Joins different kinds of networks. It converts data from one network’s protocol to the other’s.
- Routes data outward. It sends data on towards other networks, much as a router does.
- Usually has a firewall. Because everything passes through it, the gateway is the natural place for a firewall, which stops data the network does not allow.
4Gateway vs router
The two are often confused, and exam papers ask for the difference.
| Router | Gateway | |
|---|---|---|
| Main job | Sends data between networks along the best route | Is the entry and exit point of a network |
| Networks it joins | Different networks that use the same protocol | Networks that use different protocols |
| Converts protocols? | No | Yes |
| Example | School network ↔ Internet (both use Internet protocols) | Zigbee smart bulbs ↔ Wi-Fi phone app |
| Where it is | Anywhere networks meet | At the edge of a network |
5Check yourself
Which device connects two networks that use different protocols?
Smart bulbs talk Zigbee; a phone app talks Wi-Fi. Which device lets the app switch the bulbs on?
Why is a firewall usually placed at the gateway?