Switching Techniques in computer networking!!

Switching Techniques in computer networking!!

What is switching!? How many types of switching techniques are there!?

ยท

5 min read

Hey folks! How you all doin'!? As promised i am back with another blog. So without wasting any time let's straight dive into it!!
Let's just start from the basics.
What computer networking is!?or What's the purpose of using networking!? or Why do we use it and how's it helpful!?
So, the purpose of computer networking is to connect the various homogeneous and hetrogeneous types of devices in such a way that they could share the data.

protocolss.png

Suppose, there's a sender who wants to send the data to the receiver. So, for doing so let's say, sender writes a program and establishes a connection through which the data or packets would move from sender to receiver.
Now, in order to understand the message 'M', there are some protocols that run on both the sender and receiver machine.
NOTE: When client and server are on the same machine then, this is the role of operating system. This is known as interprocess communication(when a process tries to establish contact with some other process but on the same machine). Therefore, CN(computer networking) deals with the connection between different machines.


Now, let's see what switching is!?
Switching is the the mechanism in computer networks that helps in deciding the best route for data transmission if there are multiple paths in a large network. And for making that decision there is something known as 'switching techniques'.


So, let's dig into what switching techniques is and what are it's types!?
As discussed above, when there is a large network then there might be a possibility of having multiple paths from the sender to the receiver.

paths.png

As seen in the above image there are multiple paths available to send the data from the sender to reciever. To choose the best route for sending the data, we use switching techniques.

chat.png As clear in the above image, the 'switching technique' will decide the best route for making one-to-one communication.



Let's see types of 'switching techniques':

switching.png

So in this blog we will discuss major types of switching techniques i.e. circuit , message and packet switching.


Let's see Circuit Switching in CN.
It is a technique that establishes a dedicated path between the sender and receiver.
So, initially circuit switching was designed for telephone networks. Yes, you read it right, it was used in telephone networking to physically connect devices.
Back then, when circuit switching was introduced there was no OSI/TCP model or CN. These models were introduced later.
Let's make it more easy for you to understand.
In the diagram below T1, T2 ...Tn are the multiple landlines.

Screenshot 2021-09-14 152702.png And these landlines are already used to connect with telephone exchange.

Screenshot 2021-09-14 153047.png Remember:
Communication through circuit switching has 3 phases:

  • Circuit establishment.

  • Data Transfer.

  • Circuit disconnect.


In this below diagram as you can see, landline T1 is already connected to the telephone exchange. And this telephone exchange is connected to some other telephone exhange of some other city.

teli.png
Let's say, T1 wants to communicate with T5, for doing so the first step would be to setup the connection.

ss.png So, this orange color device that you see above works as a multiplexer(many to one). And therefore to establish the connection you just need to complete the circuit.

Screenshot 2021-09-14 160001.png As you can see in the above figure, there is a complete dedicated path that is established between T1 and T5.
Note: The path here established is a dedicated one. This means, although the T1 and T5 are not connected directly but still gives an impression that they are dedicatedly or directly connected. Because once the connection is established then there would be a contiguous flow of data until the circuit is disconnected.


Few more points to remember:

  • Circuit Switching takes place at the physical layer. (as there was no CN models back then, therefore there is no such thing like layers here. Therefore, as soon as the number was dialed, the connection was established and then there was a contiguous flow of data.)
  • Contiguous Flow. The flow is always inorder.
  • No headers.(Once setup is done, no headers are needed then. By establishing a dedicated connection what happens is that you reserve all the resources of that link, you reserve the bandwidth of that channel, you reserve that buffer, and there's a contiguous flow of data until the connection is terminated. So, no header is needed.)
  • Efficiency is less.(Since the path is dedicated, the resources gets reserved, which means no one else can use that bandwidth until the connection is terminated.)
  • Delays less.(As there is no store and forward approach used.)
  • As it works on physical layer therefore we can't divide the data and send it. Besides, its efficiency is also low therefore, circuit switching works fine for telephone networking. But when it comes to other services like email, messanger, whatsapp, or especially CN then this technology can't be used there.


Let's see, what's packet switching?
Packet switching works at data link and network layer.
In this, message is first splitted into small pieces known as packets and then sent individually.

packet.png These packets are given numbers to identify their order at the receiving end.

numbering.png
Every packet comprises some info in its header and takes the shortest path as possible.

Screenshot 2021-09-14 133531.png s1, s2, s3, s4, s5 are the nodes. These nodes stores the packet , process and forwards it to the next node.
Packets after reaching the receiving end are arranged in correct order.
And now if the order is correct then the acknowledgement message is sent to the sender. And if any packet is missing or corrupted, then message will be sent to resend the message.

  • Store and forward.(Unlike circuit it follows store and forward approach) -Efficiency.(more than circuit switching)
  • More delay.
  • Pipelining used.


Now, let's see what's message switching!?
Message switching is a predecessor of packet switching. As, first came circuit switching -> Message switching -> Packet switching. -A complete message is passed across a network.(Unlike packet switching, where the message was first divided into small pieces and then each packet was delivered individually.)

  • Follows store and forward approach.
  • Hop by hop delivery.(Node to node delivery)
  • More delay.
  • Efficiency.(More than circuit switching)


Thanks for giving it a read. I hope this might have helped you! ๐Ÿ˜Š
Will be back with more blogs...See yaa ๐Ÿ˜‰!!
till then stay safe and healthy, study more, share more, gain more and grow more!!๐Ÿค—

ย