A thought just occurred to me…
With addressing in IPv6, there’s enough addresses to cover every square metre of the earth’s surface with something like 100 addresses or so. Not sure if a standard exists for mapping geographic co-ordinates to addresses, but one just occurred to me that I might try some day.
The Maidenhead locator system divides the world up into a series of squares. At its coarsest level, it divides into zones which are each 10? latitude and 20? longitude. There form a 18×18 grid, and are usually denoted by a letter.
These are divided further into grid squares, measuring 1? × 2? in size. They form a 10×10 grid, and are usually addressed by a number…
Within this, there are subsquares, representing 2.5’×5′ (that’s minutes, not feet) forming a 24×24 grid, addressed again by letter. The grid square where I’m located, QG62LN represents an area that covers the suburbs of The Gap, the southwest bit of Enoggera, the northwest bit of Bardon, and the western end of Ashgrove.
Suppose we were to encode this maidenhead locator into the address. It’s probably less useful in traditional IP networks, but maybe it will have a use. In Amateur Radio it may be useful for the purpose of routing between mobile stations. In fact, it’s this mobile context where I see it being most useful. Lets first consider how many bits we’d need to store each component:
- Zone level, 18×18 grid: 5 bits for latitude, 5 bits for longitude, or alternatively for 324 zones, 9 bits.
- Square level, 10×10 grid: 4 bits for latitude, 4 bits for longitude, or alternatively for 100 squares, 7 bits.
- Subsquare level, 24×24 grid: 5 bits for latitude, 5 bits for longitude or alternatively for 576 subsquares, 10 bits.
Logically you’d be using numbers starting at zero for the addresses in all fields, so A would be translated to 0, etc. My QTH locator (QG62LN) would be translated as follows: Q?16, G?6, 6?6, 2?2, L?11, N?13.
You can either address latitude and longitude individually, packing them as separate fields, or you can lump them together to possibly save one bit of space. For instance, I can concatenate the two 5-bit values representing the zone QG into a 10-bit value: 10,0000,0110? = 0x206. Or I can save some space by realising there are only 324 zones which can be represented with 9 bits like so: ((16×18) + 6) = zone 294 ? 1,0010,0110? = 0x126. The grid square can be similarly encoded (0110,0010? = 0x62 or 011,1110? = 0x3e), and likewise the subsquare.
How would you pack these into an IP address? I was thinking something along one of these two:
Zone Square Subsquare Lat Lng La Ln Lat Lng .---. .---. .--. .--. .---. .---. 10000 00110 0110 0010 01011 01101 = 28 bits Zone Square Subsquare .-------. .-----. .--------. 100100110 0111110 0100010101 = 26 bits
Presumably these would form the lower 28 or 26 bits of your prefix.
won’t happen man, this would mean isp’s would need to have multiple address pools for the areas they are covering, considering you could somehow map the latitude and longitude into the lower part, so the address distribution issue is solved it would still mean a considerable effort especially considering how many special rules would need to be added, also it would significantly restrict the number of addresses an ISP has to offer from his pool, not to mention what happens if someone makes his own subnet and crosses the imaginary borderlines, they sure as hell wouldn’t bother mapping to geographic address
Who says ISPs would necessarily use it for customers? No ISP would have that many prefixes, especially not for global sites. Some argue that IPv6 in general, “won’t happen man” because they’ve got too much of a vested interest in IPv4.
On Amateur Radio and in mesh networks however; this could be a very practical way of addressing individual clusters of access points and organising link-local addressing. In the amateur radio world, we do have one /8 block on IPv4, which I’ll bet will get taken off us at some point. However, it could prove to be a useful way to divide up the address space in this situation.