Why I can tnsping Server P from Server A but cannot tnsping Server P from Server B?
Ping uses ICMP, tnsping checks the connectivity of the host and port defined in the TNS entry.


  I checked the tnsnames.ora of A and B. They are identical.


Yes, and name resolution may be still different. Or more likely the firewall may block connection attempts from host B on the listener port.

Just use telnet, nc or whatever tool you have installed to check the host + port combination:

telnet serverP_ip_address listener_port
nc -z serverP_ip_address listener_port
echo 1 &gt; /dev/tcp/serverP_ip_address/listener_port