SWITCHING
& IT’S TYPES
~ Computer Networks
1
WHAT IS SWITCHING?
Switching in computer networking is the method of transferring data
packets between devices or networks using devices called switches.
For example, when you access a webpage, your request travels through
switches to reach its destination.
Switching occurs at the Data Link layer of the OSI Model, right after data
packets are created in the Physical Layer.
2
What is a Switch?
A switch is a network device that connects computers and servers, allowing
them to communicate without data interference. It directs incoming data
packets to the correct destination, acting like a traffic cop.
What is a Network Switch?
A network switch is a specific type of switch that operates at the Data Link
layer of the OSI Model. It uses destination MAC addresses to determine where
to send data and maintains a switching table to track connected devices. This
efficiency reduces network congestion and improves performance compared
to older devices like hubs.
3
4
Process of Switching :
1. Frame Reception: The switch receives a data frame from a connected device.
2. MAC Address Extraction: It reads the frame's header to get the destination
MAC address.
3. MAC Address Table Lookup: The switch checks its switching table to find the
port for that MAC address.
4. Forwarding Decision: If it finds a match, it sends the frame to the correct port.
If not, it floods the frame to all ports (except the incoming one) and updates its
table with any new MAC addresses it discovers.
5. Frame Transition: Finally, the switch forwards the frame to the destination
device.
5
TYPES
There are three types of switching
methods:
Circuit Switching
Space Division Switches
Time Division Switches
Message Switching
Packet Switching
Datagram Packet
Switching
Virtual Circuit Packet
Switching
6
CIRCUIT SWITCHING
Definition: Circuit switching is a method that establishes a dedicated communication
path between the sender and receiver for the duration of the call or data transfer.
Circuit Switching can use either of the two technologies:
7
How It Works:
1. Connection Establishment: A path is created before any data is sent.
2. Data Transfer: Once the path is established, data (voice, video, etc.) is transmitted
along that path.
3. Disconnect: The connection is terminated once the communication is complete.
Example: This method is similar to how traditional telephone calls work.
Phases of Circuit Switching:
Circuit Establishment: Connection setup.
Data Transfer: Actual communication occurs.
Circuit Disconnect: Ending the connection.
8
Advantages:
Dedicated communication channel.
Fixed bandwidth ensures consistent quality.
Disadvantages:
Connection setup can take time (about 10 seconds).
Path remains dedicated even when not in use, leading to potential waste of
resources.
More expensive due to the need for dedicated paths.
9
SWITCHING TECHNOLOGIES
1. Space Division Switching:
Definition: Uses physically separate paths for communication.(Telephone exchange)
Types:
Crossbar Switch: Has multiple input and output lines with crosspoints to connect
them. The number of crosspoints increases with more stations, making it costly
for large networks.
Multistage Switch: Breaks the crossbar into smaller units, reducing the number of
crosspoints and providing alternate paths if one fails.
Advantages:
High speed and capacity.
Non-blocking, meaning multiple connections can occur simultaneously.
Space Division Switches can be categorized in two ways:
10
Crossbar Switch
Multistage Switch
Crossbar Switch:
The Crossbar switch is a switch that has n input lines and n output lines. The crossbar switch
has n^2 intersection points known as crosspoints.
Disadvantage of Crossbar switch:
The number of crosspoints increases as the number of stations is increased. Therefore, it
becomes very expensive for a large switch. The solution to this is to use a multistage switch.
Multistage Switch:
Multistage Switch is made by splitting the crossbar switch into the smaller units and then
interconnecting them.
It reduces the number of crosspoints.
If one path fails, then there will be an availability of another path.
11
2. Time Division Switching:
Definition:
Shares a single communication channel among multiple users by allocating specific time
slots for each.
How It Works: Users take turns sending data in their assigned time slots, which maximizes
the use of the channel.
Example: Digital Telephony (TDM - Time Division Multiplexing) - multiple calls are
transmitted over a single communication channel by dividing the channel into time slots.
12
MESSAGE SWITCHING
Definition: Message switching is a technique where entire messages are sent as
complete units and routed through intermediate nodes, which store and forward the
messages.
How Message Switching Works: 13
1. Message Creation: The sender prepares a complete message with a destination
address.
2. Transmission: The message is sent to the first intermediate node.
3. Storage: The node stores the entire message temporarily.
4. Routing Decision: The node reads the destination address and determines the best
route.
5. Forwarding: The message is forwarded to the next node, repeating the process.
6. Delivery: The message continues until it reaches the final destination.
Key Features of Message Switching:
No Dedicated Path: No fixed connection between sender and receiver.
Dynamic Routing: Messages are routed based on their destination address.
Store and Forward: Each node temporarily stores the entire message before
forwarding it.
14
Advantages:
Efficient Bandwidth Use: Multiple devices share data channels, enhancing
efficiency.
Reduced Congestion: Messages are stored at nodes, easing traffic.
Message Priority: Important messages can be prioritized.
Variable Message Size: Supports messages of various sizes.
Disadvantages:
Storage Requirements: Nodes need enough storage for messages.
Long Delays: Storing and forwarding can slow down delivery, especially for large
messages.
15
PACKET SWITCHING
Definition: Packet switching is a method of sending messages by breaking them into
smaller pieces called packets. Each packet is sent individually across the network and
later reassembled at the destination.
How It Works: 16
1. Message Splitting: A message is divided into smaller packets, each with a unique sequence
number.
2. Packet Header: Each packet contains information like the source address, destination
address, and sequence number.
3. Routing: Packets travel independently through the network, often taking the shortest
available path.
4. Reassembly: At the receiving end, packets are reassembled in the correct order.
5. Error Handling: If any packets are missing or corrupted, a request is sent to resend those
packets. Once all packets are received correctly, an acknowledgment is sent back.
Approaches to Packet Switching:
1. Datagram Packet Switching
Independent Packets: Each packet (datagram) is treated as a separate entity.
Routing: Intermediate nodes decide how to forward packets based on their destination
information.
Connectionless: There’s no fixed path; packets can take different routes.
2.Virtual Circuit Switching:
17
Virtual Circuit Switching is also known as connection-oriented switching.
In the case of Virtual circuit switching, a preplanned route is established before the messages are
sent.
Call request and call accept packets are used to establish the connection between sender and
receiver.
In this case, the path is fixed for the duration of a logical connection.
Advantages of Packet Switching:
Efficient Use of Resources: Network resources are used more effectively since packets share paths.
Robustness: If a route fails, packets can be rerouted, making the network more resilient.
Scalability: Easily accommodates more users and devices.
Disadvantages of Packet Switching:
Variable Delay: Packets may arrive at different times, causing delays in reassembly.
Overhead: Additional header information for each packet can increase the data load.
Complexity: The need for managing packets and ensuring they are in order adds complexity to the
system.
THANK YOU
Presented By : Noor Sariya