
                         AS Number LOOKUP Utility
                            Alpha Version 0.12

                               Kuniaki Kondo
            Copyright (C) 1998-2000 Internet Initiative Japan Inc.

                               5 April 1999


1. Introduction

  ASLOOKUP is the tool which searches the sequence of AS number
specified with the parameter from IRR and indicates the first line of
Description of AS Object.
  When failing in reference by IRR, it is possible to go to search also
to whois database of ARIN, JPNIC and APNIC.
  Moreover, it is also possible to choose Whois server of JPIX(*1)
instead of RADB.

  Furthermore, AS number can be searched from IP address by using option.

  (*1)JPIX : The JPIX is commercial Internet Exchange in JAPAN.


2. Platform

  ASLOOKUP has been tested on FreeBSD 2.2.6-RELEASE up to now.


3. How to Install

  Please unpack this package to a suitable directory. 

  Next, go to the directory,

  Please change Makefile, as you like. (See 3.1)

  % make

  please perform above.

  If compile is completed normally,

  # make install

  please perform above as root.


3.1 Option at time of compile

  ASLOOKUP uses the port 43 of localhost for reference of AS Object as
RADB at the time of package distribution.
  This is for being assumed that IRRd is running at the local host,
and the change of this portion is needed in starting ASLOOKUP at the
host with IRRd is not running,

  Below, a change part is described.

  - Use whois.ra.net as RADB.

    The parameter of CFLAGS of makefile will be changed.
    As for CFLAGS, "-DRALOCAL" is specified at the time of package
    distribution. Using whois.ra.net as RADB server, please delete
    "-DRALOCAL".

  - Specify arbitrary servers as RADB.

    When IRRd server is running in addition to the local host,
    or you would like to specify arbitrary RADB server,
    first please delete "-DRALOCAL" of CFLAGS which is in Makefile.

    Next, in aslookup.c,

	#ifndef RALOCAL
        #define RADB    "whois.ra.net"
        #define WHOIS   43
        #endif          /* _ifndef RALOCAL */

    please change the parameter of the portion of RADB and WHOIS into 
    suitable value.

    They indicate below.

      RADB is a host name of RADB server.
      WHOIS is a port number of RADB server.

  - Selection of the database for reference

    At ASLOOKUP, it is possible to go to search whois database of ARIN,
  JPNIC and APNIC by the compile option.

    Please change CFLAGS of Makefile suitably.
    In addition, when both JPNIC and APNIC are chosen, it searches in 
  the order of RADB, JPNIC, and APNIC. When All of ARIN, JPNIC and APNIC
  are chosen, it searches in the order of RADB, ARIN, and JPNIC or APNIC.

    Following are compile option.

	ARIN	-DARINDB
	JPNIC	-DJPNICDB
	APNIC	-DAPNICDB

    Moreover, although default DB is usually RADB or local IRRd,
  it is also possible to choose whois server "whois.jpix.ad.jp", which JPIX
  is running, as default. In this case, please add "-DJPIXDB" at CFLAGS.
  (Even when the "-DRALOCAL" is specified, although a problem
   should not occur, but please do not specify it by way of precaution.)

  - Access Log

    At ASLOOKUP, it is possible to record access log.
    If you want to record log, you add "-DLOG" at CFLAGS of Makefile.

    A default logfile name is "/var/log/aslookup.log". If you want to 
  change it, you change a line of "#define LOG" in aslookup.c.

4. How to use

4.1 Fundamental directions

  One or more AS numbers are specified and Description of AS Object of 
AS number is searched.

  Ex. % aslookup <as number> <as number> <as number> ........

  In <as number>, AS number to search is specified.
  At the time of specification, even when "(" or ")" is contained as
  used in Cisco router, since they are ignored and only AS number is seen,
  it is possible to use the AS Path acquired from Cisco as it is.

  Notice: As you know, inputting "(" from a command-line,
          without escaping, it is not recognized
          Ex. % aslookup \^\(1234_\) \+\$

4.2 Applied directions

  It's possible to use as result "show ip bgp regexp" or "show ip bgp"
abstracted from Cisco without change.

  % aslookup -f <file name>

  or

  % cat <file name> | aslookup

  For the file of <file name>, it will use which saved only the
portion of the routing table as a result of "show ip bgp" etc.
performed by Cisco.

  The case of Cisco "show ip bgp" etc. ,as result,

-------
BGP table version is 965625, local router ID is 202.232.1.8
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop          Metric LocPrf Weight Path
*>i3.0.0.0          198.32.136.42          1    100      0 701 80 ?
...
-------

  although the portion of a header comes out,

-------
BGP table version is 965625, local router ID is 202.232.1.8
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop          Metric LocPrf Weight Path
-------

  please use it after removing the portion above.

4.3 Search AS number from IP address.

  In ASLOOKUP, reference of AS number which uses IP address as the
reference key is possible by using "-r" option.
  For example,

  % aslookup -r <IP Address> | <Host Name>

  by performing that, it searches in which AS the host of relevance is
contained, and it is possible to search Description and to display from 
the AS Object of the AS.

5. IRRd

  "IRRd" is public by 

  "http://www.merit.edu/radb/irrd/".

  It is a convenient tool to mirror the information, and to start 
running the functional reduction version of RADB server in simple at 
local environment.
  Since reference can be carried out smoothly by running locally as 
mirror-existence of RADB, when using this tool, it is recommended to
start running IRRd server at somewhere in your local network.

6. Notes

  - Whichever damage occurred when using this software,
    the author has no responsibility at all.

  - Redistribution of this software is under freedom at the condition
    that any contents of this package is not changed.
    (It is happy if you contact the author.)

  - Although modification of this software etc. is performed freely,
    inquiry to the author should be withheld from the time of your
    modification and change.

  - Please get in touch with the author when there are the opinion, hope,
    etc. about this software.

7. Distribution Policy

   All files in the package includes following description.

   /*
    * Copyright (c) 1998-2000 Internet Initiative Japan Inc.
    * All rights reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    * 1. Redistributions of source code must retain the above copyright
    *    notice, this list of conditions and the following disclaimer.
    * 2. Redistribution with functional modification must include
    *    prominent notice stating how and when and by whom it is
    *    modified.
    * 3. Redistributions in binary form have to be along with the source
    *    code or documentation which include above copyright notice, this
    *    list of conditions and the following disclaimer.
    * 4. All commercial advertising materials mentioning features or use
    *    of this software must display the following acknowledgement:
    *      This product includes software developed by Internet
    *      Initiative Japan Inc.
    *
    * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY EXPRESS OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    * DISCLAIMED.
    */

   As described in the notice, redistribution is allowed for any
   purpose including commercial product as long as satisfying
   above conditions.  Redistribution with modification is not
   prohibited but we encourage everybody to share the improvement
   for public.  We are happy to integrate contributions in
   original release.  If you still want to distribute your own
   modified package, please make it clear that how it is changed
   and use different distribution name to avoid the conflict.

8. Acknowledgments

  I'd like to thank Toru Toyama, Ikuko Tsuchiya, Akinori Maemura and 
  all IIJ staffs for to write english version document.

9. Author contact

    Kuniaki Kondo
    Internet Initiative Japan Inc.

    E-mail: kuniaki@iij.ad.jp
							Thank you.
$Id: readme-eng.txt,v 1.6 2000/04/05 08:36:11 kuniaki Exp $
