Saturday, May 7, 2016

Anoop's Method : Representing IPv6 addresses in a new way

The Problem:

The biggest problem that is with the IPv6 representation is that 128bits requires a lot of characters representing it. A problem I thought of and came up with a unique solution, may not be a perfect solution but it a lot easier than the current one (Wikipedia Explanation) which only network admins can understand. This I feel is one of main reason why its adoption has been less.

With 128 bits for address you will need 32 characters to represent a single IPv6 address (each character representing 4 bits) if the current Base16 is Used. However you look at it, its going to consume that many characters. If the vast majority of the characters are going to be zeros then omitting them is a nice idea which is the current solution that IPv6 uses. What does that mean to the layman ? How does he configure the ip address of his machine ? The IPv4 itself is confusing for a simpleton but with IPv6 it changes the whole approach of thinking. Although it may appear as self-explanatory the simplcity of typing or something similar is totally disregarded in the IPv6 representation. This doesn't mean that I am IPv4 fanboy or anything. I just love the idea of simplicity. In stark contrast I actually feel IPv6 should be adopted and soon. It will drastically change the world. The problem remains with the representation.

My Solution:
Base256 (or Anoop's Method)

The obvious question will be : it will require 256 different characters to represent each of the 256 values. Not to mention people have to remember them, and how is this supposed to help the anyone?

And that is where I would say "I beg to differ".

I said 256 different characters not 256 different characters to remember.

So let me explain, does anyone know base64 encoding ? it uses 64 characters to represent 64 values, I am just borrowing that idea.

The 64 Characters are ofcourse :
10 - numbers
26 - Small letters of english
26 - Capital letters of english
plus and slash (Atleast I think its + and /) - that makes it a total of 64 characters.

Personally I prefer having the following character set in this order:

So how does 64 characters = 256 values. This is where you got to love the idea of simplicity.

Now how do I convert 64 values to 256 values ?
Rotate it Clockwise or Anticlockwise with marker indicating direction of the character (this is Method 2) or better yet put a line marker in the direction of North, East, South, West (Or Top, Right, Bottom, Left), making every single character have 4 possible combinations. That means 64X4 = 256 characters.

The picture above represents two ways of having 256 Values from 64 Characters. 

So an ip address would like this:
OR (Second Method, is to use the line marker with character rotation )
NOTE: These new 256 characters (first method) should be made available in Unicode characters list specifically for IPv6 Representation or 4 new Modifier characters have to be included in the Unicode characters list. The second method is a little more complex to read and has slight flaws depending on the font that is being used.

That would make it 8Bits * 16 = 128Bits
Representing IPv6 or IPv4 address would be a lot simpler using the this method.

Console Environment: (ASCII representation)
Since these alphabets with markers donot exist as of today, there has to be an ascii representation for console only machines. In that case we would require 32 characters as before. As we need a prefix for each character to identify whether it is South Marker Capital Letter 'A' ,  West Marker Capital Letter 'A', North Marker Capital Letter 'A'  or East Marker Capital Letter 'A' .

The same address would look something like this:


Subnet Mask Example:

The prefix being S-SOUTH, W-WEST, N-NORTH, E-EAST . The prefix should always be capital letter and every letter has a prefix if you are using ASCII representation. The spaces are present to improve readability.

GUI Environment:
And for the GUI environment a Popup window that lists the primary base256 characters along with the marker type(NORTH, EAST, SOUTH, WEST) can be provided to configure an ipaddress/subnet... etc.

IPv4 Representation :
IPv4 also can be represented using this method, which requires only 4 characters.

Character Representation and its values:
Should the characters values be uncollated or collated as in do we assign values like this:

S0 = 0, W0 = 1, N0 = 2,  E0 = 3, S1 = 4, W1 = 5,  N1 = 6,  E1 = 7


Method2:  (4S Method or SSSS Method, SOUTH SOUTH SOUTH SOUTH Method)
S0 = 0, S1 = 1, S2 = 2,  S3 = 3, S4 = 4, S5 = 5,  S6 = 6,  S7 = 7, ... , S- = 62, S+ = 63 , W0 = 64, ... so on and so forth.

Personally I think method 2 for value association is better and more readable.

Some common values:
0 = S0
1 = S1
255 = E+

Short Cut to Fast Typing of IPv6 Characters

A + CTRL + Arrow UP = NA
a  + CTRL + Arrow UP = Na
1  + CTRL + Arrow RIGHT = E1
... Etc


  1. To be honest, if anyone is typing in IPv6 addresses manually, then they're either going to be experts configuring networking equipment (with configurations written in UTF8), or there's been an epic fail on behalf of the system admin supplier.

    IPv6 addresses are generally not going to be time-invariant, or network-invariant. It ain't going to fly if you have to type in such long strings every time the prefix assignment is updated.

    No end user ever typed in an Appletalk address, and work on DNS SD should ensure that users are presented with service names rather than addresses.

    1. @Ray,

      There are many advantages to using UTF-8 to type in IPv6. As the above url shows. It will have same near flexibility of IPv4.

      I did put a disclaimer saying this : "may not be a perfect solution but it a lot easier than the current one"

      "It ain't going to fly if you have to type in such long strings every time the prefix assignment is updated."

      That is probably the reason why its not getting adopted as quickly as we hoped.

      "DNS SD should ensure that users are presented with service names rather than addresses"

      0. If you look at the url mentioned above, with base256 it no longer looks like an Internet address itself.
      1. What if you want to statically configure some machines with IPv6 ?
      2. What if I want to share a folder within my own organization ?
      3. What if I want to VNC/Telnet/SSH/RemoteDesktop Connection inside or outside my org ?
      4. What if I want to setup firewall rules blocking some ip addresses ?

      The DNS SD may provide me with a means of access but manually typing is still required just like a Kickstarter on a bike. I just made the kickstarter a lot whole lot more simpler and readable.

  2. While amusing, this is ultimately impractical. The Unicode space is sparsely populated and there are enough homoglyphys that the Unicode to IPv6 conversion will be untrustworthy.

    The "Proquints" system was the closest I saw to a feasible IPv6 address compression solution, but it obscures the prefix boundaries so it is useless.

    You're better off using the Snapchat dot pattern or other QR codes, which are designed for that job.

  3. "ultimately impractical"... please explain.

    "there are enough homoglyphys that the Unicode to IPv6 conversion will be untrustworthy" -> Most monospace fonts distinguish between homoglyphs pretty well. Check out the simple tool at (you may need to compile it using Qt)