LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Static IP is wrong on Boot (https://www.linuxquestions.org/questions/linux-networking-3/static-ip-is-wrong-on-boot-522474/)

ShadowHywind 01-24-2007 03:33 PM

Static IP is wrong on Boot
 
Hi all, i have a strange issue that i have no clue on how to fix. I have static ips set in my /etc/network/interfaces. But when i boot up. The ip of the interface is completely wrong. it comes up with a 169.254.. number. When i check the interface file the static ip is correct. Any ideas.

here is my /etc/network/interfaces
Code:

auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0


iface eth0 inet static
address 192.168.2.18
netmask 255.255.255.0
gateway 192.168.2.1
#address 192.168.2.19
#netmask 255.255.255.0
#gateway 192.168.2.1

auto wlan0
iface wlan0 inet static
address 192.168.2.19
netmask 255.255.255.0
gateway 192.168.2.1


pljvaldez 01-24-2007 03:43 PM

I think I read somewhere this is a bug in zeroconf. I have the same problem and haven't taken the time to fix it. I just sudo ifdown eth0 && sudo ifup eth0.

ShadowHywind 01-24-2007 03:51 PM

i will have to try that ifdown next time i restart. I have been manually changing it in networkmanager. But if the ifdown works i might as well just add it to my startup script. Thanks for the idea.

pljvaldez 01-24-2007 03:54 PM

Well, I should backtrack a little. I'm not using static IP's in the traditional sense. I'm using "static" DHCP. I've set my router (DHCP server) to assign the same IP to my machines based on the MAC address of each card. So that trick works for me because it brings down the interface and then when I start it up again, it asks the router for the new IP and finds out it's wrong. So it gets reset.

pljvaldez 01-24-2007 03:58 PM

By the way, here is the bug for Debian (which Ubuntu is based on). I haven't yet found a way to disable zeroconf, but it appears it's possible.

pljvaldez 01-24-2007 04:07 PM

I found this workaround
Quote:

One last thing: IF you want to set up a static address for eth0, and you have zeroconf installed, make sure to add the following to /etc/default/zeroconf:

IFBLACKLIST="eth0"

Either that, or if you want to disable zeroconf completely (might not be a bad idea)

DISABLE=yes
I haven't tried it yet, but I will tonight!

ShadowHywind 01-24-2007 04:41 PM

what do you know, i just removed zeroconf, rebooted *just to check*. And Everything works the way that it should. Thanks


All times are GMT -5. The time now is 07:37 AM.