[Nottingham] Gentoo network alias syntax, or "ip" add a label...

Martin martin at ml1.co.uk
Sun Oct 9 11:34:44 UTC 2011

On 8 October 2011 23:12, Martin <martin at ml1.co.uk> wrote:
> Folks,
> OK, I seem to have come unstuck with the Gentoo OpenRC syntax for the
> simple task of merely putting two IP addresses onto the same ethernet
> interace...
> So, I have eth0, and merely wish to assign and
> and call them eth0 and eth0:2 respectively.
> Using:
> config_eth0=(
> ""
> ""
> )
> So...
> What's the magic to also get the second ip address labelled with an
> "eth0:2" ? (Or to get ifconfig to see it exists?)

I'm suspicious the Gentoo setup doesn't support that.


help configuring eth0:0 alias interface in openrc

> Or can "ip" be used to just add a label to an existing interface address?

Anyone for that one? Or, for an existing address, must you remove and
then re-add with the eth0:x label ?

> ... And the documentation for Gentoo OpenRC appears to be rather 'lacking'...

What was it that Richard Stallman said about good documentation and freedom?!...

I'm using Shorewall and there are good examples for using a single
physical interface across multiple subnets given on:

Routing on One Interface

What isn't described is that you must also take care over what address
used by the interface when sending data packets. Hence, depending on
what you're doing, you will need to use "ip tables" to appropriately
set the source address for anything outgoing on that interface.

The Linux kernel does exactly the right thing for when you have
separate physical interfaces. Why not so for multiple aliases on a
single physical interface?...

Hope that helps for any others having similar fun...


More information about the Nottingham mailing list