[quagga-users 14805] Re: BGP type 2 length 3294 is too large, attribute total length is 2314.
Matthias Ferdinand <mf-5+/[email protected]> Wed, 13 Sep 2017 17:35:36 +0200
| Newsgroups | gmane.network.quagga.user |
|---|---|
| Message-ID | <20170913153536.GP28721@xoff> |
On Sat, Sep 09, 2017 at 07:30:39AM +0200, Andreas Jaggi wrote:
> Hi Matthias
>
> We are using the following approach: ip as-path access-list limit-to-100 deny ^([0-9]+ ){99,}[0-9]+$
thanks! apparently I forgot the '+' sign after the digits when testing
the {} construct, and there are only so many single-digit ASes or long
AS paths made of single-digit ASes :-)
I used '_' (underscore) instead of ' ' (space). Underscore also matches
'{', ',' and '}' (confederation syntax?) and beginning and end of
string. But still my regex failed to match anything using '{' in the AS
path. Matching that would require '_+' as separator and a comma in the
character set.
E.g. 217.199.156.0/22 ends in 16637 9129 {64237,64512,65008,65011,65400}
I think your regex also misses that.
I now use this format:
ip as-path access-list maxas-limit75 deny ^([{},0-9]+ ){75}
This counts {a,b,c} path elements as a single entry, and the blank
requires that there is still something more following the list of 75
ASes.
Regards
Matthias
>
> Cheers
> Andreas
>
>
> On Fri, Sep 08, 2017 at 04:52:47PM +0200, Matthias Ferdinand wrote:
> > Hi,
> >
> > Cisco IOS seems to have a nice configuration setting
> >
> > bgp maxas-path <num>
> >
> > https://www.cisco.com/c/en/us/td/docs/ios/12_2/iproute/command/reference/fiprrp_r/1rfbgp1.html#wp1254976
> >
> > which apparently quagga does not have.
> >
> > So I set up an as-path access-list like so:
> >
> > ip as-path access-list maxas-limit75 deny _[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+
> > ip as-path access-list maxas-limit75 permit .
> >
> > which seems to work, but is not nice to read. I tried to use counting
> > regexes with braces ([0-9]{0,75}) without success. Is there a more
> > elegant way to do it than above?
> >
> > Regards
> > Matthias Ferdinand
>
> --
> andreas jaggi
> lead engineer network services
>
> open systems ag
> raeffelstrasse 29
> ch-8045 zurich
> t: +41 58 100 10 10
> f: +41 58 100 10 11
> [email protected]
>
> http://www.open.ch