A gateway is an internetwork device which joins different network protocols together. It woods on all seven layers of OSI model. Gateways are also known as protocols converters. Gateway can accept a packet formatted for one protocols and convert the formatted packet into another protocols. Similarly a gateway can forward packets across different networks that may also use different protocols frequency. If network a is a token ring network using TCP/ IP and network B is a newel Netware network a gateway can relay frames between the two. This means that a gateway has the ability of translating between frame formats but also different protocols.
Figure gateway operations all layers of OSI model
Task of gateway is very different as it shall take care of different frame sizes data rates formats acknowledgment schemes, priority schemes etc. A network gateway can be implemented in software hardware or as combination of both. Now we will discuss about router in detail .