How does a network switch work , let us understand what is switch, A network switch connects devices within a network (often a local area network, or LAN*) and forwards data packets to and from those devices. Unlike a router, a switch only sends data to the single device it is intended for (which may be another switch, a router, or a user’s computer), not to networks of multiple devices.
A local area network (LAN) is a group of connected devices within close physical proximity. Home WiFi networks are one common example of a LAN.
what we have covered a article

Why is Switching Concept required?
The switching concept is developed because of the following reasons:
Bandwidth: It is defined as the maximum transfer rate of a cable. It is a very critical and expensive resource. Therefore, switching techniques are used for the effective utilization of the bandwidth of a network.
Collision: Collision is the effect that occurs when more than one device transmits the message over the same physical media, and they collide with each other. To overcome this problem, switching technology is implemented so that packets do not collide with each other.
Advantages of Switching:
A switch increases the bandwidth of the network.
It reduces the workload on individual PCs as it sends the information to only that device that has been addressed.
It increases the overall performance of the network by reducing the traffic on the network.
There will be less frame collision as the switch creates the collision domain for each connection.
Disadvantages of Switching:
A Switch is more expensive than a network bridge.
A Switch cannot determine the network connectivity issues easily.
Proper designing and configuration of the switch are required to handle multicast packets.
Types of switches in Computer Network
Switches are the connectivity points of an Ethernet network. These are small devices that can receive data from multiple input ports and send it to the specific output port that takes data to its intended destination in the network. There are different types of switches in a network. These are:

Unmanaged switches
These are the switches that are mostly used in home networks and small businesses as they plug in and instantly start doing their job and such switches do not need to be watched or configured. These require only small cable connections. It allows devices on a network to connect with each other such as a computer to a computer or a computer to a printer in one location. They are the least expensive switches among all categories.
Managed switches
These types of switches have many features like the highest levels of security, precision control, and full management of the network. These are used in organizations containing a large network and can be customized to enhance the functionality of a certain network. These are the costliest option but their scalability makes them an ideal option for a network that is growing. They are achieved by setting a simple network management protocol (SNMP).
They are two types of network switches
(I) Smart switches:
These switches offer basic management features with the ability to create some levels of security but have a simpler management interface than the other managed switches. Thus they are often called partially managed switches. These are mostly used in fast and constant LANs which support gigabit data transfer and allocations. It can accept the configuration of VLANs (Virtual LAN).
(II) Enterprise managed switches:
They have features like the ability to fix, copy, transform and display different network configurations, along with a web interface SNMP agent and command-line interface. These are also known as fully managed switches and are more expensive than smart switches as they have more features that can be enhanced. These are used in organizations that contain a large number of ports, switches, and nodes.
LAN switches –
These are also known as Ethernet switches or data switches and are used to reduce network congestion or bottleneck by distributing a package of data only to its intended recipient. These are used to connect points on a LAN.
PoE switches –
PoE switches are used in PoE technology which stands for power over Ethernet which is a technology that integrates data and power on the same cable allowing power devices to receive data in parallel to power. Thus, these switches provide greater flexibility by simplifying the cabling process
How does a network switch work?
Features of Switches
1 A switch operates in layer 2, i.e. data link layer of the OSI model.
2 It is an intelligent network device that can be conceived as a multiport network bridge.
3 It uses MAC addresses (addresses of medium access control sublayer) to send data packets to selected destination ports.
4 It uses a packet switching technique to receive and forward data packets from the source to the destination device.
5 It supports unicast (one-to-one), multicast (one-to-many), and broadcast (one-to-all) communications.
6 The transmission mode is full-duplex, i.e., communication in the channel occurs in both directions at the same time. Due to this, collisions do not occur.
7 Switches are active devices, equipped with network software and network management capabilities.
8 Switches can perform some error checking before forwarding data to the destined port.
The number of ports is higher – 24/48.
How does a network switch work?
What is a Layer 2 switch? What is a Layer 3 switch?
Network switches can operate at either OSI layer 2 (the data link layer) or layer 3 (the network layer). Layer 2 switches forward data based on the destination MAC address (see below for definition), while layer 3 switches forward data based on the destination IP address. Some switches can do both.
Most switches, however, are layer 2 switches. Layer 2 switches most often connect to the devices in their networks using Ethernet cables. Ethernet cables are physical cables that plug into devices via Ethernet ports.
Switch advantages and disadvantages
1 Increases Capacity –

They increment the accessible data transfer capacity of the organization.
2 Reduces Burden –
They help in lessening the outstanding burden on individual host PCs.
3 Increment Presentation –
They increment the presentation of the organization.
4 Less casing Impacts –
Networks that use switches will have fewer casing impacts. This is because of the way that switches make impact areas for every association.
5 Straightforward –
Switches can be associated straightforwardly with workstations.
6 Increases Bandwidth –
It increases the available bandwidth of the network.
7 Less frame collisions –
Networks that use switches will have fewer frame collisions
8 More secure –
Since the switch is isolated, data will go only to the destination.
Disadvantages of Switches
1 Costly –
They are more costly in contrast with network spans.
2 Tough Availability issues –
Network availability issues are hard to be followed through the organization switch.
3 Issues in traffic broadcasting –
Broadcast traffic might be problematic.
4 Defenseless –
If switches are in the indiscriminate mode, they are defenseless against security assaults for example caricaturing IP addresses or catching Ethernet outlines.
5 Need for Proper Planning –
Proper planning and arrangement are required to deal with multicast parcels.
6 Mechanical Component can wear out –
The switch’s mechanical component can wear out with time.
7 Physical contact is mandatory –
Must have physical contact with the object to be actuated.