What are gateways? Gateway types, principle of operation

The “communication” between computers includes many devices, and one of them is a gateway. What is it? What types are there? What is their principle of action?

What is a gateway?

gateways it
This name has a hardware router, as well as software that is used to connect computer networks. A prerequisite is the ability to use different types of protocols (for example, local or global). A gateway mask is used for recognition. This is a kind of identifier in the global network. It is believed that the gateway is installed if there is a transfer of data useful from the point of view of the user.

What is he like

gateway setting
The gateway converts protocols of one type to another. A good example is when a local computer and a global network connect. Then the network gateway is used. To present a hardware example, I propose to look at something else. A router (router), a very popular and used device, is the same hardware network gateway. They can work with all popular operating systems. The main task performed by the network gateway is converting protocols between different networks. It can receive, process and send packets. Moreover , data transfer can occur both on one protocol and on several.

Gateways are such subjects of technical systems that can be implemented as hardware or software solutions, or connected together (which is most common). But usually they mean applications installed on the router and / or computer. Gateways are devices that must understand all protocols with transmitted data. They should be able to encrypt and decode all received and sent information. Speaking about the disadvantages of gateways, it should be noted that they usually work much slower than conventional routers, switches and network bridges. They can act as a host or endpoint of the Internet. Speaking about the latter, it is necessary to distinguish between hosts and gateways. It is very important. So, the first ones provide web pages to computer users, and the second ones connect different networks. The latter includes a server that controls traffic during data exchange between the company's computers and the Internet. For large volumes, the gateway is usually integrated with a firewall and proxy point. To control the distribution and conversion of packets, it is combined with a router. If we talk about software, then it can be installed on both the server and the computer.

Gateway functions

It establishes data packet transmission routes over various heterogeneous network interfaces. It can also localize all processed traffic. It can be a subnet gateway, or a data channel. There is also a specific function, which has not yet become widespread. Now the conversation is about the voice gateway. It is necessary to transmit audio traffic. Voice gateway is used in phones.

Principle of operation

voice gateway
How is everything going? Gateways are devices that can work on all popular operating systems. We’ll look at the data path of the moment when the user clicked on the “Send” button. First, an explanation is made using machine languages ​​that the computer requires. Then all information is encoded in binary code. It is broken down into data packets. Each of them contains information, of which it is a part and where it is needed. Encryption is in progress. Then the route is determined, and data packets are sent to the recipient. When they arrive at their destination, then the above processes occur in reverse order, except that decryption is performed. That is, this device works as a gateway router. Now let's look at what types of gateways exist.

Default gateway

gateway installed
In protocols, this is the name of the address where all traffic is sent, for which it is impossible to lay a route. For this property it is also called the gateway of last resort. To determine where it is necessary to transfer data, a special routing table is used. If it is not possible to determine the ultimate goal, then they are transferred precisely to it. I found the use of gateways of last resort in networks where central routers are well-defined, in their client segments, and also simply small in size. In the table, it is specified by the following entry: “network 0.0.0.0 with mask 0.0.0.0”. Setting up a gateway for this is not difficult (usually it is configured when installing drivers).

Call gateway

mask gateway
Looking ahead, I’ll inform you that it is not used in IDT. A characteristic feature of this gateway is that it has a WC field. Therefore, it is possible to immediately transmit 2 5 = 32 words to the procedure, which is called through the stack.

Task gateway

Its important advantage is versatility - it can work in all three descriptor tables. But here offset fields are not used, so they can take any value. Also, TSS has been used as a segment here. Setting up a gateway, despite its versatility, is not an easy task.

Gateway interrupt

Applies exclusively to IDT. It can clear the IF interrupt flag when it enters a processing routine. Since the previous value of the register is always stored on the stack, when an exit from a task in progress occurs, it takes its initial position. An important advantage is that this gateway can handle part of the interrupt that occurs in CLI mode.

Gateway traps

subnet gateway
It is also used exclusively in IDT. At the same time he was awarded the title of the simplest gateway. So, when interrupts arrive, he goes to the processing procedure. If necessary, the stack can even be switched. Let's take a closer look at one of the samples presented in the article.

Additional options for using default gateways

In general, what are they, and what role do they play in data transfer? Above, only one possibility was outlined, but it does not give a complete idea of ​​what and how. So, the default gateway allows you to simplify traffic coordination. How? To do this, he sends all the received data to the central routers, which can see a more "voluminous" picture, and accordingly - they have great chances to find a recipient. It is also necessary to consider what the routing table of the workstation is made of. So, it has loops, a local network segment, and the default gateway itself. The role of the latter is to receive all traffic that the first two recipients did not understand. When several devices or pieces of equipment are connected to the same router, then using the default gateway is the only available form of specifying addresses for data. When using multiple connections, this form of data exchange loses its meaning. In this case, it is not necessary to configure the gateway by default.

Why does he have such a name

How did it happen? It should be noted that the application varies depending on the field, although there is no difference in functionality. The term "default gateway" is used on workstations. Its use in these cases is the normal mode of operation of this unit of equipment. The term “gateway of last resort” is used with respect to routers where the occurrence of such a situation is considered not normal, since this device should always know where it is necessary to deliver information packets.

Conclusion

gateway router
Summing up, we can say that the topic of gateways is extremely capacious. If we undertake to describe in detail what and how in relation to them, then even the smallest text will exceed this article in size. But such a detailed level of presentation is still not needed by ordinary users and even those who configure them. This information may be needed only if a person himself wants to develop such a device, but here it is already necessary to write material for a whole book.

Source: https://habr.com/ru/post/K17107/


All Articles