To cause your machine to consult with a particular server for name lookups you simply add their addresses to /etc/resolv.conf.
Open the /etc/resolv.conf file in your favoirite editor and specify the DNS server in it.
# sudo vi /etc/resolv.conf
Here 192.168.10.1 is my DNS server in my example.com domain. Now if your server does not have the file resolv.conf in your /etc directory, dont worry you can simply create it and edit it as above.
# touch /etc/resolv.conf
Similarly you can assign static lookups in your /etc/hosts file.
# sudo vi /etc/hosts
192.168.10.100 test test.example.com
If you specify these host explicitely in the /etc/hosts file then the domain name rsolution will takes place fastly.