Home >Common Problem >What is a router gateway?

What is a router gateway?

青灯夜游
青灯夜游Original
2020-08-26 17:11:5621207browse

Router gateway refers to the IP of the router, which is essentially the IP address from one network to other networks. The IP address of the gateway is the IP address of a device with routing functions. Devices with routing functions include routers, servers with routing protocols enabled (essentially equivalent to a router), and proxy servers (also equivalent to a router).

What is a router gateway?

Gateway is also called an Internet connector and a protocol converter. The default gateway implements network interconnection above the network layer and is the most complex network interconnection device. It is only used for network interconnection between two high-level protocols with different protocols. The structure of a gateway is similar to that of a router, except for the interconnection layer. Gateways can be used for both WAN interconnection and LAN interconnection.

Note: Due to historical reasons, many literatures about TCP/IP once called the router used in the network layer a gateway. Today, many LANs use routing to access the network. Therefore, the gateway usually refers to the IP of the router!

In OSI, there are two types of gateways: one is a connection-oriented gateway, and the other is a connectionless gateway. When there is a certain distance between two subnets, a gateway is often divided into two halves and connected with a link in the middle. We call it a half gateway.

There are many types of gateways according to different classification standards. The gateway in the TCP/IP protocol is the most commonly used. The "gateway" we talk about here refers to the gateway under the TCP/IP protocol.

So what exactly is a gateway?

A gateway is essentially the IP address from one network to other networks. For example, there are network A and network B. The IP address range of network A is "192.168.1.1~192. 168.1.254" and the subnet mask is 255.255.255.0; the IP address range of network B is "192.168.2.1~192.168. 2.254", the subnet mask is 255.255.255.0.

In the absence of a router, TCP/IP communication is not possible between two networks. Even if the two networks are connected to the same switch (or hub), the TCP/IP protocol will If the results of the "AND" operation between the subnet mask (255.255.255.0) and the host's IP address are different, it determines that the hosts in the two networks are in different networks.

To achieve communication between the two networks, it must pass through the gateway. If the host in network A finds that the destination host of the data packet is not in the local network, it forwards the data packet to its own gateway, which then forwards it to the gateway of network B, and the gateway of network B forwards it to someone in network B. Host (as shown in the attached picture). The process of network A forwarding data packets to network B.

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

So which machine’s IP address is this IP address? The IP address of the gateway is the IP address of the device with routing function. Devices with routing function include router, server with routing protocol enabled (essentially equivalent to a router), proxy server (also equivalent to a router) ).

In the context of interoperating with Novell NetWare networks, the gateway acts as a bridge between the Server Message Block (SMB) protocol used in Windows networks and the NetWare Core Protocol (NCP) used in NetWare networks. Gateways are also known as IP routers.

For more related knowledge, please visit: PHP Chinese website!

The above is the detailed content of What is a router gateway?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn