LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-30-2007, 01:46 AM   #1
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
How to force DNS in DHCP (Ubuntu)?


In Windows, it is possible to get an IP address through DHCP, but force the NIC to use another DNS server that isn't pushed out through DHCP.

I am currently getting a wireless signal on my Ubuntu box. It's complicated, but basically I have to get it through a DHCP server that I have no control of. The DHCP server assigns me an ip address and its own DNS server. I have tried changing /etc/resolv.conf to point to my own local DNS, but the DHCP will change it back. I suspect that I have to add some kind of option under /etc/networking/interfaces in ubuntu, but I am not familiar with the options. Also, is there a way to force a domain name? Again, if I add my own local domain name in /etc/resolv.conf, it gets changed back by DHCP.

Last edited by Micro420; 07-30-2007 at 01:48 AM.
 
Old 07-31-2007, 01:18 AM   #2
Samotnik
Member
 
Registered: Jun 2006
Location: Belarus
Distribution: Debian GNU/Linux testing/unstable
Posts: 471

Rep: Reputation: 40
man interfaces?
 
Old 07-31-2007, 01:41 AM   #3
pdw_hu
Member
 
Registered: Nov 2005
Location: Budapest, Hungary
Distribution: Slackware, Gentoo
Posts: 346

Rep: Reputation: Disabled
You can use the -R switch with dhcpcd (other dhcp clients must also have something like this), which forbids DHCP to change the DNS settings (e.g. to change the /etc/resolv.conf file).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS With DHCP dipuasks Linux - Networking 5 09-08-2007 01:33 AM
Dynamic update DNS through DHCP? Problems configuring in Ubuntu 6.10 entropy Linux - Networking 2 12-11-2006 04:56 PM
forward dns from dhcp to dhcp Fark Linux - Networking 3 03-31-2004 10:40 AM
Force update of dns cache? DrJones Linux - Networking 2 11-17-2003 04:55 AM
Brute force DHCP SSBN Linux - Networking 10 10-21-2003 10:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration