I have got the confirmation that the virtual address needs to be either defined in HOSTS file in both nodes or in DNS server.
Oracle uses a Virtual IP (VIP) for database access. The VIP must be on the same subnet as the public IP address. The VIP is used for RAC failover (TAF). This will move to surviving node. Virtual address will be configured in hosts file of all nodes in a RAC.