- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 11:18 PM
Hi i have to router A and B
Router A and B have same Asnumber
Router A is uplink Router B
In router A how used regexp ??
used show ip bgp regexp .
only show me ebgp prefixs doonot show my ibgp prefixs origin is router B
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 08:28 AM
Locally originate Vs originate in AS
^$ Vs _ x $
I think this different' I will try both in lab
If I have time
Thanks
MHM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 11:22 PM - edited 01-22-2025 06:37 AM
This link not cover all cases
Thanks
MHM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 06:21 AM
Can I see show ip bgp
MHM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 12:35 AM
Hello @Ramin Malekghasemi
Try this command:
show ip bgp regexp _[0-9]+$
This command will show prefixes where the last AS is an external one (eBGP-learned prefixes).
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 05:38 AM
test this only show me ebgp prefix
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 01:28 AM
Hello
You could also try the below, this should show all prefixes with a populated as-path seq
sh ip bgp regexp .+
Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.
Kind Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 05:39 AM
Test this too show only ebgp prefixes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 06:09 AM
Hi @Ramin Malekghasemi ,
If you only want to see prefixes originated in the local AS, you need to use the following command:
sh ip bgp regexp ^$
Regards,
Harold Ritter, CCIE #4168 (EI, SP)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 09:50 AM
Hell
that what you wanted wasn’t it-these if you want local routes then as stated by @Harold Ritter reg expression ^$ will show local routes
Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.
Kind Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 06:36 AM
Use
_ x $
Where x is the AS of ibgp
MHM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 08:15 AM
Hi @MHM Cisco World ,
Bear in mind that the AS number is not inserted when the update is being sent to an iBGP neighbour, but rather when it is being sent to an eBGP neighbor. The command you are suggesting will therefore not show the prefixes originated by the local AS, unlike ^$ would.
Regards,
Harold Ritter, CCIE #4168 (EI, SP)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 08:28 AM
Locally originate Vs originate in AS
^$ Vs _ x $
I think this different' I will try both in lab
If I have time
Thanks
MHM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 08:38 AM - edited 01-22-2025 08:47 AM
Hi @MHM Cisco World ,
Whether a prefix is locally originated or by another router in the same AS, the local AS number will not show. The local AS number is only added to the AS path when the update is sent to a neighbor in a remote AS.
Regards,
Harold Ritter, CCIE #4168 (EI, SP)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 02:46 PM
