Traditional Culture Encyclopedia - Traditional stories - What is a gateway?

What is a gateway?

A gateway is a "gateway" through which one network connects to another.

There are many kinds of gateways according to different classification standards. The gateway in TCP/ IP protocol is the most commonly used, and the "gateway" we say here refers to the gateway under TCP/IP protocol;

Essentially, it is the IP address of a network to other networks.

Without a router, there would be no TCP/IP communication between the two networks. Even if two networks are connected to the same switch (or hub), the TCP/IP protocol will determine that the hosts in the two networks are in different networks according to the subnet mask (255.255.255.0). In order to realize the communication between the two networks, it is necessary to pass through the gateway. If the host in network A finds that the destination host of the packet is not in the local network, it will forward the packet to its own gateway, which will then forward the packet to the gateway in network B, which will then forward the packet to the host in network B (as shown in the attached figure). The same is true in the process of network B forwarding packets to network A. ..

Therefore, only by setting the IP address of the gateway can the TCP/IP protocol realize the communication between different networks.