SNSD (netsukuku)

The Scattered Name Service Disgregation (SNSD) is the ANDNA equivalent of the SRV Record of the Internet Domain Name System (defined by RFC 2782).

SNSD isn't the same as the "SRV Record", it has its own unique features.

With SNSD it is possible to associate IP addresses and hostnames to another hostname. Each assigned record has a service number, in this way the IP addresses and hostnames which have the same service number are grouped in an array. In the resolution request the client will specify the service number too, therefore it will get the record of the specified service number which is associated to the hostname.

Example
The node X has registered the hostname "angelica". The default IP address of "angelica" is 1.2.3.4. X associates the "depausceve" hostname to the `http' service number (port 80) of "angelica". X associates the "11.22.33.44" IP address to the `ftp' service number (port 21) of "angelica".

When the node Y resolves "angelica", by default it gets 1.2.3.4, but when its web browser tries to resolve it, it asks for the record associated to the `http' service, therefore the resolution will return "depausceve". The browser will resolve "depausceve" and will finally contact the server. When the FTP client of Y resolves "angelica", it will get the "11.22.33.44" IP address. If Y tries to resolve a service which hasn't been associated to anything, it will get the main IP, 1.2.3.4.

The node associated with an SNSD record is called "SNSD node". In this example "depausceve" and 11.22.33.44 are SNSD nodes.

The node which registers the records and keeps the registration of the main hostname is always called "register node", but it can also be named "Zero SNSD node", in fact, it corresponds to the most general SNSD record: the service number 0.