In case of two routers directly connected to each other, when they are learning MAC addresses through sending ARP Request packet, R1 sends an ARP Broadcast Request packet to R2 and R2 replies to R1 through ARP Unicast packet and during the course of this process both R1 and R2 are going to store their respective IP - MAC addresses into their ARP cache/ table.
Now, my doubt is that Routers have a default behaviour of discarding broadcast packets arriving at them, so how can a router accept this ARP Broadcast Request packet to reply to the other end router with ARP Unicast packet ?
As far as I believe is that Routers are discarding broadcast packets while receiving them and while working at Layer 3 of OSI model and it is accepting the ARP Broadcast Request packet because while processing ARP packets, Router is working on Layer 2 of OSI model and also ARP protocol works on Layer 2 of OSI model, so it is working in this way.
Am I correct or wrong ??
Please someone explain me the correct logic behind this… If I am wrong.