LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-04-2004, 09:37 AM   #1
powadha
Member
 
Registered: Nov 2003
Location: Zwolle
Distribution: Arch
Posts: 651

Rep: Reputation: 31
Static IP driving me nuts


I'm trying to get my IP static in debian but nothing seems to work. I edit my /etc/network/interfaces to the following:

auto lo
iface lo inet loopback

# This entry was created during the Debian installation
auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1

I tried adding the broadcast line 'broadcast 192.168.1.255' but nothing works. Using DHCP all is fine but I need static. Another client is running win which was so easy to configure using static IP (TCP/IP) 192.168.1.3.
I tried ifdown eth0 & ifup eth0 even tried rebooting a few times but nothing helps. What am I doing wrong? In win I specified a DNS, no need for that in Debian?

Regards
 
Old 10-04-2004, 09:40 AM   #2
powadha
Member
 
Registered: Nov 2003
Location: Zwolle
Distribution: Arch
Posts: 651

Original Poster
Rep: Reputation: 31
The internal network is working fine btw. I can open shares on the win box from debian without any problem.....seems just an internet problem.
 
Old 10-04-2004, 10:01 AM   #3
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
Quote:
In win I specified a DNS, no need for that in Debian?
I'm afraid that you need to specify DNS also in Debian. You can put it into /etc/resolv.conf using the following format:
Code:
nameserver xxx.xxx.xxx.xxx
If the /etc/resolv.conf doesn't exist, you can just create one.
 
Old 10-04-2004, 10:21 AM   #4
powadha
Member
 
Registered: Nov 2003
Location: Zwolle
Distribution: Arch
Posts: 651

Original Poster
Rep: Reputation: 31
Brilliant! The file exists but tells me that I shouldn't edit since changes get overwritten. Well ,tried it anyway and got internet back! Warnig is true though, rebooting and the file gets overwritten to the former state (no nameserver) How to make this permanent (which file to edit)

Regards
 
Old 10-04-2004, 10:37 AM   #5
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
It appears that Debconf controls your network settings. There's probably a way to change them permanently via Debconf if you can locate the package that initially set up your net connection, but it may be easier just to install the "etherconf" utility and use it to configure your network. Etherconf plays nicely together with Debconf, so reboots don't change the configuration made via etherconf.
 
Old 10-04-2004, 10:54 AM   #6
powadha
Member
 
Registered: Nov 2003
Location: Zwolle
Distribution: Arch
Posts: 651

Original Poster
Rep: Reputation: 31
Thanx, I installed the etherconf utility and made a new config. Could this have anything to do with the fact that even though I use static IP, forward the ports to my client (192.168.1.2) but still get no connection in Azureus (BitTorrent) It keeps stating a NAT-error. I guess this is off-topic but this is the reason I started to set static IP in the first place. Same on low ID's in MlDonkey.....Not sure what to check anymore.
Internet is fine now btw!

Regards
 
Old 10-04-2004, 11:08 AM   #7
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
I don't use BitTorrent, so cannot help you there. Maybe you have too strict firewall rules? I suggest that you make a Google search ("bittorrent nat error", or something like that) to see if other people have encountered similar problems.
 
Old 10-04-2004, 01:15 PM   #8
powadha
Member
 
Registered: Nov 2003
Location: Zwolle
Distribution: Arch
Posts: 651

Original Poster
Rep: Reputation: 31
Weird, I guess I was happy a bit too soon. After reboot internet is still not working and I have to do a dpkg-reconfigure etherconf to get internet access. Any clues on what packages might be srewing my settings? I'd like to get rid of it and use the settings made by etherconf.

Regards
 
Old 10-04-2004, 01:51 PM   #9
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
I've earlier had the kind of problem you describe when I installed Debian from LiveCDs (Morphix & Knoppix) but using Debian's own installer this problem disappeared. In my laptop I've had somewhat similar problem because my PCMCIA netcard was started too late. Moving pcmcia service to start earlier in /etc/rc{2-5}.d/ solved this problem.

I'd suggest that you keep an eye on boot messages -- they might tell why your net connection fails to start. It might be also worth checking dmesg and /var/log/syslog for network and eth0 related error messages.
 
Old 10-04-2004, 04:32 PM   #10
powadha
Member
 
Registered: Nov 2003
Location: Zwolle
Distribution: Arch
Posts: 651

Original Poster
Rep: Reputation: 31
Hmm, no errors on boot, nothing weird happening. I'm afraid I'm stuk with dpkg-reconfigure etherconf.....
No more clues...anyone?

Regards
 
Old 10-04-2004, 05:13 PM   #11
powadha
Member
 
Registered: Nov 2003
Location: Zwolle
Distribution: Arch
Posts: 651

Original Poster
Rep: Reputation: 31
Well I got it! After reading a lot of google post I finally found some Debian article. I had to enter the line dns-nameservers 192.168.1.1 to /etc/network/interfaces.
I read a lot of tries entering just nameserver 192.xxx.x.x. but those din't work. Anyway: solved!
 
Old 10-04-2004, 06:42 PM   #12
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
Well, I'm glad to hear that you worked out a solution.

One question, though: Did you need to install "resolvconf" package or was it enough just to add the dns-nameservers line to /etc/network/interfaces?
 
Old 10-04-2004, 11:49 PM   #13
powadha
Member
 
Registered: Nov 2003
Location: Zwolle
Distribution: Arch
Posts: 651

Original Poster
Rep: Reputation: 31
I still have the resolvconf package installed, not sure if it would work without. I de-installed etherconf package.
 
Old 10-05-2004, 02:45 AM   #14
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
"Resolvconf is a framework for keeping track of the system's information about currently available nameservers. It sets itself up as the intermediary between programs that supply nameserver information and programs that use nameserver information. Examples of programs that supply nameserver information are: ifupdown, DHCP clients, the PPP daemon and local nameservers. Examples of programs that use this information are: DNS caches, resolver libraries and the programs that use them."
http://packages.debian.org/unstable/net/resolvconf

Sounds like a useful program. I try to keep it in mind so I can recommend it to other people who keep losing their DNS between reboots like you did.
 
  


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
Help - it's driving me nuts! n4ogl Linux - Newbie 4 11-13-2005 09:28 PM
Yast is driving me nuts! brianthegreat SUSE / openSUSE 16 10-31-2005 10:15 AM
Driving me nuts!! jappstam12345 Linux - Newbie 7 03-11-2005 05:51 PM
This is driving me nuts! dareino Fedora 4 06-30-2004 02:17 AM
driving me nuts!!! ihatebillgates Linux - Newbie 6 12-12-2003 07:03 AM

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

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