I need to use the open DNS : 208.67.222.222,208.67.220.220 in my network connection.I use etisalat 3.75 USB modem HUAWEI in my Ubuntu 12.04 PC.I had tried to add this DNS in :/etc/network/interfaces/etc/resolv.confwith no success.
Change the DNS server in etisalat USB modem
networking;dns
I'm not sure if your USB modem's network connection is managed by NetworkManager or not. If the network setup is static then you should be able to change the default DNS servers using the info in section #1, otherwise see the details in section #2.1. DNS resolution using /etc/resolv.confOn a Unix system there is a file called nsswitch.conf which controls how names of various things get resolved. For example, host names would be governed by this line in that file:hosts:      files mdns4_minimal [NOTFOUND=return] dnsThis line says:Look to files first (such as /etc/hosts).Next try mdns4_minimal which means try to resolve the name using Multicast DNS. The NOTFOUND means that any response of notfound by the preceeding mdns4_minimal process should be treated as authoritative and that the system should not try to continue hunting for an answer. Lastly the dns parameter means to use a legacy unicast DNS query.When the name is attempting to be resolved via mdns4_minimal the file /etc/resolv.conf will be consulted to determine things such as:nameservers to querydefault search domain namedefault domain nameFor example:domain somedom.net.search somedom.net.nameserver 208.67.222.222nameserver 208.67.220.220So to control your default DNS server you'd need to change the DNS server settings in this file, /etc/resolv.conf.2. NetworkManagerIf your network connection is being managed by NetworkManager then you can change the DNS settings through its configuration applets like so.open NetworkManager's main menu                                                          Open IPv4 tab         Add DNS serversConfirmAfter adding the IP's for the DNS servers to NetworkManager's interface if you check the file, /etc/resolv.conf` you'll see them as follows:nameserver 208.67.222.222nameserver 208.67.220.220ReferencesNetwork Configuration - Ubuntu Documentation