A device that interconnects 2 different networks, sometimes with different network protocols. When used to connect networks based on different protocols, a gateway converts a datagram from one protocol stack into the other. When used to connect 2 IP-based networks, a gateway (also called a router) has 2 separate IP addresses, one on each network.