I’m pleased to announce our library and cli for generating unique and reproducible IP addresses. Both of these are written in Rust and are based on our IPGen Spec which is a specification for generating such IP addresses using cryptography.

The idea with the specification and accompanying tools is to remove the frustration of managing IP addresses within your network. Right now you either assign IP addresses manually having to keep track of which IP addresses were assigned and which ones weren’t, or you use a centralized system to manage these allocations like a service discovery tool or your favorite DBMS.

Using our command line tool for example, all you need to do is bind your service, the first instance of Cassandra in this example, to an IP address generated by this command:-

$ ipgen --network fd9d:bb35:94bf::/48 cassandra.1 fd9d:bb35:94bf:c38a:ee1:c75d:8df3:c909

You can then use the the same command to generate an IP address in your app’s startup script to tell it the IP address of that instance so it can connect to it, or you can simply derive that IP address from your app as follows:-

let ip = ipgen::ip("cassandra.1", "fd9d:bb35:94bf::/48").unwrap();

which gives you, your standard IpAddr.

This makes assigning and consuming IP addresses on your network as easy as generating UUIDs. No need for a centrally coordinated system which might be another potential point of failure nor do you or your apps have to know about the IP address that will be generated.

The spec and the tools support both IPv4 and IPv6 addresses. They are available for use right away. We are already generating our IP addresses using them.