9

What is the exact difference between router and gateway? In Network configuration we set the default gateway ip address, but in reality we call the device configured with that ip address as router?

9

Router describes the general technical function (layer-3 forwarding) or a hardware device intended for that purpose, while gateway describes the function for the local segment (providing connectivity to elsewhere). You could also state that "you set up a router as gateway". Another term is hop which describes the forwarding in between subnets.

It's just a matter of perspective, the device is the same.

5

What is the exact difference between router and gateway?

A router is a device/service that provides the function of routing IP packets between networks.

A gateway (in network terms) is a router that provides access for IP packets into and/or out of the local network.

In Network configuration we set the gateway ip address, but in reality we call the device configured with that ip address as router?

Specifically, the gateway you are likely referring to is the default gateway which is the router to which a client (or source device) sends IP packets that are destined somewhere other than the local network and for which the client has no "better" route.

A gateway always has to be a router, but a router does not have to be a gateway.

  • Can you please elaborate the statement "A gateway always has to be a router, but a router does not have to be a gateway" in detail ? – Raja Jul 2 '18 at 3:34
  • Because a gateway's purpose is to route packets into/out of a local network segment for other devices, it will always be a router. However a router can be attached to a local network without performing any sort of routing into/out of the local network segment for other devices. It could be using the connection to a local network segment for a number of different purposes (for example, including but not limited to, management purposes such as monitoring, reporting, logging, etc.). – YLearn Jul 2 '18 at 18:43
1

A router is a layer 3 device i.e It cannot modify the IP address of the packet, it can only change the MAC Address it can route the packet, whereas a gateway could be NAT capable, or can act as a firewall in case of a NAT-capable gateway it can change the packet's IP address and more capable gateways can block traffic

  • Layer2 Devices - Switches

  • Layer3 Devices - Routers

  • Layer2- Layer7 Devices - Gateways/Firewalls/IDC (usually implement DPI -deep packet inspection)

Gateways are distinct from routers or switches in that they communicate using more than one protocol and can operate at any layer of the 7 layer OSI model of networking. - Wikipedia

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.