Queries using primary and lookup keys
-------------------------------------

<ip-lookup> (IPv4 address prefix, range or single address) 

Returns inetnum, route objects with exact match on a specified key. If the
exact match does not exist, the objects with the smallest less specific
match. When single address is specified, an inet-rtr object is also returned
whose ifaddr attribute matches the query argument.

<ip-lookup> (IPv6 address or IPv6 prefix)

Returns inet6num object with exact match on a specified key. If the exact
match does not exist, the object with the smallest less specific match is
returned.

<as-number>

Returns an aut-num object whose aut-num attribute matches the query argument
and as-block object with the range containing the aut-num object, if it
exists.

<as-number> - <as-number> (range of <as-number> separated by '-')

Returns an as-block object whose primary key defines a range that matches or
fully contains the range specified in the query argument.

<domain-name>

Returns domain and inet-rtr objects whose primary keys match the query
argument. For domains a referral query may be performed. In such case the
actual query is performed by the referred server and the results are
transparently passed to the client. See the RIPE Database Reference Manual
section 2.7 "Referral mechanism for domains" for more information.

<person-name>

Returns all person and role objects whose person or role attribute contains
the name specified in the query argument.

<set-name>

Returns a set whose primary key matches the query argument.

<nic-handle>

Returns a person or role object whose nic-hdl attribute matches the query
argument.

<mntner-name>

Returns a mntner object whose primary key matches the query argument.

IP address lookups
-----------------

-l <ip-lookup>

Returns first level less specific inetnum, inet6num or route objects,
excluding exact matches.

-L <ip-lookup>

Returns all level less specific inetnum, inet6num or route objects,
including exact matches.


-m <ip-lookup>

Returns first level more specific inetnum, inet6num or route objects,
excluding exact matches.

-M <ip-lookup>

Returns all level more specific inetnum, inet6num or route objects,
excluding exact matches.

-x <ip-lookup>

Requests that only an exact match on a prefix be performed. If no exact
match is found no objects are returned.

-d <ip-lookup>

Enables use of the -m, -M, -l and -L flags for lookups on reverse delegation
domains.


Inverse queries
---------------

-i ac (-i admin-c) <nic-hanlde> or <person-name>

Returns all objects whose admin-c attribute matches the query argument.

-i ah (-i author) <nic-hanlde> or <person-name>

Returns all limerick objects whose author-c attribute matches the query
argument.

-i pn <nic-hanlde> or <person-name>

Returns all objects whose admin-c, tech-c, zone-c, author or cross-nfy
attribute matches the query argument.

-i ct (-i cross-mnt) <mntner-name>

Returns all route and aut-num objects whose cross-mnt attribute matches the
query argument.

-i cn (-i cross-nfy) <nic-hanlde> or <person-name>

Returns all route and aut-num objects whose cross-nfy attribute matches the
query argument.

-i la (-i local-as) <as-number>

Returns all inet-rtr objects whose local-as attribute matches the query
argument.

-i mr (-i mbrs-by-ref) <mntner-name>

Returns all set objects (as-set, route-set and rtr-set) whose mbrs-by-ref-c
attribute matches the query argument.

-i mo (-i member-of) <set-name>

Returns all objects whose member-of attribute matches the query argument and
their membership claim is validated by mbrs-by-ref attribute of the set.
Absence of mbrs-by-ref attribute means that the membership is only defined
by members attribute of the set.

-i mb (-i mnt-by) <mntner-name>

Returns all objects whose mnt-by attribute matches the query argument.

-i ml (-i mnt-lower) <mntner-name>

Returns all objects whose mnt-lower attribute matches the query argument.

-i mn (-i mnt-nfy) <e-mail>

Returns all mntner objects whose mnt-nfy attribute matches the query argument.

-i mu (-i mnt-routes) <mntner-name>

Returns all aut-num, inetnum and route objects whose mnt-routes attribute
matches the query argument.

-i ny (-i notify) <e-mail>

Returns all objects whose notify attribute matches the query argument.

-i ns (-I nserver)<domain-name> or <ip-lookup>

Returns all domain objects whose nserver attribute matches the query
-argument. 

i or (-i origin) <as-name>

Returns all route objects whose origin attribute matches the query argument.

-i rb (-i referral-by)<mntner-name>

Returns all mntner objects whose referral-by attribute matches the query
argument.

-i rz (-i rev-srv) <domain-name> or <ip-lookup> 

Returns all inetnum and inet6num objects whose rev-srv attribute matches the
query argument.

-i sd (-i sub-dom) <domain-name>

Returns all domain objects whose sub-dom attribute matches the query
argument.

-i tc (-i tech-c) <nic-hanlde> or <person-name>

Returns all objects whose tech-c attribute matches the query argument.

-i dt (-i upd-to) <e-mail>

Returns all mntner objects whose upd-to attribute matches the query
argument.

-i zc (-i zone-c) <nic-hanlde> or <person-name>

Returns all objects whose zone-c attribute matches the query argument.


Query support for tools
-----------------------

-F

Produce output using short hand notation for attribute names.

-K

Requests that only the primary keys of an object to be returned. The
exceptions are set objects, where the members attributes will also be
returned. This flag does not apply to person and role objects.

-k (optional normal query)

Requests a persistent connection. After returning the result the connection
will not be closed by the server and a client may issue multiple queries on
the same connection. Note, that server implements 'stop-and-wait' protocol,
when no next query can be sent before receiving a reply for the previous
one. Except the first -k query, -k without an argument closes the persistent
connection.

-g (mirroring request)

Request a NRTM stream from the server. See the RIPE Database Reference Manual 
section 4. "Mirroring the RIPE Database" for more information".

Miscellaneous queries
---------------------

-R

Switches off use referral mechanism for domain lookups, so that the database
returns an object in the RIPE database with the exact match with the lookup
argument, rather than doing a referral lookup.

-r 

Switches off recursion for contact information after retrieving the objects
that match the lookup key.

-T (comma separated list of object types, no white space is allowed)

Restricts the types of objects to lookup in the query.

-a

Specifies that the server should perform lookups in all available sources.
See also "-q sources" query.

-s (comma separated list of sources, no white space is allowed)

Specifies which sources and in which order are to be looked up when
performing a query.


Informational queries
---------------------

-q sources

Returns the current set of sources along with the information required for
mirroring. See the RIPE Database Reference Manual section 2.9 "Other server
features" for more information.

-q version

Displays the current version of the server.

-t <object-type>

Requests a template for the specified object type.

-V<client-tag>

Sends information about the client to the server.

-v <object-type>

Requests a verbose template for the specified object type.

