cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
732
Views
0
Helpful
7
Replies

How to show ip bgp

Hi guys,

Can i show routes filtered by local preference or weight. Example is show ip bgp routes with local preference of 200.

Tnx

7 Replies 7

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Jefferson,

you can filter the sh ip bgp output with a route-map

sh ip bgp route-map loc-pref-200

where the route-map has been defiend as:

route-map loc-pref-200

match local-preference 200

For weight I don't know it is not a match option in a route-map

Hope to help

Giuseppe

Hi,

I mean on the sh ip bgp regexp command when checking routes.

TNx

Hello Jefferson,

as far as I know the regexp will look at the BGP AS path attribute and local-preference and weight are different BGP attributes

see:

#sh ip bgp regexp ?

LINE A regular-expression to match BGP AS paths. Use "ctrl-v ?" to enter "?"

So I think you cannot find loc-pref or weight inside AS path

Hope to help

Giuseppe

hi there,

It's difficult to match exatly your requirement.Still u can filter out by using sh ip bgp | include or exclude or using reg expression after include.

HTH

The Weight atribute is local to a router, can be applied only on incoming updates, and is never propagated.

Therefore, you will not be able to match based on it!

HTH

johnlloyd_13
Level 9
Level 9

if you used route maps, yes you could see them. use the show route-map command. you will see the associated attribute used in your filtering.

You CANNOT *match* based on Weight, you can only *set* it!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: