Switching
gocourse.in Maintenance

We'll be back soon

Our CDN (cdn.gocourse.in) is currently unreachable. Some images, JavaScript, or CSS files may not load properly.

Estimated downtime: ~30 minutes

Switching

kumudha

What is Switching?

Switching is the process of transferring data from one device to another through a computer network by selecting the most appropriate communication path.

Whenever a device sends data over a network, switching technology ensures that the information reaches the correct destination instead of every connected device.

Real-World Example

Imagine a courier company.

If you send a parcel to your friend, the courier company delivers it only to your friend's address—not to every house in the city.

Similarly, a network switch delivers data only to the intended device rather than broadcasting it to all devices connected to the network.

Why is Switching Important?

As networks became larger, simply broadcasting every piece of data to all devices created several problems:
  • Heavy network traffic
  • Data collisions
  • Reduced performance
  • Lower security
  • Wasted bandwidth
Switching was introduced to solve these issues by forwarding data only where it needs to go.

What is a Network Switch?

A network switch is a networking device that connects multiple devices within the same Local Area Network (LAN).

These devices may include:
  • Computers
  • Laptops
  • Servers
  • Printers
  • IP Phones
  • Wireless Access Points
  • Network Storage Devices
The primary responsibility of a switch is to receive data and forward it only to the correct destination device.

Which OSI Layer Does a Switch Operate On?

A traditional switch operates at the:

Data Link Layer (Layer 2) of the OSI Model.

At Layer 2, switches use MAC (Media Access Control) addresses to identify connected devices.

Some advanced switches, called Layer 3 switches, can also perform routing functions using IP addresses.

Key Characteristics of Switching

Switching offers several important features that improve network communication.
  • Transfers data between devices in a network
  • Uses switches to forward data efficiently
  • Operates mainly at Layer 2 of the OSI model
  • Uses MAC addresses for forwarding decisions
  • Sends data only to the intended destination
  • Supports full-duplex communication
  • Reduces network collisions
  • Improves bandwidth utilization
  • Provides high-speed communication
  • Enhances overall network security
  • Increases network performance
  • Supports scalable enterprise networks

Evolution of Switching Technology

Early Networks: Hubs

In the early days of networking, hubs were widely used.

Whenever a hub received data, it sent copies of that data to every connected device.

Problems with hubs included:
  • High network congestion
  • Frequent collisions
  • Low bandwidth efficiency
  • Poor security
  • Slow communication

Modern Networks: Switches

Switches solved these problems by introducing intelligent forwarding.

Instead of broadcasting data everywhere, switches identify the destination using MAC addresses and forward frames only to the appropriate device.

Benefits include:
  • Faster communication
  • Better security
  • Reduced congestion
  • Efficient bandwidth usage
  • Improved scalability
Today, switches have almost completely replaced hubs.

How Network Switching Works

A switch performs several steps whenever it receives data.

Step 1: Frame Reception

The switch receives a data frame from a connected device.

Example:

Computer A sends data to Computer B.

Step 2: Read the Source MAC Address

The switch learns the MAC address of the sender and stores it in its MAC Address Table.

Step 3: Read the Destination MAC Address

The switch examines the destination MAC address contained in the Ethernet frame.

Step 4: Search the MAC Address Table

The switch checks whether the destination MAC address already exists in its forwarding table.

Two situations are possible.

Case 1: Destination Found

If the MAC address exists,

the switch forwards the frame only through the corresponding port.

Case 2: Destination Not Found

If the MAC address is unknown,

the switch floods the frame to all ports except the incoming port.

When the destination device replies, the switch learns its MAC address and stores it.

Future communication becomes much faster.

Step 5: Frame Delivery

The frame reaches the destination device successfully.

This intelligent process makes switching highly efficient.

MAC Address Table Explained

Every switch maintains a MAC Address Table, also known as a Forwarding Table or CAM Table.

Whenever a new device communicates,

the switch automatically learns its MAC address and stores it.

This process is called MAC Learning.

Types of Network Switching

There are three major switching techniques used in computer networks.

1. Circuit Switching

Circuit Switching establishes a dedicated communication path between the sender and receiver before data transmission begins.

The entire communication session uses the same path.

How It Works
  • Connection establishment
  • Data transmission
  • Connection termination
The communication channel remains reserved until the session ends.

Example

Traditional telephone systems.

When you make a phone call, a dedicated communication path is established until the call ends.

Advantages

  • Reliable communication
  • Constant bandwidth
  • Low delay after connection establishment
  • Ordered delivery

Disadvantages

  • Expensive
  • Bandwidth remains reserved even during idle periods
  • Poor resource utilization

2. Message Switching

In Message Switching, the complete message is treated as a single unit.

Each intermediate node stores the entire message before forwarding it.

This is known as the Store-and-Forward Technique.

Example

Postal service.

Every post office stores your parcel before forwarding it to the next location.

Advantages
  • No dedicated connection required
  • Efficient route selection
  • Flexible communication
Disadvantages
  • High delay
  • Requires large storage
  • Unsuitable for real-time communication

3. Packet Switching

Packet Switching is the most commonly used switching method today.

Instead of sending the entire message at once,

the message is divided into small pieces called packets.

Each packet contains:
  • Source address
  • Destination address
  • Sequence number
  • Payload (actual data)
  • Error checking information
Packets may travel through different routes and are reassembled at the destination.

Example

The Internet.

Whenever you browse a website or stream a video, packet switching is used.

Advantages
  • Efficient bandwidth utilization
  • Supports multiple users
  • High reliability
  • Fault tolerant
  • Cost-effective
Disadvantages
  • Packets may arrive out of order
  • Delay may vary
  • Packet loss is possible

Datagram Packet Switching

Datagram Packet Switching is a connectionless form of packet switching.

Each packet is treated independently.

Different packets can follow different routes.

No dedicated path is established.

Example

Internet Protocol (IP)

IP routing uses datagram packet switching.

Advantages

  • Highly flexible
  • Fast routing decisions
  • Efficient use of network resources

Disadvantages

  • Packets may arrive out of order
  • Variable delay
  • Packet loss can occur

Virtual Circuit Packet Switching

Virtual Circuit Switching combines features of both packet switching and circuit switching.

A logical path is established before data transmission.

All packets follow the same route.

Unlike circuit switching, no physical circuit is permanently reserved.

Example

Frame Relay

ATM (Asynchronous Transfer Mode)

MPLS networks

Advantages
  • Packets arrive in sequence
  • Better Quality of Service (QoS)
  • Lower packet loss
  • Predictable performance
Disadvantages
  • Initial setup required
  • Failure of the virtual path affects communication

Why is Switching Required?

Switching improves network communication by solving many common networking problems.

Efficient Bandwidth Usage

Bandwidth is a limited and valuable resource.

Switches ensure that bandwidth is used efficiently by forwarding data only where required.

Collision Reduction

Older Ethernet networks suffered from collisions when multiple devices transmitted simultaneously.

Switches eliminate collisions by providing dedicated communication paths for each connected device.

Improved Performance

Switches reduce unnecessary traffic, making networks significantly faster.

Better Security

Since switches send data only to the intended destination, other devices cannot easily view network traffic.

Advantages of Switching

  • High-speed communication
  • Efficient bandwidth utilization
  • Reduced collisions
  • Better network performance
  • Improved security
  • Supports full-duplex communication
  • Easy network expansion
  • Reliable data delivery
  • Scalable for enterprise environments
  • Lower network congestion

Disadvantages of Switching

Although switches offer many benefits, they also have some limitations:
  • More expensive than hubs
  • Configuration may be complex in large networks
  • Layer 2 loops can occur without protocols like STP (Spanning Tree Protocol)
  • Managed switches require skilled administration
  • Large enterprise networks require careful planning

Our website uses cookies to enhance your experience. Learn More
Accept !