Gateway This device is primarily used to connect two different networks, and the gateway can communicate with both hosts at the same time. But both sides of the host is not able to communicate directly, it is necessary to go through the gateway to communicate. The work of the gateway is in the application layer.
Simply put, the gateway is to manage different network segments of the IP, we generally do VLAN on the switch, we need to be under the default VLAN interface to do an IP, and this IP is what we call the gateway. Industrial routers It is a network-layer device, typically sending data in packets. In the sub-interface of the router, there is the role of splitting the broadcast domain, so when we use the switch to do the VLAN, it is to make a three-tier router on the route. The IP address that we set on the sub-interface of this router is the gateway. Of course, in today's most commonly used Ethernet, gateways are degraded into routers.