In this article, we will discuss Switch, How it works? and what are its advantages and disadvantages also we will discuss some differences between HUB and SWITCH?
Switch In Networking
It is a networking device that is used to connect multiple devices with each other.
The switch works on Layer-2(Data Link Layer) of the OSI Model, which has multiple ports in it and is used to connect the no of PC to switch and switch to other computers.
The switch acts as an Intelligent Device, in which it maintains a table known as CAM(Content Accessible Memory), and stores the MAC addresses of each computer to send the particular data to the particular computer.
Why Switch is a Layer-2 device?
The switch is called a layer-2 device because it forwards frames based on MAC addresses. The switch has the storage capacity to find the particular device or to send the data to the desired computer.
It creates a table and on these tables, physical addresses of each computer device are stored which are connected to the ports of the switch.
If there are eight PC(PC1, PC2, PC3, PC4,……….PC8) connected to a single switch. If PC1 has to send data to PC5 then the switch uses its MAC addresses which are stored in form of a Table and find which particular computer is PC1 sending the data.
MAC addresses stored in the switch sends the data to the correct device port.
Also Read: What is HUB? and How it works?
How does a switch work?
The switch works on a layer-2(data link layer) of the OSI model and uses the STAR topology in which all the computer devices are connected to a central node called Switch. Which stores the MAC addresses of computer devices, in the form of a table because the switch has some storing capacity that’s why it is known as an Intelligent device.
After storing the MAC addresses in it, and when you send the data from the source computing device to the destination computing device, it detects the MAC address and sends the data to only the correct device.
Advantages of Switch
- You can send data to the only computer which you want to send.
- Multiple computers are connected at the same time.
- Acts as an intelligent device because of its storage capacity.
- Works on Full-duplex mode where both computers’s the source and the destination computer contact each other at the same time.
- Increase the speed of the network.
- No frame collision because each port has a separate collision domain.
Disadvantages of Switch
- Switches are more expensive than other devices.
- Sometimes Broadcast traffic troubles switch
Difference Between HUB and Switch
FAQ(Frequently Asked Questions)
Difference between Router and Switch?
The switch is used to create a network using the MAC addresses stored in it, while the router is also used to create a network but the main work is to create a large network or multiple networks and uses IP addresses to send the data.
What is the role of the Data Link Layer?
The role of the Data Link layer is to check and monitor that messages are reaching the right device or not. And another function of this Data Link layer is framing.
What do you mean by Routing?
Routing is the process of finding the best path on which data can pass from source(sender) to destination(receiver). Routing is done by a device known as routers, which works on network layer devices.
you can also read these topics: