Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 Jan 2014 11:13:25 -0600
From:      Mark Felder <feld@FreeBSD.org>
To:        freebsd-net@freebsd.org
Subject:   Re: network.subr _aliasN handling
Message-ID:  <1388769205.18631.66232001.48DB5958@webmail.messagingengine.com>
In-Reply-To: <A7699871-A170-4AD5-B740-ED8BE17C7107@fisglobal.com>
References:  <20131228055324.GA72764@aim7400.DataIX.local> <A7699871-A170-4AD5-B740-ED8BE17C7107@fisglobal.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Dec 28, 2013, at 22:24, Teske, Devin wrote:
> 
> On Dec 27, 2013, at 9:53 PM, <jhellenthal@dataix.net> wrote:
> 
> > Curious what everyone's opinion would be on modifying the handling of _aliasN functions or providing a wrapper around it to handle non-sequential ordering.
> > 
> > My goal on this is simple and based around groupings similiar to that of the way user id(1)'s in passwd and group are handled or denoted for use on modern systems.
> > 
> > I.e.: I would like to achieve this...
> > 
> > *_alias[1-99] = System type addresses "Importand addresses or internal"
> > *_alias[100-199] = Aliases for interface 1
> > *_alias[200-299] = Aliases for interface 2
> > etc...
> > 
> > NOt looking to achieve some sort of prefered naming convention for the interface aliases, but loosen them so they may be defined by the user in whatever means neccesary to their benefit.
> > 
> > In a scheme similiar to above I attempted to set an address on every other 4th alias leaving 3 space rule room for insertion of further addresses but was surprised when the processing of the aliases ceased at the first non-sequential space.
> > 
> > So why not just grab every _aliasN no matter of what it is for the interface and shove them into an arrary to be processed by a "for" statement ? the order would still be kept without having to inspect every defintion of alias and incrementing prehistorically.
> > 
> > As well this could provide early loading of the addresses into their respective arrays so they may be processed and provided to any other functions that may need to access them earlier on in script fallthrough.
> > 
> > Looking at _alias'N' sequentialy feels like a neucense.
> 
> You mean something like the attached?
> -- 

Commit this and I'll buy you a beverage of your choice the next time I
run into you :-) I have webservers with a hundred or more aliases, each
followed by a comment like:

ifconfig_em0_aliasXX="1.2.3.4/32" # customer or vhost name

And when you need to move an IP to another server or disable one
temporarily it's very painful. Renumbering is not fun, and it's annoying
when a new guy not familiar with the consequences makes a change on the
server and then it's rebooted a month later and some IPs are no longer
activated on boot!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1388769205.18631.66232001.48DB5958>