Historically, LAN switching typically involves Layer 2 switching at the Access Layer and sometimes at the Distribution Layer. Layer 2 switches forward information based only on the MAC address (the Layer 2 frame address). Layer 3 switching, however, uses the MAC address in addition to the Layer 3 address (e.g., an IP address).
The following three options exist when considering designing a switched environment:
- Layer 2 switching throughout the network
- A combination of Layer 2 and Layer 3 switching (this requires a higher degree of planning)
- Layer 3 switching throughout the network
When deciding between Layer 2 and Layer 3 switching (Figure 4.5), the network designer must understand the impact it may make in the following areas:
- How the policies are implemented
- How intelligent load sharing is accomplished
- The way network failures are dealt with
- Convergence issues
- The cost factor
Figure 4.5 – Layer 2 versus Layer 3 Switching
Note: Using Layer 2 switching, Layer 3 switching, or a combination of the two also depends on the available switching platforms, as not all switches support Layer 3 technologies. Layer 3 switches are also called “multilayer switches” or “routing switches”.
At the heart of switched networking is the concept of VLANs. This represents the process of creating logical broadcast domains by grouping particular nodes attached to different switches within a switched environment.
When designing a full Layer 2 environment using VLANs, a router might be used to provide routing between VLANs. This technique is called “router on a stick” because only one router interface is used to carry all the VLANs.
The advantages of having a combination of Layer 2 and Layer 3 switches at the Distribution Layer or Core Layer, or Layer 3 switches throughout the network, is that a routing process, or router switch module, is built into the switch itself.
When exclusively using Layer 2 switches and VLANs throughout the network, all the policies, access lists, and QoS rules will be managed at the Data Link Layer. The policy capabilities are very limited at the Data Link Layer, but they are greatly enhanced in Layer 3 switches.
Another area in which Layer 2 switches are limited is load sharing capabilities used to ensure redundant links (multiple paths) throughout the network. This is because Layer 2 switches only know about MAC addresses, and they cannot perform intelligent load sharing, for example, based on a destination network (e.g., Layer 3 switches) that supports dynamic routing protocols. Therefore, with Layer 2 switching, the load can be shared only on a per-VLAN basis.
In addition, when using Layer 2 switches only, the basis of all failures or the failure domain will be isolated to the VLAN only. On the other hand, in a multilayer environment, the failures can be better isolated to the Access Layer, to the Core Layer, or even to particular network segments.
In a Layer 2 switched environment, only STP offers convergence and loop control. However, when using Layer 3 switching, this feature can also be implemented at the Distribution and Core Layers using routing protocol technologies such as OSPF, EIGRP, and others.
When considering cost, using Layer 2 everywhere is the cheapest solution, but this is also a less flexible and manageable option. Using Layer 3 switches throughout the network is the most expensive option but it is very powerful and flexible. A compromise would be to implement Layer 3 switches first only in the Distribution Layer and then, eventually, as the budget allows and the network scales, extend the Layer 3 switches into the Core Layer for full Layer 3 switching at the Distribution and Core Layers.
