Tag Archives: network switch

Layer 2, Layer 3 & Layer 4 Switch: What’s the Difference?

Network switches are always seen in data centers for data transmission. Many technical terms are used with the switches. Have you ever noticed that they are often described as Layer 2, Layer 3 or even Layer 4 switch? What are the differences among these technologies? Which layer is better for deployment? Let’s explore the answers through this post.

What Does “Layer” Mean?

In the context of computer networking and communication protocols, the term “layer” is commonly associated with the OSI (Open Systems Interconnection) model, which is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven abstraction layers. Each layer in the OSI model represents a specific set of tasks and functionalities, and these layers work together to facilitate communication between devices on a network.

The OSI model is divided into seven layers, each responsible for a specific aspect of network communication. These layers, from the lowest to the highest, are the Physical layer, Data Link layer, Network layer, Transport layer, Session layer, Presentation layer, and Application layer. The layering concept helps in designing and understanding complex network architectures by breaking down the communication process into manageable and modular components.

In practical terms, the “layer” concept can be seen in various networking devices and protocols. For instance, when discussing switches or routers, the terms Layer 2, Layer 3, or Layer 4 refer to the specific layer of the OSI model at which these devices operate. Layer 2 devices operate at the Data Link layer, dealing with MAC addresses, while Layer 3 devices operate at the Network layer, handling IP addresses and routing. Therefore, switches working on different layers of OSI model are described as Lay 2, Layer 3 or Layer 4 switches.

OSI model

Switch Layers

Layer 2 Switching

Layer 2 is also known as the data link layer. It is the second layer of OSI model. This layer transfers data between adjacent network nodes in a WAN or between nodes on the same LAN segment. It is a way to transfer data between network entities and detect or correct errors happened in the physical layer. Layer 2 switching uses the local and permanent MAC (Media Access Control) address to send data around a local area on a switch.

layer 2 switching

Layer 3 Switching

Layer 3 is the network layer in the OSI model for computer networking. Layer 3 switches are the fast routers for Layer 3 forwarding in hardware. It provides the approach to transfer variable-length data sequences from a source to a destination host through one or more networks. Layer 3 switching uses the IP (Internet Protocol) address to send information between extensive networks. IP address shows the virtual address in the physical world which resembles the means that your mailing address tells a mail carrier how to find you.

layer 3 switching

Layer 4 Switching

As the middle layer of OSI model, Layer 4 is the transport layer. This layer provides several services including connection-oriented data stream support, reliability, flow control, and multiplexing. Layer 4 uses the protocol of TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) which include the port number information in the header to identify the application of the packet. It is especially useful for dealing with network traffic since many applications adopt designated ports.

layer 4 switching

” Also Check –What Is Layer 4 Switch and How Does It Work?

Which Layer to Use?

The decision to use Layer 2, Layer 3, or Layer 4 switches depends on the specific requirements and characteristics of your network. Each type of switch operates at a different layer of the OSI model, offering distinct functionalities:

Layer 2 Switches:

Use Case: Layer 2 switches are appropriate for smaller networks or local segments where the primary concern is local connectivity within the same broadcast domain.

Example Scenario: In a small office or department with a single subnet, where devices need to communicate within the same local network, a Layer 2 switch is suitable.

Layer 3 Switches:

Use Case: Layer 3 switches are suitable for larger networks that require routing between different subnets or VLANs.

Example Scenario: In an enterprise environment with multiple departments or segments that need to communicate with each other, a Layer 3 switch facilitates routing between subnets.

Layer 4 Switches:

Use Case: Layer 4 switches are used when more advanced traffic management and control based on application-level information, such as port numbers, are necessary.

Example Scenario: In a data center where optimizing the flow of data, load balancing, and directing traffic based on specific applications (e.g., HTTP or HTTPS) are crucial, Layer 4 switches can be beneficial.

Considerations for Choosing:

  • Network Size: For smaller networks with limited routing needs, Layer 2 switches may suffice. Larger networks with multiple subnets benefit from the routing capabilities of Layer 3 switches.
  • Routing Requirements: If your network requires inter-VLAN communication or routing between different IP subnets, a Layer 3 switch is necessary.
  • Traffic Management: If your network demands granular control over traffic based on specific applications, Layer 4 switches provide additional capabilities.

In many scenarios, a combination of these switches may be used in a network, depending on the specific requirements of different segments. It’s common to have Layer 2 switches in access layers, Layer 3 switches in distribution or core layers for routing, and Layer 4 switches for specific applications or services that require advanced traffic management. Ultimately, the choice depends on the complexity, size, and specific needs of your network environment.

Conclusion

With the development of technologies, the intelligence of switches is continuously progressing on different layers of the network. The mix application of different layer switches (Layer 2, Layer 3 and Layer 4 switch) is a more cost-effective solution for big data centers. Understanding these switching layers can help you make better decisions.

Related Article:

Layer 2 vs Layer 3 Switch: Which One Do You Need? | FS Community

How to Upgrade Cumulus Linux on N-Series Switches?

In the previous posts, we have introduced lots of details about Cumulus Linux, a network operating system. Also, we have talked about how to install Cumulus Linux on FS N-series switches like the 100GbE switch. In this post, we will solve another Cumulus Linux related question concerned by most of our users: how to upgrade Cumulus Linux on an N-series network switch?

Before Upgrading Cumulus Linux

Before any update, you should consider the migration and backup of some important data or files in case of any accident or emergency. In that way, being clear about the location of your configuration data is crucial before updating Cumulus Linux. Just like other Linux operating system distributions, the /etc directory is the primary location for all configuration data in Cumulus Linux. In the following figures, we list some files and as well as their directories that you are likely to do the backup.

Cumulus Linux Network Configuration Files

Figure 1: Cumulus Linux Network Configuration Files

Additional Commonly Used Files

Figure 2: Additional Commonly Used Files

Note: If you are using the root user account, consider including /root/. If you have custom user accounts, consider including /home//.

Upgrading Processes

Basically, there are two methods to upgrade Cumulus Linux: disk image install and package upgrade. According to different environment and preferences, the upgrade can be achieved in different ways. In this part, we will guide you on how to use these two ways one by one. By the way, if you are using MLAG to dual connect two switches in your environment, there are additional steps to follow. You can refer to the guide:Upgrade Switches in an MLAG Pair.

Solution 1: Installing A Disk Image

When you are performing a rolling upgrade in a production environment and using up-to-date and comprehensive automation scripts, the disk image installation will be recommended. It enables you to choose the exact release to which you want to upgrade. Moreover, it is the only method available to upgrade your switch like a 10GbE switch to a new release train (for example, from 2.5.6 to 3.7.0) or from a release earlier than 3.6.2.
To apply this upgrade, you need to use ONIE (open network install environment), which allows the installation of network operating systems (NOS) on a bare metal switch. FS N-series switches all include an ONIE installer. There are mainly six steps you can follow with:

1. Back up the configurations off the switch.

2. Download the Cumulus Linux image you want to install.

3. Install the disk image with the onie-install -a -i command, which boots the switch into ONIE. There are various ways to install the disk image, such as using FTP, a local file, or a USB drive. In figure 3, we demonstrate how to install image from a web server as your reference. After disk image installed, the switch can be rebooted.

Disk Image Install

Figure 3: Disk Image Install

4. Restore the configuration files to the new release—ideally with automation.

5. Verify correct operation with the old configurations on the new release.

6. Re-install third-party applications and associated configurations.

Solution 2: Upgrading Packages

Package upgrade is recommended if you are upgrading from Cumulus Linux 3.6.2 or later, or if you use third-party applications (package upgrade does not replace or remove third-party applications, unlike disk image install). When upgrading, configuration data stays in place. If the new release updates a configuration file that you changed previously, you are prompted for the version you want to use or if you want to evaluate the differences. Altogether, there are six steps as follows:

1. Back up the configurations from the switch.

2. Apply the following command to fetch the latest update metadata from the repository.

Command for the Latest Update Metadata

3. Review potential upgrade issues (in some cases, upgrading new packages might also upgrade additional existing packages due to dependencies). Run the following command to see the additional packages that will be installed or upgraded.

Command for Additional Packages

4. Upgrade all the packages to the latest distribution.

Command to the Latest Distribution

5. Reboot the switch if the upgrade messages indicate that a system restart is required.

Command to Reboot the Switch

6. Verify correct operation with the old configurations on the new version.

Questions & Answers

Besides the procedures to upgrade Cumulus Linux, we also list some questions concerned most by our FS customers.

1. How to Deal With Upgrade Failures?

Even the most well planned and tested upgrades can result in unforeseen problems. If you fail to upgrade Cumulus Linux, sometimes the best solution is to roll back to the previous state. You can refer to the following three techniques:

  • Back out individual packages: If you identify the problematic package, you can downgrade the affected package directly. In rare cases, you might need to restore the configuration files from backup or edit to back out any changes made automatically by the upgrade package.
  • Flatten and rebuild: use orchestration tools to re-install the previous OS release from scratch and then rebuild the configuration automatically.
  • Backup and restore: restore to a previous state, using a backup captured before the upgrade.
2. Will Future Software Updates for Cumulus Linux Be Free?

For FS N-series switches, the default validity of Cumulus Linux is one year. If Cumulus Linux OS is upgraded after 1 year, the customer can’t upgrade it for free and needs to renew the software support. Even if the software support service has been expired, you are allowed to use your current software as usual. By the way, we also provide a three-year software support fee option and a five-year software support fee option. The longer for OS support you choose, the more economical the switch will be.

3. Who Will Cover Technical Support?

FS will provide five-year tech support for the hardware. As for the problems about Cumulus Linux, FS and Cumulus will solve it together. Moreover, as one of the Linux distributions, the source code of Cumulus Linux is also freely available to everyone to use, modify or share such as GitHub. Just like the above question about the software update, the default validity of technical support for Cumulus Linux is one year. One year later, you can renew the support term.

Summary

In this post, we mainly focus on how to upgrade the Cumulus Linux on FS N-series switches. In addition, we list three after-sales related questions frequently asked by our FS customers.

An Overview on EVPN and LNV

Bombarded with assorted network applications and protocols, the technologies and solutions for network virtualization delivery have been enriched greatly over past years. Among those technologies, VXLAN, also called virtual extensible local area network, is the key network virtualization. It enables layer 2 segments to be extended over an IP core (the underlay). The initial definition of VXLAN (RFC 7348) only relied on a flood-and-learn approach for MAC address learning. Now, a controller or a technology such as EVPN and LNV in Cumulus Linux can be realized. In this post, we are going to make an exploration on those two techniques: LNV and EVPN.

VXLAN

Figure 1: VXLAN

What Is EVPN

EVPN is also named as Ethernet VPN. It is largely considered as a unified control plane solution for the controller-less VXLAN, allowing for building and deploying VXLANs at scale. The EVPN relies on multi-protocol BGP (MP-BGP) to transport both layer 2 MAC and layer 3 IP information at the same time. It enables a separation between the data layer and control plane layer. By having the combined set of MAC and IP information available for forwarding decisions, optimized routing and switching within a network becomes feasible and the need for flooding to do learning gets minimized or even eliminated.

What Is LNV

LNV is the short of lightweight network virtualization. It is a technique for deploying VXLANs without a central controller on bare metal switches. Typically, it’s able to run the VXLAN service and registration daemons on Cumulus Linux itself. The data path between bridge entities is established on the top of a layer 3 fabric by means of a simple service node coupled with traditional MAC address learning.

The Relationship Between EVPN and LNV

From the above wiki of the EVPN and LNV, it’s easy for us to notice these two technologies are both the applications of VXLAN. For LNV, it can be used to deploy VXLAN without an external controller or software suite on the bare-metal layer 2/3 switches running Cumulus Linux network operating system (NOS). As for EVPN, it is a standards-based control plane for VXLAN, which can be used in any usual bare-metal devices, such as network switch and router. Typically, you cannot apply LNV and EVPN at the same time.

Apart from that, the deployments for EVPN and LNV are also different. Here, we make a configuring model for each of them for your better visualization.

EVPN Configuration Case

 

EVPN

Figure 2: EVPN

In the EVPN-VXLAN network segments shown in Figure 2 (Before), hosts A and B need to exchange traffic. When host A sends a packet to host B or vice versa, the packet must traverse the switch A, a VXLAN tunnel, and the switch B. By default, routing traffic between a VXLAN and a Layer 3 logical interface is disabled. If the functionality is disabled, the pure Layer 3 logical interface on the switch A drops Layer 3 traffic from host A and VXLAN-encapsulated traffic from the switch B. To prevent the pure Layer 3 logical interface on the switch A from dropping this traffic, you can reconfigure the pure Layer 3 logical interface as a Layer 2 logical interface, like Figure 2 (After). After that, you need to associate this interface with a dummy VLAN and a dummy VXLAN network identifier (VNI). Then, an Integrated routing and bridging (IRB) interface need to be created, which provides Layer 3 functionality within the dummy VLAN.

LNV Configuration Case

 

LNV

Figure 3: LNV

The two layer 3 switches are regarded as leaf 1 and leaf 2 in the above figure. They are running with Cumulus Linux and have been configured as bridges. Containing physical switch port interfaces, the two bridges connect to the servers as well as the logical VXLAN interface associated with the bridge. After creating a logical VXLAN interface on both leaf switches, the switches become VTEPs (virtual tunnel end points). The IP address associated with this VTEP is most commonly configured as its loopback address. In the image above, the loopback address is 10.2.1.1 for leaf 1 and 10.2.1.2 for leaf 2.

Summary

In this post, we have introduced the two techniques of network virtualization: EVPN and LNV. These two applications of network virtualization delivery share some similarities, but also quite a lot of differences. Being satisfied with the simplicity, agility, and scalability over the network, the EVPN has been a popular choice in the market.

How to Choose a Gigabit Network Switch?

Gigabit network switch is the most commonly used equipment in data centers. Before choosing the best network switch for the current or future network, people can type “Ethernet switch” into the online shopping site or search engine, they may find a ton of listings for switches of all kinds and price levels. It’s not an easy job to find one. Then how to choose a Gigabit network switch in order to avoid buying the wrong device or overspending needlessly?

Gigabit network switch is widely used

Figure: Gigabit network switch is widely used.

Types of Gigabit Network Switch

Gigabit Ethernet switch can be divided into unmanaged, managed and PoE categories.

Unmanaged switches use the plug-and-play design that means they only allow Ethernet devices to communicate with one another. They are shipped with fixed configuration and don’t allow any changes to this configuration. This type of network switch is normally found in home networks or small business.

Managed switches offer all the features of unmanaged switches and are capable of configuring, managing and monitoring one’s LAN. Users have greater control over how data travels over the network and decide which one has access to it.

PoE switches support electrical power and data transmission over one network cable, which will greatly simplify the cabling process. Using a PoE switch, people don’t need to worry about power outlet when deploying network devices.

Features of Gigabit Network Switch

With a network switch, users can have different networked devices on their desks as well as bandwidth-intensive applications that require high rates of data transmission and no tolerance for congestion. These switches are the basics of modern wired network. They can not only provide the connections to PCs and other devices in a wide variety of fields, but also support the cloud storage of servers. With new trends like SDN and the IoT transforming the industry, people have to get the features that they need from the switches, so that they would know which switch is the one that they need.

How to Choose a Gigabit Network Switch?

Here are the most important facts you should consider when choosing a Gigabit network switch.

  • Choose the role of the switch. If you are just looking for a device to extend your wired network at home, one unmanaged switch is suitable. And an 8 port Ethernet switch or 12 port switch is enough for home network. If you want to find a switch for a large network, you may buy one or more managed switches acting as core switches. 24 port and 48 port PoE managed switches are the right choice.
  • Choose the forwarding rate of the switch. Gigabit switches have different processing rate. Processing and forwarding data rates are very important. The processing rate becomes lower, the forwarding rate will be slower. This may make the switch unable to accommodate full wire-speed communication across all the ports. So people should figure out what forwarding rate they need before buying a Gigabit switch.

Conclusion

From the above, we know how to choose a Gigabit network switch. If you have decided to buy a network switch, welcome to visit FS.COM. FS has a good selection of 10Gb switch, 40G or even 100G switch and PoE switch for home and office users.

How to Mount a Network Switch to a Rack?

A network switch has been recognized as one of the most important devices for today’s networking technology. It allows simultaneous transmission of multiple packets and partition a network more efficiently than bridges or routers. The rack mount switch can be installed in a standard 19-inch equipment rack or on a desktop or shelf. So how do you mount a network switch to a rack to establish network wiring connections? Here’s a step-by-step guide to teach you how to mount a network switch to a rack.

Preparations Before Mounting the Network Switch

Before rack mounting the switch, please pay attention to the following factors:

  • Location: The site should be at the center of all the devices you want to link and near a power outlet, so that it is accessible for installing, cabling and maintaining the devices in the rack.
  • Temperature: Since the temperature within a rack assembly may be higher than the ambient room temperature, check that the rack-environment temperature is within the specified operating temperature range (0 to 40 °C).
  • Mechanical Loading: Do not place any equipment on top of a rack-mounted unit.
  • Circuit Overloading: Be sure that the supply circuit to the rack assembly is not overloaded.
  • Grounding: The switch rack should be properly grounded.

How to Mount a Network Switch to a Rack?

Step1. Attaching the Brackets to the Switch

Attach the brackets to the network switch using the screws provided in the mounting accessory.

network switch to rack

Step2. Installing the Switch in the Rack

Mount the switch in the rack with the optional rack mount kit, usually using the rack-mounting screws. Be sure to secure the lower rack-mounting screws first to prevent the brackets being bent by the weight of the switch.

switch rack

Step3. Adding Other Switches into the Rack

If there is only one data switch to be installed in the rack, then you can make the connection to a power source now. If there are multiple switches to be mounted, you need to install the another switch on the top of the first one in the rack, and then attach the power cords.

Step4. Attaching the Power Cords

After you complete mounting all of the switches in the rack, it’s time to connect the switch rack to the power source. Remember to verify that you have the correct power supply (AC-input or DC-input and the correct wattage) for your configuration.

Caution: To prevent bodily injury when mounting or servicing the switches in a rack, you must take special precautions to ensure that the system remains stable. The following guidelines are provided to ensure your safety:

  • This network switch should be mounted at the bottom of the rack if it is the only unit in the rack.
  • When mounting the switch in a partially filled rack, load the rack from the bottom to the top with the heaviest component at the bottom of the rack.
  • If the rack is provided with stabilizing devices, install the stabilizers before mounting or servicing the switches in the rack.

Establishing Network Wiring Connections

After mounting your network switches to a rack, you can establish the network wiring connections according to your requirements now. If you’re using a Gigabit Ethernet switch, it can be connected to 10, 100 or 1000Mbps network interface cards in PCs and servers, as well as to other switches and hubs. It may also be connected to remote devices using optional SFP transceivers. No matter which type of network switches you are using, make sure that they are securely mounted in the rack and connected to the corresponding networking wiring systems.