general speaking:

  • The first-level switch only supports the physical layer protocol (the telephone program-controlled switch can be counted as one???)
  • Layer 2 switches support physical layer and data link layer protocols, such as Ethernet switches
  • Three-layer switch supports physical layer, data link layer and network layer protocols, such as some switches with routing functions

From the ISO/OSI hierarchical structure, switches can be divided into two-tier switches, three-tier switches, and so on. The second-layer switch refers to the traditional switch that works on the second layer of the OSI reference model-the data link layer. Its main functions include physical addressing, error checking, frame sequence, and flow control. A pure second-tier solution is the cheapest solution, but it provides the least control in terms of subnetting and broadcasting restrictions. Traditional routers can be used together with external switches to solve this problem, but the processing speed of routers can no longer keep up with the bandwidth requirements. Therefore, Layer 3 switches, Web switches, etc. came into being.

The three-layer switch is a device with three-layer switching function, that is, the second-layer switch with the third-layer routing function, but it is an organic combination of the two, not simply superimposing the hardware and software of the router device on the LAN On the switch.

Web switches provide management, routing, and load balancing transmission for data center equipment (including Internet servers, firewalls, cache servers, and gateways, etc.). Different from traditional network equipment, traditional network equipment pays attention to high-speed completion of the exchange of single frames and data packets, while Web switching focuses on tracking and processing Web sessions. In addition to the connection and packet routing provided by traditional Layer 2/3 switches, Web switches can also provide complete strategies that traditional LAN switches and routers lack, and balance local and global server load, access control, and quality of service assurance ( QoS) and bandwidth management and other management capabilities. At present, Web switches have evolved from pure transport layer (layer 4) devices to the intelligence of content-based (layer 7) switching. Using content or user classification to redirect Web requests is a function of the Web server. However, the development of Internet transmission and commerce far exceeds the improvement of computer processing power. Offloading content categories to the Web switch balances the entire site's infrastructure.

Layer 3 switch is a switch with routing function!! Layer 2 is based on MAC address access!

There are currently two common types of switches:

  • The first is the Layer 2 switch, which is the one we see the most.Based on MAC, Layer 2 fast switching, all interfaces are in the same broadcast domain.
  • The second type is the layer 3 switch you are talking about. As the name suggests, the layer 3 switch can use the routing function. In the early days of the layer 3 switch, an MSFC (Multilayer Switching Feature Card) was needed to support the layer 3 routing function. Modern layer 3 switches All have integrated this feature.

Example 1_ Layer 2 switch:

There are two Layer 2 switches on the first floor and the second floor. They can divide VLANs and make strategies to communicate. However, if the switch on floor 1 and the switch on floor 2 are not in the same VLAN, and they have to communicate with each other. , Then you need to use the router to do the routing function.

Example 2_Layer three switch:

As above, if there are more floors and more switches, then only a 3-layer core switch can replace the router.

The principle of a layer 3 switch is very simple: one route is exchanged multiple times.

Explanation: In a wide area network, of course, what is running is layer 3 data packets (routed), and routing needs to determine the optimal path from source to destination each time, and you have to re-select it each time, and if you use a layer 3 switch , You can perform source-to-destination routing for the first time, and the layer 3 switch will transfer this data to layer 2. Then next time, whether it is from destination to source or source to destination, it will be fast exchanged.


  1. Layer 3 switches have routing functions, but they cannot completely replace routers because the basic principles are different.
  2. In a sense, Layer 3 switches will be much faster than router policy forwarding!
  3. Layer 3 switches can easily save network resources and prevent congestion.