Loop in AS macro
- Previous message (by thread): Loop in AS macro
- Next message (by thread): Loop in AS macro
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Lu, Ping
plu at cw.net
Thu Jan 18 17:10:54 CET 2001
Hi, Shane, Thank for the tip. It works. Ping Lu Cable & Wireless USA Network Tools and Analysis Group W: +1-703-292-2359 E: plu at cw.net > -----Original Message----- > From: Shane Kerr [mailto:shane at ripe.net] > Sent: Thursday, January 11, 2001 4:46 AM > To: Lu, Ping > Cc: 'cengiz at packetdesign.com'; Wilfried Woeber, UniVie/ACOnet; > farrache at cc.in2p3.fr; db-wg at ripe.net; routing-wg at ripe.net; > Henk.Uijterwaal at ripe.net > Subject: RE: Loop in AS macro > > > Ping, > > What I usually do (in Perl) is something like this: > > my %entries_seen; > foreach my $as_set (@as_sets) { > # if we've seen this value (recursive as-set), skip > next if ($entries_seen{$as_set}); > > # note that we've seen this as-set > $entries_seen{$as_set}++; > > # get a list of members of the as-set, and process appropriately > foreach my $member (members($as_set)) { > # add member as-sets to the list of as-sets to process > push(@as_sets, $member) if ($member =~ /^AS-/i); > > # other processing here > . > . > . > } > } > > If you're using some other scripting language, it will be > different, but > typically no more difficult. If you're in C, you may want to > use glib or > something like that, otherwise you'll need to use a list or > hash you write > yourself. > > Shane Kerr <shane at ripe.net> > Database Software Engineer > RIPE NCC > +31 20 535 4427 > > On Wed, 10 Jan 2001, Lu, Ping wrote: > > > Hi, I am new to this list and would like to ask a (maybe > stupid) question to > > the dicussion: > > > > If we want to write a script to expand the AS MACRO, how > can we avoid to go > > into a loop if multiple AS-MACROs reference each other ? > > > > Ping Lu > > Cable & Wireless USA > > Network Tools and Analysis Group > > W: 703-292-2359 > > E: plu at cw.net > > > > > -----Original Message----- > > > From: Cengiz Alaettinoglu [mailto:cengiz at packetdesign.com] > > > Sent: Wednesday, January 10, 2001 12:14 PM > > > To: Shane Kerr > > > Cc: Wilfried Woeber, UniVie/ACOnet; farrache at cc.in2p3.fr; > > > db-wg at ripe.net; routing-wg at ripe.net; Henk.Uijterwaal at ripe.net > > > Subject: RE: Loop in AS macro > > > > > > > > > > > > Shane Kerr (shane at ripe.net) on January 10: > > > > Gilles, Wilfried, and all, > > > > > > > > This is not a bug, or even an inconsistency. Consider > the following > > > > as-macro objects: > > > > > > > > as-macro: AS-X > > > > members: AS-Y, AS123 > > > > > > > > as-macro: AS-Y > > > > members: AS-X, AS456, AS789 > > > > > > > > In this case, AS-X and AS-Y both expand to the same > aut-num objects: > > > > AS123, AS456, and AS789. However, they may have different > > > maintainers, > > > > contacts, descriptions, and so on. In RPSL, many more > > > kinds of loops are > > > > possible as well, in as-set, route-set, and filter-set objects. > > > > > > RPSL defines semantics when loops exist. However, it does > not promote > > > them, or prohibit additional restrictions by the registry > operators > > > not to have loops. > > > > > > > > > > > External software that deals with the set objects needs > to do loop > > > > detection in order to prevent infinite loops. For as-set > > > objects (which > > > > are as-macro objects in RIPE-181), this is fairly easy: > > > keep a list or > > > > hash of the AS sets expanded, and don't expand them again. > > > For route-set > > > > and filter-set objects it is not quite so easy. If you > > > need help with > > > > these, you can send me and e-mail and I can explain the > > > techniques that > > > > I've used for these objects. > > > > > > > > Shane Kerr <shane at ripe.net> > > > > Database Software Engineer > > > > RIPE NCC > > > > +31 20 535 4427 > > > > > > > > p.s. This is actually a feature, not an bug. :) > > > > > > > > p.p.s. It has been argued (by me) that RPSL allows > objects that are > > > > logically impossible, but the RFC authors don't seem to > think so! > > > > > > > > On Wed, 10 Jan 2001, Wilfried Woeber, UniVie/ACOnet wrote: > > > > > > > > > Hi Gilles, > > > > > > > > > > I guess we wouldn't be able to check against those > > > accidents at the time > > > > > of a DB _update_... > > > > > > > > > > But checking the RR internal _data_ consistency could > > > maybe become part > > > > > of the RIS (or similar) project? > > > > > > > > > > Henk, any comments? > > > > > > > > > > An interesting aside: I guess similar problems > could occur with > > > > > RPSL-based RRs? > > > > > > > > > > -WW > > > > > > > > _________________________________:____________________________ > > > _________ > > > > > Wilfried Woeber : e-mail: > Woeber at CC.UniVie.ac.at > > > > > UniVie Computer Center - ACOnet : Tel: +43 1 4277 - 140 33 > > > > > Universitaetsstrasse 7 : Fax: +43 1 4277 - 9 140 > > > > > A-1010 Vienna, Austria, Europe : RIPE-DB: WW144, PGP > > > keyID 0xF0ACB369 > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > ~~~~~~~~~ > > > > > > > > > > To: staff at ip.tele.dk, peering at tli.de, ip-oper at tli.de, > > > admin-c at tli.de > > > > > CC: farrache at cc.in2p3.fr, db-wg at ripe.net, routing-wg at ripe.net > > > > > Subject: Loop in AS macro > > > > > Date: Wed, 10 Jan 2001 10:28:15 +0100 > > > > > From: Gilles Farrache <farrache at cc.in2p3.fr> > > > > > > > > > > Dear database managers, > > > > > > > > > > I notice a loop in the followings AS-MACRO, in fact > > > AS-TELEDANMARKINTERNATIONAL > > > > > is calling AS-TLI which is calling AS-TELEDK which is > > > calling AS-TELEDANMARKINTERNATIONAL. > > > > > (and all that make that our automatic filter generation > > > tool fails) > > > > > > > > > > Could you correct those macro and will the Ripe database > > > management provide any > > > > > control on that kind of loop ? > > > > > > > > > > Gilles > > > > > > > > > > as-macro: AS-TELEDANMARKINTERNATIONAL > > > > > descr: Tele Danmark customers outside Denmark > > > > > as-list: AS1902 AS12461 > > > > > as-list: AS8881 AS-KOMTEL > > > > > as-list: AS13194 AS-BITE > > > > > as-list: AS6709 > > > > > as-list: AS8650 AS-TLI > > > > > as-list: AS8542 > > > > > as-list: AS12294 AS-TSUA AS6807 AS8349 AS12788 > > > AS12837 AS12872 AS13249 AS15386 AS15497 AS15929 AS16007 > > > > > as-list: AS12546 > > > > > as-list: AS15389 > > > > > tech-c: AS5071-RIPE > > > > > admin-c: AS5071-RIPE > > > > > notify: staff at ip.tele.dk > > > > > notify: peering at tli.de > > > > > mnt-by: AS3292-MNT > > > > > changed: jesper at skriver.dk 20001103 > > > > > changed: toba at tdk.dk 20001117 > > > > > changed: tee at tdk.dk 20001123 > > > > > changed: jesper at skriver.dk 20001228 > > > > > changed: jesper at skriver.dk 20010109 > > > > > source: RIPE > > > > > > > > > > as-macro: AS-TLI > > > > > descr: Talkline GmbH, Internet Division > > > > > descr: List of ASes according to Talkline > Internet (AS8650) > > > > > descr: and customers > > > > > as-list: AS5605 > > > > > as-list: AS6783 > > > > > as-list: AS8650 > > > > > as-list: AS8881 > > > > > as-list: AS12461 > > > > > as-list: AS12546 > > > > > as-list: AS-TELEDK > > > > > as-list: AS-GLOBAL > > > > > tech-c: TLIP1-RIPE > > > > > admin-c: TLIP1-RIPE > > > > > notify: peering at tli.de > > > > > mnt-by: TALKLINE-MNT > > > > > changed: thomas at tli.de 19990923 > > > > > changed: thomas at tli.de 19991020 > > > > > changed: thomas at tli.de 19991025 > > > > > changed: thomas at tli.de 20001023 > > > > > changed: thomas at tli.de 20001025 > > > > > source: RIPE > > > > > > > > > > as-macro: AS-TELEDK > > > > > descr: Tele Danmark and Tele Danmark customers > > > > > as-list: AS-TELEDANMARKDANISH > > > > > as-list: AS-TELEDANMARKINTERNATIONAL > > > > > as-list: AS-BELBONEMEMBERS > > > > > as-list: AS-GLOBAL > > > > > tech-c: AS5071-RIPE > > > > > admin-c: AS5071-RIPE > > > > > notify: staff at ip.tele.dk > > > > > notify: peering at tli.de > > > > > mnt-by: AS3292-MNT > > > > > changed: jesper at skriver.dk 19990922 > > > > > changed: jesper at skriver.dk 19991019 > > > > > changed: jesper at skriver.dk 19991025 > > > > > changed: jesper at skriver.dk 19991210 > > > > > changed: toba at tdk.dk 20000903 > > > > > source: RIPE > > > > > > > > -------------------------------------------------------------- > > > ------------------ > > > > > > > > > > > > > > > > > > > > > > Cengiz > > > > > > -- > > > Cengiz Alaettinoglu Packet Design Inc. > > > > > > > > >
- Previous message (by thread): Loop in AS macro
- Next message (by thread): Loop in AS macro
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[ db-wg Archives ]