[lug] Address for LAN on VPN?

Sean Reifschneider jafo at tummy.com
Thu Mar 9 19:02:18 MST 2006


On Mon, Mar 06, 2006 at 05:56:08PM -0700, David L. Anselmi wrote:
>Sean Reifschneider wrote:
>>192.168.$[RANDOM%256].$[RANDOM%256]
>
>Very cool.  I don't think I did it that way last time I picked a subnet 
>(I probably didn't realize the variable would expand).  But that's worth 
>remembering (and that $RANDOM is only 15 bits).

Of course, it could generate a bad address like .0 or .255, but as a first
pass it works great.

Thanks,
Sean
-- 
 Gone Postal Sort: Iterate over elements, any element that is out of order you
 blow away.  -- Evelyn, Kevin, and Sean, watching Monty Python and reading DDJ
Sean Reifschneider, Member of Technical Staff <jafo at tummy.com>
tummy.com, ltd. - Linux Consulting since 1995: Ask me about High Availability




More information about the LUG mailing list