What is a network switch and how does it work?

Networks are essential today for supporting businesses, providing communications, providing entertainment, the list goes on and on. A fundamental thing that networks have in common is the network switch, which allows devices to be connected for the purpose of sharing resources.

What is a network switch?

A network switch is a device that operates at the data link layer of the OSI — Layer 2 model. It receives packets sent by devices connected to its physical ports and sends them back, but only through the ports that lead to them. devices for which the packages are intended. They can also operate at the network layer – Layer 3 where routing occurs.

Switches are a common component of networks based on Ethernet, Fiber Channel, Asynchronous Transfer Mode (ATM), and InfiniBand, among others. In general, however, most switches today use Ethernet.

How does a network switch work?

After a device is connected to a switch, the switch notes its media access control (MAC) address, a code that is built into the network interface card (NIC) of the device that connects to a Ethernet cable that connects to the switch. The switch uses the MAC address to identify from which connected device outgoing packets are sent and where to deliver incoming packets.

Thus, the MAC address identifies the physical device as opposed to the network layer IP address (Layer 3), which can be dynamically assigned to a device and change over time.

When a device sends a packet to another device, it enters the switch and the switch reads its header to determine what to do with it. It matches the destination address or addresses and sends the packet through the appropriate ports to the destination devices.

To reduce the risk of collisions between inbound and outbound network traffic from a switch and a device connected at the same time, most switches offer full duplex functionality in which packets coming in and going to a device have full bandwidth access. of the switch. link. (Imagine two people talking on a cell phone rather than a walkie talkie).

While it is true that switches operate at Layer 2, they can also operate at Layer 3, which is necessary for them to support Virtual Local Area Networks (VLANs), which are logical network segments that can span across subnets. In order for traffic to move from one subnet to another, it must pass between switches, which is facilitated by the routing capabilities built into the switches.

Switches vs Hubs

A hub can also connect multiple devices together for the purpose of sharing resources, and the set of devices connected to a hub is called a LAN segment.

A hub differs from a switch in that packets sent by one of the connected devices are broadcast to all devices connected to the hub. With a switch, packets are directed only to the port that leads to the device to which the packets are addressed.

Switches typically connect local network segments, so hubs connect to them. The switches filter traffic destined for devices on the same LAN segment. With this intelligence, switches more efficiently use their own processing resources as well as network bandwidth.

Switches vs Routers

Switches are sometimes confused with routers, which also provide the forwarding and routing of network traffic, hence their name. But they do it with a different purpose and location.

Routers operate at Layer 3 (the network layer) and are used to connect networks to other networks.

An easy way to tell the difference between switches and routers is to think about local area networks and wide area networks. Devices connect locally through switches, and networks are connected to other networks through routers. If you think about the general path a packet can take to reach the internet, for example: device> hub> switch> router> internet, that should help you too.

Of course, there are cases where the switching functionality is built into the hardware of a router, and the router also acts as a switch.

The simplest case here is to think of your home wireless router. It is routed to a broadband connection through its WAN port, but it usually also has additional Ethernet ports that you can use to connect an Ethernet cable to a computer, TV, printer, or even a game console. ‘other devices on the network, such as other laptops and phones, connect through the Wi-Fi router, it still offers switching functions through the local network. So the router, in fact, is also a switch. And you can even connect a separate switch to the router to provide both internet and LAN access to additional devices.

Types of switches

Switches vary in size, depending on the number of devices you need to connect in a specific area, as well as the type of network speed / bandwidth required for those devices. In a small office or home office, a four- or eight-port switch is usually sufficient, but for larger deployments, you typically see switches with up to 128 ports. The form factor of a smaller switch is an appliance that you can install on a desktop, but the switches can also be rack-mounted for placement in a wiring closet, data center, or server farm. Rack mountable switch sizes range from 1U to 4U, but larger areas are also available.

Switches also vary in the network speed they offer, ranging from Fast Ethernet (10/100 Mbps), Gigabit Ethernet (10/100/1000 Mbps), 10 Gigabit (10/100/1000/10000 Mbps) and even 40/100 Gbps speeds. The speed to choose depends on the throughput required for the supported tasks.

Switches also differ in their capabilities. Here are three types.

Not managed

Unmanaged switches are the most basic, offering a fixed configuration. They are generally plug-and-play, which means they have little to no options for the user to choose from. They can have default settings for features like quality of service, but they cannot be changed. The advantage is that unmanaged switches are relatively inexpensive, but their lack of functionality makes them unsuitable for most business uses.

Managed

Managed switches offer more features and functionality for IT pros and are the type most commonly seen in corporate or enterprise settings. Managed switches have command line interfaces (CLIs) to configure them. They support Simple Network Management Protocol (SNMP) agents that provide information that can be used to troubleshoot network problems.

They can also support VLANs, QoS settings, and IP routing. Security is also better, protecting all types of traffic they handle.

Because of their advanced features, managed switches cost significantly more than unmanaged switches.

Smart or smart switches

Smart or intelligent switches are managed switches that have some functionality beyond what an unmanaged switch offers, but less than a managed switch. They are therefore more sophisticated than unmanaged switches, but they are also less expensive than a fully managed switch. They generally do not support telnet access and have web GUIs rather than command line interfaces. Other options, such as VLANs, may not have as many features as those supported by fully managed switches. But because they are cheaper, they may be suitable for smaller networks with less financial resources and those with fewer feature requirements.

Management features

The full list of features and functionality of a network switch will vary depending on the switch manufacturer and any additional software provided, but in general, a switch will provide professionals with the ability to:

  • Enable and disable specific ports on the switch.
  • Configure the settings for full duplex (half or full), as well as bandwidth.
  • Set the Quality of Service (QoS) levels for a specific port.
  • Enable MAC filtering and other access control features.
  • Configure SNMP monitoring of devices, including link health.
  • Configure port mirroring, to monitor network traffic.

Other uses

In large networks, switches are often used as a means of offloading traffic for analysis. This can be important for security, where a switch can be placed in front of a WAN router, before traffic goes to the LAN. It can facilitate intrusion detection, performance analysis and firewall. In many cases, port mirroring is used to mirror data flowing through the switch before it is sent to an intrusion detection system or packet sniffer, for example.

Basically, however, it is the simple task for a network switch to quickly and efficiently deliver packets from Computer A to Computer B, whether the computers are located across the hall or at the other side of the world. Several other devices help with this delivery along the way, but the switch is an essential part of the network architecture.

Join the Network World communities on Facebook and LinkedIn to comment on the topics that matter to you.

Copyright © 2020 IDG Communications, Inc.

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *