Tom H wrote:
> Mark Copper wrote:
> > Tom H wrote:
> >> Mark Copper wrote:
> >>> Previously, my file followed this format for multiple IP addresses on
> >>> a single nic like this (cf
> >>> https://wiki.debian.org/NetworkConfiguration):
> >>>
> >>> auto eth0 eth0:1
> >>>
> >>> iface eth0 inet static
> >>>     address 192.168.1.42
> >>>     netmask 255.255.255.0
> >>>     gateway 192.168.1.1
> >>>     dns-nameservers 8.8.8.8
> >>>
> >>> auto eth0:1
> >>>     allow-hotplug eth0:0
> >>>     iface eth0:1 inet static
> >>>     address 192.168.1.43
> >>>     netmask 255.255.255.0
> >>
> >> You have "allow-hotplug eth0:0" without an "iface eth0:0 ..." line.
>
> > I think I do, but why is it necessary? I thought it was only for
> > dynamic changes.  and this server never needs them.
> 
> "iface ..." defines the interface and "allow-hotplug ..." allows
> udev to hotplug it. Without "iface ...", "allow-hotplug ..." is of
> no use. You must have meant to have "allow-hotplug eth0:1", not
> "allow-hotplug eth0:0".

Right.  allow-hotplug is for udev.  auto is for static boot.  The
presence of "auto" should work at boot time since eth0:1 was listed in
the first auto line.

> >>> but both /etc/init.d/networking reload and restart had separate
> >>> problems besides not solving my resolv.conf problem. So I tried the
> >>> newer format at the bottom of the same wiki.debian.org page like this:
> >>>
> >>> auto eth0
> >>> allow-hotplug eth0
> >>> iface eth0 inet static
> >>>     address 192.168.1.42
> >>>     netmask 255.255.255.0
> >>>     gateway 192.168.1.1
> >>>     dns-nameservers 8.8.8.8
> >>>
> >>> iface eth0 inet static
> >>>     address 192.168.1.43
> >>>     netmask 255.255.255.0
> >>
> >> You have two "iface eth0 ..." lines.
> >
> > strange, but it's in the wiki.
> 
> I'm sorry. I've just looked at the wiki and I didn't know that there
> was a new (?) iproute configuration style.

I think that is a new ifupdown configuration style.  It was ifupdown
that changed.  AFAIK iproute is the same.

  s/iproute/ifupdown/

For reference see:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=717878

And:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=717887

> It's too bad that the developer didn't get rid of the "netmask" line
> and use "address 192.168.1.42/24" instead. I assume that it's for
> backward compatibility but it'd be nice if both were possible.

Agreed.  It would be very nice if we could use the 192.168.1.42/24
style of designating the netmask.  Then it would be more compatible
with the other commands that use that syntax.

Bob

Attachment: signature.asc
Description: Digital signature

Reply via email to