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

Re: Configuring multiple IP addresses on VLAN interface using ifupdown



Miles Fidelman wrote:
> for what it's worth, my (working, for years) /etc/network/interfaces
> file looks like this:

In addition to what Tom said, you have redundant network and broadcast
statements.  If you specify the netmask then the network and broadcast
will be calculated from the netmask.

Better to reduce the configuration to the source input and let the
program calculate the dependent parts rather than doing so manually
and possibly making a mistake.  Let the machine calculate it for you.

> iface eth0 inet static
>     address 207.154.13.48
>     netmask 255.255.255.224
>     network 207.154.13.32
>     broadcast 207.154.13.63
> ...

Since the netmask is specified the network and broadcast would
normally be calculated from it.  Unless overridden.  This is
sufficient.

    address 207.154.13.48
    netmask 255.255.255.224

> iface eth0:1 inet static
>     address 207.154.13.49
>     netmask 255.255.255.224
>     broadcast 207.154.13.63

Same thing here.  With netmask the broadcast statement is redundant.

> iface eth0:2 inet static
>     address 207.154.13.50
>     netmask 255.255.255.224
>     broadcast 207.154.13.63

And here.

At one time in the long past the ifupdown examples included all
possible option statements.  Which is typical of examples to show all
of the possibilities and then users can hack it as they need.  But
this ended up with a lot of people thinking that all of those
statements were required and desired.

A year or so ago there was an effort to clean up those redundant
statements from the documentation.  The ifupdown examples no longer
include them.  They have been removed from the fine Debian Reference.
They have been removed from most wiki pages that have been found.  So
I am hinting here to clean them up too.  :-)

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: