Add an IP alias to ethernet interface

Andrew Beverley andy at
Mon Jun 4 15:22:53 PDT 2007

On Mon, 2007-06-04 at 14:07 -0700, Dan Nicholson wrote:
> On 6/4/07, Andrew Beverley <andy at> wrote:
> >
> > I've created an ipv4-alias script, please see attached. However, it is
> > almost exactly the same as the ipv4-static script (it still needs all
> > the same parameters as a normal static address), which makes me think
> > that the ipv4-static script should just be updated so that it can deal
> > with an ALIAS variable (similar to the script Rabenkind did).
> Script looks nice, and now I see how it works actually trying the
> commands. It looks like we could probably add an ALIAS config for
> ipv4-static. But what happens if the user sets a label as their only
> address? I.e., they only have a single config file in ifconfig.eth0
> and it sets ALIAS=1 because having an alias sounds like a good idea?
> I'm honestly asking because I have no experience here.

I'm no expert either, but from what I've just tried I /think/ it still
works. What happens when using the ALIAS is that the original interface
(eg eth0) that was brought up is left without an IP address, but an
alias is added to it that responds in the way that the original
interface would respond if the IP address was attached directly to it.

> > > As for getting it in LFS, I would be find adding it to the contrib
> > > directory in lfs-bootscripts.
> >
> > Great. If you do want to keep it as a separate script, can I suggest a
> > mention of it in the network script page of LFS (ch 7.13)? This is the
> > first place I think most people would go to look for this sort of
> > information.
> If it ends up being a separate scripts, I'll try to get it mentioned
> in the book. I'd prefer to just add it to the current ipv4-static
> script so long as it doesn't regress anything or add a big potential
> pitfall for newcomers.

I also think it would be better in ipv4-static. Given that your average
newcomer will copy most configuration files word for word, then as long
as the ALIAS option is detailed in the amplifying text rather than in
the example configuration file I don't think it would be a problem.
However, even if they did put it in, from what I've seen above I don't
think it matters greatly, although I'd like someone else to confirm


Andy Beverley

More information about the lfs-dev mailing list