| View previous topic :: View next topic |
| Author |
Message |
buptwugh Tux's lil' helper

Joined: 16 Jan 2012 Posts: 75 Location: Beijing,China
|
Posted: Thu Feb 23, 2012 1:12 pm Post subject: [Solved] How to fix the dns server address |
|
|
My NIC eth0 and wlan0 both connect to the Internet by DHCP
Recently I want to do some network test and I need to fix my DNS server address.
First
I change the /etc/resolv.conf
Delete the nameserver and add the nameserver I want to use.
When I change it, I can use this nameserver, but about after several minutes the resolv.conf is changed by dhcp.
So the nameserver I have added disappeared.
| Code: |
# Generated by dhcpcd from wlan0
domain bupt.edu.cn
nameserver 10.3.9.4
nameserver 10.3.9.5
|
How can I solved it?
By google I find that I can change my peerdns , But I can not find the related configure file.

Last edited by buptwugh on Tue Feb 28, 2012 1:05 pm; edited 1 time in total |
|
| Back to top |
|
 |
Yuu Apprentice


Joined: 23 Dec 2008 Posts: 213 Location: France
|
Posted: Thu Feb 23, 2012 2:01 pm Post subject: |
|
|
Hi buptwugh,
maybe you should try using net-dns/openresolv, to set static nameservers (link).
Or, just simply by using the option "nodns" to your DHCP configuration (see here) if you don't want DHCP to change your nameservers. And if you want static nameservers, you could also use the "dns_servers" option.
Good luck :] _________________ Inspiron 1720 laptop : T8300 | 200 Gb hard drive | 2Gb of ram | 8600M GT | Gentoo x86_64
Server : Celeron 220 | 250 Gb hard drive | 2Gb of ram | SiS 662 VGA | Gentoo x86_64 |
|
| Back to top |
|
 |
buptwugh Tux's lil' helper

Joined: 16 Jan 2012 Posts: 75 Location: Beijing,China
|
Posted: Thu Feb 23, 2012 2:19 pm Post subject: |
|
|
| Thanks, I will try it. |
|
| Back to top |
|
 |
Yuu Apprentice


Joined: 23 Dec 2008 Posts: 213 Location: France
|
Posted: Sat Feb 25, 2012 12:15 pm Post subject: |
|
|
Hi buptwugh,
don't forget to add "[SOLVED]" to your topic name; if it's solved now  _________________ Inspiron 1720 laptop : T8300 | 200 Gb hard drive | 2Gb of ram | 8600M GT | Gentoo x86_64
Server : Celeron 220 | 250 Gb hard drive | 2Gb of ram | SiS 662 VGA | Gentoo x86_64 |
|
| Back to top |
|
 |
buptwugh Tux's lil' helper

Joined: 16 Jan 2012 Posts: 75 Location: Beijing,China
|
Posted: Tue Feb 28, 2012 1:04 pm Post subject: |
|
|
Thanks Yuu,
Add the "nodns" option can solved the problem.
These day I am busy doing my homework, So I forget this topic.
Sorry. |
|
| Back to top |
|
 |
|