Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 May 1999 21:35:04 -0700 (PDT)
From:      "Aaron Gifford" <agifford@infowest.com>
To:        freebsd-isp@freebsd.org
Subject:   Re: ifconfig_if0_alias?
Message-ID:  <19990521043504.2D45915316@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
I gave up directly maintaining individual entries in /etc/rc.conf
for each new IP alias I added.  Instead I created a file listing
just an IP address (and optional comments) for each IP alias
which I process with a perl script.  The perl script automatically
updates my /etc/rc.conf neatly adding the appropriate 
ifconfig_if0_aliasXYZ= line and adding a subsequent static route
for each IP alias.  Additionally, the script checks to see if I've
deleted any IP aliases and if so, deletes them or suggests the
command line commands to do so (depending on how the script is
configured).  Oh, I forgot to mention that it does the reverse
too, running ifconfig and route add for any new IP aliases.

Yeah, yeah, this does mean rc.conf has to be at least partially
machine readable, but since this is just for my own convenience
and not a general solution, I don't care.

Just to be sure I wasn't wasting my time adding static loopback
routes for every IP alias, I did a quick ping test:

PINGing a local IP alias that does NOT have a loopback route:

--- 10.200.55.242 ping statistics ---
1000 packets transmitted, 1000 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.119/0.136/0.217/0.015 ms


PINGing a local IP alias that DOES have a loopback route:

--- 10.200.55.243 ping statistics ---
1000 packets transmitted, 1000 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.093/0.106/0.305/0.015 ms

It looks like the loopback route shaves off .030 ms on average
at least in this case processing pings.

It works for me and is a bit easier than adding an ifconfig_...
line to rc.conf by hand.  Anyone interested in the perl script
can e-mail me in private.  It has only been tested with several
hundred IP aliases, so for those with many hundreds or thousands,
I'd be interested in finding out if it works there too.

Aaron out.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




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