From phudec at postel.sk Sun May 16 12:03:08 2004 From: phudec at postel.sk (Peter Hudec) Date: Sun, 16 May 2004 12:03:08 +0200 Subject: [irrtoolset]RtConfig template error in import/export Group Message-ID: <40A73C5C.6020405@postel.sk> hi at first - I'm newbie with IRRToolsSet, so be patient with me :) I have problem with RtConfig and generating cisco configs witch importGroup and exportGroup (Error in template file). My setup is folloving - object perring-set: AS8679:PRNG-SIX - @RtConfig exportGroup AS8679 AS8679:PRNG-SIX It "crashes" on the ":" in the AS8679:PRNG-SIX (as I found in the source code and debuging) As the RtConfig generates cisco config it should write something like neighbor AS8679:PRNG-SIX peer-group - I don't think that this is also valid Has anyone solution (patch) to do - keep perring-set-name as it is - make RtConfig parse the line (with no template error) - generate valid cisco config I'm using IRRToolSet-4.7.3 (latest non-ng version).The latest ng version (IRRToolSet-4.8.1) has seqfault me (stable debian) My solution is to write patch (if doesn't exists) - add one more (optional) parameter to the importGroup/exportGroup line - @RtConfig exportGroup [config-peer-name] - this will generate config line - neighbor peer-group best regards Peter Hudec -- Hlupi robia chyby z pracovitosti. Mudri, aby si oddychli. position: [IP network manager] company: [PosTel Ltd.] address: [Borska 6, 841 04 Bratislava] mail: [phudec at postel.sk] www: [http://www.postel.sk/] cellular: [+421 905 997203] fax: [+421 2 50203198] phone: [+421 2 50203169] From katie at ripe.net Mon May 17 14:54:07 2004 From: katie at ripe.net (Katie Petrusha) Date: Mon, 17 May 2004 14:54:07 +0200 Subject: [irrtoolset]RtConfig template error in import/export Group In-Reply-To: <40A73C5C.6020405@postel.sk> References: <40A73C5C.6020405@postel.sk> Message-ID: <20040517125406.GA19772@ripe.net> On Sun, May 16, 2004 at 12:03:08PM +0200, Peter Hudec wrote: Dear Peter, Thanks for reporting this. Sorry, there's a bug in RtConfig command line parser (it refuses hierarchical names, here's a patch for it: diff -r4.9 src/RtConfig/command.l 219c219 < [A-Za-z_0-9-]+ { --- > [:A-Za-z_0-9-]+ { However I'm not sure what you mean by 'neighbor AS8679:PRNG-SIX peer-group - I don't think that this is also valid' Do you mean that your peer group name should be kept to "PRNG-SIX" in the config? However, the full RPSL name is AS8679:PRNG-SIX, do you mean you'd like a part of the name to be cut out in the config? Won't it create confusion when having names like: AS1:PRNG-SIX AS2:PRNG-SIX ... Also, what about other peering-set names inside this peering-set? Please also let me know if there are any problems with the patch. P.S. Later I'll have a look why it segfaults in 4.8.1. -- Katie Petrusha RIPE NCC > hi > > at first - I'm newbie with IRRToolsSet, so be patient with me :) > > I have problem with RtConfig and generating cisco configs witch importGroup > and exportGroup (Error in template file). > > My setup is folloving > - object perring-set: AS8679:PRNG-SIX > - @RtConfig exportGroup AS8679 AS8679:PRNG-SIX > > It "crashes" on the ":" in the AS8679:PRNG-SIX > (as I found in the source code and debuging) > > As the RtConfig generates cisco config it should write something like > neighbor AS8679:PRNG-SIX peer-group > - I don't think that this is also valid > > Has anyone solution (patch) to do > - keep perring-set-name as it is > - make RtConfig parse the line (with no template error) > - generate valid cisco config > > I'm using IRRToolSet-4.7.3 (latest non-ng version).The latest ng version > (IRRToolSet-4.8.1) has seqfault me (stable debian) > > My solution is to write patch (if doesn't exists) > - add one more (optional) parameter to the importGroup/exportGroup line > - @RtConfig exportGroup [config-peer-name] > - this will generate config line > - neighbor peer-group > > > best regards > > Peter Hudec > > -- > Hlupi robia chyby z pracovitosti. Mudri, aby si oddychli. > > position: [IP network manager] > company: [PosTel Ltd.] > address: [Borska 6, 841 04 Bratislava] > > mail: [phudec at postel.sk] www: [http://www.postel.sk/] > cellular: [+421 905 997203] fax: [+421 2 50203198] > phone: [+421 2 50203169] From phudec at postel.sk Mon May 17 15:53:07 2004 From: phudec at postel.sk (Peter Hudec) Date: Mon, 17 May 2004 15:53:07 +0200 Subject: [irrtoolset]RtConfig template error in import/export Group In-Reply-To: <20040517125406.GA19772@ripe.net> References: <40A73C5C.6020405@postel.sk> <20040517125406.GA19772@ripe.net> Message-ID: <40A8C3C3.2010407@postel.sk> Katie Petrusha wrote: > On Sun, May 16, 2004 at 12:03:08PM +0200, Peter Hudec wrote: > > Dear Peter, > > Thanks for reporting this. > > Sorry, there's a bug in RtConfig command line parser (it refuses hierarchical names, > here's a patch for it: > > diff -r4.9 src/RtConfig/command.l > 219c219 > < [A-Za-z_0-9-]+ { > --- > >>[:A-Za-z_0-9-]+ { I have done this patch for myself too. And the patch is working good. (answer to the question if the patch is working) > However I'm not sure what you mean by > 'neighbor AS8679:PRNG-SIX peer-group > - I don't think that this is also valid' > > Do you mean that your peer group name should be kept to "PRNG-SIX" in the config? > However, the full RPSL name is AS8679:PRNG-SIX, do you mean you'd like a part of the name to be cut out in the config? Won't it create confusion when having names like: > > AS1:PRNG-SIX > AS2:PRNG-SIX > ... You have misunderstood me. If your peering-set name is AS8679:PRNG-SIX then the output is like .. -- CUT -- router bgp 8679 neighbor AS8679:PRNG-SIX peer-group neighbor AS8679:PRNG-SIX route-map AS8679-IMPORT-SIX in neighbor 192.108.148.10 remote-as AS2607 neighbor 192.108.148.10 peer-group AS8679:PRNG-SIX neighbor 192.108.148.15 remote-as AS12508 neighbor 192.108.148.15 peer-group AS8679:PRNG-SIX . . . -- CUT -- I want to replace the string AS8679:PRNG-SIX with someting else (I'm not sure if the cisco will accept hierarical names) The solution can by to add one optional parameter to the RtConfig importGroup/exportGroup line (name of the peering group) @RtConfig exportGroup [config-peering-name] Instead of patchig RtConfig for this, I used sed to replace AS8679:PRNG-SIX to [config-peering-name] and it works also vell. It would be nice to implement this feature in the future, but I can live without it too. > Also, what about other peering-set names inside this peering-set? This could be problem with my soulution :(. > P.S. Later I'll have a look why it segfaults in 4.8.1. I have tried the precompiled binaries and also compiled one by myself. I'm not familiar so good with the code to repair it :(, so I will let it to the developers. best regards Peter Hudec -- An expert is anyone from out of town. position: [IP network manager] company: [PosTel Ltd.] address: [Borska 6, 841 04 Bratislava] mail: [phudec at postel.sk] www: [http://www.postel.sk/] cellular: [+421 905 997203] fax: [+421 2 50203198] phone: [+421 2 50203169] From pavel.halfar at ha-vel.cz Thu May 20 14:46:25 2004 From: pavel.halfar at ha-vel.cz (Pavel Halfar) Date: Thu, 20 May 2004 14:46:25 +0200 Subject: [irrtoolset]problem with RtConfig generating remote-as Message-ID: <40ACA8A1.3030100@ha-vel.cz> Hello, I am quite new to IRRTOOLS set, so my question might be covered somewhere else (but I haven't found answer anywhere) I have problem with RtConfig, which generates wrong line, here is setup : Local AS is AS15935 configured on router 194.50.100.45. I want to get import lines for neighbour 194.50.100.1 which is in AS25192 template file : @RtConfig set cisco_max_preference = 1000 @RtConfig set cisco_map_name = "AS%d-IMPORT-%d" @RtConfig import AS15935 194.50.100.45 AS25192 194.50.100.1 command line : RtConfig -h whois.ripe.net -p 43 -s RIPE -protocol ripe -cisco_use_prefix_lists < template_file what I get as result is : ! no ip prefix-list pl100 ip prefix-list pl100 permit 217.31.192.0/20 ip prefix-list pl100 deny 0.0.0.0/0 le 32 ! no route-map AS25192-IMPORT-1 ! route-map AS25192-IMPORT-1 permit 1 match ip address prefix-list pl100 set local-preference 500 exit ! router bgp 15935 ! neighbor 194.50.100.1 remote-as 15935 neighbor 194.50.100.1 route-map AS25192-IMPORT-1 in ! exit The problem is with line : neighbor 194.50.100.1 remote-as 15935 which I don't mind to be there, but it is wrong, because the remote AS is 25192, not 15935 (which is my local AS) The version of RtConfig I am using is (downloaded binaries from www.ripe.net) : elite at albert:~/ripe/Examples$ RtConfig -v RtConfig (IRRToolSet v4.8.1) katie at x9 Thank you very much for answer best regards, Pavel -- Ing. Pavel Halfar Reditel spravy site a technicke podpory Senior Manager of Net Administration ha-vel internet s.r.o. ha-vel internet, voice, family, cafe...rEVOLUCE e-mail : pavel.halfar at ha-vel.cz Masarykovo namesti c. 2/2 702 00 Ostrava - Moravska Ostrava GSM brana : +420 606 77 88 78 Tel/Fax : +420 59 62 42 526 Dohledove centrum : +420 606 77 88 82