[![Hi am new to networking, am having packet tracer scenario here. I have 2 switches S1 and S2. I have not configured any VLAN on both the switches.so all the devices connected to both the switches are by default in VLAN 1 (default VLAN). Both the laptop(0/1) are having address and both the PC are having address. I know that switches are layer 2 devices and process the incoming frames based on their MAC address. Here are my doubts. Am unable to ping PC0 from laptop 0 on s1 But am able to ping PC1 from pc0 AND laptop 0 from laptop 1, even though they are connected to different switch .

If switches process the incoming frames based on MAC address why Am I unable to ping PC0 from laptop 0 on s1

enter image description here

2 Answers 2


Generally, switches forward by destination MAC address. At the same time, they learn each frame's source MAC address to build/update their forwarding table (source address table, CAM table). IP addresses are not visible to switches (unless a layer-3 switch works as a router).

If you connect two switches (using the same VLAN or without any VLANs), you create a common data link layer segment (L2) spanning both switches. Any device can send/talk to any other device as long as its MAC address is used. Each switch simply learns the MAC addresses located on the other switch on the interconnecting port. Of course, you can connect an arbitrary number of switches together with the same effect.

On the other hand, hosts using IP can only talk to hosts on another network (subnet) using a gateway. Your diagram doesn't show such a gateway, so hosts using shouldn't be able to ping/talk to hosts using


Layer two switches are not aware of IP addresses. According to your diagram, the PCs should not be able to ping the laptops and vice versa. Since they can, your configuration is not as shown in the diagram. Your issue is in the PC and laptop configurations -- which are off topic here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.