I have created a simple topology with routers and computers and I ping from computer A to computer B . Firstly, computer A send ARP request to gateway of A and then got reply. Mac and ip of gateway is addes to arp table of computer A. Then ICMP packet is send ( let's say to router X) . Later, I got reply on computer A from computer B , which comes from router Y, but mac and ip of router Y isn't added to arp table of computer A. Is it right behaviour or I misconfigured something ?
Network devices can only see MAC addresses of devices on the local network (broadcast domain, actually.) ARP traffic is broadcasted and not routed. When your Computer A is trying to communicate with Computer B on a different network, it doesn't need to know the MAC address of B. It only needs to know how to route to that IP address and the MAC address of the local router.