Principle and application of TCP/IP protocol Note 05: Gateway

Source: Internet
Author: User


As we all know, walking from one room to another must pass through a door. Similarly, sending information from one network to another must pass through a "gateway", which is the gateways. As the name implies, the gateway is the "gate" of a network connected to another network.
According to different classification standards, there are many kinds of gateways. The gateway in the TCP/IP protocol is the most common, and here we refer to the "gateway" refers to the TCP/IP protocol gateway.

So what exactly is a gateway? A gateway is essentially an IP address of a network to another network.

For example, network A and network B, network A's IP address range is "192.168.1.1~192." 168.1.254 ", the subnet mask is 255.255.255.0; The IP address range for Network B is "192.168.2.1~192.168.2.254"and the subnet mask is 255.255.255.0. In the absence of a router, TCP/IP communication between the two networks is not possible, even if the two network connections on the same switch (or hub), the TCP/IP protocol will determine the subnet mask (255.255.255.0) on the two network hosts in a different network. To achieve communication between the two networks, you must pass through the gateway. If the host in Network a discovers that the destination host for the packet is not on the local network, forwards the packet to its own gateway, which is then forwarded by the gateway to Network B's gateway, and the gateway of Network B is forwarded to a host of network B (as shown in the accompanying drawings). The process by which network B forwards packets to network A.
So, only set up the IP address of the gateway, the TCP/IP protocol can realize the mutual communication between different networks. So which IP address is the IP address of the machine? The IP address of the gateway is the IP address of the device with routing capabilities, a router with routing capabilities, a server with a routing protocol enabled (essentially a router), and a proxy server (also equivalent to a router).

Principle and application of TCP/IP protocol Note 05: Gateway

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.