Switching
- Switching in a computer network helps to decide the best route for data transmission when there are multiple paths in a larger network
- It finds the best route to transfer data from the sender to the receiver, particularly in a large network
- It is a one-to-one connection
Types of Switching
- Circuit Switching
- Message Switching
- Packet Switching
- Datagram Approach
- Virtual Circuit Approach
Circuit Switching
- A dedicated path is established between the sender and receiver
- Before data transfer, the connection is established
- Example: Telephone network
- Three basic phases:
- Connection establishment
- Data transfer
- Connection disconnection
Message Switching
- Store and Forward Mechanism
- A message is transferred as a complete unit and forwarded with the Store and Forward Mechanism at the intermediary node
- It is not suited for streaming media and real-time applications
Packet Switching
- The Internet is a packet-switched network
- A message is broken into individual chunks called packets
- Each packet is sent individually
- Each packet has the source and destination IP Address with a sequence number
- Sequence numbers help the receiver to:
- Reorder the packets
- Detect missing packets
- Send acknowledgements
Datagram Packet Switching
- Also known as connectionless switching
- Each independent entity is called a datagram
- The datagram contains destination information. The intermediary devices use this information to forward datagrams to the correct destination
- The path is not fixed
- Intermediate nodes make routing decisions to forward the packets
Virtual Circuit Switching
- Also known as connection-oriented switching
- A preplanned route is established before the message is sent
- Call request and call accept packets establish the connection between the sender and receiver
- The path is fixed for the duration of a logical connection