How do I test my caching name server?

The first test you can perform to ensure that your caching name server is working is to use dig to locate the DNS database information for wally2.both.org. To further test your caching name server, use the dig command to obtain the IP Address (es) for some common Internet websites, such as www.opensource.com, CNN, Wired, and any others you like.
For More Information Please Refer:
https://opensource.com/article/17/4/build-your-own-name-server
You May Also Like to Read:
How to build a DNS server on Linux?