Add an IP alias to ethernet interface

Bryan Kadzban bryan at kadzban.is-a-geek.net
Wed Jun 6 16:34:35 PDT 2007


Andrew Beverley wrote:
> Personally though, I think it would be useful to still include the
> ALIAS directive (it's only a few extra line of code).

It may only be a few lines of code, but it's another entire service
script, 90-some percent of which is copied from our existing script.
;-)

> Firstly it gives the script the ability to deal with more of the
> functionality of ip (I assume there is a reason to use the alias
> option),

I don't know whether that's true or not; it may be.  The only reason I
can think of off the top of my head is firewall rules (the iptables -i
and -o options) -- but any packet coming in on the eth0 device will be
treated like it came in on the eth0:1 device if it's from the right IP.
So there's no real security gained there.

And I think if I had hundreds of IPs on a single physical NIC, I'd
rather have them all be on one device, than spread across hundreds.
That may be an extreme case though.

I suspect the alias option exists in ip for compatibility with ifconfig,
and no other reason.  But I don't know that for sure.

> and secondly, using the above does not seem to be compatible with
> ifconfig (which I think most people probably still use) - the second
> IP address doesn't show in the output of ifconfig.

Except that LFS doesn't install ifconfig.  It's part of net-tools, which
is in BLFS.  :-P

Plus the net-tools tarball is six years old.  That's why iproute2 was
created: net-tools wasn't being updated to take advantage of all the new
kernel features that have been added to the networking stack in the past
six years.

FWIW, I don't really care which way this gets added -- I'm just thinking
that if we can avoid adding another service script, it'll cut down on
maintenance.  OTOH, if it's in contrib/ it probably won't be maintained
anyway (at least not in sync with everything else), so maybe that's not
important.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-dev/attachments/20070606/1a4fd47a/attachment.sig>


More information about the lfs-dev mailing list