From: Sidalo (sidalo@gmail.com)
Date: Thu Feb 15 2007 - 16:57:58 ART
The reason _54$ was likely used is that it accounts for any possible
scenario of routes originating in AS 54. If at some point you attached
another connection and got a connection to AS 100 who was then connected to
AS 54 the _54$ would match the 100 54 string as well as the single 54
string, whereas the ^54$ would exclude routes transiting AS 100.
In the scenarion either would match what you need, but _54$ would allow for
future matches in the scenario above. Lookout for keywords of always and in
the future or some aspect that you should account for something else instead
of what is current.
The show commands show the same thing in your scenario but would not always
show the same.
On 2/15/07, Curt Gregg (cugregg) <cugregg@cisco.com> wrote:
>
> Hey Sidalo,
>
> I agree with your points. I'm trying to understand why _54$ would be used
> opposed to ^54$ given the following;
>
> R6 has two paths to AS 54 and their directly connected customers 500 and
> 600 thru RA and RB.
>
> I need to prefer RA for routes inside of AS 54 and RB for routes to AS 500
> and 600.
>
> I used an as-path to match ^54$ and set a high LOC-PREF with a route map
> to my neighbor RA and anything not matched by as-path would get a lower
> LOC-PREF.
>
> So basically routes to AS 54 would traverse RA and routes to AS 500 and
> 600 (attached to AS 54) would prefer RB.
>
> I noticed mention of _54$ used instead of ^54$, they both have the same
> results however I think to be specific ^54$ should be used to match anything
> originating inside of AS 54.
>
> sho ip bgp reg _54$ and sho ip bgp ^54$ show the same results.
>
>
> ------------------------------
> *From:* Sidalo [mailto:sidalo@gmail.com]
> *Sent:* Thursday, February 15, 2007 2:16 PM
> *To:* Curt Gregg (cugregg)
> *Cc:* Cisco certification
> *Subject:* Re: Question: BGP REG ^54$ or _54$
>
>
> ^54$ = coming only from AS 54 and passing though no other AS whether
> before or after AS 54
>
> _54$ = anything that started in AS 54 and could have passed through
> additional AS before reaching you.
>
> ^54_ = anything that is coming directly from AS 54 and could have
> originated somewhere before reaching AS 54.
>
> On 2/15/07, Curt Gregg (cugregg) <cugregg@cisco.com > wrote:
> >
> > Question:
> >
> > Wouldn't these two expressions be the same or you trying to match
> > anything originating in AS 54?
> >
> > ip as-path access-list 1 permit ^54$
> > ^ = start of a line
> >
> > or
> >
> > ip as-path access-list 1 permit _54$
> > _ = beginning of the line (or end of the line or a space)
> >
> >
> > Wouldn't _54$ also be considered the end of the path or originating AS
> > as the as-path describes the AS systems it has passed thru beginning
> > with the most recent and ending with the originating AS.
> >
> > In this case AS 54 is the directly connected AS.
> >
> > Are there pros or cons to using either or?
> >
> > TIA
> >
> > Curt
> >
> > _______________________________________________________________________
> > Subscription information may be found at:
> > http://www.groupstudy.com/list/CCIELab.html
This archive was generated by hypermail 2.1.4 : Thu Mar 01 2007 - 07:38:46 ART