Linux - NewbieThis 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
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.
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.
I think it's telling you that your configuration does not meet the "Linux Standard Base." (If so, that's a rather cumbersome way of saying "syntax error.")
You don't mention what distro/version you are using, which is useful information because there can differences among how different distros do things. I can share my static ip configuration from my Debian system.
Code:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.2.5
netmask 255.255.255.0
# iface eth0 inet dhcp
gateway 192.168.2.1
You might also check your router configuration. Most routers allow you to identify a pool of addresses for DHCP. The last one I installed started DHCP with xxx.xxx.xxx.2 (something I changed immediately). If yours does the same and the address you want to use as static is in that pool, it could be causing some confusion with the static IP.
The auto stanca has nothing to do with dhcp. At least not when its on the beginning of a line. Its just to say that if ifup -a is called that this device should be configured. Also this does not help solve your problem. Just telling so you don't remove it.
MAybe check output of dmesg and take a look at network configuration.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
I seem to recall that ifupdown uses the first entry in /etc/network/interfaces for any given interface.
It could just be that you're not in the same subnet with the gateway and client. Both must be in the private A, or B, or C subnets, not mixed. And you have to make sure network-manager isn't running also, because it disables ifupdown.
static IP is not in dhcp pool.
dhcp pool is same subnet.
Its a debian knockoff. I dont know much more than that other than some german guy made it. Its got a tool set in it Id like to use.
for the static IP to work;
the LAN cable connected to your server or pc must be connected to a router or a switch which has the same subnet you had specified on /etc/network/interfaces
I don't think you need to do the update-rc.d after changing your network interface settings. The rc.d system in debian is/has been going through a some changes over the years, and certain parameters in the various configuration files are deprecated. I think the error messages from that step are not part of your problem.
Is that your entire /etc/network/interfaces that you posted, or are there more bits inside? Also, are you using anything like network-manager or wicd in a gui or is this all cli stuff for you?
Anyway what version of Linux you use might not be important in this case,
just make sure there is no network manager disabling the use
of /etc/network/interfaces file.
Since you are refering to a German made version of Debian
I presume it could be a (live) Knoppix cd or hdd install.
If it is installed to disk it can be changed
and also when booted from cd with the toram boot option that puts it into memory
(runs very fast).
but if it runs directly from cd some important files cannot be so easily changed.
Kind regards and succes
Sietze van de Burgt.
Last edited by sietze1977; 01-21-2014 at 01:49 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.