A gateway, also known as an Internet connector or a protocol converter, is a computer system or device that plays the important role of conversion; the gateway implements network interconnection above the network layer and is a complex network interconnection device that only uses For network interconnection with two different high-level protocols; the gateway can be used for both WAN interconnection and LAN interconnection.
#The operating environment of this tutorial: Windows 10 system, Dell G3 computer.
What is a gateway?
Gateway is also called an Internet connector and a protocol converter. The gateway implements network interconnection above the network layer. It is a complex network interconnection device and is only used for network interconnection between two high-level protocols with different protocols. Gateways can be used for both WAN interconnection and LAN interconnection. A gateway is a computer system or device that does the heavy lifting. Used between two systems with different communication protocols, data formats or languages, or even completely different architectures, a gateway is a translator. Unlike bridges that simply convey information, gateways repackage received information to suit the needs of the destination system. Same layer - application layer.
Concept
Gateway
Everyone knows that walking from one room to another must be done Go through a door. Similarly, sending information from one network to another must pass through a "gateway", which is the gateway. As the name suggests, Gateway [1] is the "gateway" that connects one network to another. That is the network level.
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 referred to the routers used in the network layer as gateways. Today, many LANs use routing to access the network, so they usually refer to gateways. It is 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 another. 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 the two networks. Even if the two networks are connected to the same switch (or hub), the TCP/IP protocol will communicate based on the subnet mask (255.255 .255.0) and the IP address of the host. If the results of the AND operation are different, it is determined that the hosts in the two networks are in different networks. To achieve communication between these two networks, it must pass through a 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. This is 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 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).
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.
Example
Suppose your name is Xiao Doian (very small, here you are a url address, pointing to a certain web resource), and you live in a big yard Here, you have many friends in your neighborhood, and your parents are your gateways. When you want to play with a friend in the yard, just shout his name in the yard and he will listen. It will respond to you when it arrives and run out to play with you.
But your parents don't allow you to go out of the door. Any contact you want to have with the outside world must be done by your parents (gateway) by phone. Suppose you want to chat with your classmate Xiao Ming. Xiao Ming’s family lives in another yard far away, and he also has parents at home (Xiao Ming’s gateway). But you don’t know Xiao Ming’s home phone number, but your class teacher has a list of all the students in your class and a phone number comparison table. Your teacher is your DNS server. So you have the following conversation with your parents at home:
Little one: Mom (or dad), I would like to ask the class teacher to check Xiao Ming’s phone number, okay? Parent: OK, you wait. (Then your parents called your class teacher and asked for Xiao Ming’s phone number.) When asked, his home number is 211.99.99.99
Little boy: Great! Mom (or Dad), I want to find Xiao Ming. Please help me contact Xiao Ming.
Parents: No problem. (Then the parents sent a request to the telephone company to connect Xiao Ming’s phone. The last step was of course to be transferred to Xiao Ming’s parents, and then his parents transferred the call to Xiao Ming).
That’s it. You got in touch with Xiao Ming.
If you understand what a gateway is, the default gateway will be easier to understand. Just like a room can have multiple doors, a host can have multiple gateways. The default gateway means that if a host cannot find an available gateway, it will send the data packet to the default designated gateway, and this gateway will process the data packet. Default gateway. The default gateway is generally filled in with 192.168.x.1
For more related knowledge, please visit theFAQcolumn!
The above is the detailed content of What is a gateway. For more information, please follow other related articles on the PHP Chinese website!