Tutorials

What is a lan switch or switch and what is it for?

Table of contents:

Anonim

In the world of networks, it is always important to know how to differentiate the different devices that allow us to create them and interconnect our equipment. So today we are going to learn all about what a Switch is. We will also see the differences between this and other equipment such as routers, hubs or even modems. So, let's get started!

Index of contents

What is a network switch or switch:

Let's start by defining what a switch is, also called a LAN switch . It is a device that will allow us to interconnect the different equipment and nodes in a network, always wired and this will be important to keep in mind. In fact, a Switch will always interconnect devices on a local area network, you know, the one we know as LAN.

The switches operate at the link layer or layer 2 of the OSI (Open System Interconection) model, a reference model used for network protocols and their definition. The data link layer is the one between layer 1 or physical (means of transport and signals) and layer 3 or network (routing and logical addressing). This deals with the physical addressing of the packets that travel over the network according to the MAC address associated with each device connected to it.

The technical and operating specifications of the switches are defined in the IEEE 802.3 standard for Ethernet network standardization. They are a set of standards that basically determine the speed at which the network connection will be able to work. Among them, the standards 802.3i (10BASET-T 10 Mbps), 802.3u (100BASE-T 100 Mbps), 802.3z / ab (1000BASE-T 1Gbps over fiber or twisted pair), etc. are well known.

Currently these standards are followed by all these devices, which always use a star topology to connect the nodes, the core team being the Switch itself. By means of a series of ports or RJ45 or SFP ports, the nodes are connected.

What a Switch can and cannot do

It is very important to know what the work area of ​​a Switch is as this will help to know how and where to connect it and what it is designed for. And of course to differentiate them from other network devices.

What you can do:

  • Interconnect devices on a wired network Toggle and forward packets from source to destination using its network-scaled MAC address table and as a link to the IP address server, which can be a router or host computer

That he can not do:

  • It is not capable of giving us connectivity with other networks, which are outside its subnet mask Consequently, it is not capable of providing Internet connection

We will see that there are switches that thanks to a firmware or small operating system are capable of doing even more things that exceed the functions for which they are designed.

Features and elements

We can find switches of practically any size in terms of ports, but they are the key to setting up complex data processing centers, with equipment and cabinets with hundreds of ports.

Ports and speed

The operation of a Switch is carried out through network ports, which allow the interconnection of the different nodes in the internal network. The number is what will determine its capacity and power, as well as its speed. The most normal thing will be to find them between 4 and 20 ports, but there are many more oriented to companies. Can have:

  • RJ45: own port for twisted pair cables, the typical 4 twisted pair UTP cables for LAN working at 10/100/1000/10000 Mbps

  • SC: fiber optic port for high-speed links at 1/10 Gbps.

  • SFP or GBIC ports: these are called modular ports because they do not have a specific connector, but rather a hole in which to insert the connector with the type of port we want. This can be a GBIC (Gigabit Interface Converter) usually with integrated RJ45 ports or the SFP / SFP + (Small Form-Factor Pluggable), a smaller port either with RJ45 or 10 Gbps fiber optics.

  • Combo ports: they are not a type of port as such, but a way to provide the Switch with a greater variety of ports. They usually come in panels of 2 RJ45 + 2 SFP or 4 + 4, where we can either use one or the other, but never both at the same time because they share a bus.

The speed is defined by the different versions of the 802.3 standard that we have seen at the beginning. We currently find switches that can deliver 10 Mbps, 100 Mbps, 1 Gbps, and 10 Gbps.

Switching methods of a switch

Switch is the Spanish name of a Switch, we think that is clear, this name refers to its operation on the Ethernet standard. This is based on the transmission of data in LAN through frames that transport the data with a header that allows both sender and receiver to be identified using the MAC address. Be careful, we are talking about MAC address not IP address, it works in another OSI layer. There are two methods of communication in networks:

  • Half Duplex: in this connection the data travels in one direction or the other, but never towards both at the same time, for example, a Full Duplex Walkie Talkie : it is the one that uses the send and receive channels simultaneously, for example, one telephone.

A very important element that determines the switching capacity of a Switch are buffers, memory elements that serve to store the frames that are to be forwarded to the corresponding node. These Buffers perform the cache function, especially important to connect two nodes with ports at different speeds, in order to reduce the bottleneck effect.

There are several switching techniques on a Switch:

  • Store-And-Forward Cut-Through Adaptive Cut-Through

(store and forward)

In this first method, the switch stores the entire data frame in the buffer upon receipt. This is done to detect possible errors in it and obviously to analyze origin and destination. After this, it will be sent to the recipient.

This method is always used on switches that have different speed ports, although we must keep in mind that there will always be a small lag or delay in sending when using this method.

(direct forwarding)

In this case, the frame is not completely buffered, but only its header is read to know the source and destination MAC and then it is forwarded.

It is a faster technique than the previous one, but it does not provide error control in damaged frames. In addition, the ports of the device must all work at the same speed.

(adaptive direct forwarding)

It is not a new method, but the ability of the switch to choose between the two previous methods. For example, when the Switch detects that too many failed and lost packets are coming in, it automatically switches to storage and forwarding, while if the ports have the same speed it will use direct forwarding.

Working with Jumbo Frames

When we are going to buy a Switch, it is usual that in its specifications they talk about Jumbo frames if the team can work with them.

We have already said that a Switch works with ethernet frames, which have a standard size of 1500 bytes. But it is possible to make them larger, up to 9000 Bytes, which are called Jumbo Frames. These do not fall within the 802.3 standard.

These frames are used to work with large volumes of information, making data transfer more efficient quickly, although it adds latency to the connection due to the fact that it has to process more information. For this reason, Jumbo Frames are used with quite powerful switches.

Switch types

We only have to see the types of Switch that we find in the market, which will be oriented to certain tasks depending on their capacity, ports, and other standards that they implement.

Switches unmanageable and manageable or level 3/4

In general, the switches have not had management capacity, at least in the most basic models. These work on the 802.3u standard, which indicates that a Switch must have autonegotiation capacity. Without the need for the intervention of a person, the customer and the switch “decide” what the switching parameters will be like. These would be the unmanaged switches.

But over time the hardware has come a long way, reducing the size, increasing the power and giving these devices more intelligence. It is not uncommon to see switches with 4-core processors and RAM of 512 MB or even more. But the most important thing in them is that they have firmware that is accessible from the browser or some dedicated port, in order to modify their parameters. These are the managed switches.

This capacity is necessary or at least optional for those computers that, in addition to switching, also offer the ability to create VPN networks, Port Mirroring (port monitoring or Port Trunking (link aggregation). These switches are also called level 3 switches. when they are able to do IP routing functions, that is, work at layer 3 of the OSI model, for example, to create a VPN. If we add to this the control of logical ports, then we will talk about a level 3 switch / Four.

PoE switch

PoE (not to be confused with PPPoE) stands for Power Over Ethernet, or Power over Ethernet. It is a technology that may well be similar to USB or Thunderbolt that we all know, since in addition to allowing the sending of data to the client-Switch, it also provides power to it. This is done directly over the UTP cable. It is based on standards:

  • IEEE 802.3af: PoE with power up to 15.4W IEEE 802.3at: PoE +: increases capacity up to 30W 3bt: uPoE reaches 51W or 71W

The power capacity is extremely useful for connecting Wi-Fi access points, IP surveillance cameras, or VoIP phones. This is how most cameras in public establishments are fed.

Desktop, Edge and Trunk Switches

Desktop switches are the most basic of all, which will almost never be managed since they are simply aimed at expanding our home network without major complications. They offer between 4 and 8 ports, at 100 Mbps with both half-duplex and full-duplex functionality. Actually, most routers already integrate at least 4 or 5 ports with these characteristics.

The second group are the perimeter switches, they have a greater number of ports, which can easily reach 24 or even 48 ports. These are used to create small subnets oriented to computer rooms of educational centers, laboratories, offices, etc. Your connection is usually 1 Gbps.

Trunk switches, in addition to offering more ports, will be manageable and will offer OSI Layer 2 and 3 functions to handle packet switching and routing. If we also add modularity through rack cabinets, we could have several hundred ports working at 1 Gbps or even 10 Gbps for data centers.

Differences between a Switch and HUB

After seeing in detail what a Switch is, it should be distinguished from those network devices related to it.

The first and most obvious is the Hub or hub, a device that can be considered the predecessor of the Switch. Like this it has a panel with a certain number of ports to interconnect the different nodes in the connected one.

The big difference is that the Hub is not able to distinguish if the information that passes through it is directed to one computer or another. This device is limited to receiving the information and repeating it for all its ports, regardless of what you have connected to them, which we call broadcast.

Differences between switch, router and modem

The next differentiation that we must make is that of the switch with the routers and the modem, and this will be easy, relying on the OSI levels.

We know that the Switch works naturally in layer 2 of the model, the data link layer, since through its MAC table it is able to send packets to the destination host. Although it is true that there are computers that can also work in layer 3 and 4 thanks to their firmware.

On the other hand, a modem only works at layer 1 or physical, it is only dedicated to converting and translating the signals that come to it from the network. For example, analogue in digital, wireless in electrical and optical in electrical.

Finally, the router is a device that works mainly in layer 3, the network layer, since it is in charge of packet routing and transfer from the public network to the internal network created by it. But of course, today's routers are very complete, and also include the function of Switch with multiple ports, and even functions of layer 4 and 7 thanks to the creation of VPN or shared data services.

Conclusions about switches

Currently almost none of us need a Switch to connect our equipment to the network, since today's routers have up to 8 ports for this and Wi-Fi. However, they are and will continue to be used indisputably in data centers, educational centers and many more.

The great evolution that these devices have had thanks to the increased power of the hardware and the complexity of the firmware, make them true computers almost at the level of routers.

We leave you now with a few networking articles:

Have you ever owned or have a Switch, what capacity? Leave your comments or questions that you consider appropriate in the box

Tutorials

Editor's choice

Back to top button