02-09-2009 03:04 PM - edited 03-04-2019 03:29 AM
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?
02-09-2009 03:24 PM
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. :-)
02-09-2009 03:53 PM
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?
02-09-2009 08:42 PM
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
11-16-2024 10:15 AM - edited 11-16-2024 10:37 AM
I know this is a really old post, but i'm replying for the sake of anyone finding this thread through google:
Two reasons OP's config did not work:
1. because they do not have the route specified in their prefix-list (10.40.0.0/25) in their routing table. This is a requirement for BGP to advertise a route. To fix this, you can create a null-route to 10.40.0.0/25:
R1(config)#ip route 10.40.0.0 255.255.255.128 null0
2. After the null-route is configured, the network to be advertised needs to be specified with a network command explicitly. The router is not gonna start advertising it just because you put it in a prefix list and applied it as a route filer. Op's config will ensure that this is the only network advertised to that neighbor, no matter how many network commands you use, and it will ensure the router does not forward routes learned from other BGP neighbors, but the network still needs to be specified in a network command.
R1(Config-router)#network 10.40.0.0 mask 255.255.255.128
a comment on this:
"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?"
Only if ORF capability is configured on both sides, and you are using Prefix-lists. Else, you are telling your OWN router what routes can be advertised to this neighbor. If you used this command: "neighbor x.x.x.x prefix-list test in" you are telling your OWN router what routes should be accepted from your neighbor. It will essentially have the same effect though, of the routes being filtered out.
11-17-2024 12:27 AM
Hello
@KenSor prefix-list's in bgp are used for the feature "outbound route filtering" or ORF.
This is not totally correct, PF can be used for other things within BGP not just ORF, and NOTE: for ORF to work you will need the other side of that peering to be configured to perform ORF so if this is an ISP then you will require their involvement, plus the fact this will perform route filtering NOT summary advertisement
As for the request to use a PF for aggregation, is this specifically for a user case or just exercise, for the best way to summarise in bgp is via the aggregation command.
12-04-2024 11:22 AM
this issue is solved ?
MHM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide