Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] How to fix the dns server address
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
buptwugh
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jan 2012
Posts: 101
Location: Beijing,China

PostPosted: Thu Feb 23, 2012 1:12 pm    Post subject: [Solved] How to fix the dns server address Reply with quote

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
View user's profile Send private message
Yuu
Apprentice
Apprentice


Joined: 23 Dec 2008
Posts: 223
Location: France

PostPosted: Thu Feb 23, 2012 2:01 pm    Post subject: Reply with quote

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 :]
_________________
Main laptop : T8300 cpu | 200 GB hard drive | 2 GB of ram | 8600M GT | Gentoo x86_64
Server : Celeron 220 cpu | 250 GB hard drive | 2 GB of ram | SiS 662 VGA | Gentoo x86_64
Back to top
View user's profile Send private message
buptwugh
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jan 2012
Posts: 101
Location: Beijing,China

PostPosted: Thu Feb 23, 2012 2:19 pm    Post subject: Reply with quote

Thanks, I will try it.
Back to top
View user's profile Send private message
Yuu
Apprentice
Apprentice


Joined: 23 Dec 2008
Posts: 223
Location: France

PostPosted: Sat Feb 25, 2012 12:15 pm    Post subject: Reply with quote

Hi buptwugh,

don't forget to add "[SOLVED]" to your topic name; if it's solved now ;)
_________________
Main laptop : T8300 cpu | 200 GB hard drive | 2 GB of ram | 8600M GT | Gentoo x86_64
Server : Celeron 220 cpu | 250 GB hard drive | 2 GB of ram | SiS 662 VGA | Gentoo x86_64
Back to top
View user's profile Send private message
buptwugh
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jan 2012
Posts: 101
Location: Beijing,China

PostPosted: Tue Feb 28, 2012 1:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum