RAINS, Another Internet Naming Service

RAINS is an alternate protocol for Internet name resolution, designed as a replacement of the Domain Name System (DNS) and is used in SCIONLab.


The following step assume that you are already running a SCION AS. Install the tool rdig, which allows you to make RAINS queries over SCION:

go get

Display the rdig help to learn about the parameters:

rdig --help

Add some convenience functions to your shell to facilitate using rains with the SCION tools until rains support gets integrated natively:

echo 'mydig() { rdig @17-ffaa:0:1107,[] "$@" scionip4 -p 5025 | grep ":A:" | awk "{print \$6}" | sed "s/:scionip4://"; }' >> ~/.profile
echo 'myHost() { echo `cat $SC/gen/ia | tr "_" ":"`,[]; }' >> ~/.profile
source ~/.profile

Making queries

To the resolver running in the Attachment Point:

rdig @17-ffaa:0:1107,[] ns1.snet. scionip4 -p 5025

To a rainsd server for the zone node.snet. :

rdig @17-ffaa:0:1107,[] ap17.node.snet. scionip4 -p 55553

Using scmp with rains

$SC/bin/scmp echo -c 3 -local `myHost` -remote `mydig ap17.node.snet.`