In this article at OpenGenus, we will be discussing about the various switching modes in a Computer Network. But before we do that let us first understand what a switch is in detail.
A switch is networking hardware that operates at the second layer of the
OSI model (the data-link layer). Their main purpose is to connect multiple devices on a network and use packet switching to transfer data over the network. All data transfered in a switch is transfered on the local network. It can also be termed as multi-port network bridge, because it contains multiple ports through which the computers are plugged into the network.
The main purpose of a switch in addition to connecting multiple computers together, is to perform necessary checks, examining addresses, both source and destination, and sending frames to the corresponding devices. It supports all three types of communication, i.e.,
multicast communication is considered a grouped communication, where data transmission is addressed to a group of destination computers at the same time, i.e, every packet in a
multicast connection is read by a particular group of computer system existing on the same network. Data transmission in
multicast is one to many.
unicast communication is a type of communication, where data is transfered between only one sender, and one receiver, i.e., data transmission is one-to-one.
broadcast communication, data is end from one sender to all the computer systems connected to a local network, i.e., data transmission is one to all.
Different types of switches
There are 4 main categories of switches, they are as follows,
- Unmanaged switches,
- Managed switches,
- LAN switches,
- PoE switches
Let us discuss them one by one,
These switches are generally inexpensive and require very minimal configurations to make then operable. This makes them the go to choice for home networks, and, small business installations. Connecting multiple computers to the network is just a matter of simply plugging the into the switch. To extend the network on the switch, we can just plug another switch to the main switch.
These switches are used in larger corporations, and, more complex networks. Theses switches provide a higher quality of service, and more configuration options, like higher security, better control over the network, and, higher precision. Since these switches provide so many configuration features these are costlier when compared to other types of switches. The switches are preferred where a more concise network control is required, and a bigger network is to be handled. Generally these switches are configured by using the Simple Network Protocol (
As the name suggests these switches are used in
LAN(Local Area Network) configurations. They are helpful in reducing network congestions, thus reducing the overall bottlenecks in a network. These switches ensure that there is no overlapping between data packets, due to the methods employed by these switches to allocate bandwidth.
PoE switches or Power over Ethernet switches, are special types of switches as they can provide both, power and data over the same cable. These switches drastically reduce the amount of cabling required to maintain a network, because no external power cord is required to maintain the power supply to the switches in a network. These switches are used in PoE Gigabit Ethernets.
Now that we have brushed up on the basics of switches, we can now continue with the different switching modes in a computer network.
Packets are forwarded using different modes on a switch, these modes are named, well... you guessed it..., switching modes. In any switching mode, the parts of the frame header of a packet or a frame is analyzed.
A frame contains the following parts according to IEEE 802.3 standards,
Let us understand what these terms mean first,
Frame Header: The frame header is part which contains the basic information about a frame, such as,
- The preamble: which is a stream of continuous
0s, It essentially provides for synchronization of packets or frames,
- The Destination address: The destination MAC Address where the packet is to be delivered
- The Source address: The MAC address of the system from where the packet originated,
- Type: The type of Ethernet protocol being used for communication
- The preamble: which is a stream of continuous
Start Frame delimiter: The Start Frame Delimiter or (
SFD) is a one byte data that is usually fixed to
10101011. It is the starting point of the packet.
Data: The data being transfered in the packet, it is generally around 46-1500 bytes long.
Frame Check Sequence: The Frame Check Sequence or
FCScontains a 4 byte long Cyclic Redundancy Check(
CRC) to check for corrupted data.
There three main types of switching modes,
- Store and forward,
- Cut through
- Fragment free
Store and forward switching
In store and forward switching the intermediate nodes or switches store the entire frame to check for errors before forwarding it to the next node, or destination.
Following are the steps taken in Store and forward switching,
- The switch waits till the entire incoming frame has been received. Once received, the switch stores the frame to into its memory buffer. This is the storing stage of the process.
- Once stored, the frame is checked for validity, or, in simple terms, the frame is checked for any existing errors.
- If an error is found the entire frame is discarded,
- Else the frame is passed to the next node
- This is the forwarding stage of the process.
Advantage of Store and forward switching
- Store and forward switching ensures that no corrupted packet is forwarded to the destination. This ensures complete stability of the destination system in case the source has been compromised by some means, or the data was tampered on the fly.
- Store and forward switching ensures that no overlapping or colliding frame is forwarded to the destination as it checks each and every frame thoroughly.
Cut Through Switching
In cut through switching frames are forwarded the moment destination address is resolved. There is no waiting for the remaining segments of the frame. Hence there is no error detection in cut through switching.
Following are the steps followed in cut-through switching,
- Once the the frame reception has been initiated, the switch waits for the first six bytes following the preamble. From the above table discussed in Switching modes we know that this is the destination MAC Address.
- The destination address is then looked up in the switching table, from this table the switch determines the outgoing interface ports to interact with the destination system.
- Once the destination and the ports are identified, the switch forwards the incoming frame to the next node.
- Cut-through switching does not implement any error checking techniques. This makes cut-through switching, a low latency switching mode in comparison to something like
- Due to absence of any error checking, the destination can be compromised by corrupted or tampered data.
- No collision is detected between frames, hence there may be overlapping frames at the destination port.
Advantage of cut-through switching
Cut through switching provides with the only advantage of low latency, due it not checking for any error, or any proof of overlapping.
Disadvantages of cut-through switching
- Due to absence of error checking the destination system might receive an invalidated, corrupted, or tampered data. Thus, reducing the security of the destination system.
- Since, cut-through switching forwards the frames on immediate identification of the destination system, there could be possible overlapping of frames, resulting in frame collisions.
Fragment Free switching
Fragment free switching is an extension of, or a slight modification of
cut-through switching. Unlike
cut-through switching, some form of error detection is implemented in
Fragment Free switching.
Following are the steps taken in
Fragment Free switching,
Once the frame reception has been initiated, the switch checks at least for the first 64 bytes of the frame, i.e.,
- 7-Bytes of Preamble,
- 6-Bytes of Destination MAC Address,
- 6-Bytes of Source MAC Address,
- 2-Bytes of Ethernet Protocol Type,
- 1-Byte of the SFD,
- and, at least the first 42-Bytes of the data being sent to the destination
Since 64-Bytes is a significant amount of the frame, if there were some form of overlapping, chances are that it would be detected in the first 64-bytes.
If a colliding frame is detected, then it is discarded, otherwise, the frame will forwarded to the next node.
Advantages of Fragment Free switching
- This form of switching is faster than
store and forwardswitching,
- This form retains some type of collision detection method, thus reducing the chances of overlapped frames reaching the destination.
Dis-advantages of Fragment Free switching
- The error detecion in fragment free switching is not as reliable as
store and foreward, because it only checks for any collision case in the frames, and no
CRCcheck is invloved.
- The frame reaching the destination may still be tampered with, and may be unsafe for the destination system.
In this article at OpenGenus, we briefly discussed about switches, different types of switches, and different modes of switching used in a computer network. We briefed over the concept and working of each type of switching mode and explained their advantages and disadvantages over each other. We hope that you understand the basic understanding of all the concepts discussed in this article, and find them useful.