Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

BGP advertisement with prefix-list

Hellom

I seem to be having trouble advertising a prefix list to a BGP neighbor.Could anyone shed some light pls.

Attached below captures the list of OSPF routes i have in the routing table. I have this redistributed onto BGP.

O 10.40.0.32/30 [110/20] via x.x.x.x, 23:18:40, GigabitEthernet1/0

O 10.40.0.40/32 [110/111] via x.x.x.x, 23:18:40, GigabitEthernet0/0/0

O 10.40.0.41/32 [110/111] via x.x.x.x, 23:18:40, GigabitEthernet0/0/0

O 10.40.0.44/30 [110/120] via x.x.x.x, 23:18:40, GigabitEthernet0/0/0

O 10.40.0.56/29 [110/110] via x.x.x.x, 23:18:40, GigabitEthernet0/0/0

O 10.40.0.18/32 [110/111] via x.x.x.x, 23:18:40, GigabitEthernet0/0/0

[110/111] via x.x.x.x, 23:18:40, GigabitEthernet1/0

O 10.40.0.19/32 [110/101] via x.x.x.x, 23:18:40, GigabitEthernet0/0/0

O 10.40.0.16/32 [110/11] via x.x.x.x, 23:18:40, GigabitEthernet1/0

O 10.40.0.24/30 [110/110] via x.x.x.x, 23:18:40, GigabitEthernet0/0/0

O E2 10.40.0.28/32 [110/20] via x.x.x.x, 23:18:40, GigabitEthernet0/0/0

O E2 10.40.0.29/32 [110/20] via x.x.x.x, 23:18:40, GigabitEthernet0/0/0

O 10.40.0.64/29 [110/110] via x.x.x.x, 23:18:40, GigabitEthernet0/0/0

O 10.40.0.72/29 [110/110] via x.x.x.x, 23:18:40, GigabitEthernet0/0/0

I have created a prefix-list to advertise a summary to the eBGP neighbor.I could use an aggregate-address but the requirement was to utilize a prefix-list.

prefix-list:

ip prefix-list test permit 10.40.0.0/25

advertisement to peer:

neighbor x.x.x.x prefix-list test out

however, all the addresses are dropped when i issue the "advertised-routes" command. Is this an issue with the prefix list itself or did i miss a step?

3 REPLIES
Bronze

Re: BGP advertisement with prefix-list

prefix-list's in bgp are used for the feature "outbound route filtering" or ORF. Basically, your config is telling the other router what to permit or drop in its advertisement to you.

From what you describe, you want to actually advertise these routes, not filter them. There are many ways to do this but I will give two examples.

First, if you ONLY want to advertise the 10.40.x.x networks to the remote peer, then you can use a route-map on the peer to limit what is advertised to him. This is good in the case where you have lots of other routes in the BGP routing tables and only want to advertise a select part of your table. This also assumes that the routes are already in your BGP routing table. If they are not there ( show ip bgp ) then you can use options 2's config to get them there.

Second, you have very little or no routes in your bgp routing table and you want to control what routes you redistribute INTO BGP, then we will use a route-map on the redistribute command.

Based on your routing table, I am assuming you want to advertise all the 10.40.x.x prefixes. There is an error with your prefix list. The prefix list you entered will match 10.40.0.0/25 exactly, not the longer prefixes that are part of that network and I do not see that exact network in your routing table.

So you prefix list should be:

ip prefix-list test permit 10.40.0.0/25 le 32

This will match all prefixes from a /25 to a /32 (le means less than or equal to)

The example for scenario one is:

!

ip prefix-list test permit 10.40.0.0/25 le 32

!

route-map test permit 10

match ip address prefix test

!

router bgp xxxx

neighbor x.x.x.x route-map test out

!

The example for scenario two is:

!

ip prefix-list test permit 10.40.0.0/25 le 32

!

route-map test permit 10

match ip address prefix test

!

router bgp xxxx

redistribute ospf x subnets route-map test

!

If you need help, let me know.

HTH

-Rob

Please rate if helpful. :-)

New Member

Re: BGP advertisement with prefix-list

Rob, Excellent post! Exactly what i needed to understand things.

so if i am applying it the way i was originally aiming for. (i.e neighbor x.x.x.x prefix-list test out). I'm actually telling my remote peer what it can send/not send to me?

Bronze

Re: BGP advertisement with prefix-list

Exactly. Its aimed at saving bandwidth (why have an update come across the wire when your just going to drop it anyway). Its one of the capabilities that are negotiated when your BGP sessions come up.

The command to turn it on is:

neighbor x.x.x.x capability orf prefix-list (send|recieve|both)

Here is a doc on the feature just in case your interested. Glad to help.

http://www.cisco.com/en/US/docs/ios/12_2s/feature/guide/fsbgporf.html

468
Views
5
Helpful
3
Replies
CreatePlease to create content