03-23-2004 03:43 PM - edited 03-02-2019 02:30 PM
I have DistributedDirectors that use the AS hop count as a metric for deciding which ip address to give out for a dns query. I have entered the following commands in an attempt to pad the AS entries for a particular AS, but it appears to be ignored. Is there a way to pad the AS entries in the bgp table?
router bgp 22745
neighbor 216.140.243.231 route-map set-inbound-as-path in
ip as-path access-list 20 permit ^3147$
ip as-path access-list 21 permit .*
route-map set-inbound-as-path permit 10
match as-path 20
set as-path prepend 6395 6395
!
route-map set-inbound-as-path permit 20
match as-path 21
IOS (tm) 3600 Software (C3660-I-M), Version 12.3(1a), RELEASE SOFTWARE (fc1)
Thanks.
Solved! Go to Solution.
03-23-2004 05:58 PM
When prepending inbound, you should only prepend the neighbor's ASN. Is 6395 the ASN for peer 216.140.243.231? Also the Match in this case will only allow prefixes that have only 3147 in the ASPATH.Is that waht you want?
Hope this helps,
03-24-2004 10:19 AM
The ACL you have will only match it if the entire AS path is "3147", nothing else. If you want to prepend only when the destination is 3147, I believe it would be
ip as-path access-list 20 permit _3147$
If you want to prepend when it transits 3147, it would be
ip as-path access-list 20 permit _3147_
Putting it on as if it originated in 3147 (ie: ^3147) doesn't make sense when 6395 is the neighbor. If you want to do it when its one hop out from 6395, it would be:
ip as-path access-list 20 permit ^6395_3147_
There is a good article here:
http://www.cisco.com/en/US/customer/tech/tk365/tk80/technologies_tech_note09186a0080094a92.shtml
03-24-2004 02:02 PM
You can match on their address space using a prefix-list instead of matching on the AS_PATH as follow:
!
ip prefix-list CustPrefix permit x.y.z.0/24
!
route-map set-inbound-as-path permit 10
match ip address prefix-list CustPrefix
set as-path prepend 6395 6395
!
route-map set-inbound-as-path permit 20
Hope this helps,
03-23-2004 05:58 PM
When prepending inbound, you should only prepend the neighbor's ASN. Is 6395 the ASN for peer 216.140.243.231? Also the Match in this case will only allow prefixes that have only 3147 in the ASPATH.Is that waht you want?
Hope this helps,
03-24-2004 09:56 AM
Yes, the AS 6395 is the neighbor AS and I am trying to match only AS 3147 to do a pad.
03-24-2004 10:19 AM
The ACL you have will only match it if the entire AS path is "3147", nothing else. If you want to prepend only when the destination is 3147, I believe it would be
ip as-path access-list 20 permit _3147$
If you want to prepend when it transits 3147, it would be
ip as-path access-list 20 permit _3147_
Putting it on as if it originated in 3147 (ie: ^3147) doesn't make sense when 6395 is the neighbor. If you want to do it when its one hop out from 6395, it would be:
ip as-path access-list 20 permit ^6395_3147_
There is a good article here:
http://www.cisco.com/en/US/customer/tech/tk365/tk80/technologies_tech_note09186a0080094a92.shtml
03-24-2004 10:58 AM
Thanks for the info Craig. I will try that. I was not aware of the use of the _ in the ACL.
03-24-2004 11:03 AM
If the peer AS is 6395, updates received from that neighbor will not match ^3147$ since 6395 will also be part of the AS_PATH. If you want to match on any AS_PATH containing 3147 then you need to do the following ip as-patch access-list 20 permit _3147_.
Let me know if that is what you are trying to achieve,
03-24-2004 12:24 PM
I changed my as-path access list to include the full AS path not just the customers AS, and that worked. Thanks Craig and hritter. I obviously did not understand the correct use of the AS parameters after the permit keyword.
Not to get greedy here, but is there a way to inbound pad the AS path for a single route entry that only has one AS entry?
In otherwords, we and our customer have an ISP in common and their address space is in the ISPs AS, so there is only the single AS entry. Can just their address space be padded without affecting other address spaces that are in the ISPs AS?
Thanks again for the helpful hints.
03-24-2004 02:02 PM
You can match on their address space using a prefix-list instead of matching on the AS_PATH as follow:
!
ip prefix-list CustPrefix permit x.y.z.0/24
!
route-map set-inbound-as-path permit 10
match ip address prefix-list CustPrefix
set as-path prepend 6395 6395
!
route-map set-inbound-as-path permit 20
Hope this helps,
03-24-2004 02:23 PM
That did the trick. Thank you for your help, I will go back and read the documentation again so I get a better feel for this type of manipulation.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide