[irrtoolset]RtConfig template error in import/export Group
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 <ASn> <peering-set-name> [config-peer-name] - this will generate config line - neighbor <config-peer-name> 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@postel.sk] www: [http://www.postel.sk/] cellular: [+421 905 997203] fax: [+421 2 50203198] phone: [+421 2 50203169]
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 < <USEFUL_LINE>[A-Za-z_0-9-]+ { ---
<USEFUL_LINE>[: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 <ASn> <peering-set-name> [config-peer-name] - this will generate config line - neighbor <config-peer-name> 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@postel.sk] www: [http://www.postel.sk/] cellular: [+421 905 997203] fax: [+421 2 50203198] phone: [+421 2 50203169]
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 < <USEFUL_LINE>[A-Za-z_0-9-]+ { ---
<USEFUL_LINE>[: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 <ASN-1> <peering-set-name> [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@postel.sk] www: [http://www.postel.sk/] cellular: [+421 905 997203] fax: [+421 2 50203198] phone: [+421 2 50203169]
participants (2)
-
Katie Petrusha -
Peter Hudec