cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3179
Views
18
Helpful
16
Replies

A regular expression to find equal length paths (or unequal)

dogfugitive
Level 1
Level 1

Hi all.

Has anyone got a clue as to whether it is possible to construct a regular expression to show only those prefixes who have an equal (or unequal) number of AS hops in their paths. These prefixes are coming from 2 different ISPs so may differ in terms of actual AS path, but that doesn't matter, it's the number of AS traversed I care about.

Thanks in advance, kind regards.

16 Replies 16

My previous regexp was only taking into account ibgp learnt prefixes ("i").

This one will cope with both eBGP and iBGP learnt prefixes:

sh ip bgp quote-regexp "23456" | incl \* [i, ][0-9]+|>

Hope this helps,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

Hi Harold,

THANKS!

That's exactly what I need!

I see I have to learn a lot how to work with the regular expessions...

BR,

Milan