LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-05-2007, 03:43 PM   #1
ThinkTank
LQ Newbie
 
Registered: Sep 2007
Posts: 6

Rep: Reputation: 0
setting linux dns


Hello Guys,

Iíve got a requirement on a couple of my debian systems to configure static IP and DNS settings as theyíre being placed into a network environment which doesnít support DHCP so it will be unable to lease its own details.

This is something Iíve not done before with Linux, at least, not successfully :-D so thought Iíd ask you guys your opinions on the best way to handle it. What I can tell you at the moment is that if I use the following settings on my windows notebook then Iím able to connect to the network and internet no trouble at all, so Iím guessing itís simply a case of setting these same details on my voyage system.

IP: 10.111.108.2
Subnet: 255.255.255.0
Gateway: 10.111.108.1

Primary DNS Server: 10.50.10.10
Secondary DNS Server: 10.50.10.11

Iíll need some nice simple Simon-Says step by steps for doing this otherwise Iím bound to get lost when trying to set it up. I do have some limited experience of modifying my /etc/network/interfaces file but certainly wouldnít say I really know what Iím doing.

Thanks chaps, I look forward to hearing your advice.

Joe
 
Old 11-05-2007, 04:04 PM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,969
Blog Entries: 1

Rep: Reputation: 208Reputation: 208Reputation: 208
You can do this:

Code:
ifconfig eth0 10.111.108.2 netmask 255.255.255.0 up
route add default gw 10.111.108.1 eth0
vi /etc/resolv.conf
In the resolv.conf file enter your DNS servers IP address:
Code:
nameserver     10.50.10.10
nameserver     10.50.10.11

Last edited by custangro; 11-05-2007 at 04:05 PM.
 
Old 11-05-2007, 05:06 PM   #3
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
Edit your /etc/network/interfaces

This is what a static network setting will look like.
Make sure you comment out (prefix each line with a # sign) the DHCP setting, don't just delete it.

Like so

Code:
# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp


Code:
#My static settings 
auto eth0
iface eth0 inet static
        address 192.168.xxx.xxx
        netmask 255.255.255.0
        broadcast 192.168.xxx.225
        gateway 192.168.xxx.xxx
And then like has been stated edit your resolv.conf file and add your name-server.
 
Old 11-06-2007, 09:16 AM   #4
ThinkTank
LQ Newbie
 
Registered: Sep 2007
Posts: 6

Original Poster
Rep: Reputation: 0
As suggested all I needed to do was edit my /etc/network/interfaces file to contain the following;

auto eth0
iface eth0 inet static
address 10.111.108.30
netmask 255.255.255.0
gateway 10.111.108.1
dns-nameservers 10.50.10.10 10.50.10.11

Thanks for all your help guys!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
setting up DNS sjpatel Linux - Networking 4 02-09-2006 03:51 PM
Setting up IPv6 linux DNS Server asurya Linux - Newbie 1 05-23-2005 09:20 AM
help setting DNS itabarau Linux - Newbie 3 02-04-2005 12:29 PM
Setting up DNS UnknownFear Linux - Networking 3 04-10-2004 02:39 AM
Need Help setting up DNS???!!! richhoward Linux - General 13 06-25-2003 05:37 PM


All times are GMT -5. The time now is 10:28 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration