DNS nameserver (DHCLIENT) in linux can be set in two ways:
1. In configure files
for example, a line in one of these files
prepend domain-name-servers 22.214.171.124,126.96.36.199;
this will insert two lines at the beginning of conf file /etc/resolve.conf
- nameserver 188.8.131.52
- nameserver 184.108.40.206
This setting is not good for access public wifi point, as the public wifi dns will be appended. When access internet, it will check these name servers first, it will last very long or fails
This approach hurts. In previous version of networkmanager, it is not easy to configure DNS, thus, I added a line in the wireless conf file /etc/dhclient-eth2.conf, soon forget this as new version of networkmanager is well developed. when I attended a conference at overseas, my laptop can connect to the conference wireless access point very well, with strong signal. Unfortunately, it always picked up the dns nameservers for my home DSL. I tried around, failed to identify the source file for home dns. This was really annoy. After query the fedora mail list, finally identified the source. That happened when I returned home from the oversea trip. You can imagine, how disappointed I was!!
2. Use of NetworkManager
the current version of NetworkManager handle this well, just follow steps as
- Right click the network manager icon in the panel and click Edit Connections.
- Select wireless tab, choose the access ID under Name column, click edit.
- Click the IPv4 Settings tab.
- Choose Automatic with manual DNS settings from the Method drop-down box.
- In the DNS Servers text box, type “220.127.116.11,18.104.22.168”.
- In the Search Domains text box, leave it blank
- Click OK and close the network manager window.
This worked ok. if you change your ISP or access public wifi point you can alter steps as
- Click the IPv4 Settings tab
- IPv4 Settings
- choose Automatic (DHCP)