Open In App

What are Gateways in Computer Network?

Last Updated : 20 Mar, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

A gateway is a network node or device that connects two networks that use different transmission protocols. Gateways play an important role in connecting two networks. It works as the entry-exit point for a network because all traffic that passes across the networks must pass through the gateway.

What is Gateway?

A gateway is a connecting point of any network that helps it to connect with different networks. The gateway monitors and controls all the incoming and outgoing traffic of the network. Suppose there are two different networks and they want to communicate with each other, so they need to set up a path between them. Now that path will be made between gateways of those different networks. Gateways are also known as protocol converters because they help to convert protocol supported by traffic of the different networks into that are supported by this network. Because of that, it makes smooth communication between two different networks.

How does Gateway Work?

Gateway has a simple working methodology of five steps:

  • Step 1: It gets data from the network
  • Step 2: It intercepts and analyzes the received data.
  • Step 3: It routes the data to the destination address.
  • Step 4: It converts the received data to make that compatible with the receiver network.
  • Step 5: It sends the final data inside the network.
Introduction of Gateways

Gateway

Actually what happens on the gateway after receiving a data packet is that they check header information that is present in the data packet. After that, it validates the destination IP address and searches for any error. If it gets no error then it makes that data packet compatible for the new network by converting protocols or other stuff.

Functionality of Gateways

There are various functionalities that are supported by any gateway:

  • LAN to WAN connections- It can connect a group of personal computers i.e. LAN(Local Area Network) to the Internet i.e. WAN(Wide Area Network).
  • Controls incoming and outgoing data– It is located on the boundary of any network, so it controls incoming and outgoing data packets from/to any network.
  • Works as a Protocol Converter- It makes sure that the data packet from another network is compatible with this network. So it converts their protocols into supported protocols and other stuff of the data packets before it enters into the network.
  • Information Collector- It collects data from different sections of the network to make a better diagnosis of any data packets. In this process, it collects information.
  • Routing of data packets- It is responsible for routing data packets to different networks because it knows about the routing path of different networks that are in communication with its network.

Different Types of Gateways

Gateways can be classified into multiple categories on different bases like on the basis of the direction of flow of data, functionality, etc…

On the Basis of the Direction of the Flow of Data

  • Unidirectional Gateways: Unidirectional Gateway allows the flow of data in only one direction. It means the changes that occurred in the source can be copied to the destination but the changes that occurred in the destination can’t be copied to the source.
  • Bidirectional Gateways: Bidirectional Gateways allow the flow of data in both directions. It means changes that occurred in the source can be copied to the destination and changes that occurred in the destination can be copied to the source.

Based on Functionality

  • Email Security Gateway: It scans email for any type of malicious content before allowing it to enter the network.
  • Cloud Storage Gateway: It helps in data transfer between the cloud and the nodes of the network. It converts different API requests into that form which can be understandable by cloud platforms.
  • Network Gateway: This is the most popular type of gateway, it acts as an interface between two different networks using different protocols.
  • Internet-To-Orbit Gateway (I2O): Project HERMES and Global Educational Network for Satellite Operations (GENSO) are two well-known I2O gateways that connect devices on the Internet to satellites and spacecraft orbiting the earth.
  • IoT Gateway: Before delivering sensor data to the cloud network, IoT gateways assimilate it from Internet of Things (IoT) devices in the field and translate it between sensor protocols. They link user applications, cloud networks, and IoT devices.
  • VoIP Trunk Gateway: By using a VoIP (voice over Internet Protocol) network, it makes data transmission between POTS (plain old telephone service) devices like landlines and fax machines easier.

Advantages of Gateways

  • It helps in connecting two different networks.
  • It filters and does not allow anything that can harm the network.
  • It helps by doing protocol conversion.
  • It provides security from external attacks.

Disadvantages of Gateways

  • Its implementation is difficult and costly.
  • It is hard to manage.
  • It causes time delay because the conversion of data according to the network takes time.
  • Failure of the gateway can cause the failure of connection with other networks.

Can a Router be a Gateway?

Yes a router can work as a network gateway. A router can govern the path that information takes in and out. This is achieved by using built-in headers and routing tables, which specify where each packet of data should be transmitted. These packets include your emails, transactions, online activities, and other information. In this way, we can consider the Router to be a Gateway.

Difference between Gateways and Router

Gateways

Router

A gateway is a device that is used for communication between networks having different sets of protocols.

Route is a device that receives, analyzes, and forwards the data packets to other networks.

Gateway connects two different networks.

It routes the data packets via the same networks.

Gateway does not support dynamic routing.

Router supports the dynamic routing.

The main function of a gateway is protocol translation.

The main function of a router is routing the traffic from one network to another network.

It is hosted on dedicated applications, physical servers, or virtual applications.

It is hosted on only the dedicated applications.

The gateway is also called a gateway router, proxy server, and voice gateway.

The router is also called a wireless router and an Internet router.

Frequently Asked Questions on Gateways – FAQs

How do two different networks having different protocols communicate with each other?

They can communicate using gateways because it does protocol conversion of the data packet of different network to make that compatible with this network.

Gateways mainly operate on which layer in the OSI model?

Gateways can operates upto layer 5 of the OSI model.

What is a bad gateway error?

A bad gateway error message like 502 Bad Gateway, shows something is not right with a website’s server communication. You can refresh the web browser, open a new browser session, or remove your browser’s cache to fix the error.

What is a default gateway?

We can say a hardware point is a default gateway which provides access to communicate one device network with another devices network for.



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads