Switching is the process of transferring data packets from one device to another in a network, or from one network to another, using a dedicated device called a SWITCH.
Users experience switching constantly; for example, when you access a webpage, your request is processed through the switching of data packets across various nodes to reach the host server.
A switch is a dedicated piece of hardware that facilitates the process of handling incoming data packets and transferring them to their specific destination. Operating at the Data Link Layer (Layer 2) of the OSI Model, a switch decides the appropriate port for a packet based on its destination MAC (Media Access Control) address.
The switch maintains MAC Tables (also known as Forwarding Tables) to effectively map which device is connected to which physical port.
1. Message Switching
An older, largely obsolete technique where the entire data block or message is forwarded across the network as a single unit. This is considered highly ineffective for modern high-speed traffic.
2. Circuit Switching
In this type, a dedicated physical connection is established between the source and destination before data transfer begins. The connection receives the full, guaranteed bandwidth (common in traditional telephony).
3. Packet Switching
Data is broken into smaller components called packets. These are transferred independently based on the best available resources at that moment. This is the foundation of the modern Internet.