The main function of the distribution layer is to aggregate access layer switches within a building. The distribution layer provides a boundary between the Layer 2 domain and the Layer 3 domain into the core network.
The boundary provides two key functions. The Layer 2 side creates a boundary for Spanning Tree Protocol, limiting propagation of Layer 2 faults. On the Layer 3 side it provides a point for summarising IP routing information. A summarised routing table reduces it size and makes it easier to troubleshooting faults and reduces protocol overhead for faster recovery times.
Some areas with multiple buildings have multiple distribution layer switches to reduce the cost of cable runs between buildings.