IP Addressing
Approaches to IP Addressing
IP Address Ranges
The two main options are:
- Public addresses without NAT. This option is nice if you can manage it, but it is often difficult to get IPv4 addresses allocated in any reasonable quantity.
- Private or otherwise NATed addresses. Can be a little annoying at times, as NAT is not perfect, but anyone can do it.
Below are some approaches to private and public addressing that are either common, or have potential.
Private Addresses
There are three main address ranges that are typically used for private networks: (1) 10.0.0.0/8; (2) 192.168.0.0/16 and (3) 172.16.0.0/12. These are defined in RFC1918.
These have the advantage of being well known, and reasonable in size. However, the birthday paradox causes some problems. For example, 192.168.0.0 has only 65536 addresses, which means that if people choose an IP address at random, a collision is likely with a network of only 256 nodes. It is a bit better with 10.0.0.0/8, where the 16.7x106 addresses means that a collision is likely after about 4,000 nodes. This all assumes random address allocation, and people are rarely random! A common solution here is to have some kind of IP allocation system, but these are not fool-proof.
Another problem with the public IP address ranges is that many networks use them, so NAT is required between networks, causing potential for further entertaining problems.
IPv6 should be a good solution here, as it does offer truly unique IP addresses based on the MAC address of your wifi/ethernet card. However, the long addresses can cause trouble for the traffic overhead of the mesh. Inverted list compression techniques could be applied here, for example, interpolative coding?, which can compress lists of ascending numbers surprisingly well.
Squatted Public Addresses
Some networks pick a large existing IP allocation, for example an allocation by a military organization that they assume their network will never need to connect to.
Class E Addresses
Class E is 240.0.0.0/4, i.e., 256 million IP addresses at the top of the range. These will never be allocated because ordinary routers typically will not handle them correctly, because they are marked for experimental use only. However, on a mesh, we provide our own routing, so this is unlikely to be a problem. Moreover, meshes are surely experimental!
We could set up an allocation scheme among our networks to allocate globally unique Class E addresses to meet our needs for many years to come. This would allow very easy federation of our networks.
