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.





– , , ( ). , / . – , . . , , , , . . , . . , -, – . , . . . , , .

. . , . , . . , . .









voice gateway




How is everything going? Gateways are devices that can work on all popular operating systems. Let's 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, as well as just small ones. 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

, , ? , , . , . ? , «» , – . , . , , . – , . , – . . .

? , , . « » . . « » , , , .

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.




All Articles