Debian This forum is for the discussion of Debian Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-04-2004, 09:37 AM
|
#1
|
Member
Registered: Nov 2003
Location: Zwolle
Distribution: Arch
Posts: 651
Rep:
|
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
|
|
|
10-04-2004, 09:40 AM
|
#2
|
Member
Registered: Nov 2003
Location: Zwolle
Distribution: Arch
Posts: 651
Original Poster
Rep:
|
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.
|
|
|
10-04-2004, 10:01 AM
|
#3
|
Senior Member
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597
Rep:
|
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. 
|
|
|
10-04-2004, 10:21 AM
|
#4
|
Member
Registered: Nov 2003
Location: Zwolle
Distribution: Arch
Posts: 651
Original Poster
Rep:
|
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
|
|
|
10-04-2004, 10:37 AM
|
#5
|
Senior Member
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597
Rep:
|
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.
|
|
|
10-04-2004, 10:54 AM
|
#6
|
Member
Registered: Nov 2003
Location: Zwolle
Distribution: Arch
Posts: 651
Original Poster
Rep:
|
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
|
|
|
10-04-2004, 11:08 AM
|
#7
|
Senior Member
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597
Rep:
|
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.
|
|
|
10-04-2004, 01:15 PM
|
#8
|
Member
Registered: Nov 2003
Location: Zwolle
Distribution: Arch
Posts: 651
Original Poster
Rep:
|
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
|
|
|
10-04-2004, 01:51 PM
|
#9
|
Senior Member
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597
Rep:
|
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.
|
|
|
10-04-2004, 04:32 PM
|
#10
|
Member
Registered: Nov 2003
Location: Zwolle
Distribution: Arch
Posts: 651
Original Poster
Rep:
|
Hmm, no errors on boot, nothing weird happening. I'm afraid I'm stuk with dpkg-reconfigure etherconf.....
No more clues...anyone?
Regards
|
|
|
10-04-2004, 05:13 PM
|
#11
|
Member
Registered: Nov 2003
Location: Zwolle
Distribution: Arch
Posts: 651
Original Poster
Rep:
|
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!
|
|
|
10-04-2004, 06:42 PM
|
#12
|
Senior Member
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597
Rep:
|
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?
|
|
|
10-04-2004, 11:49 PM
|
#13
|
Member
Registered: Nov 2003
Location: Zwolle
Distribution: Arch
Posts: 651
Original Poster
Rep:
|
I still have the resolvconf package installed, not sure if it would work without. I de-installed etherconf package.
|
|
|
10-05-2004, 02:45 AM
|
#14
|
Senior Member
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597
Rep:
|
"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.
|
|
|
All times are GMT -5. The time now is 06:43 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|