LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-19-2005, 08:48 PM   #1
Akhran
Member
 
Registered: Aug 2005
Distribution: Debian 'lenny'
Posts: 208

Rep: Reputation: 30
Entries in /etc/network/interfaces


Originally, I have 192.168.1.12 as my DNS, as shown below:

In the file /etc/network/interfaces,

Code:
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.10
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.12
In the file /etc/resolv.conf, there is a line
Code:
 nameserver 192.168.1.12
If there is a change in the IP address of the DNS, what are the files I need to update? /etc/resolv.conf and(or) /etc/network/interfaces ?

Assuming the new IP address of the DNS is 192.168.1.100, I notice that if I update the new IP address in /etc/network/interfaces only, it doesn't work. However, if I update the new IP address in /etc/resolv.conf but I don't update the /etc/network/interfaces file, it still work. Does the dns-nameservers statement in /etc/network/interfaces serve any function and does it need to be updated if there is any change in the IP address of the DNS?

Thanks.
 
Old 08-19-2005, 09:50 PM   #2
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
Is there a problem?

I think you've got all the important config files pretty much OK. In addition to /etc/network/interfaces and /etc/resolv.conf there are, at least, /etc/hostname and /etc/hosts that need to be set right. But you've got the most important files all right.

The manual configuration would probably include something like this:

$ su
# /sbin/ifconfig lo down
# /sbin/ifconfig eth0 down
# /sbin/ifconfig lo 127.0.0.1
# /sbin/ifconfig eth0 xxx.xxx.xxx.xxx netmask 255.255.255.xxx
# /sbin/route add default gw xxx.xxx.xxx.xxx eth0

(Replace the x's with the correct numbers. )

If you do this, it means that you'll have to do it every time you open debian. If you want it done automatically every time you start debian, you'll need to write these settings to a config file.

Or do it the easy way and do "apt-get install etherconf", and then do (as root) "etherconf".

I don't know, I'd probably choose the easy way.

You can add to /etc/hosts something according to this syntax:

127.0.0.1 localhost.localdomain localhost
your_ip_address your_hostname.your_domainname your_hostname

The most often used troubleshooting command is "ifconfig". (You need to do it as root.)

Last edited by Dead Parrot; 08-19-2005 at 10:19 PM.
 
  


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
/etc/network/interfaces file romel Debian 9 03-02-2017 02:15 AM
/etc/network/interfaces angel115 Linux - Networking 1 10-23-2005 04:29 AM
Two Interfaces on the same Network cspcom Linux - Newbie 6 06-18-2005 04:32 PM
Network Interfaces aussben Linux - Wireless Networking 3 12-18-2004 02:35 AM
need help with /etc/network/interfaces littlemidget Linux - Networking 1 08-04-2004 07:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

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