Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: Correct way to add multiple "secondary IPs"to one dev/interface in /etc/network/interfaces?

From: Cameron Hutchison <lists(at)xdna.net>
Date: Fri Dec 21 2007 - 20:54:03 EST


Jonathan Wilson <jw@mailsw.com> wrote:

>> Can you describe in more detail what "everything breaks" means?
>> The internet still works for me, so it cannot be "everything" :-)

>But it is everything, ...

I was trying to make my point in a funny way. I'm assuming your fridge still works and your cat didn't keel over and die, so not "everything" broke. So, just what is the scope of "everything breaks"?

>... even then /etc/init.d/network start won't work.

In all my years of using debian, I've never manually run /etc/init.d/network. I have always just run ifup/ifdown on the interfaces I am playing with. I dont know what side-effects the init script will have. Of course, when you're happy that it seems to work, its worth rebooting to ensure that everything comes up properly from the init script, but that's usually a last step for me (if I do it at all. If ifup works, its always worked on reboot for me).

I guess what I'm trying to say is to test just using ifup/ifdown so you can isolate any problems to the smallest action needed to cause them.

>I asked on freenode IRC and "simonrvn" told me not to use "up" and "down" but
>to use "post-up" and "pre-down" instead.

Do you need help?X

These are just aliases for "up" and "down", I guess to make it clearer just when they run. That's according to the sid source code anyway. I can't see how it can make any difference using one or the other.

>allow-hotplug eth0
>iface eth0 inet static
> address nn.nnnn.179.107
> netmask 255.255.255.224
> broadcast nn.nnnn.179.127
> gateway nn.nnnn.179.97
> post-up ip addr add nn.nnnn.179.108/27 dev eth0:0
> post-up ip addr add nn.nnnn.179.109/27 dev eth0:1
> pre-down ip addr del nn.nnnn.179.108/27 dev eth0:0
> pre-down ip addr del nn.nnnn.179.109/27 dev eth0:1
> # dns-* options are implemented by the resolvconf package, if
>installed
> dns-nameservers 192.168.0.8 192.168.0.16
> dns-search graphics claborn.net

>It seems to be working, at long last.

The only difference between that and your previous config is that you have removed the 'label' argument and the broadcast argument (and the post-up/pre-down bit).

Have you tried running the commands manually that ifup would run? (running ifup -v should show you what it runs). This would show you where it fails.

>Cameron: From your statement "The internet still works for me" I assume you
>use something like this. May I see an example of your conf please? Where did
>you find documentation for it?

"The internet still works for me" was just a joke based on your "everything breaks" statement. However, I did try a similar setup to yours and I had no problems. I am running sid though.

When you next get a chance, its worth running that "ifup -v" command to see just where it fails. Right now, I can't see what might have been wrong.

-- 
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Received on Fri Dec 21 20:54:44 2007
Do you need more help?X

This archive was generated by hypermail 2.1.8 : Wed Feb 27 2008 - 23:06:35 EST


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library