LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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, 02: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, 03:04 PM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
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 03:05 PM.
 
Old 11-05-2007, 04:06 PM   #3
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 59
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, 08: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 02:51 PM
Setting up IPv6 linux DNS Server asurya Linux - Newbie 1 05-23-2005 08:20 AM
help setting DNS itabarau Linux - Newbie 3 02-04-2005 11:29 AM
Setting up DNS UnknownFear Linux - Networking 3 04-10-2004 01:39 AM
Need Help setting up DNS???!!! richhoward Linux - General 13 06-25-2003 04:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:00 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