2.1.1 RIPE whois client: 
Searching for the names of database objects; 

If you wish to look up objects in the RIPE database, you must use special search keys. A full list of the search keys is given below: 

OBJECT          KEYS
-----------------------------------------------------------------------------------
aut-num         AS number (e.g. AS3333)
as-macro        as-macro name (e.g. AS-EBONE)
community       community name (e.g. HEPNET)
domain          domain name (e.g. over.ripe.net)
inetnum         range of IP addresses e.g 193.0.0.0 - 193.0.0.255;
                network name e.g.RIPE-NCC
inet6num        range of IP version 6 addresses or network name
person          a person's name or NIC-handle
                or e-mail address in RFC822 format.
                e.g. Ambrose Magee or AMRM1-RIPE
                or ambrose@ripe.net
clns object
domain-prefix   domain-prefix, domain-name
inet-rtr        internet router name (e.g.
limerick        name of limerick
mntner          name of mntner object e.g. AMRM1-RIPE-MNT
route           internet route e.g. 193.0.0.0/24
role            the name, the NIC-handle or the e-mail address (in RFC822 format)
                of a role object; e.g. RIPE NCC

If you also want to search for other strings in the objects, you can use the WAIS interface; however it doesn't support the special options that are provided in the RIPE 'whois' interface. 


The RIPE whois client has several options, which may be used either alone or in combination. 

The following is a list, in alphabetical order, of the available options, which are explained in more detail below. 


Option                                                               Function
------------------------------------------------------------------------------
  -a                                                     search all databases
  -F                                            fast raw output (implies -Fr)
  -h                                                  search alternate server
  -i                                                          inverse look-up
  -k                                           used with the telnet interface
  -L                                           find all Less specific matches
  -m                                   find first level More specific matches
  -M                                           find all More specific matches
  -p                    connect to other port than the default whois port
  -r                                               turn off recursive lookups
  -s                                    search databases with source "source"
  -S                               tell server to leave out "syntactic sugar"
  -t                              requests template for object of type "type"
  -T                                     only look for objects of type "type"
  -HELP                  gives a copy of the current `HELP & HOWTO' document.

A very useful option is "-h", which allows you to connect directly to the server at the RIPE NCC or to a "mirror" of the RIPE database elsewhere. 

- Example: 

$ whois -h whois.ripe.net AMRM1-RIPE 

-a option: 


This allows you to search all the databases that are mirrored by the RIPE NCC. In some cases, only part of a particular database is mirrored e.g. only the records of autonomous system s. The following databases are currently mirrored: 

RADB ( autonomous system s, IP address assignments, mntner objects, routes, internet routers) 

InterNIC ( autonomous system s, IP address assignments) 

ANS ( autonomous system macros, mntner objects, routes, internet routers) 

MCI ( autonomous system macros, mntner objects, contact persons, routes, internet routers, IP address assignments) 

CANET (routes, autonomous system s, mntner objects, internet routers) 

APNIC (all RIPE type objects) 

Example: 

[an-lar] $ whois -h whois.ripe.net -a David Conrad 


person:      David Conrad
address:     Asia Pacific Network Information Center
	[..... stuff deleted .....]
source:      APNIC



-F option: 

This option generates an output quickly, but with the abbreviated form of the attributes. Example: 

[an-lar]$ whois -h whois.ripe.net AMRM1-RIPE 

gives 


person:      Ambrose Magee
address:     RIPE Network Co-ordination Centre (NCC)
address:     Kruislaan 409
address:     NL-1098 SJ   Amsterdam
address:     The Netherlands
phone:       +31 20 592 5065
fax-no:      +31 20 592 5090
e-mail:      ambrose@ripe.net
nic-hdl:     AMRM1-RIPE
notify:      ambrose@ripe.net
mnt-by:      AMRM-RIPE-MNT
changed:     ambrose@ripe.net 970115
source:      RIPE


However, 

[an-lar]$ whois -F -h whois.ripe.net AMRM1-RIPE 

gives 


*pn: Ambrose Magee
*ad: RIPE Network Co-ordination Centre (NCC)
*ad: Kruislaan 409
*ad: NL-1098 SJ   Amsterdam
*ad: The Netherlands
*ph: +31 20 592 5065
*fx: +31 20 592 5090
*em: ambrose@ripe.net
*nh: AMRM1-RIPE
*ny: ambrose@ripe.net
*mb: AMRM-RIPE-MNT
*ch: ambrose@ripe.net 970115
*so: RIPE


-i option: 

This option allows you to do reverse or inverse look-ups of particular combinations of attributes and objects. 

The attributes which can be used are: 

admin-c, tech-c, zone-c; 
notify; 
origin; 
mnt-by; 
author. 


The syntax of the usage is: 

whois -i <attribute (or list of attributes)> <attribute value> 

Examples of how the "-i" option is used are now given: 


whois -i admin-c,tech-c,zone-c <nic-hdl|person or role name> 
[an-lar]$ whois -h whois.ripe.net -i admin-c,tech-c,zone-c CO19-RIPE 

finds all objects which cite CO19-RIPE as an admin-c or a tech-c or a zone-c. 

inetnum:     193.0.0.0 - 193.0.255.255
netname:     EU-ZZ-193-0
descr:       European Regional Registry
descr:       Europe
country:     EU
admin-c:     MK16-RIPE
tech-c:      CO19-RIPE
status:      ALLOCATED UNSPECIFIED
mnt-by:      RIPE-NCC-HM-MNT
mnt-lower:   RIPE-NCC-HM-MNT
changed:     hostmaster@ripe.net 970506
source:      RIPE




inetnum: 193.203.0.0 - 193.203.255.255 netname: EU-ZZ-193-203 descr: European Regional Registry 
[.......stuff deleted.......] 


Any one or more of the three attributes admin-c, tech-c and zone-c may be used. 


whois -i notify <RFC822 e-mail address> 
You can also find all objects which have a particular e-mail address in their "notify" attribute; 

Example: 

[an-lar]$ whois -h whois.ripe.net -i notify ambrose@ripe.net 

finds all objects which have ambrose@ripe.net in their notify attribute 

mntner:      AMRM1-RIPE-MNT
descr:       Ambrose's mntner.
admin-c:     AMRM1-RIPE
tech-c:      AMRM1-RIPE
upd-to:      ambrose@ripe.net
mnt-nfy:     ambrose@ripe.net
mnt-nfy:     ripe-dbm@ripe.net
auth:        MAIL-FROM Ambrose.Magee@ripe.net
auth:        MAIL-FROM ripe-dbm@ripe.net
remarks:     This is a test mntner.
notify:      ambrose@ripe.net
mnt-by:      AMRM1-RIPE-MNT
changed:     ambrose@ripe.net 960815
changed:     ambrose@ripe.net 960930
source:      RIPE


person: Ambrose Magee 
[.......stuff deleted.......] 


whois -i origin <AS number> 
Example: 

[an-lar]$ whois -h whois.ripe.net -i origin AS3333 

finds all route object s which specify AS3333 as their origin. 

route:       193.0.0.0/24
descr:       RIPE-NCC
origin:      AS3333
notify:      ops@ripe.net
mnt-by:      RIPE-NCC-MNT
changed:     GeertJan.deGroot@ripe.net 960812
source:      RIPE



whois -i mnt-by <name of mntner-object> 
Example 


[an-lar] $ whois -h whois.ripe.net -i mnt-by AMRM1-RIPE-MNT 

finds all objects which are maintained by AMRM1-RIPE-MNT. (See Section 2.3 for details on mntner objects). 


whois -i author <nic-hdl|person's name> 
Example: 


[an-lar]$whois -h whois.ripe.net -i author AMRM1-RIPE 


finds all limericks with AMRM1-RIPE in the "author" attribute. 

[an-lar]$whois -h whois.ripe.net -i author Ambrose Magee 


finds all limericks with "Ambrose Magee" in the "author" attribute. 


The "-r" option: 

All the above options do recursive look-ups i.e. they will look-up any person objects associated with admin-c, tech-c, zone-c or author attributes. 

To disable this recursive look-up, use the "-r" option. This may be used with the other options, including "-i". 

Example: 


[an-lar]$ whois -h whois.ripe.net -r -i admin-c,tech-c,zone-c AMRM1-RIPE 

Note that the "-r" flag must precede the "-i" flag and the arguments. 

-k option: 

This is used in the telnet interface. See Section 2.1.4(b) 

-L option: 

Sometimes when doing a look-up on an inetnum object, you may wish to find the "next objects up" in the hierarchy i.e. all less specific matches; e.g. 

[an-lar]$ whois -h whois.ripe.net -r 193.1.0.0/16 

inetnum:     193.1.0.0 - 193.1.255.255
netname:     IE-HEANET-193-1
descr:       DELEGATED BLOCK
descr:       Provider Local Registry
descr:       HEAnet
country:     IE
admin-c:     MN131
tech-c:      MN131
mnt-by:      RIPE-NCC-HM-MNT
changed:     roderik@ripe.net 950315
source:      RIPE


Now compare the above with the output of the following: 

[an-lar]$ whois -h whois.ripe.net -r -L 193.1.0.0/16 

gives 

inetnum:     193.1.0.0 - 193.1.255.255
netname:     IE-HEANET-193-1
descr:       DELEGATED BLOCK
descr:       Provider Local Registry
descr:       HEAnet
country:     IE
admin-c:     MN131
tech-c:      MN131
mnt-by:      RIPE-NCC-HM-MNT
changed:     roderik@ripe.net 950315
source:      RIPE



inetnum:     193.0.0.0 - 193.255.255.255
netname:     EU-ZZ-193
descr:       European Regional Registry
descr:       Europe
country:     EU
admin-c:     DK58
tech-c:      DK13-RIPE
status:      ALLOCATED UNSPECIFIED
mnt-by:      RIPE-NCC-HM-MNT
changed:     hostmaster@ripe.net 960123
source:      RIPE


In other words, the inetnum object which "includes" IE-HEANET-193-1, is also found. The same process is implemented for route object s, but not for domain objects. 

There is no "-l" option. The default behaviour of the database is to find exactly the object you want or first less specific match (for inetnum and route objects). 

-m option: 

This option allows you to look-up all those objects which are one level more specific than what you have given in your query. In the case of inetnum objects, this means that you can lookup all those inetnum objects which are the "children" of the inetnum object found by an exact match i.e. the first level more specific match. 

Example: 

[an-lar]$ whois -h whois.ripe.net -r 193.1.0.0/16 

inetnum:     193.1.0.0 - 193.1.255.255
netname:     IE-HEANET-193-1
[.......stuff deleted.......]


But, 

[an-lar]$ whois -h whois.ripe.net -r -m 193.1.0.0/16 

finds 86 objects; i.e. there are 86 objects which are directly within the range of IP addresses given by 193.1.0.0 - 193.1.255.255. 

-M option: 

Some of the objects found by a "-m" look-up have "children" themselves; i.e. there are objects directly within the range of IP addresses specified by the objects found by a "-m" look-up. 

These objects may be found by a "-M" look-up. 

Example: 

[an-lar]$ whois -h whois.ripe.net -r -M 193.1.0.0/16 

finds 97 objects. 


-p option: 

Normally, when you do a "whois" query, you connect to port 43 of the server which you specified with the "-h" option. However, there are occasions when you wish to connect to a port different from the default port. E.g., if you had a private database, with a whois daemon of its own, you could connect to it. 

[an-lar]$ whois -h localhost -p 4327 

connects to port 4327 on the localhost. 

-s option: 

The RIPE database contains objects that are from other databases. This is indicated by the "source" attribute in each object. The sources used in the RIPE database are RIPE, RADB, INTERNIC, ANS, MCI, CANET and APNIC. Not every object type may be found using a source other than RIPE. See the details for option "-a". 

Example: 

[an-lar]$ whois -h whois.ripe.net -s INTERNIC AS3333 

gives 

aut-num:     AS3333
descr:       part of AS block AS3154 - AS3353
admin-c:     3353
remarks:     this AS number is assigned by the InterNIC
remarks:     please query whois.internic.net for more information
changed:     ripe-dbm@ripe.net 970103
source:      INTERNIC


-S option: 

This option tells the server to leave out text which is only added to make aut-num objects more readable by humans. This text is called "Syntactic Sugar". 

Example: 

[an-lar]$ whois -h whois.ripe.net -r AS3333 

gives 

aut-num:     AS3333
descr:       RIPE NCC
descr:       European Regional Internet Registry
as-in:       from AS286  120 accept ANY
[........stuff deleted ........]
as-out:      to AS286 announce AS3333
[........stuff deleted ........]


Compare with the output of 
[an-lar]$ whois -h whois.ripe.net -r -S AS3333 

aut-num:     AS3333
descr:       RIPE NCC
descr:       European Regional Internet Registry
as-in:       AS286  120 ANY
[........stuff deleted ........]
as-out:      AS286 AS3333
[........stuff deleted ........]


The "-t" option: 

This option allows you to obtain a template of any type of object that is accepted by the RIPE database. You may specify either the full or the abbreviated name of the object as follows: 


Full name    Abbreviation
--------------------------
aut-num                an
as-macro               am
community              cm
domain                 dn
inetnum                in
inet6num               i6
persons                pn
dom-prefix             dp
inet-rtr               ir
limerick               li
mntner                 mt
route                  rt
role                   ro
--------------------------

A full list of objects may be obtained by typing "all" after the "-t" option. 

The -t option generates a template that lists each of the attributes together with a list of its flags. Flags are enclosed in square brackets and separated within the list by white space. 

The flags are ... 


[mandatory] - 	An object MUST NOT contain zero instances of this 
	        attribute.
[optional]  - 	An object MAY contain zero instances of this attribute.
[single]    -   An object MUST NOT contain more than one instance of 
	        this attribute.
[multiple]  -   An object MAY contain more than one instance of this 
	        attribute.
[look-up key] - Attribute  is indexed.
[inverse key] - Attribute is in the 'reverse' index. (use -i)
[primary key] - Attribute is (part of) the primary key.

[primary/look-up key] - Attibute is both indexed and is (part
			of) the primary key.



The "-t" option does not display a list of obsolete attributes, as before. The "-v" option must be used. 

Example: 

[an-lar]$ whois -h whois.ripe.net -t person 


person:      [mandatory]  [single]	[primary/look-up key]
address:     [mandatory]  [multiple]	[ ]
phone:       [mandatory]  [multiple]	[ ]
fax-no:      [optional]   [multiple]	[ ]
e-mail:      [optional]   [multiple]	[look-up key]
nic-hdl:     [mandatory]  [single]	[primary/look-up key]
remarks:     [optional]   [multiple]	[ ]
notify:      [optional]   [multiple]	[inverse key]
mnt-by:      [optional]   [multiple]	[inverse key]
changed:     [mandatory]  [multiple]	[ ]
source:      [mandatory]  [single]	[ ]

[an-lar]$ whois -h whois.ripe.net -t pn 

gives the same output. 


The "-v" option: 

This option displays a detailed ("verbose") template of any type of object that is accepted by the RIPE database. Each attribute of the object is briefly described. 

A full list of objects is available by typing "all" after the "-v" option. 

Example: 

[an-lar] whois -h whois.ripe.net -v person 


The person object:


The person object contains information on how to
contact those people who are responsible for
network operations or RIPE Database objects.


person:      [mandatory]  [single]     [primary/look-up key]    
address:     [mandatory]  [multiple]   [ ]                      
[...........Remainder of basic template deleted............]


The content of the attributes of the person object are defined below:

person
	The full name of an adminstrative, technical or zone
	contact person specified in another object.
	[..........Remainder deleted......................]




Note: obsoleted attributes are only displayed using the "-v" option. 


The "-T" option: 

If you know the type of the object for which you are looking, you can restrict the search to that type only. This option is useful when different types of object have the same KEYS. 

Example: 

[an-lar]$ whois -h whois.ripe.net -r 193.0.0.0/24 

gives 


inetnum:     193.0.0.0 - 193.0.0.255
netname:     RIPE-MEETING
descr:       RIPE Meeting Terminal Room
descr:       Amsterdam, Netherlands
country:     NL
admin-c:     GJG1-RIPE
tech-c:      GJG1-RIPE
changed:     GeertJan.deGroot@ripe.net 970110
source:      RIPE




route:       193.0.0.0/24
descr:       RIPE-NCC
origin:      AS3333
notify:      ops@ripe.net
mnt-by:      RIPE-NCC-MNT
changed:     GeertJan.deGroot@ripe.net 960812
source:      RIPE


cf. the output of 

[an-lar] $ whois -h whois.ripe.net -r -T inetnum 193.0.0.0/24 

inetnum:     193.0.0.0 - 193.0.0.255
netname:     RIPE-MEETING
descr:       RIPE Meeting Terminal Room
descr:       Amsterdam, Netherlands
country:     NL
admin-c:     GJG1-RIPE
tech-c:      GJG1-RIPE
changed:     GeertJan.deGroot@ripe.net 970110
source:      RIPE


In this situation, only the inetnum object is found. Note that when using the "-T" option, the abbreviated form of the object names may be used; e,g, "in" can be used instead of "inetnum". 

-HELP option: 

The output of this option is an up-to-date copy of the HELP document for using the "whois" tools to access the RIPE database. 

Example: 

[an-lar]$ whois -h whois.ripe.net HELP 

gives 


		This is an extract from Chapter 2 of ripe-157,
		which is available from:

		<http://www.ripe.net/docs/ripe-157.html>

		<ftp://ftp.ripe.net/ripe/docs/ripe-157.ps>

		<ftp://ftp.ripe.net/ripe/docs/ripe-157.txt>


		
		Database queries and updates:


		
		2.1 Querying the RIPE Database
		[...stuff deleted...]




Summary 
The syntax of the usage of the "whois" command is as follows: 

Usage: 

whois [-aFLmMrSv] [-h hostname] [-s sources] [-T types] [-i attr] keys 
whois -t type whois -v type 



Using non-RIPE `whois' clients: 
Please note that most of the options are NOT understood by non RIPE 'whois' client programs. Sometimes the following work-around will work : 

Instead of 

[an-lar] $ whois -h whois.ripe.net -T person AMRM1-RIPE 

you can use 

[an-lar] $ whois -h whois.ripe.net "-T person AMRM1-RIPE" 

