أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
https://kb.meraki.com/knowledge_base/layer-3-versus-layer-2-switch-for-vlans
layer 2 switch communication base on mac address while layer 3 switch working as like a router and switch both but have the facility to communicate both on mac and ip address.
A L2 Switch sends packets using MAC addresses. It works as bridge between the network devices.
A L3 Switch uses IP address for sending packets. It works as router between different network segments.
Layer 2 devices work on mac address and broadcast to find a device on the segment. L2 devices build Mac-Address-Table to perform unicast packet forwarding. Layer 3 devices work on IP Address and actually block broadcasts from L2 device. To communicate between different L2 segments, you need an L3 device like a router or L3 switch to route traffic. In summary an L3 switch can be used as router to route traffic from L2 switches and can act as gateway. L2 switches can create VLANs with different network segments and we can only connect those segments over L2 etherchannels or 802.1Q trunks.
L2 switches can only forward frames using MAC address, but L3 switches can able to forward traffic using routing protocols that are configured (RIP, IS-IS, EIGRP , OSPF) as like router.
A switch will be a L2 switch until the command "ip routing" is entered in global configuration mode. once that command entered, switch ready to perform as a L3 Switch (able to do routing).
Mostly switches in distribution layer are configured as L3 switch.
It is used mainly for allowing communication between two different VLAN's (between VLAN10 and VLAN20) because L3 device is need to communicate the host in different VLAN.
Layer2 switches only switch data by reading data link layer header (Src MAC address and Dest MAC address). Layer3 switches are called as Multi-layer switches (MLS). They can perform fast switching by reading L2, L3 and even L4 header. A layman can see MLS as one box with integrated switching and routing engine. Layer3 switches are performance wise better then L3 routers as MLS can forward data by wire speed.