Most people these days would call this a blog. I think "blog" sounds like something to be avoided in polite society but these days that is what this is. |
posted Feb 8, 2012, 8:19 PM by Sandy McArthur, Jr.
Recently I've been having fun interconnecting multiple private networks at both work and private locations. I wanted a method to deterministically assign static IP addresses and subnets without too much worry of overlap for when DHCP doesn't work. Below is what I've come up with for myself.
Calculating an OctetTo come up with the octet (0-255) decide on the text string describing that octet, normalize the name (lowercase it and remove any spaces) and then calculate the CRC32 of that string as an unsigned integer. That gives me a large number which I then divide by 256 and use the remainder ( mod) as the octet.
For example: a private network located at '123 Any Street' would get the third octet of 15. - '123 Any Street' is normalized to '123anystreet'
- CRC32 of '123anystreet' is 2973677327
- The remainder of 2973677327 divided by 256 is: 2973677327 mod 256 = 15
- Therefor the private network at 123 Any Street would be 192.168.15.0/24
For most private networks I'd let DHCP allocate the fourth octet and be done with it.
VPN Network NamesBut for P2P VPN between hosts, like N2N or tinc, an address doesn't make sense as the key to naming the network and running a DHCP server might not make sense in such decentralized manner. In that case I'd repeat the steps above with a descriptive name such as company name or department name and a descriptive host name such as 'sandy-macbook' as the strings to CRC32.
Hope that is helpful. You can likely find commercial products that take care of much of this for you but I'm cheap and I enjoy the details. |
posted Feb 7, 2012, 8:23 AM by Sandy McArthur, Jr.
N2N is a peer to peer VPN I've been trying out on some OpenWRT boxes for a few days now. I'm finding the link reliability to be very poor. I can have an active ssh connection to two boxes from my laptop and their ability to ping each other over the n2n vpn is intermittent at best. I like the idea of the product but am finding it lacking so far. I plan to see if I can improve the vpn link stability else I'll give tinc a try. |
posted Feb 7, 2012, 8:07 AM by Sandy McArthur, Jr.
Knowing (2009) is sci-fi'ed up rapture movie. Start with a rapture story, replace angles with aliens, replace non-believers with Nicolas Cage, replace an audience with bored people. If you like that kind of stuff this movie could be for you. |
|