We all are a part of the internet, the international network which connects people, cities, states, countries, continents together forming a global community for sharing information to anyone, anywhere and anytime. Whether its a smartphone, Desktop, laptop, tablet, smartwatch or even IoT device, everything and anything can be connected to internet.
Computer networks enable use to connect to our colleagues and loved ones anywhere on the planet, in a click of a button we can communicate and get things done. But technically there is a lot more going on which we don’t even think about. Have you ever tried to think how we are able to exchange data physically, is there any medium, if there is, how it travels, who decides where it should go, how much should go? Well let’s dig deep into it and understand data switching in this blog.
Switching is a very wide and one of the most important topics in computer networking. If anyway you are interested in networking and TCP/IP Internet, this is going to make your basis towards them.
I will assume you have watched my video on switching, and if not I hope you will!
Switching is the term which is self explanatory. Let’s take an example to understand what it really does. Consider a system where I want to connect 5 devices in my home. Take all of them as Desktop PCs for simplicity. I want to make a connection between all of them, such that every computer should be able to connect to any other. In this case I would have to lay a physical wire or a cable (usually twisted pair) between each one of them, which results in me having large number of connections. To be precise, if I have n number of devices to connect, I will have to lay n*(n-1)/2 connections all together. In my case, for 5 PCs it would be 10 connections. But practically it is not 5, but spans to 100’s to , 1000’s of stations in a single network if I talk about corporate networks and organisations, just imagine your school or college labs. A single lab can have about 30-40 systems, which means 700-800 connections. What do you think, would you manage this much wires in a wired system? How much cost can you bear. I know its not feasible.
Having all these problems we came across a method to tackle efficient wastage of simplicity and the expense issues. We introduce switching. Its a method of connecting a number of systems in an efficient manner. Switching is defined as exchange of information by receiving the inbound connections in a number of data segments called ports, and forwarding them into other designated ports for outbound of data. A switch is the device used for switching of data. All the systems I have, I will first connect them to a central hub, called switch, just like we do in star topology. All the nodes or hosts will be connected to the switch in different ports. Now, If I want to send data to any other device in the same network, I will send it to the switch, and then the switch will decide where the data is to be forwarded. Usually it is port in which the destination device is assigned.
The switch works on layer 2 of the OSI model. Layer-3 switches are also out, which work along with the routers for data transmission in different networks. When we talk about switching, we usually refer the data to be in frames. How will the switch know where the data should go, it is the responsibility of the headers attached with the data which contain the hardware/physical address of the source and destination system. This address is often called as Media Access Control (MAC) address and is the only address which can tell a sender what is the next station the data should be forwarded to.
Types Of Switching
Now switching can have many variations, major ones are going to be discussed as you scroll down. Let’s talk about the types of switching now.
1. Message switching – This is the oldest form of switching. It is not in use now, infact was never used much. The data which I will send to the switch, will be a complete block. I will send the complete message I have over my network interface. Whether it is 10 bytes or 10 Kbytes, I will send it all at once and the switch will receive it. While it checks the header of the data to identify the receiver, it should have some resource to temporarily store that whole data, which we call as buffer or RAM. We can have multiple switches in our path so every switch receives data, stores it, checks the header and forwards it to the next station in the path. Due to this nature, it is also called store and forward. Finally when the data reaches the receiver he will consider the data as a whole block and read it as a whole. there is no predefined path as any free path can be considered as a channel to transfer the data.
Obviously as we can see that the propagation and transmission delay in this type of switching is very high and also the biggest disadvantage is the intermediate devices should have enough memory to store the temporary block of data I will send and having all the intermediate devices to have all these memories is very costly and is not, not at all efficient. And also this is also not compatible for real time communication this are the major reasons why this was very less popular and today it is vanished and you need not know it but for educational purposes you can.
2. Circuit Switching- Circuit switching is the major application in today’s telecommunication networking. The world uses circuit switching for real time communication like for voice and video. The concept of circuit switching says that we have to establish a dedicated and individual path before we actually start the communication between a sender and receiver anywhere in a network. A major time of our communication will be in establishing the link between the sender and receiver. The links which are not in use already by other devices in the network can be used. But once the link has been established the sender and the receiver will continuously use the link to transfer data as long as they want. At the same time no other device can use the link. Once the communication is over the link is freed for other devices to use.
The major advantage of circuit switching is the data transmission rate. However the communication establishment time is more, the transmission of data is as fast as you can imagine because in terms of real time communication the data should reach as soon as I send it as you see in voice and video calls. The bandwidth in circuit switching is more than message switching and also there is no need of large buffers in intermediate switches. Usually it is used for long term communications which involves less delay and more efficiency.
Talking about the disadvantages as we see that the link establishment takes a large part of our communication time. Also no other device can use the links if it is busy and if no link is free the communication will not take place.
3. Packet Switching – This is perhaps the most important in computer networks as it is mostly used in data transfer in modern world. We will not send data as a whole block we will divide and break the data into smaller parts which we will call as discrete fixed size elements known as packets. These packets will contain all the information we require for forwarding the messages to next hop and ultimately reached the destination. The working implies that we have a whole data which we will break into fixed size smaller parts which will usually depend upon the maximum transmission unit of the network and then we will send all the packets one by one into the network interface. The switching device will receive the packets and will decide where the packets are to be sent. Here we can have multiple paths for reaching the destination. So in packet switching the packets need not follow the same path as its former and latter packet. Any packet can follow any path over the network to reach the destination but we will ensure that the packet reach the right destination and will have all the packet which I sent. The destination device will compile and reassemble the packets to get the original data. It can also happen that the packets will reach in jumbled form, for example, I send packet 1 first but it is not necessary that packet 1 will be received first at the destination.
In packet switching we don’t know the route for the path of each packet but will assure that the packet will reach in the same format as I sent it. The major advantage of packet switching is that it uses the most out of computer network because there is no dedicated part of any sender and receiver any packet can follow any path which is free at that instant of time. The switch will always be busy forwarding the packets. It can also be used for real time communications. Also, as there are packets which have very small size ranging from bytes to only kilobytes, the intermediate stations need not have large buffers.
Talking about the disadvantages we have that packets can easily be lost in their destination path. Also there is time delay for reassembling and unscrambling the packets which are received in jumbled form. If an attacker or a malicious user enters a network he can easily sniff the packets and get the information what the devices are communicating over the network we call it as packet sniffing.
Although the disadvantages of the packet switching are relevant but considering the advantages and high bandwidth of the system it is widely used in computer networking and is the standard for it . If you want to dig deeper into the networking field you have to understand packet switching very deeply.
So I hope by now you have a rough idea of how switching works and what are the types of switching the advantages and disadvantages of every type and what do you have to give to understand all of this. I will cover many other topics in my other blogs so if you want to have further knowledge in computer networking, routing and switching please refer to my other blogs as well. Uptil then, this is Ansh signing off, have a good day!
Official Website: https://bitten.tech
Download my OFFICIAL APP to learn ethical Hacking FREE: https://play.google.com/store/apps/details?id=com.bittentech.bittentech
Follow this link to join my Telelgram group: https://t.me/joinchat/LtZhHBBcp_BgVzoRIROKUQ
Follow me on Instagram : https://instagram.com/ansh.98
Like me on Facebook : https://linksad.net/qUUBB