What is a Router, Switch And Gateway in Networking ?

In the last post , we have seen Hubs, Bridges and Repeaters in detail. Now in this post, we will explore the other important networking devices i.e Routers, Switch, and Gateway used in data transmission. So let’s dig deep in each of these now .

What Is a Router ?

The router is basically an interconnecting device that connects two or more computer networks. It makes use of an internet protocol (IP) and assumes that all of the attached devices on the networks use the same communication architecture and protocols.

A router operates at OSI layer 3 . The router has access to network layer address and contain software that enables them to determine which of the several paths between those addresses is the best for a particular transmission.

A router generally connects LANs and WANs on the Internet and has a routing table that is used for making decisions about the route. The routing tables are normally dynamic and the tables further updated using routing protocols.

Routers relay packets among multiple interconnected networks. They route packets from one network to any number of potential destination networks on the internet.

What is a Router, Switch And Gateway in Networking ?

Physically, routers resembles bridges. Each router is a special purpose computer dedicated to the task of interconnected networks. Like a bridge, a router has a conventional processor and memory as well as a separate input/output interface for each network to which it connects.

A router automatically discovers the address of devices connected to each router in an internetwork. They use an interior routing protocol and connect from their internetworks to the outside networks using an exterior routing protocol.

These protocol includes RIP , OSPF , Border Gateway Protocol (BGP) etc. At present Cisco holds the largest share (over half) of the router market.

Routers uses logical and physical addressing to connect two or more logically separate networks. Data is generally grouped into packets, or blocks of data. Each packet has a physical device address and also a logical network address.

 

Data is mainly grouped into packets or blocks of data. Each packet has a physical device address as well as a logical network address.

What Is Switch in Networking ?

A switch is a device that provides bridging functionality with greater efficiency. A switch mainly acts as a multiport bridge to connect devices or segments in a LAN.

The switch has a buffer (refer figure below) for each link to which it is connected. When it receives any packet, it stores the packet in the buffer of the receiving link and checks for the address to find the outgoing link.

Switches are of two types : 1. Store and forward switch  and 2. Cut  through switch

A store and forward switch stores the frame in the input buffer until the complete packet has arrived. In a cut-through switch, forwards the packet to the output buffer as soon as the destination address is received.

The CPU and the control unit, using the information in the frame  then consult the switching table to find the output port. The frame is then finally sent to port 5 for transmission.

What is a Router, Switch And Gateway in Networking ?

Two Layer Switch

A two-layer switch operates at the physical as well as data link layer. The two-layer switch is basically a bridge. It has multiple ports and it is designed to allow better performance.

There is no competing traffic and so there are no collisions. Greater performance can be achieved by layer 2 switches over hubs and bridges.

In cut-through switch, the destination address appears in the frame header. Cut through switch begins forwarding the incoming frame on to the appropriate output line as soon as the switch recognizes the destination address.

In-store and forward switch , it accepts a frame on input line , buffers it briefly, and then routes it to the appropriate output line.

New switches typically include L2 switches with bridge functionality rather than a bridge.

Layer 3 Switch 

Routers basically do all of the IP level processing involved in the forwarding of IP traffic in software .  High-speed LAN and high-performance L2 switches may pump collisions of packets . The software-based router is not capable of handling this rate.

To accommodate such a load L3 switches can be used , which is implementing the packet forwarding logic of the router in hardware.A three-layer switch is used at the network layer and it is a kind of router .

L3 Switches Types :

1. In packet by a packet switch , the switch operates as a traditional router. Because the forwarding logic is in the hardware, it achieves an increase in performance over the software-based router .

2. In a flow-based switch , it enhances the performance by identifying flows of IP packets that have the same source and destination addresses. Once the flow is defined, the predetermined route can be established through the network.

What is a Router, Switch And Gateway in Networking ?

What Is Gateway In Networking ?

Gateway provides all of the inter-connectivity provided by routers and bridges , but in addition, they furnish connectivity and conversion between the 7 layers of the OSI reference model.

A gateway is normally a computer that operates in all the 5 layers of the Internet or 7 layers of OSI model. A gateway takes an application message, reads (interprets) it, and interprets it. This means that it can be simply used as a connecting device between two internetworks that use different models. 

The gateway can be performed in hardware , software, or both. Gateways are often application-specific and because of their complex protocol , conversions are slower than bridges, routers, and switches.

A gateway can actually convert the data so that it works with an application on a computer on the other side of the gateway, for e.g. a gateway can receive e-mail messages in one format and convert them into another format. 

What is a Router, Switch And Gateway in Networking ?

One example of gateway function is interfacing a device using SNA with a device using the OSI protocol stack. The gateway will convert from SNA to an OSI protocol structure as well as OSI to SNA . 

A gateway is a device that can interpret and further translate the different protocols that are used on two distinct networks.  Gateway operates through all the seven layers of the OSI model and all five layers of the internet model.

Thus gateway’s main functionality lies in the role of protocol translator for architecture such as SNA, IPX ,TCP/IP and OSI. It can also translate between different IEEE 802 architecture. it can reside in workstations, mini pcs , mainframes etc. 

Gateways are often stored and forward devices, forwarding only the information request by the destination node. ‘Voice gateway’ act as an intermediary node connecting a voice call between a packetized voice user .  

Hope you really enjoyed the post. Stay tuned for more interesting stuff in my next post.

Spread the Wisdom !!

Techie Aric

Aric is a tech enthusiast , who love to write about the tech related products and 'How To' blogs . IT Engineer by profession , right now working in the Automation field in a Software product company . The other hobbies includes singing , trekking and writing blogs .

Leave a Reply

Your email address will not be published. Required fields are marked *