From: Ruhann (groupstudy@ru.co.za)
Date: Wed Mar 25 2009 - 04:22:27 ART
The two filters do a similar thing but are different:
^100$ - Directly connected to AS 100 (begins and ends in AS 100) 1 ASN
hop.
_100& - Originated in AS 100, but could have passed through other AS's.
You will use the first if you want to match only your directly connect AS'
routes, ie to match routes originated in a connected peering AS,
the only problem with this approach you are not allowing the peer AS to use
prepending of his own AS-number, as you only matching a AS-path length with
1 hop being 100,
so in that regard the following would be the better filer: ^(100)+$
The second filter _100$, also list routes that AS-100 originated, but the
difference is AS-100 could be directly connected or it could be 10 AS hops
away, having passed through several AS's.
This would also allow AS-100 to use prepending. This is not a nice filter
since it does allow quite alot.
Which to use would entirely depends on what you are trying to match of
filter.
imh more strict is always better, but that more real world than exam :)
hth
On Sun, Mar 22, 2009 at 7:40 PM, Cisco Fanatic <ebay_products@hotmail.com>wrote:
> Hi All,
>
> If we have to learn only those prefixes that Originate in some AS ASXX. We
> can
> use ^$ and _XX$. In some workbooks I have seen one or the other being used.
> I
> have tested both and both are working (the way it should). Which one is
> better
> over the other.
>
> For example,
> !
> router bgp XX
> neighbor x.x.x.x filter-list 10 in
> !
> ip as-path access-list 10 deny _ASXX$
> ip as-path access-list 10 permit .*
> !
> *******************************************
> Or/And,
>
> !
>
> router bgp XX
>
> neighbor x.x.x.x filter-list 10 in
>
> !
>
> ip as-path access-list 10 deny ^ASXX$
> !
> *******************************************
>
>
> Yuri
>
> _________________________________________________________________
> Windows Live SkyDrive: Get 25 GB of free online storage.
> http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_skydrive_032009
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
>
>
>
>
>
>
>
-- <ruhann>Blogs and organic groups at http://www.ccie.net
This archive was generated by hypermail 2.1.4 : Mon Apr 06 2009 - 06:44:07 ART