Re: unable to get /etc/resolv.conf and /etc/network/interfaces configured properly in wheezy
Bob Proulx a écrit :
>
> auto eth0
> allow-hotplug eth0
> iface eth0 inet static
> address 192.168.1.42
> netmask 255.255.255.0
> gateway 192.168.1.1
> up ip addr add 192.168.1.43/24 dev eth0 label eth0:0
> down ip addr del 192.168.1.43/24 dev eth0 label eth0:0
> up ip addr add 192.168.1.44/24 dev eth0 label eth0:1
> down ip addr del 192.168.1.44/24 dev eth0 label eth0:1
You don't even need to define a label, unless you want to display the
additional addresses with ifconfig (not needed with ip addr ls).
> Personally I find that way simpler and looks nicer. Then there is
> never a problem with interfaces and virtual interfaces getting out of
> sync with each other. There is only ever one real interface and the
> rest are simply slaved off of it. But others don't like it and like
> the implementation of many virtual interfaces.
IP aliases/labels are not virtual interfaces. And all the trouble comes
from treating them as interfaces, which they are not.
Reply to: