RtConfig in IRRToolset v5.0.0

Nick Hilliard nick at inex.ie
Wed Apr 7 20:41:55 UTC 2010


On 07/04/2010 16:57, Bruce Morgan wrote:
> I’ve been moving over to IRRToolsetv5 this past week and while the
> coding is very much improved, I have noticed some strange behaviour.
> While peval still works fine rtconfig seems to treat the AS-SET AS-4739
> as empty and returns ANY/NOT ANY on the prefixes. Not sure whether it is
> parsing it as a non-existent AS rather than an AS-SET. Change the AS-SET
> to another name, such as AS4739:AS-CUSTOMER and all works fine.

Hi Bruce,

Could you post an example here?  I've just checked with some mangled up 
test objects which use import / export and which refer to as-set: 
AS-4739, and it appears to work ok:

> muffin:/home/nick> cat test.cfg
> as-set:     AS-4739
> members:    AS4739, AS4806, AS4851, AS18346, AS9588, AS10213, AS17498, AS23708, AS24037, AS23645, AS7600, AS24098, AS7553, AS9734, AS9795, AS24130, AS9438, AS24013, AS9661, AS24064, AS24500, AS24238, AS24565, AS37990, AS24339, AS38049, AS24557, AS17737, AS38234, AS24553, AS7551, AS20940, AS9290, AS9650, AS10104, AS17732, AS17920, AS23863, AS24438, AS38242, AS38832, AS45137, AS45208, AS45511, AS45534, AS45665, AS38796, AS40009, AS45448, AS45570, AS7699, AS38570, AS38826, AS45797, AS55302, AS23913, AS38883
>
> aut-num:        AS65432
> import:         from AS4739 192.168.100.39 at 192.168.100.60 accept AS4739
> muffin:/home/nick> echo '@rtconfig import AS65432 192.168.100.60 AS4739 192.168.100.39' | rtconfig -f test.cfg
[...]

I haven't checked this in depth, but the output of this looks roughly 
correct to me.

> Basically I would like similar policy functionality in IPv6 space as
> IPv4 but the current rendition of rtconfig doesn’t want to parse it
> properly and only returns the original /32 prefix eg
>
> from AS65518 at 2001:388:1::83 action community.append(7575:2131);
> accept AS6262^0-64 AND <^PeerAS+$>;

You should probably restrict this expression using "afi ipv6.unicast".

But the output definitely looks wrong.  Simplified test case:

> muffin:/home/nick> cat test-ipv4.cfg
> aut-num:        AS65432
> mp-import:      afi ipv4.unicast from AS2128 at 192.168.100.60 accept AS2128^0-24
> muffin:/home/nick> cat test-ipv6.cfg
> aut-num:        AS65432
> mp-import:      afi ipv6.unicast from AS2128 at 2001::1 accept AS2128^0-64
> muffin:/home/nick> cat test-ipv6-nolength.cfg
> aut-num:        AS65432
> mp-import:      afi ipv6.unicast from AS2128 at 2001::1 accept AS2128
> muffin:/home/nick> echo '@rtconfig import AS65432 192.168.100.60 AS2128 192.168.100.28' | rtconfig -f test-ipv4.cfg -cisco_use_prefix_lists
> muffin:/home/nick> echo '@rtconfig import AS65432 2001::1 AS2128 2001::2' | rtconfig -f test-ipv6.cfg -cisco_use_prefix_lists
> muffin:/home/nick> echo '@rtconfig import AS65432 2001::1 AS2128 2001::2' | rtconfig -f test-ipv6-nolength.cfg -cisco_use_prefix_lists

The last rtconfig should return:

> ipv6 prefix-list ipv6-pl100 permit 2001:7F8:18::/48  le 64

Instead, it returns "ANY/NOT ANY".

Do you know if this was this working on 4.8.5?  I don't have a copy to hand.

Nick



More information about the irrtoolset mailing list