Network - Layer 2 network

What do we mean when we talk about a Layer 2 network? Or when we say that this part of the network is operating at Layer 2? Simply put, it means that the network segment in question is not participating in any routing. All hosts on that particular portion of the network are in the same subnet/VLAN/broadcast domain. It is a flat (non-hierarchical) section of the network where hosts can communicate with each other using their MAC addresses, assuming an Ethernet network. No default gateway need be used for communication. Routing is only performed when hosts within want to communicate outside of the local network segment. A Layer 2 network is said to perform only switching. Layer 2 refers to the Data Link Layer of the OSI Model.

For example, take a look at this section of a network:

layer-2-network-example.png

In this particular setup, the section of the network between the distribution and the access layers is said to be Layer 2. This means that the access switches are not performing any routing. Routing is performed only by the distribution switches using SVIs as the default gateways. VLAN 10 in this topology spans both access and both distribution switches.

In other words, the location where routing takes place (the SVIs in this case) is the edge of that Layer 2 network.

A Layer 2 network operates in contrast to a Layer 3 network.

Links:

https://networklessons.com/cisco/ccnp-switch/cisco-campus-network-design-basics/