[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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



On Friday 21 December 2007 12:49, Jonathan Wilson wrote:
> > Does anyone know the correct way to add multiple secondary IPs
> > (in other words, a base device IP, and 2 or more additional IPs)
> > to one device interface, in this case, eth0.
>
> I accidently sent the original post before I finished typing.
>
> When I use a config like the last example, networking completely breaks,
> meaning, that even the addresses on eth0 and eth1 that were working before,
> stop working.

Looks like my original post did not come through for some reason. Maybe it was too long.

Here's the most important example from the original post. It works as-is. 
If I uncomment the commented "up" and "down" lines, everything breaks. 
Yes, I have real numbers and not nnn in the real config file.:

allow-hotplug eth0
iface eth0 inet static
        address nn.nnn.179.107
        netmask 255.255.255.224
        broadcast nn.nnn.179.127
        gateway nn.nnn.179.97
        up ip addr add nn.nnn.179.108/27 broadcast nn.nnn.179.127 label eth0:1 dev eth0
#        up ip addr add nn.nnn.179.109/27 broadcast nn.nnn.179.127 label eth0:2 dev eth0
        down ip addr del nn.nnn.179.108/27 label eth0:1 dev eth0
#        down ip addr del nn.nnn.179.109/27 label eth0:2 dev eth0
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 192.168.0.8 192.168.0.16

Thanks,

	JW

-- 

----------------------
System Administrator - Cedar Creek Software
http://www.cedarcreeksoftware.com


Reply to: