Server name (DNS) server to server ping issues

Hi All,

I am having a server to server ping issues.

when i am login into server i am unable to ping other servers by using host name(DNS). it working when i am using IP address.
but when i apply netplan ( sudo netplan apply) . i am able to ping the other servers by using host name.

can you please help me if there is any permanent fix for this issue.

What version of Ubuntu?

This site is for the co-ordination of the Ubuntu project, and not support.

For Ubuntu Support options, I suggest you look at

You may get the odd person who’ll offer some suggestions or support, but most will ignore it and stay on topic (and this post will likely be closed due to off-topic-support nature)