Layer 2 vs Layer 3 switches

I am a bit confused on when I need and should use a layer 2 or layer 3 switch. In the corporate network we have Aruba 3810 core switches, and all the access switches are HPE 1950 24/48 PoE+. We have 7 vlans, IT mgmt, workstations, machines, wlan, wlan-guest, wlan-guest2, VoIP. Most of the the phones are having connected the computers connected to them (built in switch).

I know about routing capabilities of layer 3 switches. But... I don't know what happens if I have a layer 2 switch like Aruba 2530 PoE+ connected, what changes and what do I miss. Only the routing between vlans? If routing has to be enabled for the vlans/devices that are connected on the 2530 it will be done on the core switches or the 1950s?

Thanks in advance!


A layer-2 switch forwards frames solely based on layer-2 information, ie. the destination MAC address of each frame. Forwarding happens exclusively between ports belonging the same VLAN.

A layer-3 switch has the additional ability to forward layer-3 IP packets based on the destination IP of each packet. This forwarding usually happens between different VLANs. Each VLAN requires an assigned IP address (as gateway). Cisco calls this IP-to-VLAN binding switch virtual interface SVI.

So, if you need a fast, yet simple router a layer-3 switch often is a good solution. If you don't need a router you can just as well use a layer-2 switch.

If you need to control traffic between VLANs most L3 switches support ACLs to filter unwanted traffic. Note that ACLs are usually stateless (unlike most firewalls), so you need to configure rules for both directions.

Edit: As @yagmoth555 has appropriately pointed out, L3 switches can differ significantly in their routing protocol support. Basic L3 switches often support only static routes or sometimes RIP while more advanced switches also support OSPF and other modern protocols. Additionally, there may be differences in the maximum number of routes that can be configured/learned.