IP to NSAP for ISIS

IP to NSAP for ISIS

The tool below provides an simple way to translate an IP (typically a loopback e.g. lo0) plus an area to an NSAP to be used to configured ISIS with the net command.

The tool completes the "translation" by padding each octect in an IP to three digits (if required) with leading zeros so for example 1.1.1.1 would become 001.001.001.001 after the padding. After this the string has the decimal points removed between the octects so 001.001.001.001 becomes 001001001001 then then finally a decial point is added after every fourth digit so 1.1.1.1 become 0010.0100.1001.

The final step is prefix the AFI (49) plus the area (which is also padded with leading zeros to become four digits e.g. area 9 becomes 0009) to our translated loopback IP then a trailing .00 for the N selector value.

This means using an area of 99 and an IP of 1.1.1.1 would become: 49.0099.0010.0100.1001.00

A LOT more can be added where we simply add an area but for most implementations this is ok. You can read much more detail about the makeup of a NSAP here.

Any thoughts please do let me know

m00nie