Prerequisite – Network Devices
1. Switch :
Switch is a multi-port bridge with a buffer and a design that can boost its efficiency and performance. It is a data link layer device. The switch can perform error checking before forwarding data which makes it very efficient as it does not forward packets that have errors and forward good packets selectively to correct port only. In other words, switch divides collision domain of hosts.
2. Gateway :
Gateway is a passage to connect two networks together that may work upon different networking models. It basically works as the messenger agents between systems that takes data from one system, interprets it and transmits it to the other system. It is also called protocol converter. It can operate at any network layer. It is more complex than the switch.
Difference between Switch and Gateway:
|It works as multi-port bridge between networks.||It works as a passage between two networks.|
|It works in data link layer.||It works in all networks layers.|
|It performs error checking before forwarding packets.||It does not perform error checking.|
|It does not work as protocol converter.||While it works as protocol converter.|
|Packet filtering is provided in switch.||Packet filtering is not provided in gateway.|
|It is less complex.||It is more complex than switch.|
|It connects devices that work on same network model.||It connects two networks working on different models.|
|The format of packet is not changed.||Packet format is changed.|
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Difference between Thread Context Switch and Process Context Switch
- Difference between Bridge and Gateway
- Difference between Router and Gateway
- Difference between Border Gateway Protocol (BGP) and Routing Information Protocol (RIP)
- C Program to find IP Address, Subnet Mask & Default Gateway
- Features of Enhanced Interior Gateway Routing Protocol (EIGRP)
- Gateway Load Balancing Protocol (GLBP)
- Common Gateway Interface (CGI)
- Border Gateway Protocol (BGP)
- Exterior Gateway Protocol (EGP)
- Difference between Hub and Switch
- Difference between Router and Switch
- Difference between Router and Layer-3 Switch
- Difference between Switch and Bridge
- Network Devices (Hub, Repeater, Bridge, Switch, Router, Gateways and Brouter)
- Inter-Switch Link (ISL) and IEEE 802.1Q
- switch vs if else
- Measure the time spent in context switch?
- Inter VLAN Routing by Layer 3 Switch
- Switch functions at layer 2
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.