From Marten.Terpstra at ripe.net Tue Jan 3 16:18:01 1995 From: Marten.Terpstra at ripe.net (Marten Terpstra) Date: Tue, 03 Jan 1995 16:18:01 +0100 Subject: multiple originators bug Message-ID: <9501031518.AA25560@ncc.ripe.net> Where a few weeks ago I fixed a bug that caused route objects for the same prefix but different origins to be properly indexed and looked up, it appeared that in a different bit of code an error based on the same principle was still present. A new version of donetdbm.pl below will fix this. drop the module below in src/donetdbm.pl run "make" in the dbase top level directory Cheers, -Marten # $RCSfile: donetdbm.pl,v $ # $Revision: 1.5 $ # $Author: marten $ # $Date: 1995/01/03 15:12:01 $ require "enread.pl"; require "addkey.pl"; require "enkeys.pl"; require "enukey.pl"; if ($opt_c) { require "cldb.pl"; } sub donetdbm { local(*db) = @_; local($unikey); local(%en); local($i); local($objseen) = 0; while (%en = &enread(db)) { if ($opt_V) { $objseen++; if ($objseen % 100 == 0) { print STDERR "donetdbm - indexed $objseen\n"; } } $unikey = &enukey(*en); &addkey(*db, $unikey, $en{"offset"}); foreach $i (&enkeys(*en)) { next if $i =~ /\d+\.\d+\.\d+\.\d+\/\d+/; &addkey(*db, "$i", $en{"offset"}) unless $i eq $unikey; } undef %en; } } sub docldbm { local(*db) = @_; local($unikey); local(%en); local($i, $j, $k); local($objseen) = 0; local($dupl) = 0; while (%en = &enread(db)) { if ($opt_V) { $objseen++; if ($objseen % 100 == 0) { print STDERR "docldbm - read $objseen\n"; } } # Now, the bit with $dupl may look kind of weird but is needed # because the same prefixes can occur with different objects. # Then one needs to keep them apart. Just add something unique # like a counter ($dupl) will do. Just make sure to remove it # before inserting the actual prefix. $type = &entype(*en); foreach $k (split(/\s+/, $KEYS{$type})) { foreach $j (split(/\n/, $en{$k})) { if ($j =~ /^(\d+\.\d+\.\d+\.\d+[\- \d\.]*)$/) { foreach $i (&old_to_new($1)) { local($pref, $len) = split(/\//, $i); local($netint) = &quad2int($pref); if ($uniqkey{"$netint/$len"}) { $uniqkey{"$netint/$len.$dupl"} = &enukey(*en); $clalist[$len] .= ":$netint/$len.$dupl"; $dupl++; } else { $uniqkey{"$netint/$len"} = &enukey(*en); $clalist[$len] .= ":$netint/$len"; } } } else { if ($j =~ /^(\d+\.\d+\.\d+\.\d+\/\d+)$/) { local($pref, $len) = split(/\//, $1); local($netint) = &quad2int($pref); if ($uniqkey{"$netint/$len"}) { $uniqkey{"$netint/$len.$dupl"} = &enukey(*en); $clalist[$len] .= ":$netint/$len.$dupl"; $dupl++; } else { $uniqkey{"$netint/$len"} = &enukey(*en); $clalist[$len] .= ":$netint/$len"; } } } } } } # Kludge, but what can you do? $CUROBJTYPE = $type; # This is the priming bit. It basically means that in a flat # tree, we will fill in some of the wellknown knots. Mind # you, it will add some 5000 knots to the tree. It will def # speed up more specific lookups, but may be slower on indexing. # Indexing for large flat type database will likely improve in # speed. # For now: *NEVER* run priming on database you need to update # using dbupdate !!!!! Only for index once database!!! local($primecount) = 0; if ($opt_p) { $const1 = 256**3; $const2 = 256**2; print STDERR "docldbm - priming database\n" if $opt_V; for $i (128..210) { local($netint) = $i*$const1; next if $uniqkey{"$netint/8"}; $uniqkey{"$netint/8"} = "DUMMY"; $clalist[8] .= ":$netint/8"; $primecount++; } for $i (192..210) { for $j (0..255) { local($netint) = $i*$const1+$j*$const2; next if $uniqkey{"$netint/16"}; $uniqkey{"$netint/16"} = "DUMMY"; $clalist[16] .= ":$netint/16"; $primecount++; } } print STDERR "docldbm - inserted $primecount prime entries\n"; } print STDERR "docldbm - start inserting prefixes\n" if $opt_V; $objseen = 0; for ($i=0; $i<=32; $i++) { foreach (split(/:/, $clalist[$i])) { next if !$_; # Make sure to remove the counter if it exists. See above # with the explanation of $dupl. if (/\.\d+/) { local($save) = $_; s/\.\d+//; &inscla($_, $uniqkey{$save}); } else { &inscla($_, $uniqkey{$_}); } if ($opt_V) { $objseen++; if ($objseen % 100 == 0) { printf STDERR "docldbm - inserted $objseen\n"; } } } } } 1; -------- Logged at Wed Jan 4 00:24:24 MET 1995 --------- From markk at internic.net Wed Jan 4 00:21:08 1995 From: markk at internic.net (Mark Kosters) Date: Tue, 3 Jan 1995 18:21:08 -0500 (EST) Subject: notes from last night In-Reply-To: <9412150909.AA14462@ncc.ripe.net> from "Tony Bates" at Dec 15, 94 10:09:23 am Message-ID: <199501032321.SAA18005@slam.internic.net> This will be possible to extract from RWhois that will be operational at the end of first quarter 1995. Thanks Mark > > Eric, > okay...here's the scoop on this. The way this is done is we > take the internic reports, networks.txt and network-contacts.txt and > then *try* to build ripe objects out of it. The script was originally > done by someone in Germany and I just kludged (as is my general style) > it to work. I say try as it doesn't deal with ranges, it does some > checks as well. I already spoke to you about when I was in US > (currently back in A'dam finishing off things) and I will send the > script to rr-impl as soon as I can get into MCI to get it (cant at the > moment). > The alternative is just one copy is made as this is kind of slow and disted > around. We probably should just ask the Internic to do this. > Unfortunately, they weren't at the GRR bof. I've cc'd Mark to see if > this is possible. > > --Tony. > > P.S. The indexing of this takes a mighty long time as well. > > > "Eric M. Carroll" writes: > * > * >RIPE keeps RIPE data, & others (internic, prdb, alternet) > * > > * > MCI shadows RIPE, internal MCI, PRDB, CAnet, Internic. > * > * Can someone tell me who and where the Internic db is generated and > * kept? I have a need for it for another project. > * > * Eric Carroll University of Toronto Network & Operations Services > * External Networking Facilities Management > -- Mark Kosters markk at internic.net +1 703 742 4795 Software Engineer InterNIC Registration Services -------- Logged at Thu Jan 5 12:22:04 MET 1995 --------- From Marten.Terpstra at ripe.net Thu Jan 5 12:21:57 1995 From: Marten.Terpstra at ripe.net (Marten Terpstra) Date: Thu, 05 Jan 1995 12:21:57 +0100 Subject: bug in whoisd Message-ID: <9501051121.AA09991@ncc.ripe.net> David Conrad found a small bug where in some cases references from objects were not looked up. This was introduced by a optimization in the lookup code (some optimization ;-). The whoisd.pl below has the line return if eof(db); removed twice. Either remove these lines yourself, or drop the whoisd.pl below in src/whoisd.pl and run a "make install" in the top level database directory. After, kill currently running whoisd and start a new one. -Marten #!PERL # whoisd - whois Internet daemon # # $RCSfile: whoisd.pl,v $ # $Revision: 0.45 $ # $Author: marten $ # $Date: 1995/01/05 11:15:01 $ # @INC = ("LIBDIR", @INC); require "getopts.pl"; require "rconf.pl"; require "dbopen.pl"; require "dbclose.pl"; require "enread.pl"; require "enwrite.pl"; require "enkeys.pl"; require "enukey.pl"; require "getopt.pl"; require "misc.pl"; require "dbmatch.pl"; require "syslog.pl"; require "template.pl"; # If we get a SIGALRM, exit. Used in the read loop, to make sure people # do not keep the connection open, and open and open .... sub alarmhandler { print NS "Timeout... Closing connection\n"; close(NS); exit; } # # makekeys - converts a whitespace seperated string of keys into # an array. Trailing zeros in netnumbers are removed. # # This also does the classless indexes if a classless address is # requested. The classless index will return db keys, so they will # simply be added to the set of keys to look up. sub makekeys { local($string) = @_; local(@keys) = (); local($i); $string =~ s/^\s+//; $string =~ tr/A-Z/a-z/; @keys = split(/\s+/, $string); # remove keys shorter than 2 chars, since the indexing does not use # them either ;-) foreach $i (0..$#keys) { if (length($keys[$i]) < 2) { splice(@keys, $i, 1); } # Remember: numbers possibly followed by dots and more numbers # are ALWAYS considered IP network numbers!!!!! if ($keys[$i] =~ /^\d+[\.\d\/]*$/) { local($p, $l) = split(/\//, $keys[$i]); if (!$l) { $keys[$i] = &quad2int($p)."/32"; } else { $keys[$i] = &quad2int($p)."/$l"; } } if (length($keys[$i]) < 2) { splice(@keys, $i, 1); } } return @keys; } # # lookupandprint - will find all matches for all keys, and will output # the objects found, if they indeed match all the keys. # will also generate an array with keys that should be # looked up recursively because they are referenced in # the printed objects # # Exit codes (set in $result): # -1 - toomany hits (if result != 1 yet) # 0 - no match (if $result was not defined yet) # 1 - OK, something was output (always) sub lookupandprint { local(*db, *keys, $nonintersect) = @_; local(%en) = (); local(@playkeys) = @keys; local(@matches) = (); local($save) = ""; local($i); # This was meant as an optimization, but it will cause references from # the last object in a file to fail. Perhaps do something slightly # more clever at some stage. # return if (eof(db); print STDERR "($$) in lookupandprint - \$nonintersect = $nonintersect\n" if $debug; foreach $i (0..$#playkeys) { next if $playkeys[$i] !~ /^\d+\/\d+$/; if ($opt_m || $opt_M) { print NS "% This may take some time, server running at low priority\n" if !$slow_msg_print; print NS "\n" if !$slow_msg_print; $slow_msg_print = 1; system("/etc/renice 10 $$ > /dev/null 2>/dev/null"); $xsps = &findmsps($playkeys[$i], $playkeys[$i], 1, $opt_m); } else { $xsps = &findlsps($playkeys[$i], $opt_L); } local(@boe); foreach $tmp (split(/,/, $xsps)) { local($val); &getmspnxl($tmp, *val); @boe = (@boe, &cla2unikey($tmp)); } splice(@playkeys, $i, 1, @boe); } @matches = &dbmatch(*db, *playkeys, $nonintersect); if (($#matches < 0) && !defined($result)) { $result = 0; return; } for $j (0..$#matches) { if ($matches[$i] == -1) { $result = -1 if $result != 1; return; } if ($displayed{$matches[$j]}) { $result = 1; print STDERR "($$) left lookupandprint already seen\n" if $debug; next; } %en = &enread(db, $matches[$j]); local($m) = -1; if (($#playkeys > 0) && !$nonintersect) { foreach (@playkeys) { $save = $_; local(@tmp) = &enkeys(*en); @tmp = (@tmp, &enukey(*en)); foreach (@tmp) { if ($save eq $_) { $m++; } } } } else { $m = $#playkeys; } if ($m == $#playkeys) { print "\n" if &enwrite(*en, 1, 0, !$opt_S); $displayed{$matches[$j]} = 1; $result = 1; $type = &entype(*en); if ($RECUR{$type} && !$opt_r) { local(@tmp) = split(/[\s\t]+/, $RECUR{$type}); foreach (@tmp) { local(@r) = split(/\n/, $en{$_}); for ($k=0;$k<=$#r;$k++) { if (!$refd{$r[$k]}) { $refs[$recindex++] = $r[$k]; $refd{$r[$k]} = 1; } } } } } } print STDERR "($$) left lookupandprint\n" if $debug; return; } # fastlookup - small routine to do fast lookups, always non-recursive # it basically just reads from a file, and outputs as fast as it can # without interpreting the data. sub fastlookup { local(*db, *keys, $nonintersect) = @_; local($j) = ""; local($i); local(@playkeys) = @keys; # This is the same optimization as in lookupandprint() # return if eof(db); foreach $i (0..$#playkeys) { next if $playkeys[$i] !~ /^\d+\/\d+$/; if ($opt_m || $opt_M) { $xsps = &findmsps($playkeys[$i], $playkeys[$i], 1, $opt_m); } else { $xsps = &findlsps($playkeys[$i], $opt_L); } local(@boe); foreach $tmp (split(/,/, $xsps)) { local($val); &getmspnxl($tmp, *val); @boe = (@boe, &cla2unikey($tmp)); } splice(@playkeys, $i, 1, @boe); } local(@matches) = &dbmatch(*db, *playkeys, $nonintersect); foreach $j (@matches) { $result = 1; seek(db, $j, 0); while () { print; last if /^\s*$/; } print "\n" if eof(db); } } # # whois - main lookup loop. will output all objects found for all sources # requested. will also process the recursive lookups generated # by lookupandprint() # #sub whois { # # local(*sources, $searchstring) = @_; # # local(@keys) = &makekeys($searchstring); # # print STDERR "($$) in whois\n" if $debug; # # foreach (@sources) { # %displayed = (); # local(*i) = 'currentdb'; # &dbopen(i, $DBFILE{$_}); # if ($opt_F) { # &fastlookup(*i, *keys); # } else { # &lookupandprint(*i, *keys); # } # for ($j=0;$j<$recindex;$j++) { # local(@refkeys) = &makekeys($refs[$j]); # &lookupandprint(*i, *refkeys); # } # undef(@refs); # $recindex=0; # &dbclose(*i); # } # print STDERR "($$) left whois\n" if $debug; #} # This is already the new version of this sub for the split database sub whois { local(*sources, $searchstring) = @_; local($nonintersect) = 1; local(@keys) = &makekeys($searchstring); if ($#keys > 0) { $nonintersect = 0; } local(%nothing) = (); print STDERR "($$) in whois\n" if $debug; foreach (@sources) { %displayed = (); local(@searchdb) = (); local(*i) = 'currentdb'; local($source) = $_; if ($TYPE{$source} eq "SPLIT") { # Here is some guess work about what file to open.... # We can only do that if there is only one key. if (!$keys[1]) { if ($keys[0] =~ /^\d+\/\d+/) { @searchdb = ("in", "rt", "ir"); } elsif ($keys[0] =~ /^as\d+$/) { @searchdb = ("an"); } elsif ($keys[0] =~ /^as\-/) { @searchdb = ("am"); } } if (!$searchdb[0]) { @searchdb = keys %OBJATSQ; } if ($opt_T) { @searchdb = @onlysearch; } foreach $j (@searchdb) { $CUROBJTYPE = $j; next if !&dbopen(i, *nothing, 0, "$DBFILE{$source}.$j"); &dbclopen(*nothing, 0, "$DBFILE{$source}.$j"); if ($opt_F) { &fastlookup(*i, *keys, $nonintersect); } else { &lookupandprint(*i, *keys, $nonintersect); } &dbclose(*i); &dbclclose(); } for ($j=0;$j<$recindex;$j++) { local(@refkeys) = &makekeys($refs[$j]); @searchdb = ("pn"); foreach $j (@searchdb) { next if !&dbopen(i, *nothing, 0, "$DBFILE{$source}.$j"); &dbclopen(*nothing, 0, "$DBFILE{$source}.$j"); &lookupandprint(*i, *refkeys); &dbclose(*i); &dbclclose(); } } undef(@refs); $recindex=0; } else { &dbopen(i, *nothing, 0, $DBFILE{$source}); &dbclopen(*nothing, 0, $DBFILE{$source}); if ($opt_F) { &fastlookup(*i, *keys, $nonintersect); } else { &lookupandprint(*i, *keys, $nonintersect); } for ($j=0;$j<$recindex;$j++) { local(@refkeys) = &makekeys($refs[$j]); &lookupandprint(*i, *refkeys); } &dbclose(*i); &dbclclose(); undef(@refs); $recindex=0; } } print STDERR "($$) left whois\n" if $debug; } # # parse - parses the command line string for special options and sets # appropriate variables # sub parse { local($string) = @_; print STDERR "($$) got in parse\n" if $debug; # Reset all command line arguments, except -k @source = (); @onlysearch = (); $opt_a = 0; $opt_r = 0; $opt_F = 0; $opt_s = 0; $opt_L = 0; $opt_m = 0; $opt_M = 0; $opt_T = 0; $string =~ s/^\s+//; if ($string =~ /^help/) { open (HELP, $HELP); while () { print; } close(HELP); &syslog("QRYLOG","($$) [] 1 $name help"); exit; } while ($string =~ /^-/) { if ($string =~ s/^-([arkFLmMS]+)\s*//) { if (length($1) > 1) { foreach (split(/|/, $1)) { eval "\$opt_$_ = 1;"; } } else { eval "\$opt_$1 = 1;"; } next; } if ($string =~ s/^-(s)\s+(\S+)\s*//) { local($src) = $2; $src =~ tr/a-z/A-Z/; @source = (@source, $src); $opt_s = 1; next; } if ($string =~ s/^-V(..[0-9]+[0-9\.]*)\s*//) { $opt_V = $1; next; } if ($string =~ s/^-T\s+(\S+)\s*//) { local($type) = $1; $type = $ALIAS{$1} if $ALIAS{$1}; $type = $ATTR{$1} if $ATTR{$1}; if (!$OBJATSQ{$type}) { print "% Request for unknown object type \"$type\" ignored\n"; } else { @onlysearch = (@onlysearch, $type); $opt_T = 1; } next; } if ($string =~ s/^\-t\s+(\S+)\s*//) { local($type) = $1; $type = $ALIAS{$1} if $ALIAS{$1}; $type = $ATTR{$1} if $ATTR{$1}; if (!$OBJATSQ{$type}) { print "% No template available for object \"$type\"\n"; $result = 1; $opt_t = 1; return $type; } &Template($type); $opt_t = 1; $result = 0; return $type; } last; } if ($opt_a) { @source = split(/\s+/, $ALLLOOK); } elsif (!$source[0]) { @source = split(/\s+/, $DEFLOOK); } print STDERR "($$) left parse\n" if $debug; if ($debug) { for $fl ("d","a","s","k","r","F","t","S","T","M","m","L") { if (eval "\$opt_$fl;") { if ($flags) { $flags .= ":"; } $flags .= "$fl"; } } print STDERR "($$) called with $flags\n"; } return $string; } # # Main program # # Read config file from RIPEDBCNF, or set to default. $conffile=$ENV{"RIPEDBCNF"}; $conffile= "DEFCONFIG" unless $conffile; &rconf($conffile); # If there are command line options, other than -d (for debug) # do not run as daemon, but process the command line and exit. if (($ARGV[0] ne "-d") && ($#ARGV>=0)) { local($cmdline) = ""; for $i (0..$#ARGV) { $cmdline .= $ARGV[$i]." "; } $string = &parse($cmdline); &whois(*source, $string); exit; } else { if ($ARGV[0] eq "-d") { print STDERR "($$) running in debug mode\n"; $debug = 1; } else { # detach from tty exit 0 if (fork() > 0); if (open(FILE, "/dev/tty")) { if (!ioctl(FILE,(0x20000000|(ord('t')<<8)|113),0)) { print STDERR "ioctl: $!\n" if ($debug); } close(FILE); } close(0) if -t; } } $port = 43 unless $port; print STDERR "($$) running on port $port\n" if ($debug); $AF_INET = 2; $SOCK_STREAM = 1; $SOL_SOCKET = 0xffff; $SO_REUSEADDR = 0x0004; $sockaddr = 'S n a4 x8'; ($name, $aliases, $proto) = getprotobyname('tcp'); if ($port !~ /^\d+$/) { ($name, $aliases, $port) = getservbyport($port, 'tcp'); } $this = pack($sockaddr, $AF_INET, $port, "\0\0\0\0"); select(NS); $| = 1; select(STDOUT); socket(S, $AF_INET, $SOCK_STREAM, $proto) || die "socket: $!"; setsockopt(S, $SOL_SOCKET, $SO_REUSEADDR, 1) || die "setsockopt: $!"; while (!bind(S, $this)) { if ($bindcount >= 20) { print STDERR "whoisd: bind() failed 20 times, giving up\n"; &syslog("ERRLOG", "whoisd cannot bind() for 20 times, giving up"); exit 1; } else { print STDERR "-- bind: $!, trying again\n" if ($debug); $bindcount++; sleep 5; } } if ($bindcount) { &syslog("ERRLOG", "whoisd needed $bindcount binds before succeeding"); } listen(S,5) || die "listen: $!"; select(S); $| = 1; select(STDOUT); # Set up the alarm handler $SIG{'ALRM'} = 'alarmhandler'; # We have come this far, let's write the PID to $PIDFILE, useful for # killing and stuff. if (open(PID, ">$PIDFILE")) { print PID "$$\n"; close(PID); } else { &syslog("ERRLOG", "cannot write to $PIDFILE: $!"); } # Main waiting loop, wait for connection, and fork of child to process # the incoming request for (;;) { ($addr = accept(NS,S)) || die $!; if (($child = fork()) == 0) { ($af,$port,$inetaddr) = unpack($sockaddr,$addr); @inetaddr = unpack('C4', $inetaddr); $rhost = "$inetaddr[0].$inetaddr[1].$inetaddr[2].$inetaddr[3]"; print STDERR "($$) fork connection [$rhost]\n" if $debug; local($name,$alias,$at,$len, at addr)=gethostbyaddr($inetaddr,$af); if ($name eq "") { $name = $rhost; } # Set alarm to timeout after people did not send anything # in 60 seconds alarm 60; while() { $result = 0; # Got something, reset alarm; alarm 0; chop; # we want at least some alphanumeric stuff ... if (/\w+/) { select(NS); $string = &parse($_); print STDERR "($$) lookup $string\n" if $debug; if (!$opt_t) { &whois(*source, $string); select(NS); print $NOMATCH,"\n" if $result == 0; print $TOOMANY,"\n" if $result == -1; select(STDOUT); if ($opt_k) { print NS "\n"; alarm 60; } else { close(NS); } } else { close(NS); } } # got something completely non-alphanumeric else { select(NS); $string = $_; print STDERR "($$) lookup $string\n" if $debug; print "Cannot lookup non-alphanumeric keys\n"; print "Connection closed\n"; $result = 0; select(STDOUT); close(NS); } # Log this query $flags = ""; for $fl ("d","a","s","k","r","F","t","S","T","M","m","L") { if (eval "\$opt_$fl;") { if ($flags) { $flags .= ":"; } $flags .= "$fl"; } } if ($opt_V) { if ($flags) { $flags .= ":"; } $flags .= "V$opt_V"; } &syslog("QRYLOG","($$) [$flags] $result $name $string"); } close(NS); print STDERR "($$) exit connection [$rhost]\n" if $debug; exit; } while (waitpid(-1, 1) > 0) {} } -------- Logged at Tue Dec 6 02:33:17 MET 1994 --------- From dsj at merit.edu Fri Jan 6 17:02:31 1995 From: dsj at merit.edu (Dale S. Johnson) Date: Fri, 6 Jan 1995 11:02:31 -0500 Subject: Directory of IRR Databases Message-ID: <199501061602.LAA07385@home.merit.edu> FYI & Correction: At Cathy Wittbrodt's request, I compiled the following and added it to our file ftp.ra.net:pub/radb/OVERVIEW . Any corrections? Comments? Comments on how we ought to handle this kind of IRR coordination? >Providers of the Internet Routing Registry >------------------------------------------ > >RIPE-181 whois servers and database ftp archive sites are provided by the >following organizations: > > whois -h Database FTP site >CA*NET crcd.canet.ca crcd.canet.ca:/canet/crcd/canet.db >MCI whois.mci.net ftp.mci.net:pub/rr/mci.db >RIPE whois.ripe.net ftp.ripe.net:ripe/dbase/ripe.db >Routing Arbiter: whois.ra.net ftp.ra.net:pub/radb/dbase/meritrr.db.Z > >The databases may also be avialable in "split" versions--consisting of a >different file for each object type. Check on the ftp directories for these. > >There is also a temporary RIPE-181 database called "prdb.db", which contains >the contents of the NSFNET PRDB translated into RIPE-181 form. (This >database >will be retired in the early 1995): > >NSFNET Backbone: whois.ra.net ftp.ra.net:pub/radb/dbase/prdb.db.Z --Dale -------- Logged at Fri Jan 6 17:04:59 MET 1995 --------- From Marten.Terpstra at ripe.net Fri Jan 6 17:04:57 1995 From: Marten.Terpstra at ripe.net (Marten Terpstra) Date: Fri, 06 Jan 1995 17:04:57 +0100 Subject: Directory of IRR Databases In-Reply-To: Your message of Fri, 06 Jan 1995 11:02:31 EST. <199501061602.LAA07385@home.merit.edu> Message-ID: <9501061604.AA20636@ncc.ripe.net> * >Providers of the Internet Routing Registry * >------------------------------------------ * > * >RIPE-181 whois servers and database ftp archive sites are provided by the * >following organizations: * > * > whois -h Database FTP site * >CA*NET crcd.canet.ca crcd.canet.ca:/canet/crcd/canet.db * >MCI whois.mci.net ftp.mci.net:pub/rr/mci.db * >RIPE whois.ripe.net ftp.ripe.net:ripe/dbase/ripe.db Please make this ftp.ripe.net:ripe/dbase/ripe.db.gz -Marten -------- Logged at Fri Jan 6 18:02:13 MET 1995 --------- From dsj at merit.edu Fri Jan 6 18:02:25 1995 From: dsj at merit.edu (Dale S. Johnson) Date: Fri, 6 Jan 1995 12:02:25 -0500 Subject: Directory of IRR Databases Message-ID: <199501061702.MAA11662@home.merit.edu> Done. Thanks, Marten. > * >Providers of the Internet Routing Registry > * >------------------------------------------ > * > > * >RIPE-181 whois servers and database ftp archive sites are provided by the > * >following organizations: > * > > * > whois -h Database FTP site > * >CA*NET crcd.canet.ca crcd.canet.ca:/canet/crcd/canet.db > * >MCI whois.mci.net ftp.mci.net:pub/rr/mci.db > * >RIPE whois.ripe.net ftp.ripe.net:ripe/dbase/ripe.db > > Please make this ftp.ripe.net:ripe/dbase/ripe.db.gz > > -Marten -------- Logged at Tue Jan 10 23:36:44 MET 1995 --------- From cengiz at ISI.EDU Tue Jan 10 23:36:18 1995 From: cengiz at ISI.EDU (Cengiz Alaettinoglu) Date: Tue, 10 Jan 1995 14:36:18 -0800 Subject: minor parse problems Message-ID: <199501102236.AA22678@cat.isi.edu> I was trying to register the following: interas-out: to AS690 192.157.69.9/32 192.157.69.4/32 (metric=1) announce ANY (in one line). This line has a syntax error, i.e. keyword metric should be metric-out. This is the diagnostics: interas-out: to to AS690 192.157.69.9/32 announce 192.157.69.4/32 (metric=1) announce ANY *ERROR*: keyword problem in interas-out line for peer AS690 Notice the extra keyword "to" and the placement of keyword "announce", though the error message is correct. This is not really a bug, but can be improved. Cengiz -- Cengiz Alaettinoglu Information Sciences Institute Voice: (310) 822-1511 University of Southern California -------- Logged at Wed Jan 11 09:46:15 MET 1995 --------- From Marten.Terpstra at ripe.net Wed Jan 11 09:46:14 1995 From: Marten.Terpstra at ripe.net (Marten Terpstra) Date: Wed, 11 Jan 1995 09:46:14 +0100 Subject: minor parse problems In-Reply-To: Your message of Tue, 10 Jan 1995 14:36:18 PST. <199501102236.AA22678@cat.isi.edu> Message-ID: <9501110846.AA26610@ncc.ripe.net> cengiz at ISI.EDU (Cengiz Alaettinoglu) writes * * I was trying to register the following: * interas-out: to AS690 192.157.69.9/32 192.157.69.4/32 * (metric=1) announce ANY * (in one line). * This line has a syntax error, i.e. keyword metric should be metric-out. * * This is the diagnostics: * interas-out: to to AS690 192.157.69.9/32 announce 192.157.69.4/32 (metric= * 1) announce ANY * *ERROR*: keyword problem in interas-out line for peer AS690 * * Notice the extra keyword "to" and the placement of keyword "announce", * though the error message is correct. * * This is not really a bug, but can be improved. True, has been on my wishlist for a while. It is sort of annoying, because when you have a syntactically correct as-in or interas-in line, but leave out one of the sugar keywords, the software will complain, but the returned object will look perfectly fine ... -MT -------- Logged at Wed Jan 11 22:06:13 MET 1995 --------- From dsj at merit.edu Wed Jan 11 22:06:30 1995 From: dsj at merit.edu (Dale S. Johnson) Date: Wed, 11 Jan 1995 16:06:30 -0500 Subject: Slight change of location of merit database Message-ID: <199501112106.QAA05332@home.merit.edu> FYI: We've changed the location of the Merit/Routing Arbiter database. What was: Routing Arbiter: whois.ra.net ftp.ra.net:pub/radb/dbase/meritrr ^^^^^^^ is now: Routing Arbiter: whois.ra.net ftp.ra.net:pub/radb/dbase/radb.db.gz ^^^^^^^^^^ This file still does not contain very much. It probably won't contain very much until about the time the PRDB is actually fully retired. The prdb.db is still where the action is for the moment: NSFNET Backbone: whois.ra.net ftp.ra.net:pub/radb/dbase/prdb.db.Z --Dale ========================================================================== >ftp.ra.net:pub/radb/OVERVIEW January 9, 1995 ... >Providers of the Internet Routing Registry >------------------------------------------ > >RIPE-181 whois servers and database ftp archive sites are provided by the >following organizations: > > whois -h Database FTP site >CA*NET crcd.canet.ca crcd.canet.ca:/canet/crcd/canet.db >MCI whois.mci.net ftp.mci.net:pub/rr/mci.db >RIPE whois.ripe.net ftp.ripe.net:ripe/dbase/ripe.db.gz >Routing Arbiter: whois.ra.net ftp.ra.net:pub/radb/dbase/radb.db.gz > >The databases may also be avialable in "split" versions--consisting of a >different file for each object type. Check on the ftp directories for >these. > >There is also a temporary RIPE-181 database called "prdb.db", which contains >the contents of the NSFNET PRDB translated into RIPE-181 form. (This database >will be retired in the early 1995): > >NSFNET Backbone: whois.ra.net ftp.ra.net:pub/radb/dbase/prdb.db.Z -------- Logged at Wed Jan 11 23:00:32 MET 1995 --------- From Marten.Terpstra at ripe.net Wed Jan 11 23:00:30 1995 From: Marten.Terpstra at ripe.net (Marten Terpstra) Date: Wed, 11 Jan 1995 23:00:30 +0100 Subject: Slight change of location of merit database In-Reply-To: Your message of Wed, 11 Jan 1995 16:06:30 EST. <199501112106.QAA05332@home.merit.edu> Message-ID: <9501112200.AA01576@ncc.ripe.net> What do you think Dale, it is useful already to start mirroring both? Currently I am only picking up the PRDB only .... -Marten "Dale S. Johnson" writes * FYI: We've changed the location of the Merit/Routing Arbiter database. * What was: * * Routing Arbiter: whois.ra.net ftp.ra.net:pub/radb/dbase/meritrr * ^^^^^^^ * is now: * * Routing Arbiter: whois.ra.net ftp.ra.net:pub/radb/dbase/radb.db.gz * ^^^^^^^^^^ * * This file still does not contain very much. It probably won't contain * very much until about the time the PRDB is actually fully retired. * The prdb.db is still where the action is for the moment: * * NSFNET Backbone: whois.ra.net ftp.ra.net:pub/radb/dbase/prdb.db.Z * * --Dale * * * ========================================================================== * * >ftp.ra.net:pub/radb/OVERVIEW January 9, 1995 * * ... * * >Providers of the Internet Routing Registry * >------------------------------------------ * > * >RIPE-181 whois servers and database ftp archive sites are provided by the * >following organizations: * > * > whois -h Database FTP site * >CA*NET crcd.canet.ca crcd.canet.ca:/canet/crcd/canet.db * >MCI whois.mci.net ftp.mci.net:pub/rr/mci.db * >RIPE whois.ripe.net ftp.ripe.net:ripe/dbase/ripe.db.gz * >Routing Arbiter: whois.ra.net ftp.ra.net:pub/radb/dbase/radb.db.gz * > * >The databases may also be avialable in "split" versions--consisting of a * >different file for each object type. Check on the ftp directories for * >these. * > * >There is also a temporary RIPE-181 database called "prdb.db", which contain * s * >the contents of the NSFNET PRDB translated into RIPE-181 form. (This datab * ase * >will be retired in the early 1995): * > * >NSFNET Backbone: whois.ra.net ftp.ra.net:pub/radb/dbase/prdb.db.Z -------- Logged at Wed Jan 11 23:21:14 MET 1995 --------- From dsj at merit.edu Wed Jan 11 23:21:30 1995 From: dsj at merit.edu (Dale S. Johnson) Date: Wed, 11 Jan 1995 17:21:30 -0500 Subject: Slight change of location of merit database Message-ID: <199501112221.RAA09333@home.merit.edu> Marten > What do you think Dale, it is useful already to start mirroring both? > Currently I am only picking up the PRDB only .... No; I wouldn't recommend picking up radb.db yet. We have to work out the details of transitioning before that will start to be useful, and there are a few knotty issues we haven't worked through yet. More in a small number of weeks... (I just thought I'd better let this list know that the meritrr had been replaced by radb.db, in case anyone *was* looking at it.) --Dale ========== > What do you think Dale, it is useful already to start mirroring both? > Currently I am only picking up the PRDB only .... > > -Marten > > "Dale S. Johnson" writes > * FYI: We've changed the location of the Merit/Routing Arbiter database. > * What was: > * > * Routing Arbiter: whois.ra.net ftp.ra.net:pub/radb/dbase/meritrr > * ^^^^^^^ > * is now: > * > * Routing Arbiter: whois.ra.net ftp.ra.net:pub/radb/dbase/radb.db.gz > * ^^^^^^^^^^ > * > * This file still does not contain very much. It probably won't contain > * very much until about the time the PRDB is actually fully retired. > * The prdb.db is still where the action is for the moment: > * > * NSFNET Backbone: whois.ra.net ftp.ra.net:pub/radb/dbase/prdb.db.Z > * > * --Dale > * > * > * ========================================================================== > * > * >ftp.ra.net:pub/radb/OVERVIEW January 9, 1995 > * > * ... > * > * >Providers of the Internet Routing Registry > * >------------------------------------------ > * > > * >RIPE-181 whois servers and database ftp archive sites are provided by the > * >following organizations: > * > > * > whois -h Database FTP site > * >CA*NET crcd.canet.ca crcd.canet.ca:/canet/crcd/canet.db > * >MCI whois.mci.net ftp.mci.net:pub/rr/mci.db > * >RIPE whois.ripe.net ftp.ripe.net:ripe/dbase/ripe.db.gz > * >Routing Arbiter: whois.ra.net ftp.ra.net:pub/radb/dbase/radb.db.gz > * > > * >The databases may also be avialable in "split" versions--consisting of a > * >different file for each object type. Check on the ftp directories for > * >these. > * > > * >There is also a temporary RIPE-181 database called "prdb.db", which contain > * s > * >the contents of the NSFNET PRDB translated into RIPE-181 form. (This datab > * ase > * >will be retired in the early 1995): > * > > * >NSFNET Backbone: whois.ra.net ftp.ra.net:pub/radb/dbase/prdb.db.Z > -------- Logged at Fri Jan 13 22:09:20 MET 1995 --------- From ala at merit.edu Fri Jan 13 22:09:39 1995 From: ala at merit.edu (Andrew Adams) Date: Fri, 13 Jan 1995 16:09:39 -0500 Subject: 181 question Message-ID: <199501132109.QAA13596@home.merit.edu> Hi. Lately I've been playing quite a bit with the new 181 software to see more how things work, etc. (Things look really cool by the way!) I noticed the following behavior and wondered if it was by design. I tried to change an object with an older 'changed' date that the one currently in the db. The message that was mailed out to the people specified in that object's 'notify' attribute said that the object had been _replaced_. However, the object wasn't really replaced. That is to say, the software realized that I was submitting an object with an older 'chagned' date and prevented me from making the update. So it seems to me that the message sent to the people specified in the 'notify' should read 'a change was _attempted_', yes? Thanks, Andy -------- Logged at Sat Jan 14 12:41:30 MET 1995 --------- From Marten.Terpstra at ripe.net Sat Jan 14 12:41:28 1995 From: Marten.Terpstra at ripe.net (Marten Terpstra) Date: Sat, 14 Jan 1995 12:41:28 +0100 Subject: 181 question In-Reply-To: Your message of Fri, 13 Jan 1995 16:09:39 EST. <199501132109.QAA13596@home.merit.edu> Message-ID: <9501141141.AA12767@ncc.ripe.net> Actually Andy, it seems you have hit a slight bug here. Without testing I am saying that it is not the notify attribute that could have caused the mail to be sent (it comes after the date checking) but the maintainer notification. I'll run some tests either later this weekend or coming week and perhaps change the order of the tests around to make it do the right thing. -Marten Andrew Adams writes * * Hi. Lately I've been playing quite a bit with the new 181 software * to see more how things work, etc. (Things look really cool by the way!) * I noticed the following behavior and wondered if it was by design. * * I tried to change an object with an older 'changed' date that the one * currently in the db. The message that was mailed out to the people * specified in that object's 'notify' attribute said that the * object had been _replaced_. However, the object wasn't really replaced. * That is to say, the software realized that I was submitting an object * with an older 'chagned' date and prevented me from making the update. * * So it seems to me that the message sent to the people specified in the * 'notify' should read 'a change was _attempted_', yes? * * * Thanks, * * Andy * -------- Logged at Mon Jan 16 13:50:57 MET 1995 --------- From Marten.Terpstra at ripe.net Mon Jan 16 13:50:55 1995 From: Marten.Terpstra at ripe.net (Marten Terpstra) Date: Mon, 16 Jan 1995 13:50:55 +0100 Subject: 181 question In-Reply-To: Your message of Fri, 13 Jan 1995 16:09:39 EST. <199501132109.QAA13596@home.merit.edu> Message-ID: <9501161250.AA22968@ncc.ripe.net> * I tried to change an object with an older 'changed' date that the one * currently in the db. The message that was mailed out to the people * specified in that object's 'notify' attribute said that the * object had been _replaced_. However, the object wasn't really replaced. * That is to say, the software realized that I was submitting an object * with an older 'chagned' date and prevented me from making the update. * * So it seems to me that the message sent to the people specified in the * 'notify' should read 'a change was _attempted_', yes? It was indeed a bug. The date check and the notification were done in the wrong order. A date check should come before notification. It was not the notify attribute that caused this, but notification due to a mnt-by attribute. The ordering has been fixed in the version of updatecheck.pl below. Replace src/updatecheck.pl with the one below and run "make" in the top level database directory. Thanks Andy. -Marten # $RCSfile: updatecheck.pl,v $ # $Revision: 1.17 $ # $Author: marten $ # $Date: 1995/01/16 12:45:29 $ require "defines.pl"; require "adderror.pl"; require "notify.pl"; require "maintainer.pl"; # In updatecheck one can do all the checks one wants because one has both # the old and the new object. All checks in here are VERY RIPE database # specific. # It is supposed to be like this: # *cur = empty : addition # *new = empty : deletion # non = empty : update sub updatecheck { local(*cur, *new, *db) = @_; local($email, $date) = ""; local($newdate) = ""; local($curdate) = ""; local($stat) = $OK; local($type) = &entype(*new); # If this is a maintainer object, bounce it of to the human mailbox # configured in the config and sent them a message explaining this. # We use the GENERAL ERROR for this (since that one can add anytext) if ($type eq "mt") { if (!$cur{"mt"} && !$new{"uo"}) { # This is a new maintainer object &adderror(*new, "maintainer objects cannot be created automatically"); &adderror(*new, "This object has been forwarded to <$HUMAILBOX>"); &adderror(*new, "for authorisation"); if (open (TMPMAIL, ">$TMPDIR/mtfw.$$")) { select(TMPMAIL); eval "print \"$MTFWHEADER\n\";"; eval "print \"$MTFWTEXT\";"; print "\n" if &enwrite(*new, 1, 0, 0); select (STDOUT); close(TMPMAIL); system("$MAILCMD < $TMPDIR/mtfw.$$"); unlink("$TMPDIR/mtfw.$$"); } else { &adderror(*new, "!! an error occured, please send object to <$HUMAILBOX> !!"); &syslog("ERRLOG", "updatecheck cannot open file to forward maintainer object $new{\"mt\"}\n"); } return $E_GENERAL; } } # Check update date foreach (split(/\n/, $new{"ch"})) { ($email, $date) = split(/\s+/, $_); if ($date gt $newdate) { $newdate = $date; } } foreach (split(/\n/, $cur{"ch"})) { ($email, $date) = split(/\s+/, $_); if ($date gt $curdate) { $curdate = $date; } } if ($newdate lt $curdate) { return $E_OLDER; } # Check authorisation by maintainer unless override is specified. if (!$new{"uo"} && !&Maintainer(*cur, *new)) { return $E_AUTHFAIL unless !&entype(*new); } # Catch if called from dbdel, then skip all checks, # just do notification. if (!&entype(*new)) { &AddNotify(*cur, *new); &syslog("AUDITLOG", "delete \"$new{\"$type\"}\" - \"$cur{\"ud\"}\""); return; } # Reset guarded values unless it has the "override" attribute &addguard(*new, *cur) unless $new{"uo"}; &AddNotify(*cur, *new); # Log special actions if ($new{"uo"}) { &syslog("AUDITLOG", "override by \"$new{\"uo\"}\" for \"$new{\"$type\"}\""); } if ($new{"ua"}) { &syslog("AUDITLOG", "authorise by \"$new{\"ua\"}\" for \"$new{\"$type\"}\""); } return $stat; } # Resetting guarded values if necessary sub addguard { local(*new, *cur) = @_; local($stat) = $OK; foreach (split(/\s+/, $GRD{$type})) { if ($new{$_} ne $cur{$_}) { &addwarning(*new, "update of guarded attribute \"$ATTL{$_}\" ignored"); $new{$_} = $cur{$_}; } } return; } 1; -------- Logged at Tue Jan 17 17:41:19 MET 1995 --------- From Marten.Terpstra at ripe.net Tue Jan 17 17:41:15 1995 From: Marten.Terpstra at ripe.net (Marten Terpstra) Date: Tue, 17 Jan 1995 17:41:15 +0100 Subject: RIPE DB software fix Message-ID: <9501171641.AA06930@ncc.ripe.net> When fixing the bug that Andy reported last week, I made a slight mistake, causing deletes to no longer be logged or notified. Sigh. Sorry. Please take updatecheck.pl below which fixes the problem. -Marten # $RCSfile: updatecheck.pl,v $ # $Revision: 1.19 $ # $Author: ripe-dbm $ # $Date: 1995/01/17 16:37:36 $ require "defines.pl"; require "adderror.pl"; require "notify.pl"; require "maintainer.pl"; # In updatecheck one can do all the checks one wants because one has both # the old and the new object. All checks in here are VERY RIPE database # specific. # It is supposed to be like this: # *cur = empty : addition # *new = empty : deletion # non = empty : update sub updatecheck { local(*cur, *new, *db) = @_; local($email, $date) = ""; local($newdate) = ""; local($curdate) = ""; local($stat) = $OK; local($type) = &entype(*new); # If this is a maintainer object, bounce it of to the human mailbox # configured in the config and sent them a message explaining this. # We use the GENERAL ERROR for this (since that one can add anytext) if ($type eq "mt") { if (!$cur{"mt"} && !$new{"uo"}) { # This is a new maintainer object &adderror(*new, "maintainer objects cannot be created automatically"); &adderror(*new, "This object has been forwarded to <$HUMAILBOX>"); &adderror(*new, "for authorisation"); if (open (TMPMAIL, ">$TMPDIR/mtfw.$$")) { select(TMPMAIL); eval "print \"$MTFWHEADER\n\";"; eval "print \"$MTFWTEXT\";"; print "\n" if &enwrite(*new, 1, 0, 0); select (STDOUT); close(TMPMAIL); system("$MAILCMD < $TMPDIR/mtfw.$$"); unlink("$TMPDIR/mtfw.$$"); } else { &adderror(*new, "!! an error occured, please send object to <$HUMAILBOX> !!"); &syslog("ERRLOG", "updatecheck cannot open file to forward maintainer object $new{\"mt\"}\n"); } return $E_GENERAL; } } # Check update date foreach (split(/\n/, $new{"ch"})) { ($email, $date) = split(/\s+/, $_); if ($date gt $newdate) { $newdate = $date; } } foreach (split(/\n/, $cur{"ch"})) { ($email, $date) = split(/\s+/, $_); if ($date gt $curdate) { $curdate = $date; } } if (($newdate lt $curdate) && %new) { return $E_OLDER; } # Check authorisation by maintainer unless override is specified. if (!$new{"uo"} && !&Maintainer(*cur, *new)) { return $E_AUTHFAIL unless !&entype(*new); } # Catch if called from dbdel, then skip all checks, # just do notification. if (!&entype(*new)) { &AddNotify(*cur, *new); $type = &entype(*cur); &syslog("AUDITLOG", "delete [$type] \"$cur{\"$type\"}\" -> \"$cur{\"ud\"}\""); return; } # Reset guarded values unless it has the "override" attribute &addguard(*new, *cur) unless $new{"uo"}; &AddNotify(*cur, *new); # Log special actions if ($new{"uo"}) { &syslog("AUDITLOG", "override by \"$new{\"uo\"}\" for [$type] \"$new{\"$type\"}\""); } if ($new{"ua"}) { &syslog("AUDITLOG", "authorise by \"$new{\"ua\"}\" for [$type] \"$new{\"$type\"}\""); } return $stat; } # Resetting guarded values if necessary sub addguard { local(*new, *cur) = @_; local($stat) = $OK; foreach (split(/\s+/, $GRD{$type})) { if ($new{$_} ne $cur{$_}) { &addwarning(*new, "update of guarded attribute \"$ATTL{$_}\" ignored"); $new{$_} = $cur{$_}; } } return; } 1; -------- Logged at Tue Jan 17 17:47:00 MET 1995 --------- From Marten.Terpstra at ripe.net Tue Jan 17 17:46:52 1995 From: Marten.Terpstra at ripe.net (Marten Terpstra) Date: Tue, 17 Jan 1995 17:46:52 +0100 Subject: nic handle feature Message-ID: <9501171646.AA06985@ncc.ripe.net> On request from the other NCC staff, I have tightened the checking on nic handles. The version of syntax.pl below will no longer accept nic handles for persons with different names that the person currently in the database holding the same handle. This addition is only useful if your database contains persons with nic handles. However, the routine ExistsObject() inside syntax.pl can be used for various other purposes. Drop in src/syntax.pl and run a "make" in the database top level dir. -Marten PS For those who have line-wrap problems with email, the ftpable copy on ftp://ncc.ripe.net/dbase-beta/dbase-beta.tar.gz is kept up-to-date with any changes made. # # $RCSfile: syntax.pl,v $ # $Revision: 0.53 $ # $Author: ripe-dbm $ # $Date: 1995/01/17 15:58:00 $ # # ARGUMENTS: *ASSOC object # RETURNS: INTEGER object_status # # Object status = $O_OK, $O_WARNING, $O_ERROR # Object will be changed to have warnings and errors # # This is the really ugly bit, where the syntax of all the fields is checked # This is completely independent of the config file and needs additions if # you add your own fields. It does not check whether fields are allowed in # this object, whether they are supposed to be multiple or any of that # That part is basic configuration driven and can be found in enparse.pl # # The syntax stuff needs to be re-written at a later date to allow for # configurable syntax. This is in the dreams of someones mind..... # require "adderror.pl"; require "net2net.pl"; # various routines to make classless life easier require "misc.pl"; # this one has quite a few used sub routines require "maintainer.pl"; # For mnt-by verification # This routine checks whether a specific object with a certain source # and type exists. It will return the number of hits. Does NOT work for # IP address just yet and has to be moved away from here .... If $lookup # is set, then it will also return the first object in the list. require "dbopen.pl"; require "dbmatch.pl"; require "dbclose.pl"; require "enread.pl"; sub ExistsObject { local($key, $type, $source, $lookup) = @_; local(*i) ='curdb'; local($dbfile) = ""; local(%nothing) = (); local(@keys) =($key); local(@matches); local(%en) = (); if ($TYPE{$source} eq "SPLIT") { $dbfile = "$DBFILE{$source}.$type"; } else { $dbfile = $DBFILE{$source}; } if (&dbopen(i, *nothing, 0, $dbfile)) { @matches = &dbmatch(*i, *keys, 1); } else { &dbclose(*i); return -1; } if ($lookup) { %en = &enread(i, $matches[0]); } &dbclose(*i); if ($lookup) { return $#matches+1, %en; } else { return $#matches+1; } } sub checksyntax { local(*object) = @_; local($rtcode) =$O_OK; local($itmp, $val, $msg); print STDERR "checksyntax - called\n" if $opt_V; foreach $itmp (keys %object) { if ($object{$itmp} eq "") { ($val, $msg) = &dosyntax($itmp, "", *object); if ($val == $O_WARNING) { &addwarning(*object, $msg); $rtcode = $O_WARNING if $rtcode == $O_OK; } elsif ($val == $O_ERROR) { &adderror(*object, $msg); $rtcode = $O_ERROR; } } else { # # Got to preprocess the multi-line semantic attributes. sigh.. Did I really # think this was a good idea ?? # The way this works is $peer and $wt (this is a combination depending on the # attribute) are used as a key to check wrapped lines. # This is probably not the best way of doing this as you to do a lot of # splitting to get the correct unique keys. # You also have to split differently depending on whether syntax sugar exists. # if($itmp eq "ai" || $itmp eq "ao" || $itmp eq "it" || $itmp eq "io") { local($FLAG) = $itmp; local(@array) = split(/\n/, $object{$itmp}); local($j,$k) = 0; local(%linewrap) = (); local(%newval) = (); foreach $j (0..$#array) { # # as-in lines # if($FLAG eq "ai") { if($array[$j] =~ /^from/) { ($sugar1, $peer, $wt, $sugar2, $pol) = split(/\s+/, $array[$j], 5); if($sugar2 ne "accept") { &adderror(*object, "keyword problem in as-in line for peer $peer cost $wt"); $rtcode = $O_ERROR; next; } } else { ($peer, $wt, $pol) = split(/\s+/, $array[$j], 3); } $object{$itmp} =~ s/from\s+|accept\s+//g; # # as-out lines # } elsif ($FLAG eq "ao") { if($array[$j] =~ /^to/) { ($sugar1, $peer, $sugar2, $pol) = split(/\s+/, $array[$j], 4); $wt = 1; if($sugar2 ne "announce") { &adderror(*object, "keyword problem in as-out line for peer $peer"); $rtcode = $O_ERROR; next; } } else { ($peer, $pol) = split(/\s+/, $array[$j], 2); $wt = 1; } $object{$itmp} =~ s/to\s+|announce\s+//g; # # interas-in lines # } elsif ($FLAG eq "it") { # # Get rid of spaces in (=) # $array[$j] =~ s/\(\s*pref\s*\=\s*(\S+)\s*\)/\(pref=\1\)/; if($array[$j] =~ /^from/) { ($sugar1, $peer, $lid, $rid, $cost, $sugar2, $pol) = split(/\s+/, $array[$j], 7); if($sugar2 ne "accept") { &adderror(*object, "keyword problem in interas-in line for peer $peer cost $cost"); $rtcode = $O_ERROR; next; } $wt = "$lid-$rid-$cost"; } else { ($peer, $lid, $rid, $cost, $pol) = split(/\s+/, $array[$j], 5); $wt = "$lid-$rid-$cost"; } $object{$itmp} =~ s/from\s+|accept\s+//g; # # interas-out lines # } elsif ($FLAG eq "io") { local($gotmet) = 0; # # This is where you have insert new ``mertic-type'' values and get rid of # spaces # if ($array[$j] =~ /metric-out/) { $array[$j] =~ s/\(\s*metric\-out\s*\=\s*(\S+)\s*\)/\(metric-out=\1\)/; $gotmet = 1; } if($array[$j] =~ /^to/) { if($gotmet) { ($sugar1, $peer, $lid, $rid, $metric, $sugar2, $pol) = split(/\s+/, $array[$j], 7); $wt = "$lid-$rid-$metric"; } else { ($sugar1, $peer, $lid, $rid, $sugar2, $pol) = split(/\s+/, $array[$j], 6); $wt = "$lid-$rid"; } if($sugar2 ne "announce") { &adderror(*object, "keyword problem in interas-out line for peer $peer"); $rtcode = $O_ERROR; next; } } else { if($gotmet) { ($peer, $lid, $rid, $metric, $pol) = split(/\s+/, $array[$j], 5); $wt = "$lid-$rid-$metric"; } else { ($peer, $lid, $rid, $pol) = split(/\s+/, $array[$j], 4); $wt = "$lid-$rid"; } } $object{$itmp} =~ s/to\s+|announce\s+//g; } # # Now finally check if the lines are the same. # if($newval{"$peer:$wt"}) { if($linewrap{"$peer:$wt"}) { $newval{"$peer:$wt"} = $newval{"$peer:$wt"}." ".$pol; } else { $newval{"$peer:$wt"} = $newval{"$peer:$wt"}."\n".$array[$j]; } } else { $newval{"$peer:$wt"} = $array[$j]; } $linewrap{"$peer:$wt"} = 1; } # # Now loop through the value and syntax check the re-built line # foreach $k (keys %newval) { foreach $l (split(/\n/, $newval{$k})) { local($val, $msg) = &dosyntax("$FLAG", $l, *object); if ($val == $O_WARNING) { &addwarning(*object, $msg); $rtcode = $O_WARNING if $rtcode == $O_OK; } elsif ($val == $O_ERROR) { &adderror(*object, $msg); $rtcode = $O_ERROR; } } } # # Otherwise just split on newlines and pass line by line to syntax checker # } else { foreach $j (split(/\n/, $object{$itmp})) { local($val, $msg) = &dosyntax($itmp, $j, *object); if ($val == $O_WARNING) { &addwarning(*object, $msg); $rtcode = $O_WARNING if $rtcode == $O_OK; } elsif ($val == $O_ERROR) { &adderror(*object, $msg); $rtcode = $O_ERROR; } } } } } print STDERR "checksyntax - returned\n" if $opt_V; return $rtcode; } sub dosyntax { local($key, $value, *object) = @_; # # THE FIRST SET OF ATTRIBUTES MAY NOT HAVE AN EMPTY VALUE IF THEY EXIST # # # ua - authorise # if ($key eq "ua") { if ($value !~ /\S/) { return $O_ERROR, "illegal authorisation value"; } return; } # # uo - override # if ($key eq "uo") { if ($value !~ /\S/) { return $O_ERROR, "illegal override value"; } } # # ud - delete # # The delete is a bit of a pain. Since we want to be able to delete # objects that actually contain syntax errors, they are NOT syntax # checked. Therefore, all the syntax checking for deletes is actually # done in misc.pl sub &hasdelete. This is not very nice, but the only # thing that actually works. Below is commented out. # if ($key eq "ud") { # if ($value !~ /\S/) { # return $O_ERROR, "delete attribute must contact email address and reason for delete"; # } # return; # } # # # AFTER THIS, ATTRIBUTES THAT ARE DEFINES BUT EMPTY ARE OK # return if $value eq ""; # # aa - see na # # # ac - admin-c # if ($key eq "ac") { if (!&isname($value)) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } return; } # # ad - address # if ($key eq "ad") { if ($value !~ /^.*$/) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } return; } # # ae - as-exclude # if ($key eq "ae") { local($sugar1, $as, $sugar2, $rest) = ""; if($value =~ /^exclude/) { ($sugar1, $as, $sugar2, $rest) = split(/\s+/, $value, 4); if($sugar2 ne "to") { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } } else { ($as, $rest) = split(/\s+/, $value,2); } if(!&isasnum($as)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\" - neigbor peer". " $as doesn't look like an AS"; } if(&isasnum($rest) || &iscommunity($rest) || &isasmacro($rest) || ($rest eq "ANY")) { $object{$key} =~ s/exclude\s+|to\s+//g; } else { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\" - exclude-route-keyword". " $rest unknown"; } return; } # # ai - as-in # if ($key eq "ai") { # # This line has been pre-processed above. # remove syntax fluff, flip to unpper case for ases and remove leading WS # $value =~ s/from\s*//; $value =~ s/accept\s*//; $value =~ s/[aA][sS]/AS/g; $value =~ s/^\s+//; # # split the line up into AS, cost and the policy # local($as,$pref,$pol) = split(/\s+/,$value,3); if (!&isasnum($as)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\"\nneigbour peer". " $as doesn't look like an AS"; } if (!$pref) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\"\nyou must give a cost"; } if (!&isaspref($pref)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\"\ncost $pref ". "must be a positive integer"; } if (!$pol) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\"\n\tno ". "routing policy expression given"; } # # now check equal brackets and braces # if(!&isbracket($pol)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: peer $as cost $pref\"" . "\n\tunequal brackets \"\(\)\"\n"; } if(!&isbrace($pol)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: peer $as cost $pref\"" . "\n\tunequal braces \"\{\}\"\n"; } # # Now grab the netlist entries and check they are ok # local($tmppol) = $pol; while($tmppol =~ s/(\{[^\}]*\})// ) { if(!&isnetlist($1)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: peer $as cost $pref\"". "\n\tnetlist error $1"; } } # # Now check the actual keywords # while($tmppol =~ s/(\S+)//) { if (!&isaskeyword($1)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: peer $as cost $pref\"\n\t$1 ". "is not a routing policy KEYWORD"; } } return; } # # al - as-list # if ($key eq "al") { $value =~ tr/a-z/A-Z/; local(@aslist) = split(/\s+/, $value); local($i); foreach $i (@aslist) { if(!&isasnum($i) && !&isasmacro($i)) { return $O_ERROR, "illegal value \"$i\" in \"$ATTL{$key}\""; } } return; } # # an - aut-num # if ($key eq "an") { $value =~ tr/a-z/A-Z/; if (!&isasnum($value)) { return $O_ERROR, "syntax error in \"$ATTL{$key}\" - $value is not a valid AS"; } if (($object{$key} =~ tr/a-z/A-Z/)) { return $O_WARNING, "\"$ATTL{$key}\" value uppercased"; } return; } # # am - as-macro # if ($key eq "am") { if(!&isasmacro($value)) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } return; } # # ao - as-out # if ($key eq "ao") { $value =~ s/to//; $value =~ s/announce//; $value =~ s/[aA][sS]/AS/g; $value =~ s/^\s+//; # # split up into AS and policy # local($as,$pol) = split(/\s+/,$value,2); if (!&isasnum($as)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\" - ". "neigbour peer $as doesn't look like an AS"; } if (!$pol) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\" - ". "no routing policy expression given"; } # # now check equal brackets and braces. # if(!&isbracket($pol)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: peer $as \"" . "\n\tunequal brackets \"\(\)\"\n"; } if(!&isbrace($pol)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: peer $as \"" . "\n\tunequal brackets \"\(\)\"\n"; } # # Now grab loop through netlist entries and check they are ok # Here a netlist entry is anything between braces. # local($tmppol) = $pol; while($tmppol =~ s/(\{[^\}]*\})// ) { if(!&isnetlist($1)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: peer $as \"". "\n\tnetlist error $1"; } } while($tmppol =~ s/(\S+)//) { if (!&isaskeyword($1)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: peer $as \"". "\n\t$1 is not a routing policy KEYWORD"; } } } # # as - aut-sys # if ($key eq "as") { if ($value !~ /^\d+$/) { if (!&isasnum($value)) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } } return; } # # at - auth # if ($key eq "at") { local(@authstr) = split(/\s+/, $value, 2); if ($authstr[0] eq "NONE") { if ($authstr[1] !~ /^$/) { return $O_ERROR, "syntax error in \"$ATTL{$key}\"". "- $authstr[1] is extraneous for $authstr[0]"; } else { return; } } if ($authstr[0] eq "CRYPT-PW") { if(length($authstr[1]) != 13) { return $O_ERROR, "syntax error in \"$ATTL{$key}\"" . " - password \"$authstr[1]\" is incorrect length"; } else { return; } } elsif ($authstr[0] eq "MAIL-FROM") { local($regex) = $value; $regex =~ s/^\s*MAIL\-FROM\s*//; eval "/$regex/;"; if ($@) { return $O_ERROR, "\"$regex\" is not a legal regular expression"; } else { return; } } else { return $O_ERROR, "syntax error in \"$ATTL{$key}\" $value"; } return; } # # au - authority # if ($key eq "au") { if ($value !~ /^[a-zA-Z0-9\-\.\ \,\(\)\/]+$/) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } return; } # # av - advisory # if ($key eq "av") { local(@list) = split(/\s+/, $value); if (!&isasnum($list[0])) { return $O_ERROR, "syntax error in \"$ATTL{$key}\" - $list[0] is no a valid peer"; } return; } # # the RIPE-60 tags are just given a simple parse - not really needed # as they are basically guarded. # # bg - bdry-gw # if ($key eq "bg") { if ($value !~ /^[A-Z0-9\-]+$/) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } return; } # # bi - bis # bis - Boundary intermediate system i.e. CLNS nonsense # if ($key eq "bi") { local(@prefixes) = split(/\s+/, $value); local($i); if ($#prefixes > 1) { return $O_ERROR, "too many prefixes in \"$ATTL{$key}\""; } foreach $i (@prefixes) { if (!&isclnsprefix($i)) { return $O_ERROR, "illegal NSAP prefix syntax in \"$ATTL{$key}\""; } } return; } # # bl - bdrygw-l # if ($key eq "bl") { if ($value !~ /^[A-Z0-9\-\ ]+$/) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } return; } # # Try to do something clever with the changed field # # ch - changed # if ($key eq "ch") { local($i); (@tmp) = split(/\s+/, $value); $email = "$tmp[0]"; foreach $i (1..$#tmp-1) { # This is for emails with spaces ;-( $email .= " $tmp[$i]"; } $date = "$tmp[$#tmp]" if ($tmp[$#tmp] =~ /^\d+$/); if (!(&isemail($email))) { return $O_ERROR, "syntax error in e-mail part of \"$ATTL{$key}\""; } local($s, $m, $h, $md, $mo, $y) = localtime(time); $mo += 1; $md = "0".$md unless $md > 9; $mo = "0".$mo unless $mo > 9; $y = "0".$y unless $y > 9; local($curdate) = "$y$mo$md"; if ($date eq "") { $object{$key} .= " $curdate"; return $O_WARNING, "todays date ($curdate) added to \"$ATTL{$key}\" attribute"; } if ($date !~ /^(\d\d)(\d\d)(\d\d)$/) { return $O_ERROR, "date part of \"$ATTL{$key}\"". "not in YYMMDD format"; } # 1988 is the start of the world. This is where we test for proper # date values of YYMMDD if (($1 < 88) || ($2 > 12) || ($3 > 31)) { return $O_ERROR, "date part of \"$ATTL{$key}\" is not a valid YYMMDD value"; } if ($date gt $curdate) { $object{$key} =~ s/$date/$curdate/; return $O_WARNING, "date in \"$ATTL{$key}\" ($date) is in the ". "future - changed to $curdate"; } return; } # # This is the "community" stuff. # It needs to make sure RIPE-81 keywords aren't there. # # cl - comm-list # if ($key eq "cl") { local(@crap) = split(/\s+/,$value); foreach $j (@crap) { if (!&iscommunity($j)) { return $O_ERROR, "syntax error in \"$ATTL{$key}\" - ". "is an illegal keyword community name \"$j\""; } local($copy) = $j; $copy =~ tr/A-Z/a-z/; local($stat) = &ExistsObject($copy, "cm", $object{"so"}); if ($stat < 1 ) { return $O_ERROR, "community \"$j\" does not exist in ". "the $object{\"so\"} database"; } } return; } # # cm - community # if ($key eq "cm") { if (!&iscommunity($value)) { return $O_ERROR, "syntax error in \"$ATTL{$key}\" - ". "illegal community name \"$j\""; } return; } # # co - connect # # check the list of connect values from the config. # if ($key eq "co") { foreach $j (split(/\s+/, $value)) { if (!$CONNECT{$j}) { return $O_ERROR, "unknown connect value \"$j\""; } } return; } # # cy - country # if ($key eq "cy") { if (!$COUNTRY{$value}) { return $O_ERROR, "unknown country \"$value\""; } else { if ($COUNTRY{$value} ne $value) { $object{$key} = $COUNTRY{$value}; return $O_WARNING, "country \"$value\" changed to \"$COUNTRY{$value}\""; } } return; } # # de - descr # if ($key eq "de") { if ($value !~ /^.*$/) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } return; } # # df - default # if ($key eq "df") { local($rest) = ""; if ($object{"dp"}) { $value =~ tr/A-Z/a-z/; ($prefix, $pref,$rest) = split(/\s+/, $value, 3); if (!&isclnsprefix($prefix)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\" - incorrect ". "NSAP prefix"; } } else { $value =~ tr/a-z/A-Z/; ($as,$pref,$rest) = split(/\s+/,$value, 3); if (!&isasnum($as)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\" ". "- default peer $as doesn't look like an AS"; } } if (!$pref) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\" - you must give a cost"; } if (!&isaspref($pref)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\" - ". "cost $pref must be a positive integer"; } if($rest && !$object{"dp"}) { $rest =~ s/STATIC/static/; $rest =~ s/DEFAULT/default/; if (&isnetlist($rest) || ($rest eq "static") || ($rest eq "default")) {} else { return $O_ERROR, "syntax error in \"$ATTL{$key}\" - ". "\"$rest\" is invalid"; } $object{$key} =~ s/STATIC/static/; $object{$key} =~ s/DEFAULT/default/; $object{$key} =~ s/[aA][sS]/AS/g; } return; } # # Check to make sure the network list looks reasonable # # # di - dom-net # if ($key eq "di") { local(@list) = split(/\s+/,$value); local($j) = 0; foreach $j (0..$#list) { if (!&isnetnum($list[$j])) { return $O_ERROR, "syntax error in \"$ATTL{$key}\" - ". "illegal IP network number $list[$j]"; } } return; } # # dm - dom-in # if($key eq "dm") { local($bis,$pref, at crap) = split(/\s+/,$value); if (!&isclnsprefix($bis)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\" - dom-prefix". " $bis doesn't look like an NSAP"; } if (!$pref) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\" - you must give a cost"; } if (!&isaspref($pref)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\" - cost $pref ". "must be a positive integer"; } if ($#crap < 0 ) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\" - no ". "routing policy expression given"; } foreach $k (@crap) { if (!&isclnskeyword($k)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\" - $k ". "is not a routing policy KEYWORD"; } } return; } # # dn - domain # if ($key eq "dn") { if (!&isdomname($value)) { return $O_ERROR, "illegal domain name in $value"; } return; } # # do - dom-out # if ($key eq "do") { local($bis, at crap) = split(/\s+/,$value); if (!&isclnsprefix($bis)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\" - ". "dom-prefix \"$bis\" doesn't look like an NSAP prefix"; } if ($#crap < 0 ) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\" - ". "no routing policy expression given"; } foreach $k (@crap) { if (!&isclnskeyword($k)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\" - ". "$k is not a routing policy KEYWORD"; } } return; } # # dp - dom-prefix # if ($key eq "dp") { if (!&isclnsprefix($value)) { return $O_ERROR, "illegal NSAP prefix format in \"$ATTL{$key}\""; } return; } # # da - dom-name # if ($key eq "da") { if ($value !~ /^[a-zA-Z\-0-9\.]+$/) { return $O_ERROR, "illegal $ATTL{$key} name"; } return; } # # dt - upd-to # if ($key eq "dt") { if (!&isemail($value)) { return $O_ERROR, "syntax error in \"$ATTL{$key}\" ". "- \"$value\" is not in \(RFC822\) format"; } return; } # # em - e-mail # if ($key eq "em") { if (!&isemail($value)) { return $O_ERROR, "syntax error in \"$ATTL{$key}\" ". "- \"$value\" is not in \(RFC822\) format"; } return; } # # gd - guardian # if ($key eq "gd") { if (!(&isemail($value))) { return $O_ERROR, "syntax error in \"$ATTL{$key}\" - ". "guardian must be a mailbox entry"; } return; } # # gw - gateway # if ($key eq "gw") { if ($value !~ /^[a-zA-Z0-9\-\.\ ]+$/) { return $O_WARNING, "syntax error in \"$ATTL{$key}\""; } return; } # # ho - hole # # still need to check against route entry # if ($key eq "ho") { local($stat, $msg, @str) = &netpre_verify($value); if($stat == $NOK) { return $O_ERROR, "syntax error in \"$ATTL{$key}\"\n$msg\n"; } return; } # # if - ifaddr # if ($key eq "if") { local($if, $mask) = split(/\s+/, $value, 2); if(!&isipaddr($if)) { return $O_ERROR, "syntax error in \"$ATTL{$key}\"" . " $if is incorrect"; } if(!&ismask($mask)) { return $O_ERROR, "syntax error in \"$ATTL{$key}\"" . " $mask is incorrect"; } return; } # # ii - ias-int # if ($key eq "ii") { local(@iistr) = split(/\s+/,$value); if ($#iistr != 1 ) { return $O_ERROR, "syntax error in \"$ATTL{$key}\" - wrong number of components"; } if (!&isipaddr($iistr[0])) { return $O_ERROR, "syntax error in \"$ATTL{$key}\" - \"$iistr[0]\" ". "is not a valid IP address"; } if (!&isasnum($iistr[1])) { return $O_ERROR, "syntax error in \"$ATTL{$key}\" - ". "\"$iistr[1]\" is not a valid AS"; } return; } # # it - interas-in # if ($key eq "it") { # # This line has been pre-processed above. # remove syntax fluff, flip to unpper case for ases and remove leading WS # $value =~ s/from\s*//; $value =~ s/accept\s*//; $value =~ s/[aA][sS]/AS/g; $value =~ s/^\s+//; # # split the line up into AS, lid, rid, cost and the policy # local($as, $lid, $rid, $pref, $pol) = split(/\s+/,$value, 5); if (!&isasnum($as)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\"\n\tneigbour peer". " $as doesn't look like an AS"; } if (!&isipaddr($lid) || !&isipaddr($rid)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\"\n\tip address error"; } if (!$pref) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\"\nyou must give a cost"; } if ($pref !~ /^\(pref=(\S+)\)$/) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\" preferece is invalid"; } if ($1 ne "MED" && $1 !~ /^\d+$/) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\"". "\n\t value \"$1\" is invalid"; } if (!$pol) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\"\n\tno ". "routing policy expression given"; } # # now check equal brackets and braces # if(!&isbracket($pol)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: peer $as cost $pref\"" . "\n\tunequal brackets \"\(\)\"\n"; } if(!&isbrace($pol)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: peer $as cost $pref\"" . "\n\tunequal braces \"\{\}\"\n"; } # # Now grab the netlist entries and check they are ok # local($tmppol) = $pol; while($tmppol =~ s/(\{[^\}]*\})// ) { if(!&isnetlist($1)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: peer $as cost $pref\"". "\n\tnetlist error $1"; } } # # Now check the actual keywords # while($tmppol =~ s/(\S+)//) { if (!&isaskeyword($1)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: peer $as cost $pref\"\n\t$1 ". "is not a routing policy KEYWORD"; } } return; } # # io - interas-out # if ($key eq "io") { local($gotmet) = 0; local($as, $lib, $rid, $metric, $pol); $value =~ s/to//; $value =~ s/announce//; $value =~ s/[aA][sS]/AS/g; $value =~ s/^\s+//; # # split up into parts # if ($value =~ /metric-out/) { $gotmet = 1; ($as, $lid, $rid, $metric, $pol) = split(/\s+/, $value, 5); } else { ($as, $lid, $rid, $pol) = split(/\s+/, $value, 4); } if (!&isasnum($as)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\" - ". "neigbour peer $as doesn't look like an AS"; } if (!&isipaddr($lid) || !&isipaddr($rid)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\"\n\tip address error"; } if ($gotmet) { if ($metric !~ /^\(metric-out=(\S+)\)$/) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\"". "\n\t is invalid"; } if ($1 ne "IGP" && $1 !~ /^\d+$/) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\"". "\n\t value \"$1\" is invalid"; } } if (!$pol) { return $O_ERROR, "syntax error in \"$ATTL{$key}: $value\" - ". "no routing policy expression given"; } # # now check equal brackets and braces # if(!&isbracket($pol)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: peer $as \"" . "\n\tunequal brackets \"\(\)\"\n"; } if(!&isbrace($pol)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: peer $as \"" . "\n\tunequal brackets \"\(\)\"\n"; } # # Now grab the netlist entries and check they are ok # local($tmppol) = $pol; while($tmppol =~ s/(\{[^\}]*\})// ) { if(!&isnetlist($1)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: peer $as \"". "\n\tnetlist error $1"; } } while($tmppol =~ s/(\S+)//) { if (!&isaskeyword($1)) { return $O_ERROR, "syntax error in \"$ATTL{$key}: peer $as \"". "\n\t$1 is not a routing policy KEYWORD"; } } $object{$key} =~ s/[aA][sS]/AS/g; return; } # # This is simple for now. TB # Will change the isnetnum routine to return various codes and modified # netnum. # in - inetnum # if ($key eq "in") { $j = 0; local($onenet) = 0; @nets = split(/\s+/, $value); if ($#nets == 0) { # check the single network $onenet = 1; $add[0] = $nets[0]; } elsif ($#nets == 2 && $nets[1] == "-") { $add[0] = $nets[0]; $add[1] = $nets[2]; } elsif ($#nets == 1 ) { $add[0] = $nets[0]; $add[1] = $nets[1]; $mod = 1; } else { return $O_ERROR, "syntax error in \"$ATTL{$key}\" - illegal network $value\n"; } foreach $j (0..$#add) { if (!&isnetnum($add[$j])) { return $O_ERROR, "syntax error in \"$ATTL{$key}\" - ". "illegal network \"$add[$j]\"\n"; } } if(!$onenet && (&quad2int($add[1])) < (&quad2int($add[0]))) { return $O_ERROR, "error in \"$ATTL{$key}\" - range is illegal ". "- end of block is too low\n"; } if($mod) { $new = $add[0]." - ".$add[1]; $object{$key} = $new; return $O_WARNING, "\"$ATTL{$key}\" value ". "\"$value\" changed to \"$new\"\n"; } if(!$onenet) { $new = $add[0]." - ".$add[1]; if($new ne $value) { $object{$key} = $new; return $O_WARNING, "\"$ATTL{$key}\" value ". "\"$value\" changed to \"$new\"\n"; } } return; } # # la - localas # if ($key eq "la") { if(!&isasnum($value)) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } return; } # # lo - location # if ($key eq "lo") { if ($value !~ /^[a-zA-Z0-9\-\.\ \,\(\)\&\'\"\/]+$/) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } return; } # # Added this in for now - maybe removed at a later date. # This is MERIT/RA special. # lr - local-route # if ($key eq "lr") { local(@list) = split(/\s+/, $value); if (!&isasnum($list[0])) { return $O_ERROR, "syntax error in \"$ATTL{$key}\" - $list[0] is not a valid peer"; } foreach (1..$#list) { if($list[$_] !~ /^\d+:\d+(\(\d+\))*$/) { return $O_ERROR, "syntax error in \"$ATTL{$key}\" - $list[$_] is invalid"; } } return; } # # ma - maintainer # if ($key eq "ma") { if ($value !~ /^[A-Z0-9\-]+$/) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } return; } # # mb - mnt-by # if ($key eq "mb") { if ($value !~ /^[A-Z0-9\-\s+]+$/) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } # Check whether all mentioned maintainer values are actually # present in the database. This is yucky, but %ExistMaintainer # is sneakily built in GetMaintainer to speed things up.... # As everything, these are only kept per ONE update message (which # can of course have multiple objects ....) local($status) = 0; local($notfound) = ""; foreach (split(/\s+/, $value)) { next if ($ExistMaintainer{$_} || ($value eq $object{"mt"}) || &GetMaintainer($_, $object{"so"})); $notfound .= "$_ "; $status = 1; } return $O_ERROR, "unknown maintainer(s) \"$notfound\" referenced" if $status; return; } # # mt - mntner # if ($key eq "mt") { if ($value !~ /^[A-Z0-9\-]+$/) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } return; } # # mn - mnt-nfy # if ($key eq "mn") { if (!&isemail($value)) { return $O_ERROR, "syntax error in \"$ATTL{$key}\" ". "- \"$value\" is not in \(RFC822\) format"; } return; } # # na - netname OR aa - as-name # if ($key eq "na" || $key eq "aa") { local($cur) = $value; local($changed) = 1 if $object{$key} =~ tr/a-z/A-Z/; local($changed) = 1 if $object{$key} =~ tr/\./\-/; local($changed) = 1 if $object{$key} =~ tr/\_/\-/; if ($object{$key} !~ /^[A-Z0-9][A-Z0-9\-]+$/) { $object{$key} = $cur; return $O_ERROR, "illegal $ATTL{$key} \"$cur\""; } else { if ($changed) { $value = $object{$key}; return $O_WARNING, "\"$cur\" changed to \"$value\""; } } return; } # # Will need to change when the NIC-handle syntax is fixed. # # nh - nic-hdl # if ($key eq "nh") { local(%preventry) = (); local($matches) = 0; local($newname) = ""; local($curname) = ""; local($uppercased) = 0; if ($DOHANDLE) { if ($value =~ /^[Aa][Ss][Ss][Ii][Gg][Nn]\s*(.*)$/) { if ($1) { if (!&ishandle($1)) { return $O_ERROR, "syntax error in requested nichandle"; } } return; } } if ($object{$key} =~ tr/a-z/A-Z/) { $value = $object{$key}; $uppercased = 1; } if (!&ishandle($value)) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } if ($uppercased) { return $O_WARNING, "\"$ATTL{$key}\" value uppercased"; } local($goandfind) = $value; $goandfind =~ tr/A-Z/a-z/; ($matches, %preventry) = &ExistsObject($goandfind, "pn", $object{"so"} , 1); if ($matches) { $curname = $preventry{"pn"}; $curname =~ tr/A-Z/a-z/; $curname =~ s/\s+/ /g; $newname = $object{"pn"}; $newname =~ tr/A-Z/a-z/; $newname =~ s/\s+/ /g; if ($curname ne $newname) { return $O_ERROR, "nic-hdl \"$value\" already assigned to $preventry{\"pn\"}"; } } return; } # # ni - nsf-in # if ($key eq "ni") { if ($value !~ /^[(\d=\d+)\s*]+$/) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } return; } # # no - nsf-out # if ($key eq "no") { if ($value !~ /^[(\d=\d+)\s*]+$/) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } return; } # # ns - nserver # if ($key eq "ns") { @list = (); @list = split(/\s+/,$value); $j = 0; foreach $j (0..$#list) { if (!&isdomname($list[$j])) { if ($list[$j] !~ /^[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$/) { return $O_ERROR, "illegal nameserver in \"$ATTL{$key}\" ". "component \"$list[$j]\""; } } } return; } # # ny - notify # if ($key eq "ny") { if (!&isemail($value)) { return $O_ERROR, "syntax error in \"$ATTL{$key}\" - ". "\"$value\" is not in \(RFC822\) format"; } return; } # # op - op-phone # of - op-fa # ph - phone # fx - fax-no # if (($key eq "op") || ($key eq "of") || ($key eq "ph") || ($key eq "fx")) { if (!(&isphone($value))) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } return; } # # om - op-mail # if ($key eq "om") { if (!(&isemail($value))) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } return; } # # or - origin # if ($key eq "or") { $value =~ tr/a-z/A-Z/; if (!&isasnum($value)) { return $O_ERROR, "syntax error in \"$ATTL{$key}\" - $value is not a valid AS"; } if (($object{$key} =~ tr/a-z/A-Z/)) { return $O_WARNING, "\"$ATTL{$key}\" value uppercased"; } return; } # # pe - peer # if ($key eq "pe") { local(@peer) = split(/\s+/, $value); if($value =~ /localas/) { if($peer[3] ne "localas" || !&isasnum($peer[4])) { return $O_ERROR, "syntax error in \"$ATTL{$key}\"". " - localas error for $value"; } } elsif (!&isipaddr($peer[0]) || !&isasnum($peer[1]) || !&ispeerkeyword($peer[2]) ) { return $O_ERROR, "syntax error in \"$ATTL{$key}\" - $value"; } return; } # # pn - person # if ($key eq "pn") { local(@names) = split(/\s+/, $value); if ($#names == 0) { return $O_ERROR, "syntax error in \"$ATTL{$key}\" - ". "must contain at least two components"; } foreach $j (0..$#names) { if (!&isname($j)) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } } return; } # # rl - routpr-l # if ($key eq "rl") { if ($value !~ /^[A-Z0-9\-\ ]+$/) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } return; } # # rm - remarks # if ($key eq "rm") { if ($value !~ /^.*$/) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } return; } # # rp - rout-pr # if ($key eq "rp") { if ($value !~ /^[A-Z0-9\-]+$/) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } return; } # # rt - route # # A little messy - all the work is done in net2net.pl # if ($key eq "rt") { local($i) = 0; local($NETMASK) = "[nN]*[eE]*[tT]*[mM][aA][sS][kK]"; local($HEX) = "[0-9a-fA-F]"; local($HEXMASK) = "0x$HEX$HEX$HEX$HEX$HEX$HEX$HEX$HEX"; local($IPADDR) = "\\d+\\.\\d+\\.\\d+\\.\\d+"; if ($value =~ /^$IPADDR$/) { local($stat, $msg, @str) = &clasfn_to_netpre($value); if($stat == $NOK) { return $O_ERROR, "$msg\n"; } else { $object{$key} = $str[0]; return $O_WARNING, "$ATTL{$key} re-written to $str[0] from $value\n"; } } elsif ($value =~ /^$IPADDR\s+\-\s+$IPADDR$/) { local($stat, $msg, @str) = &clasfr_to_netpre($value); if($stat == $NOK) { return $O_ERROR, "$msg\n"; } else { if($#str >= 1) { $msg = "$value is not CIDR aligned\n". "resubmit the following seperate objects\n"; foreach $i (0..$#str) { $msg .= "$str[$i]\n"; } return $O_ERROR, "$msg\n"; } else { $object{$key} = $str[0]; return $O_WARNING, "$ATTL{$key} re-written to $str[0] from $value\n"; } } } elsif ($value =~ /^$IPADDR\s+($NETMASK)*\s*$IPADDR$/ || $value =~/^$IPADDR\s+($NETMASK)*\s*$HEXMASK$/) { local($stat, $msg, @str) = &netmask_to_netpre($value); if($stat == $NOK) { return $O_ERROR, "$msg\n"; } else { $object{$key} = $str[0]; return $O_WARNING, "$ATTL{$key} \"$value\" re-written to $str[0] from $value\n"; } } else { local($stat, $msg, @str) = &netpre_verify($value); if($stat == $NOK) { return $O_ERROR, "$msg\n"; } } return; } # # Need to really check against the DNS eventually # # rz - rev-srv # if ($key eq "rz") { @list = (); @list = split(/\s+/,$value); $j = 0; foreach $j (0..$#list) { if (!&isdomname($list[$j])) { return $O_ERROR, "illegal nameserver in $value"; } } return; } # # sd - sub-dom # if ($key eq "sd") { foreach (split(/\s+/, $value)) { if (!&issubdomname($_)) { return $O_ERROR, "syntax error in \"$ATTL{$key}\": $_"; } } return; } # # so - source # if ($key eq "so") { if (!$DBFILE{$value}) { return $O_ERROR, "unknown source \"$value\""; } if (!$CANUPD{$value}) { return $O_ERROR, "cannot update entry with source \"$value\""; } return; } # # st - status # if ($key eq "st") { if ($value =~ /^d$|^[Dd][Ee][Ll][Ee][Gg][Aa][Tt][Ee][Dd]$/) { $object{$key} = "D"; return $O_WARNING, "\"$ATTL{$key}\" changed to \"D\""; } if ($value =~ /^r$|^[Rr][Ee][Ss][Ee][Rr][Vv][Ee][Dd]$/) { $object{$key} = "R"; return $O_WARNING, "\"$ATTL{$key}\" changed to \"R\""; } if ($value =~ /^[Aa]$|^[Aa][Ss][Ss][Ii][Gg][Nn][Ee][Dd]$/) { $object{$key} = ""; return $O_WARNING, "\"$ATTL{$key}\" has default value; removed"; } if ($value =~ /^D$|^R$/) { return 1; } return $O_WARNING, "\"$ATTL{$key}\" has an illegal value"; } # # tc - tech-c # if ($key eq "tc") { if (!&isname($value)) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } return; } # # tr - as-transit # if ($key eq "tr") { return; } # # wd - withdrawn # if ($key eq "wd") { if($value !~ /^(\d\d)(\d\d)(\d\d)$/) { return $O_ERROR, "date part of \"$ATTL{$key}\" not in YYMMDD format"; } # 1988 is the start of the world. This is where we test for proper # date values of YYMMDD if (($1 < 88) || ($2 > 12) || ($3 > 31)) { return $O_ERROR, "date part of \"$ATTL{$key}\" is not a valid YYMMDD value"; } local($s, $m, $h, $md, $mo, $y) = localtime(time); $mo += 1; $md = "0".$md unless $md > 9; $mo = "0".$mo unless $mo > 9; $y = "0".$y unless $y > 9; local($curdate) = "$y$mo$md"; if ($value gt $curdate) { return $O_ERORR, "date in \"$ATTL{$key}\" ($date) is in the future"; } return; } # # zc - zone-c # if ($key eq "zc") { if (!&isname($value)) { return $O_ERROR, "syntax error in \"$ATTL{$key}\""; } return; } # # These are not checked and not used, just in here for clarity # # # ue - *ERROR* # if ($key eq "ue") { return; } # # uf - u-from (NOT USED) # if ($key eq "uf") { return; } # # ui - msg-id (NOT USED) # if ($key eq "ui") { return; } # # uw - WARNING # if ($key eq "uw") { return; } } 1; -------- Logged at Sat Jan 21 02:16:49 MET 1995 --------- From eric at enfm.utcc.utoronto.ca Sat Jan 21 02:16:25 1995 From: eric at enfm.utcc.utoronto.ca (Eric M. Carroll) Date: Fri, 20 Jan 1995 20:16:25 -0500 Subject: success with tools Message-ID: <95Jan20.201640est.606534@enfm.utcc.utoronto.ca> Dale suggested this list would be interested in a progress report on CA*net's use of the RA code. We have been successful in doing a complete configuration run for CA*net using peval, the radbserver and a ripe-181 database. This has permitted us to decommission the old build system we had in place that dated back to when CA*net used gated (it has ciscos now). We had some surgery to perform on the code in question, because of the gated specific nature of it. As a general, possibly quite obvious comment, I would like to suggest that peval and friends produce a attributed list instead of a list of values and attributes. gated uses the latter, but cisco uses the former. Its trivial to distribute, less easy to invert, especially if you cannot assume that things are all grouped. I would also like to suggest that the tools be a bit more oriented around a policy stage with a router-independent notation and a configuration build stage. We mostly just focused on getting what was available up right now. But I have alot I want to automate with cisco generation, and I have an interest in looking at this package for other types of routers that look nothing like gated at all, and would need to drive, say, expect scripts. Anyone remember Proteons? :-) Our next efforts will be to introduce real localpref configuration by AS or route into our process. Also, we are looking into what it will take to validate BGP path components with this package. Eric Carroll University of Toronto Network & Operations Services Supervisor, External Networking Facilities Management CA*net Network Engineering -------- Logged at Mon Jan 23 20:11:14 MET 1995 --------- From cengiz at ISI.EDU Mon Jan 23 20:10:55 1995 From: cengiz at ISI.EDU (Cengiz Alaettinoglu) Date: Mon, 23 Jan 1995 11:10:55 -0800 Subject: success with tools In-Reply-To: <95Jan20.201640est.606534@enfm.utcc.utoronto.ca> References: <95Jan20.201640est.606534@enfm.utcc.utoronto.ca> Message-ID: <199501231910.AA01120@cat.isi.edu> Great news and thank you very much for the feedback. I am currently restructuring peval to make it more general and less gated specific. Eric M. Carroll (eric at enfm.utcc.utoronto.ca) on January 20: > Dale suggested this list would be interested in a progress report on > CA*net's use of the RA code. We have been successful in doing a > complete configuration run for CA*net using peval, the radbserver and > a ripe-181 database. This has permitted us to decommission the old > build system we had in place that dated back to when CA*net used gated > (it has ciscos now). > > We had some surgery to perform on the code in question, because of the > gated specific nature of it. As a general, possibly quite obvious > comment, I would like to suggest that peval and friends produce a > attributed list instead of a list of values and attributes. gated uses > the latter, but cisco uses the former. Its trivial to distribute, less > easy to invert, especially if you cannot assume that things are all > grouped. I would also like to suggest that the tools be a bit more > oriented around a policy stage with a router-independent notation and > a configuration build stage. > > We mostly just focused on getting what was available up right now. But > I have alot I want to automate with cisco generation, and I have an > interest in looking at this package for other types of routers that > look nothing like gated at all, and would need to drive, say, expect > scripts. Anyone remember Proteons? :-) > > Our next efforts will be to introduce real localpref configuration by > AS or route into our process. Also, we are looking into what it will > take to validate BGP path components with this package. > > Eric Carroll University of Toronto Network & Operations Services > Supervisor, External Networking Facilities Management > CA*net Network Engineering Cengiz -- Cengiz Alaettinoglu Information Sciences Institute Voice: (310) 822-1511 University of Southern California -------- Logged at Tue Jan 24 13:14:51 MET 1995 --------- From Marten.Terpstra at ripe.net Tue Jan 24 13:12:03 1995 From: Marten.Terpstra at ripe.net (Marten Terpstra) Date: Tue, 24 Jan 1995 13:12:03 +0100 Subject: success with tools In-Reply-To: Your message of Fri, 20 Jan 1995 20:16:25 EST. <95Jan20.201640est.606534@enfm.utcc.utoronto.ca> Message-ID: <9501241212.AA03222@ncc.ripe.net> * I have alot I want to automate with cisco generation, and I have an * interest in looking at this package for other types of routers that * look nothing like gated at all, and would need to drive, say, expect * scripts. Anyone remember Proteons? :-) Or would need to drive SNMP... -Marten -------- Logged at Thu Jan 26 02:11:44 MET 1995 --------- From eric at enfm.utcc.utoronto.ca Thu Jan 26 02:11:22 1995 From: eric at enfm.utcc.utoronto.ca (Eric M. Carroll) Date: Wed, 25 Jan 1995 20:11:22 -0500 Subject: astrace? Message-ID: <95Jan25.201133est.606466@enfm.utcc.utoronto.ca> astrace uses alc. Is there a radbserver version? Eric Carroll University of Toronto Network & Operations Services External Networking Facilities Management -------- Logged at Thu Jan 26 15:06:07 MET 1995 --------- From dsj at merit.edu Thu Jan 26 15:05:55 1995 From: dsj at merit.edu (Dale S. Johnson) Date: Thu, 26 Jan 1995 09:05:55 -0500 Subject: astrace? Message-ID: <199501261405.JAA05489@home.merit.edu> Eric, /f/rrdb/users/ftp/pub/pride/prtraceroute-2.0beta.shar.gz (Or if there is a newer version on ripe.net, let me know). As you note, astrace is obsolete now that prtraceroute has been ported for RIPE-181. > astrace uses alc. Is there a radbserver version? > > Eric Carroll University of Toronto Network & Operations Services > External Networking Facilities Management > -------- Logged at Thu Jan 26 16:00:51 MET 1995 --------- From Tony.Bates at mci.net Thu Jan 26 15:59:56 1995 From: Tony.Bates at mci.net (Tony Bates) Date: Thu, 26 Jan 1995 09:59:56 -0500 Subject: astrace? In-Reply-To: Your message of Thu, 26 Jan 1995 09:05:55 EST. <199501261405.JAA05489@home.merit.edu> Message-ID: <199501261459.JAA08875@lovefm.reston.mci.net> This is the latest as far as I can know. Here it is in action... Yes we finally have US traceroutes....;-) /prtraceroute -lv ftp.merit.edu (y|n|e)? yes traceroute with AS and policy additions [Jan 26 14:59:26 UTC] from AS3561 ns.mci.net (204.70.128.1) to AS237 ftp.merit.edu (35.1.1.48) 1 AS3561 other1.res.mci.net 204.70.128.2 [I] 2 2 3 ms 2 AS3561 border1-serial3/7.Washington.m 204.70.134.2 [I] 4 8 4 ms 3 AS3561 core-fddi-0.Washington.mci.net 204.70.2.1 [I] 4 4 5 ms 4 AS3561 core-hssi-3.NewYork.mci.net 204.70.1.6 [I] 9 10 9 ms 5 AS3561 core-hssi-3.Boston.mci.net 204.70.1.2 [I] 190 202 19 ms 6 AS3561 core-hssi-4.Chicago.mci.net 204.70.1.46 [I] 48 32 32 ms 7 AS3561 border2-fddi0/0.Chicago.mci.ne 204.70.3.82 [I] 32 32 34 ms 8 AS3561 cpe2-hssi-2.Chicago.mci.net 204.70.25.10 [I] 39 44 37 ms 9 AS237 fdd0.michnet1.mich.net 192.203.195.4 [E1] 40 38 39 ms 10 AS237 nic.merit.edu 35.1.1.48 [I] 37 38 38 ms AS Path followed: AS3561 AS237 AS3561 = MCI AS237 = MichNet --Tony. "Dale S. Johnson" writes: * Eric, * * /f/rrdb/users/ftp/pub/pride/prtraceroute-2.0beta.shar.gz * * (Or if there is a newer version on ripe.net, let me know). * * As you note, astrace is obsolete now that prtraceroute has been ported * for RIPE-181. * * > astrace uses alc. Is there a radbserver version? * > * > Eric Carroll University of Toronto Network & Operations Services * > External Networking Facilities Management * > -------- Logged at Fri Jan 27 02:04:32 MET 1995 --------- From cengiz at ISI.EDU Fri Jan 27 02:04:05 1995 From: cengiz at ISI.EDU (Cengiz Alaettinoglu) Date: Thu, 26 Jan 1995 17:04:05 -0800 Subject: pride tools for Ripe-181 Message-ID: <199501270104.AA01378@cat.isi.edu> Hi Marten, We hired a graduate student research assistant. I am going to ask him to port pride tools to Ripe-181 unless of course someone else already started working on this. His name is Kumar Munnangi . If he asks questions about this, please do not be surprised. I hope that this is OK with all of rr-impl. Cengiz -- Cengiz Alaettinoglu Information Sciences Institute Voice: (310) 822-1511 University of Southern California -------- Logged at Fri Jan 27 13:53:15 MET 1995 --------- From Marten.Terpstra at ripe.net Fri Jan 27 13:53:12 1995 From: Marten.Terpstra at ripe.net (Marten Terpstra) Date: Fri, 27 Jan 1995 13:53:12 +0100 Subject: pride tools for Ripe-181 In-Reply-To: Your message of Thu, 26 Jan 1995 17:04:05 PST. <199501270104.AA01378@cat.isi.edu> Message-ID: <9501271253.AA01383@ncc.ripe.net> Cengiz, * Hi Marten, * * We hired a graduate student research assistant. I am going to ask him * to port pride tools to Ripe-181 unless of course someone else already * started working on this. * * His name is Kumar Munnangi . If he asks questions * about this, please do not be surprised. I will not be surprised. However, he should send specific PRIDE tools to pride at ripe.net or more generally to rr-impl at ripe.net, because I am leaving the NCC and PRIDE as of next week. In fact today is my last official working day. So please, for timely reponse, do not send mail to me personally. I'll stay on most aliases though.... * I hope that this is OK with all of rr-impl. Fine with me.... -Marten -------- Logged at Fri Jan 27 15:56:45 MET 1995 --------- From dsj at merit.edu Fri Jan 27 15:56:43 1995 From: dsj at merit.edu (Dale S. Johnson) Date: Fri, 27 Jan 1995 09:56:43 -0500 Subject: DISA to run a private 181 Registry Message-ID: <199501271456.JAA27185@home.merit.edu> FYI: DISA is setting up to run a RIPE-181 Registry! Steve seems to say that they will have no data to share; I'll suggest to him that routes that go to the global Internet need to be registered somewhere, or they will have limited connectivity. Should we invite Steve onto rr-impl? --Dale PS: Is anyone besides AS690 planning to implement a rule of: If you aren't registered in the IRR, you won't be routed? ================================================================ > From swinnett at BBN.COM Fri Jan 27 09:31:16 1995 > Date: Fri, 27 Jan 95 9:28:26 EST > From: Steven Winnett > To: "Dale S. Johnson" > cc: swinnett at BBN.COM > Subject: Re: Policy Syntax Question > > >The linkage goes the other direction: Every "route" object has a > >mandatory "origin:" attribute which contains the number of the AS > >that the net belongs to. Hence, to build the list of nets belonging > >to an AS, you would scan the list of route objects looking for those > >that had the AS you were interested in. > > > >Merit has built an "radbserver" which caches this information to > >make it easily available to config generators and similar programs. > > > >It is nice you are learning this. Do you have a specific objective? > > > >--Dale > > > > Dale - Yes indeed. As I assumed (perhaps incorrectly) Jane Wojcik > had explained to you, we are engaged in a project with DISA to set > up their own routing registry database. They have now become > convinced of the need for this. We have proposed to them to make use > of the existing work by yourselves and RIPE and they are agreeable > to this also. Hence I am on this learning effort. In the end I hope > they will have a fairly substantial RRDB which will, of course, > work in tandem with those at Merit and RIPE. > > When the case for setting up such a database was presented to them, > they really liked the idea. Needless to say the case for presenting > such an argument was totally founded on the pioneering work that > you and RIPE have done in this area. Hence our desire to not reinvent > wheels here but instead to make use of existing technology and, in > time, make them partners in the RRDB efforts you and RIPE are > pursuing. This information would, of course, be something which they > would have to keep internally and not accessible to the general > public. > > Does this answer your question? If you have others, please ask; I've > bothered you with enough! > > Steve Winnett > BBN > -------- Logged at Mon Jan 30 18:18:31 MET 1995 --------- From dsj at merit.edu Mon Jan 30 18:18:25 1995 From: dsj at merit.edu (Dale S. Johnson) Date: Mon, 30 Jan 1995 12:18:25 -0500 Subject: Another RIPE-181 implementation Message-ID: <199501301718.MAA17857@home.merit.edu> FYI: Here is another person who has been running RIPE-81/181 for a while. (Should he also be part of the IRR? rr-impl? ) --Dale ============================================================================= > From ejk at digex.net Mon Jan 30 11:40:41 1995 > Date: Mon, 30 Jan 1995 11:40:39 -0500 > From: Ed Kern > To: "Dale S. Johnson" > Subject: Re: Mnt-by question > In-Reply-To: Re: Mnt-by question (Dale S. Johnson) > ... > > New maintainer objects need to be processed by humans, and we won't > > have done that for a few minutes yet. (The guy who usually does this > > isn't here, and I have to look up the process). Once that is done, you > > will be able to submit route objects to the RADB. > > this is fine..and I understand how it works...been running my own 81 > then 181 database for about six months and Ive been bitten more times then > i can count ;)...I got lost at the very start with there being TWO > databases.. -------- Logged at Tue Jan 31 00:35:07 MET 1995 --------- From Marten.Terpstra at ripe.net Tue Jan 31 00:35:04 1995 From: Marten.Terpstra at ripe.net (Marten Terpstra) Date: Tue, 31 Jan 1995 00:35:04 +0100 Subject: Another RIPE-181 implementation In-Reply-To: Your message of Mon, 30 Jan 1995 12:18:25 EST. <199501301718.MAA17857@home.merit.edu> Message-ID: <9501302335.AA14267@ncc.ripe.net> * > From: Ed Kern * > To: "Dale S. Johnson" * > Subject: Re: Mnt-by question * > this is fine..and I understand how it works...been running my own 81 * > then 181 database for about six months and Ive been bitten more times then * > i can count ;)...I got lost at the very start with there being TWO * > databases.. Hey! How dare he say these things about our software ;-) ;-) -Marten -------- Logged at Tue Jan 31 15:52:31 MET 1995 --------- From dsj at merit.edu Tue Jan 31 15:52:08 1995 From: dsj at merit.edu (Dale S. Johnson) Date: Tue, 31 Jan 1995 09:52:08 -0500 Subject: Another RIPE-181 implementation Message-ID: <199501311452.JAA10724@home.merit.edu> Marten, > Hey! How dare he say these things about our software ;-) ;-) Well, he was actually confused by Merit having two RIPE databases with names that differed by one character. (Not surprising, I guess). But then he followed with: > DEATH TO THE PRDB Woe! Insult! --Dale :-) Seriously, though, some of us (the RA and RIPE, at least) are going to have to face decisions about when ISPs running 181 software are big enough/ serious enough to be part of the IRR. CANET (and MCI?) can ignore the problem if they don't use full IRR network/route lists in their configs and if they don't offer full IRR prtraceroute data. But what should the criteria be for RIPE or the RA (or others) for accepting Joe's-Bar-and-Grill.net as a source of IRR data when Joe says he's running 181 and would like to be included? (At the very least, we could put him as lowest priority for believing his data.) One possible model: copy the NAP policy: anyone can buy a connection to the NAPs, but you have to convince individual members there that they want to peer with you... (e.g. you have to convince RIPE and the RA and whoever else separately that they want to include your data in their servers). ==================================================== > * > From: Ed Kern > * > To: "Dale S. Johnson" > * > Subject: Re: Mnt-by question > > * > this is fine..and I understand how it works...been running my own 81 > * > then 181 database for about six months and Ive been bitten more times then > * > i can count ;)...I got lost at the very start with there being TWO > * > databases.. > > Hey! How dare he say these things about our software ;-) ;-) > > -Marten > > The only problem at the moment is that you requested a new maintainer > > object for AS2548 a few minutes ago (at the end of your message): > > > > > > mntner: MAINT-AS2548 > > > > descr: Contact List for AS2548 > > > > admin-c: Ed Kern > > > > upd-to: AS2548 at ra.net > > > > auth: MAIL-FROM ejk at nitrous.digex.net > > > > changed: ejk at digex.net 950130 > > > > source: RADB > > > > *ERROR*: maintainer objects cannot be created automatically > > > > *ERROR*: This object has been forwarded to > > > > *ERROR*: for authorisation > > > > New maintainer objects need to be processed by humans, and we won't > > have done that for a few minutes yet. (The guy who usually does this > > isn't here, and I have to look up the process). Once that is done, you > > will be able to submit route objects to the RADB. > > this is fine..and I understand how it works...been running my own 81 > then 181 database for about six months and Ive been bitten more times then > i can count ;)...I got lost at the very start with there being TWO > databases.. > > DEATH TO THE PRDB -------- Logged at Thu Feb 2 23:50:10 MET 1995 ---------