cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1173
Views
5
Helpful
5
Replies

How switch knows mac address

saishreevj
Level 1
Level 1

When I'm trying to ping from PC1 to PC2, broadcast is sent , PC2 replies. Now Switch learns mac address of source machine PC1, so in the same way it learns mac address of PC2 when it replies to PC1 right?

 

 

 

 

source MAC.PNG

1 Accepted Solution

Accepted Solutions

Hello
Those PCs are on the same connected network but all devices have no knowledge of each other.

PC1 has a packet to send to PC2, but it doesn’t where to send it, all it knows is it’s own src-mac/ip address and pc2 dest ip  and mac address of 0000.0000.000 so it will arp for pc2 mac address


Switch will check this arp frame and see it’s a broadcast so it will flood it out to all off its ports (minus the one it was received on) and at the same time it will cache PC1 mac-address into its own mac- address table and relate it to the port it was seen on, and when PC2 see it own ip address in this arp request it will unicast replies to pc1 as such the switch caches PC2 mac- address/port also.


Now the switch has knowledge of both PC1/2 source/destination mac-addresses, PC1/PC2 have an arp entry for each other so traffic can now flow between each pc via the switch.

 

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

View solution in original post

5 Replies 5

balaji.bandi
Hall of Fame
Hall of Fame

Thats right, Switch copy both the MAC address and store them in CAM table, Until the expired time.

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hi,

 

yes. check below video to get good understanding.

 

https://www.youtube.com/watch?v=TIHvWb-gruc&ab_channel=Networklessons.com

 

rate this and mark as answer if this resolved your concern

Please rate this and mark as solution/answer, if this resolved your issue
Good luck
KB
https://nwl.cl/2zXqngB - This article explains how a switch learns MAC address and why it floods frames when it doesn't know the destination MAC address.

Hello
Those PCs are on the same connected network but all devices have no knowledge of each other.

PC1 has a packet to send to PC2, but it doesn’t where to send it, all it knows is it’s own src-mac/ip address and pc2 dest ip  and mac address of 0000.0000.000 so it will arp for pc2 mac address


Switch will check this arp frame and see it’s a broadcast so it will flood it out to all off its ports (minus the one it was received on) and at the same time it will cache PC1 mac-address into its own mac- address table and relate it to the port it was seen on, and when PC2 see it own ip address in this arp request it will unicast replies to pc1 as such the switch caches PC2 mac- address/port also.


Now the switch has knowledge of both PC1/2 source/destination mac-addresses, PC1/PC2 have an arp entry for each other so traffic can now flow between each pc via the switch.

 

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

@paul driverThanks for the detailed explanation. Its  ff:ff:ff:ff:ff:ff  right, I see you mentioned as 00.00.00.00 for broadcast mac address . 

Hello
yes i did I was referring to the pc1 knowledge prior to sending a arp request however the broadcast would indeed be ffff.ffff.fffff


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Review Cisco Networking for a $25 gift card