Suppose PC1 with IP address
22.214.171.124 and MAC address
A.A.A.A wants to send a frame to PC2 with IP address
126.96.36.199 and MAC address
B.B.B.B, plus there is a switch in the middle. PC1 doesn't know where is PC2 located so it will send an ARP REQUEST.
Now, when the ARP reaches the switch, the switch makes the decision of flooding all the ports except the one it came from, and when it does that the request will reach PC2 which will first add the IP and MAC addresses of the SRC to its ARP table, and then it will REPLY with its IP and MAC addresses. After that the packet is sent.
Of course, the switch will direct the reply to PC1 because it knows its MAC address and IP address Of the SRC and DES.
Now, the BUM (Boradcast Unkown Unicast Multicast)
What I know is that (suppose having the same end points and switch) the switch uses this traffic to dynamically learn the which port belongs to which endpoint. Suppose the same case where PC1 wants to send a frame to PC2. PC1 frame has the SRC and DES IP and MAC addresses. The frame is sent, and when it reaches the switch, the switch looks into its CAM table to know which port belongs to which MAC address and if it doesn't find PC2 it will send the frame (WITH THE MAC AND IP ADDRESSES OF BOTH END POINTS) to all end devices and PC2 will know that this IP address belongs to him PC2 will reply and when it does. I think it sends back the same frame (I am not sure but it will send back something whether a frame or a request that will tell the switch to register that port with its IP and MAC addresses).
I have came to my own conclusion that says the ARP protocol helps in saving the IP and MAC addresses of other machines (PC2 in this case) in its own ARP table. On the other hand, the switch uses the BUM traffic to fill up its own CAM table. (please correct me if am wrong)
What I am asking here is:
Is my explanation correct?
What are the main differences between them?
Can we use one of them only? because they seem to be doing the same task. If not why?
Please correct me if I got something wrong. I know whoever is going to answer me will have way way way more knowledge than me, so please share with me as much as you can because I have passion for what am trying to learn! :)