download prefixlookup.sh
This script runs via inetd and acts as a whois-daemon
that answers questions about ip-adresses or some simple
regexp regarding AS-number, examples
> whois -h whois.yourserver.net 198.41.0.4
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Advertised to non peer-group peers:
194.68.48.8 194.71.25.234
1653 2603 1299 1239 26134 11840
130.242.94.226 (metric 20) from 194.68.48.8 (194.71.25.252)
Origin IGP, localpref 100, valid, internal
Last update: Mon Jan 10 15:47:01 2005
1653 2603 1299 1239 26134 11840
193.110.12.19 from 193.110.12.19 (130.242.80.128)
Origin IGP, localpref 100, valid, external, best
Last update: Sat Jan 8 03:12:15 2005
yourzebra>
> whois -h whois.yourserver.net _11840$
BGP table version is 0, local router ID is 194.68.48.4
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
* i198.41.0.0 130.242.94.226 100 0 1653 2603 1299 1239 26134 11840 i
*> 193.110.12.19 0 1653 2603 1299 1239 26134 11840 i
* i198.41.3.0 130.242.94.226 100 0 1653 2603 1299 1239 26134 11840 i
*> 193.110.12.19 0 1653 2603 1299 1239 26134 11840 i
* i208.226.58.0 130.242.94.226 100 0 1653 2603 3356 10913 26134 11840 i
*> 193.110.12.19 0 1653 2603 3356 10913 26134 11840 i
Total number of prefixes 3
yourzebra>