L2 layer switching, also known as link layer or layer 2 of the OSI model, focuses on switching data frames based on MAC addresses. Switches at this layer provide basic functions such as filtering and switching frames between network segments and often support VLANs for network segmentation. L2 switches are ideal for basic switching in small and medium-sized networks where routing between networks is not needed.