What is a Network switch?
Every year we are surrounded by more and more computers, laptops, mobile and other digital devices. They are used at home, in offices, administrative and many other premises. The problem of their connection for data transfer is becoming more and more urgent - one that would eliminate the need to transfer information, for example, on a USB flash drive. In the recent past, it was solved with the help of hubs, but by now, they have almost been supplanted by more intelligent devices - network switches or switches. In simple terms, these are devices that allow you to combine several computers into a network and play the role of its core in it. This is really convenient, and in a variety of situations:
- in an enterprise or office with a large number of computers, network printers and other digital equipment;
- in a small home local network - for example, consisting of several computers, a laptop and a modern TV;
- as part of a large-scale video surveillance system with a large number of cameras;
- in an industrial network with numerous sensors that control technical processes and transmit data to the control room;
- in many other cases.
How does the switch work?
The question of what a switch is, is naturally followed by another one: on what principle does it work? Everything is both simple and complex at the same time. The switch receives data from devices accessing it and gradually fills the switching table with their MAC addresses. On subsequent calls, the switch reads the address of the sending device, analyzes the switching table and uses it to determine which device to send data to. At the same time, other computers do not "know" about the fact of information transfer since it has nothing to do with them. This ensures that the network operates in the so-called full-duplex mode.
At the learning stage, the new switch, not finding the receiver's MAC address in its table, sends data to all devices connected to it (of course, except for the sender). The correct recipient replies to the switch, and the latter creates a new entry in the switch table. In the future, the switch, receiving data with the same MAC address, "understands" exactly where they need to be sent and no longer produces mass mailing but strictly addressed sending. Thus, the traffic is localized, and the network is unloaded.
The principle of operation of the so-called unmanaged switch, which operates at the second (link) OSI layer, was described above. In addition to these, some more advanced models work at the third and fourth levels. They are much more functional since they allow manual control (in particular, through the command line interface), support QoS, VLAN, mirroring, traffic storm detection, limiting data rates for different ports, and many other useful functions. Such devices are included in complex and extensive networks - in particular, those deployed in large enterprises.
There are three modes in which the switch transmits data to destination nodes. The key features of each mode are the degree of transmission reliability and the associated latency.
The first mode is called Cut-Through. The switch accepts data, reads from it only the address of the receiving node and sends it to its destination without any additional checks. The waiting time, in this case, is minimal, but there is a possibility of data transmission with errors.
The second mode is called Store and Forward - with intermediate storage. The switch not only reads the recipient's address but also analyzes all received information to find errors. Only then is the data transferred to its destination. The waiting time increases in comparison with the previous model - the switch must check.
The third mode is called Fragment-Free - fragment less or hybrid. It is a combination of the two modes described above. The switch receives a data frame, reads the destination address, and then checks the information for errors, but not all, but only the first 64 bytes. After verification, the switch sends data to the recipient.
Data transfer conditions are not constant - they change over time. It is useful to have a switch that adapts to these conditions. At the beginning of the operation, such a device enables pass-through switching for all ports. Then, those ports on which there are too many errors are automatically put into a hybrid (fragment less) mode. Finally, if there are still too many errors after this, the ports are put into staging mode.
How to choose a switch?
A great variety of switch models are on sale, which differs significantly from each other both in functionality and in price. An IT specialist needs to know the main characteristics of switches (read - selection criteria).
Base bit rate
In most cases, several speed values are indicated at once in the characteristics of the switches (an example of recording is 10/100 Mbit / s). It would help if you focused on the highest value - this is the maximum for this device. If data arrives at the switch at a rate lower than this maximum, it will automatically adjust to it. Models of the upper price range can operate at speeds of 10/20/100/200/1000/2000 Mbps. Consider the characteristics of your network and the characteristics of the devices included in it and make the right choice.
Number of ports
Models with several ports from 5 to 48 are on sale. Choose a switch taking into account not only the actual number of devices that will be connected to it immediately but also the prospects for expanding the network in the future. Experience shows that for networks deployed at home and in small offices, switches with several ports from 5 to 15 are optimal. For an enterprise, a device with several ports from 15 to 48 is suitable.
Unmanaged switches from one category. They do not allow for fine-tuning, which is a minus for a large enterprise, but a plus for use at home or in a small office. Unmanaged models are usually compact and inexpensive.
The second category includes managed models. They allow flexible configuration using specialized software or a web interface. The administrator can change numerous parameters of the managed switch - priorities of connected devices, general network parameters, and others. Such models are well suited for use in complex and branched networks, but customizing them requires special knowledge and certain experience.
Choose a switch with this feature when you need to supply power to devices directly over a network cable (twisted pair). One possible example is IP cameras connected to a local network. PoE (Power over Ethernet) is a very convenient feature: it eliminates the need to use power cables without compromising the quality of data transmission in any way.
Availability of SFP ports
A switch with such ports is needed if you need to connect it to other switches or higher-level devices. Please note: SFP is just a port; you must first install a special module in it, which, in turn, will enable a non-standard connection (for example, via fibre).
Switches with this function are becoming more and more popular - the growing interest in environmental protection plays a role. These smart models monitor devices connected to them, identify inactive ports and temporarily put them into sleep mode. Manufacturers claim that the power-saving function implemented in switches can save up to 80% (!) Of electricity.
Choose a model with this function if you need a logical delimitation of individual sections of the local network. You can create your own segments for different departments, divisions and branches of the company, organize a public access network.
Traffic segmentation function
Switches with this feature allow you to configure ports or port groups so that they are completely separate from each other but still have access to the server.
A device with this functionality is needed if you need to create a single logical switch with more than 48 ports. It is easy to understand that stacking support is required in large-scale, branched networks deployed in large enterprises.
Broadcast storm protection
One of the private manifestations of such a storm is a DDoS attack on a local network. If the latter includes a regular switch without protection from a broadcast storm, as a result of an attack, the entire network can simply "lie down". Models in which such protection is implemented detect floods and cut them off promptly so that the network remains stable.