Switching is yet a very important topic to be covered for the Cisco Certified Network Associate (CCNA) 200-301 exam. Before we start learning about what is switching in computer Network, and its techniques, it is very important to learn about hubs and switches.
Before you get introduced to the concept of switching, just keep in mind that switching refers to the exchange or transfer of information through various layers of the Open Systems Interconnection (OSI) model.
Note: If you haven’t read the previous blog of our CCNA 200-301 series, I highly recommend you do so.
Let’s learn about what is a hub and a switch first.
What is a Hub?
- It is an L-1 Device (Physical Layer).
- It does not learn MAC addresses. Therefore, it is a dummy device.
- It always broadcasts the information.
- It performs its functions in 0s and 1s (bits).
You must know that hub is obsolete in the market as now it has been replaced by a switch.
What is a Switch?
- A Layer 2 (Datalink layer) Device.
- It learns the MAC addresses. Therefore, it is an intelligent device.
- It does not broadcast.
- It comprises an Application Specific Integrated Circuit (ASIC).
- It makes a MAC address table in the same way as a router makes a routing table.
There are two types of switches:
A Manageable switches:
- A manageable switch is one to which you can assign an IP address.
- You can also add slots to it.
- You can also access the CLI. they have a console port.
- They’re expensive.
B Unmanageable switches:
- IP addresses cannot be assigned to them.
- They do not have a console port.
- They are cheaper.
What is Switching in Computer Network?
When a packet of information is forwarded from one port to the destination port, this process of transferring data is called switching.
Switching also ensures that the best route is decided to transfer the data when there are multiple paths in a large network. You must know that the information does not directly reach the receiver, it passes through various nodes.
Switching can be classified into two types on a broader level:
- In connectionless switching, there is no order of delivering the data.
- The data packets are forwarded individually in the form of packets.
- There is no need to build a prior connection to deliver the data packets.
- A semi-permanent connection or a communication circuit is formed along the paths between two endpoints.
- This makes sure that the data is delivered in the right order to the connection layers.
- After the data is transferred, these connections can either be kept for future use or can be destroyed on the spot.
Why Do We Need Switching Techniques?
There can be multiple paths to deliver information from a sender to a receiver in large networks. This is where the function of switching techniques comes in. These techniques help decide the switch to the best path for data transmission.
You must know that the switching technique allows systems to make one-to-one connections.
Types of Switching Techniques in Computer Network
There are three types of switching techniques. There are:
- Circuit switching
- Message switching
- Packet switching
Let’s learn about each one of them!
1. Circuit Switching
When a dedicated path or circuit is created between the sender and receiver to communicate, this type of switching technique is called circuit switching.
- A connection is established before the transfer of the data.
- An example of such a circuit is a telephone network. A virtual circuit is established between the caller and the callee before the user can make a call.
- A circuit can be permanent or temporary.
There are three phases that an application has to go through if it has to use circuit switching. These phases are:
- Establishing a circuit
- Transferring the data
- Disconnecting the circuit
2. Message Switching
When the whole data is considered as a single data packet and transferred in one go, such a switching technique is referred to as message switching.
- It uses the store and forward mechanism.
- If the data is very huge and cannot be transferred in one go, it is first broken down into smaller pieces of data and sent to the intermediary node.
- This intermediary node then constructs the full message after receiving all the data pieces.
- After making the full message or the complete unit, then only it forwards the data.
- It is not suitable for real-time applications and streaming media.
Therefore, message switching has two phases:
- Storing the data
- Forwarding the data
3. Packet Switching
In packet switching, a message is broken down into smaller chunks called packets. This technique is quite similar to the message switching technique.
- Yet it is different from the message switching technique as each of the smaller chunks of data or packets are sent individually. They are not stored.
- Since each of these packets are sent individually, all of them have source and destination IP address and sequence number.
- The sequence number comes in handy as these packets are sent in any order.
- The sequence number has the following benefits:
- It reorders the packets sent by the sender.
- It also detects missing packages.
- It acknowledges the received packages. For example, if packet number 2 is not received by the destination, it will not send any acknowledgment to the receiver.
- It then retransmits that packet.
- The Internet is one of the examples of a packet-switched network in technology.
There are two approaches by which packet switching can be done. These are:
- Datagram Approach
- Virtual Circuit Approach
- The datagram approach is also called connectionless switching.
- Each of the independent entities is called a datagram.
- Each of the datagrams consists of destination information.
- The intermediary devices use this information to transmit these datagrams to their exact destinations.
Virtual Circuit Approach:
- This is also called connection-oriented switching.
- As you have read before, a prior semi-permanent connection is created before the messages are sent.
- Call request and call accept packets are used to create a connection between the sender and receiver.
- The path is fixed here.
That’s all for this blog on switching. In this blog, you have learned what are hubs and switches. You have also learned what is a switching mechanism.
Then you got familiar with the various techniques of switching. These techniques helped you understand how a switch chooses the best possible patch to send the data to its destination through the layers of an OSI model.
If you want to learn more about switching in general, you can check out this video!
Stay tuned for more blogs for the CCNA 200-301 series!
Happy learning, Techies!