When it comes to internet, reasonable speed is always an most important thing that no one ready to compromise with. That may be a crucial reason for making you sit infront of your machines for hours and days. So the lightning speed can be achieved with your ubuntu box in two ways. They are
# First you have to set your machine's address (127.0.0.1) itself as the primary dns address. This can be done with the help of Network manager or by editing the /etc/resolv.conf file in your ubuntu box. Check the screenshot below..
;; Query time: 0 msec
- Use faster and free domain name servers like google's pubic dns or OpenDNS (first throw the one provided by your service provider). .
- Maintain a local dns cache in your machine itself. So that you can do a good amount of address resolution for frequently used websites within your machine itself, and that saves a reasonable amount of time.
Here i am planning to bring both of these techniques together in a simple manner. Though there are many applications for local DNS caching in ubuntu [ such as dnsmasq, pdnsd, bind9 ] are available, bind9 seems to be a good option for me...
Starting with BIND9 DNS server in Ubuntu
Starting with BIND9 DNS server in Ubuntu
Bind9 (Berkly Internet Naming Daemon) is the most widely deployed DNS server. Bind9 is available in the ubuntu main repository itself. So you don't need to add some additional repository for installing it. Use the following command line or search for 'bind9' in Synaptic package manager to install it.
$ sudo apt-get install bind9
Bind9 allows different type of configurations, and our point of view is on configuring it as a caching server. In this configuration BIND9 will find the answer to name queries and remember the answer for the next query. This can be useful for a slow internet connections especially based on mobile internet. By caching DNS queries, you will reduce bandwidth and (more importantly) latency. It increase network performance by caching IP addresses of commonly visited websites instead of retrieving them from the public DNS servers maintained by ISPs at each request.
Configuring the BIND server
# First you have to set your machine's address (127.0.0.1) itself as the primary dns address. This can be done with the help of Network manager or by editing the /etc/resolv.conf file in your ubuntu box. Check the screenshot below..
using Network manager:: select the connection and click on the edit. Then choose the IPv4 settings tab and add 127.0.0.1 to the DNS servers field.
editing the resolv.conf file:: If you are using DHCP then you may have to edit the resolv.conf file every time you connect to the internet to make bind work properly.
No comments:
Post a Comment