How PCs communicate through L2 Switch

How PCs communicate through L2 Switch
 

I would like to know how computers communicate between each other through L2 Switch.

PC1:10.10.10.1
PC2: 10.10.10.2
PC3: 10.10.10.3

Any Expert to explain step by step, how ARP and ICMP get involded in order for  instance PC1 to ping PC2 successfully. How does the L2 switch handles that to get the ping to work ?

Thank you

l2
jskfanAsked:
Who is Participating?
 
JustInCaseCommented:
Yes. Each device will check what is content ARP message and respond back if it finds its own address.
0
 
JustInCaseCommented:
You are already in packet tracer in simulation mode. Try to understand what is saying in the messages.
When packet is sent, which type of packet, order in which packets are sent.
:)
0
 
jskfanAuthor Commented:
I am not using Packet tracer. Just  a picture from a web site
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
jskfanAuthor Commented:
I mean how does the L2 switch map the MAC to IP address ?
for instance when PC 1 tries to  reach PC 2,   PC1 will look up  DNS to  get  the  IP address of PC2

PC1 will send a broadcast query or ARP query : What is the MAC address of IP x.x.x.x  , the Switch will register the MAC address of PC 1 , but how si it  going to fetch the MAC address of PC 2, since the switch does not know if the IP address that PC 1 is trying to reach whether it belongs to PC 2 or PC 3
0
 
JustInCaseCommented:
0
 
jskfanAuthor Commented:
I followed the steps in the link you provided.

What  I do not understand, is the first time request. for instance PC 1 tries to communicate with PC2  through L2 switch,  PC1 will broadcast its own IP and MAC addresses, the Switch will forward that out of every port except the one it has received the frame from.  

Question1: will L2 Switch registers IP and MAC address of PC1 in its table ?

question2 : When L2 switch forwards the request through other ports out, will the Frame contain Target PC Ip address ?

When Other PCs in the segment receive the Broadcast, they will verify if the IP address in the Frame matches their own IP address, if so then they  respond back to the switch with their own IP and MAC addresses in the frame, then the Switch will register the response content (IP and MAC address), and send the requested MAC address to PC1

*** I was not sure L2 switch table has  a map IP address to MAC address. I thought the Frame has only Mac address
0
 
JustInCaseCommented:
Question1: will L2 Switch registers IP and MAC address of PC1 in its table ?
Switch will add source MAC address into TCAM when frame is received on port (only in IN direction).
question2 : When L2 switch forwards the request through other ports out, will the Frame contain Target PC Ip address ?
L2 frame does not contain target IP address, it does contain destination MAC address ffff.ffff.ffff. Target IP address is part of ARP message. You can red some explanation and packet capture here.

L2 switches do not map IP addresses, just L2 addresses, and the only ARP table is for management VLAN (L3 switch interface).
0
 
jskfanAuthor Commented:
in the link you provided, you stated:

<<Device that receives L2 frame will check if ARP message is addressed to it (check IP address  inside of ARP message of target device against its own IP address). In Wireshark you will see translation of ARP datagram to English as: " Who has 192.168.0.201? Tell 192.168.0.27" >>

OK So the IP address of the Target is in the ARP message which is   itself contained in the Frame.
0
 
jskfanAuthor Commented:
Thank you
0
 
JustInCaseCommented:
You're welcome.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.