Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
New Member

Switching Layer-2/Layer-3


I have a simple question which is confusing me.

In a Lan setup we have let's say 2 workstations on the same subnet on VLAN-1 and we have a Router FastEthernet also connects on the Switch as the gateway for the same subnet.

So both PC's have their default gateway ( Router's FastEthernet- IP address). When 1-PC sends a traffic to PC # 2, does the traffic have to go to Router and once router sees it that everybody is on the same subnet I don't have to send it out and it justs forwards it to PC # 2. OR ...the switch because of the MAC-Address table ( Layer-2) gets the traffic from PC-1 and forwards it to PC # 2.

My confusion is because of default gateway given to PC's and switch of Router's FastEthernet does the packet touches the Default gateway ( Router) and gets send back to switch for PC # 2. Because in Layer-3 source/dest. IP addresses..and switch can't do that so Router has to decided where it goes...correct me if i am wrong...or i am not clear enough...



Hall of Fame Super Bronze

Re: Switching Layer-2/Layer-3

On same subnet, the workstation goes directly to the other workstation without using the gateway.

You can do a quick test and unplug the gateway from the network and repeat the process. Do it during non-production time of course :)

Hall of Fame Super Blue

Re: Switching Layer-2/Layer-3


If PC1 wants to talk to PC2 and they are on the same subnet with the same subnet mask once PC1 has the mac-address of PC2 it will send data to it. It does not need the router for this communication.

If PC1 wants to talk to another PC on a different subnet then yes it will use the router.



New Member

Re: Switching Layer-2/Layer-3


Thanks for the replies. My confusion is Packet Headers. If switch has mac-addresses of all the PC's then PC # 1 will go to switch and will process it and forward to PC # 2 because it's on same far so good. In packet headers, we have IP addresses also right, source and destination....switch does not recognize ip address because it's layer 2 so I am not saying Router will process it but it will forward back to Switch ...or i am getting all confuse...I guess I have been looking at Packet headers alot..and thing have confused my concept..

Hall of Fame Super Blue

Re: Switching Layer-2/Layer-3

When PC1 talks to PC2 it uses the mac-address. Mac-addresses are used on ethernet to deliver traffic between hosts on the same subnet.

The IP addresses are relevant only when the host has to make a forwarding decision ie.


PC1 network


PC1 compares PC2's ip address with it's own subnet mask

PC2 - network = so this is the same network and so it only needs the mac-address to deliver the packet.


CreatePlease to create content