cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
194
Views
3
Helpful
4
Replies

BGP look up AS number for pre-pend and Local prefer and not other AS

MonkeyBear007
Level 1
Level 1

BGP filter only to look up AS number for pre-pend and Local prefer and not other AS

once the router has the bgp table of the internet

I want to filer only see my local AS number of local pre and pre-pend how will i filer but show commands

1 Accepted Solution

Accepted Solutions

M02@rt37
VIP
VIP

Hello @MonkeyBear007 

To filter the BGP table on a router to only see your local AS number for local preference and prepend attributes, you can utilize BGP regular expressions (regex).

Specifically, the `show ip bgp regexp _<your_AS_number>_` command will allow you to display BGP routes where your AS number appears in the AS_PATH attribute. This method leverages the flexibility of regex to precisely target the entries in the BGP table that include your AS number, enabling you to observe the routes affected by your local preference and prepend configurations. The underscores `_` act as delimiters in the regex pattern, ensuring that your AS number is accurately matched within the AS_PATH, irrespective of its position. This focused approach is essential for network administrators who need to monitor and verify the impact of their BGP policies, such as local preference adjustments and AS-path prepending, to ensure optimal routing behavior and policy compliance within their network infrastructure.

By using this command, for instance, `show ip bgp regexp _12345_` if your AS number is 12345, the router will display all BGP routes where your AS number is present in the AS_PATH attribute. This filtered view is particularly useful for network troubleshooting and optimization tasks, as it highlights the specific routes influenced by your local AS policies. The output will include detailed information about each matched route, such as the next hop, metric, local preference, weight, and the complete AS path. This allows you to analyze how your local preference and prepending decisions are shaping the routing landscape, ensuring that your traffic engineering goals are met and that the desired paths are preferred or de-prioritized as intended. Overall, this method provides a clear and concise way to verify and manage the influence of your AS's BGP policies on the broader routing table.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

View solution in original post

4 Replies 4

M02@rt37
VIP
VIP

Hello @MonkeyBear007 

To filter the BGP table on a router to only see your local AS number for local preference and prepend attributes, you can utilize BGP regular expressions (regex).

Specifically, the `show ip bgp regexp _<your_AS_number>_` command will allow you to display BGP routes where your AS number appears in the AS_PATH attribute. This method leverages the flexibility of regex to precisely target the entries in the BGP table that include your AS number, enabling you to observe the routes affected by your local preference and prepend configurations. The underscores `_` act as delimiters in the regex pattern, ensuring that your AS number is accurately matched within the AS_PATH, irrespective of its position. This focused approach is essential for network administrators who need to monitor and verify the impact of their BGP policies, such as local preference adjustments and AS-path prepending, to ensure optimal routing behavior and policy compliance within their network infrastructure.

By using this command, for instance, `show ip bgp regexp _12345_` if your AS number is 12345, the router will display all BGP routes where your AS number is present in the AS_PATH attribute. This filtered view is particularly useful for network troubleshooting and optimization tasks, as it highlights the specific routes influenced by your local AS policies. The output will include detailed information about each matched route, such as the next hop, metric, local preference, weight, and the complete AS path. This allows you to analyze how your local preference and prepending decisions are shaping the routing landscape, ensuring that your traffic engineering goals are met and that the desired paths are preferred or de-prioritized as intended. Overall, this method provides a clear and concise way to verify and manage the influence of your AS's BGP policies on the broader routing table.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

MonkeyBear007
Level 1
Level 1

show ip bgp regexp _100_   with my AS number but nothing shows up

It need some work 

Elaborate more about what you want and I can run lab after 1 hr

MHM

it's fine i just enter mistype in the AS number and thank you
how will Cisco ASR 1k takes to load the BGP table on a 10G ?
since there is default from ISP it will work quick than don't need to wait until it loads the BGP table?

I mostly work in MPLS which is different from Internet BGP
I remember when I work Small ISP (9 year ago) Cisco ASR 9k you had to wait until BGP table was fully load before you use it
not sure what ASR 1k

Review Cisco Networking for a $25 gift card