Get a quoteGet a quote
Live ChatLive chat
Client ZoneClient Zone
ContactsContacts
Hide
Live Support
Sales department
Technical Support
Referral Whois and ARIN's rwhoisd

Without strict standards, the Internet would have been just a bunch of interconnected networks, and finding valid information about some specific resource would have been next to impossible.

The most simple example (not directly related to the Internet or IT, but illustrating the main idea):

Imagine the modern telephone system. Each country has its own area code, each state/district/region has its own area code too, inside the country. Each smaller region has an area code too.

For example, you want to call someone in Vienna, Virginia, with the local number 123 4567.

You will have to lookup the U.S international code first (+1 in this case). After that, you will need to find the Virginia’s area code. You will use something like a phone-book for this. In the phone book – we can notice that Virginia, U.S has multiple area codes (276, 434, 540, 571, 703, 757, 804 in this particular example). In the same phone book, we find that Vienna’s area code is 703, so, we will have to dial: +1 703 123 4567 (where 123 4567 is the local phone number).

So, to find the intermediary codes you have to dial in order to be able to reach the local phone number, you have consulted a phone book, or the equivalent of a “Directory Service” (The information in the phone book being the directory itself).

A similar logic is hidden, for example, behind the DNS (Domain Name System) hierarchical naming system. We won’t go to deep into DNS structure, but in order to find valid information about a specific domain name, you will have to take similar steps as with the phone system.

Let’s say we want to find the IP address of the 4th level domain headquarters.servercompany.co.uk. We firstly need to know who controls the .uk TLD. After that – we will need to find who controls the .co.uk 2nd level domain, and so on, until we obtain the needed IP address.

In theory, a “directory” refers to a database of information that is highly optimized for read operations, which should provide the ability of browse, lookup or search information using some specific criteria.

On the internet, we deal with hierarchical data structures too.
Most notable are: DNS and IP networks.
We gave a DNS-related example earlier. The situation with IPv4 IP adresses is similar, but instead of dividing domain names into TLD, 2nd level, 3rd level domains, etc, IP networks can be divided by applying shorter bitmask to the base 2 notation of an initial ip address.

Thus, 74.125.39.99 is part of the 74.125.39.0/24 network, which in its turn is a part of 74.125.36.0/22, which is a part of 74.125.0.0/18, which is also a subnet of the 74.112.0.0/12 network, and so on.

By definition, RWhois or Referral Whois is an application protocol for querying of distributed databases of Internet domain names, address allocations, and other directory information.
It is in some way an extension of the Whois protocol, which was meant to be used earlier for the same purpose, but which was appropriate only during the beginning of the Internet, more exactly on the ARPANET.
As the internet evolved – a single server for keeping all this data is not enough, nor is it scalable.

Rwhois enhances Whois, and adds hierarchy and scalability to it.
Rwhois is documented in detail in RFC 2167, which supersedes a few older standards.
The most used rwhois server daemon is rwhoisd (http://projects.arin.net/rwhois/) developed by ARIN.
We will proceed with the standard install and basic configuration of the rwhoisd server.
The install process will be OS-independent, so we will install it from the source tarball provided by ARIN, using the last (1.5.9.5) version.
==========================================================
[root@server src]# wget http://projects.arin.net/rwhois/ftp/rwhoisd-1.5.9.5.tar.gz
[root@server src]# tar zxf rwhoisd-1.5.9.5.tar.gz
[root@server src]# cd rwhoisd-1.5.9.5

If we are installing this on Linux, we will have to adjust a small detail, because of different syntax of the `sort` parameters on FreeBSD and Linux:
[root@server rwhoisd-1.5.9.5]# nano mkdb/index.c
Before the next lines:
#ifdef NEW_STYLE_BIN_SORT
#define SORT_COMMAND "sort -o %s -k 5,5 -k 4,4n -t : %s"
#else
#define SORT_COMMAND "sort -o %s +4 +3 -t : %s "
#endif

add:
#define NEW_STYLE_BIN_SORT
Compiling and installing:
[root@server rwhoisd-1.5.9.5]# ./configure --prefix=/usr/local/rwhois
[root@server rwhoisd-1.5.9.5]# make
[root@server rwhoisd-1.5.9.5]# make install

Creating an init script for the rwhoisd daemon:
[root@server rwhoisd-1.5.9.5]# nano /etc/init.d/rwhoisd
#!/bin/bash
#
# /etc/rc.d/init.d/rwhoisd
#
# Source function library.
. /etc/init.d/functions
test -x /usr/local/rwhois/sbin/rwhoisd || exit 0
RETVAL=0
#
# See how we were called.
#
prog="rwhoisd"
start() {
# Check if atd is already running
if [ ! -f /var/lock/subsys/rwhoisd ]; then
echo -n $"Starting $prog: "
daemon /usr/local/rwhois/sbin/rwhoisd -d -c /usr/local/rwhois/etc/demo/rwhoisd.conf
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/rwhoisd
echo
fi
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc /usr/local/rwhois/sbin/rwhoisd
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/rwhoisd
echo
return $RETVAL
}
restart() {
stop
start
}
reload() {
restart
}
case "$1" in
start)
start
;;
stop)
stop
;;
reload|restart)
restart
;;
condrestart)
if [ -f /var/lock/subsys/rwoisd ]; then
restart
fi
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart}"
exit 1
esac
exit $?
exit $RETVAL

[root@server rwhoisd-1.5.9.5]# chmod +x /etc/init.d/rwhoisd
[root@server rwhoisd-1.5.9.5]# chkconfig --add rwhoisd
[root@server rwhoisd-1.5.9.5]# chkconfig rwhoisd on
[root@server rwhoisd-1.5.9.5]# mkdir /usr/local/rwhois/etc/demo
[root@server rwhoisd-1.5.9.5]# rsync -a /usr/local/rwhois/etc/rwhoisd/samples/ /usr/local/rwhois/etc/demo/
[root@server rwhoisd-1.5.9.5]# cd /usr/local/rwhois/etc/demo/
[root@server demo]# nano rwhoisd.conf

Adjust the following parameters:
—————–
root-dir: /usr/local/rwhois/etc/demo
local-host: rwhois.rservers.com
local-port: 4321
userid: rwhois
max-children: 30

—————–
[root@server demo]# chown -R rwhois:rwhois /usr/local/rwhois/etc/demo/net-*
[root@server demo]# touch /usr/local/rwhois/etc/demo/rwhoisd.log
[root@server demo]# chown -R rwhois:rwhois /usr/local/rwhois/etc/demo/rwhoisd.log
[root@server demo]# /usr/local/rwhois/bin/rwhois_indexer -i -c /usr/local/rwhois/etc/demo/rwhoisd.conf -v -C network -s txt
[root@server demo]# /etc/init.d/rwhoisd restart

To add new networks to this rwhois system – you will need to copy an existing subnet’s directory from /usr/local/rwhois/etc/demo/ to a new one, and adjust rwhoisd.auth_area to include the new network.

Also, these procedures can be automated, and integrated with a web interface, which would greatly simplify management.

Request a Quote
Request a quote
Fill out a small form and let us contact you shortly
Client Zone
Access Client Zone
Ticket system, knowledge base and other services for our clients
Contact Us
Contact us
Send us a request or ask any questions via this contact form