A traditional local area network design uses a Layer 2 access layer with a Layer 3 distribution layer.
The distribution Layer 3 provides the network gateway for the Layer 2 access layer hosts.
Where possible, it is recommended to restrict a VLAN to a single access layer switch to eliminate topology loops which are a common point of failure in local area networks; even with spanning tree protocol enabled.
This recommendation comes at the cost of flexibility as all hosts within a VLAN are restricted to a single access layer switch.
Where this recommendation is not used, and a Layer 2 VLAN is extended across multiple switches to provide access to an application or service, it is common to see STP block links and as a result cause slower network convergence.
To provide a degree of redundancy in the network design, a first hop redundancy protocol (FHRP) can be configured between two switches on the distribution layer to provide a reliable MAC and IP address for hosts to use as as gateway.