cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
984
Views
0
Helpful
13
Replies

ibgp and regexp

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

1 Accepted Solution

Accepted Solutions

Locally originate Vs originate in AS 

        ^$              Vs         _ x $

I think this different' I will try both in lab 

If I have time 

Thanks 

MHM

View solution in original post

13 Replies 13

 

This link not cover all cases

Thanks 

MHM

Can I see show ip bgp

MHM

M02@rt37
VIP
VIP

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).

 

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

test this only show me ebgp prefix

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

Test this too show only ebgp prefixes

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,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

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

Use 

_ x $ 

Where x is the AS of ibgp

MHM

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,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

Locally originate Vs originate in AS 

        ^$              Vs         _ x $

I think this different' I will try both in lab 

If I have time 

Thanks 

MHM

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,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)