From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org)
	by nuthatch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-user+bounces-54283-garchives=archives.gentoo.org@gentoo.org>)
	id 1GgyBG-0006YR-Ly
	for garchives@archives.gentoo.org; Mon, 06 Nov 2006 06:42:03 +0000
Received: from robin.gentoo.org (localhost [127.0.0.1])
	by robin.gentoo.org (8.13.8/8.13.8) with SMTP id kA66coD2031683;
	Mon, 6 Nov 2006 06:38:50 GMT
Received: from mail.cubesearch.com ([207.115.69.50])
	by robin.gentoo.org (8.13.8/8.13.8) with ESMTP id kA66aLku008928
	for <gentoo-user@lists.gentoo.org>; Mon, 6 Nov 2006 06:36:22 GMT
Received: by mail.cubesearch.com (Postfix, from userid 505)
	id ACBD91FB8E8; Sun,  5 Nov 2006 22:36:20 -0800 (PST)
Received: from localhost (localhost [127.0.0.1])
	by mail.cubesearch.com (Postfix) with ESMTP id A50331FB8E7
	for <gentoo-user@lists.gentoo.org>; Sun,  5 Nov 2006 22:36:20 -0800 (PST)
Date: Sun, 5 Nov 2006 22:36:20 -0800 (PST)
From: 3ric Johanson <ericj@shmoo.com>
X-X-Sender: ericj@localhost
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] conf.d/net aliases using iproute2
Message-ID: <Pine.LNX.4.64.0611052215510.19110@localhost>
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Archives-Salt: 1bcc6c7d-8f87-410d-a07f-57dc53bbcd2b
X-Archives-Hash: c0e8b8f23d3a8ecc85ff976cd75fa266

Hi there,

As part of my firewall/shorewall config, I'd like to use aliased 
interfaces.. this is working fine:

config_eth2=(
         "x.254.18.119/24"
         "x.254.18.120/24"
         "x.254.18.121/24"
         )

  # ip addr show dev eth2
4: eth2: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc cbq qlen 1000
     link/ether 00:x:27:85:11:x brd ff:ff:ff:ff:ff:ff
     inet x.254.18.119/24 brd 216.254.18.255 scope global eth2
     inet x.254.18.120/24 brd 216.254.18.255 scope global secondary eth2
     inet x.254.18.121/24 brd 216.254.18.255 scope global secondary eth2

.. this is great.   However, in order for me to setup different rules for 
these incoming sub-interfaces (aliased).. I need to label them using ip 
route2 commands, such as:

# ip addr add x.254.18.120/24 brd x.254.18.255 dev eth2 label eth2:1

How can I have the ifup script create these labeled aliases via ip route2?

I guess I could pull down the interfaces and add them back by hand or 
script.. but that seems really ghetto.

Help?

Cheers,
3ric Johanson

-- 
gentoo-user@gentoo.org mailing list