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

Re: /etc/network/interfaces & point-to-point ethernet & broadcast address



On Thu, Feb 06, 2003 at 09:51:47PM -0500, Noah L. Meyerhans wrote:
> Yes.  In fact, David Miller, one of the Linux network stack hackers, has
> been quoted as saying that ifconfig and route are deprecated and that ip
> is the way of the future.  I know that people have suggested on this
> mailing list in the past that we ditch ifconfig and route in place of
> it, but that suggestion was shot down because people are too used to

Probably a good start might be to upgrade ifupdown to use ip commands
rather then ifconfig/route commands. Also update anywhere else in Debian
that uses the old commands (one example that comes to mind is the
default scripts that come supplied for ISDN).

I think this shouldn't be too hard.

Or as completely different approach, do something like:

auto eth0
iface eth0 inet static

    up ip address add dev eth0 192.168.87.1/24 broadcast +
    down ip address del dev eth0 192.168.87.1/24

    up ip address add dev eth0 192.168.87.2/24 broadcast +
    down ip address del dev eth0 192.168.87.2/24


(note: this won't work as is; I deliberately ommited the required
fields; I think it is possible to make it work, but I can't remember
how).

Which is good in that all IP addresses are configured
symetrically.

Its downside though is that we just lost the benifits of the structured
information already in the interfaces file.

It also means some information is duplicated.
(note: it might be possible to ommit the del rule, but I like having
symmetrical ups/downs... It is less likely to cause confusion).

For people new to /bin/ip, the above would be instead of the more
traditional:

auto eth0
iface eth0 inet static
    address 192.168.87.1
    network 192.168.87.0
    netmask 255.255.255.0
    broadcast 192.168.87.255

auto eth0:0
iface eth0:0 inet static
    address 192.168.87.2
    network 192.168.87.0
    netmask 255.255.255.0
    broadcast 192.168.87.255

Which, at least with woody ifup/down is rather buggy.

If, for instance you type in:

ifdown eth0
ifup eth0
ifup eth0:0

it won't configure eth0:0 because ifup thinks it already is up, and
doesn't realize that shutting down eth0 also shutdowns (implied) eth0:0
(at the kernel level). Similarly, if eth0:0 has down scripts, then
these would not have been executed.

Now (with the new version) you can just type in "ifdown eth0", followed
by "ifup eth0" and everything will "just work".

> using the old commands.  I wonder if we could do something to transition
> to ip as the default interface/route manipulation tool.  Perhaps wrapper
> scripts?  That was the suggestion by Dave Miller.

What benifit would you get in using wrapper scripts over
using the old programs?

Also I suspect many people simply aren't aware that the
old programs are now considered obsolete and have been replaced.
--
Brian May <bam@debian.org>



Reply to: