BGP, append prefix list and advertise route-map

Unanswered Question
May 9th, 2010

I am trying to accomplish the above per the following route maps

the append works, but the advertising of the route-map is not working.

Should both be on the same route-map, or is there some other problems I do not see?

The subnets in the advertise route map are in the route table and I see them when doing sh ip bgp summary.

router bgp 65001
bgp log-neighbor-changes
network 0.0.0.0
network 10.1.0.0 mask 255.255.255.0
network 10.1.1.0 mask 255.255.255.0
network 1.2.2.0 mask 255.255.255.252
network 172.16.1.1 mask 255.255.255.255
redistribute ospf 1 metric 1000 route-map Red_to_BGP
neighbor 1.2.2.1 remote-as 65000
neighbor 1.2.2.1 route-map PREPEND out
no auto-summary

route-map PREPEND permit 10
match ip address prefix-list default-only
set as-path prepend 60001 60001 60001

ip prefix-list default-only seq 5 permit 0.0.0.0/0


route-map Red_to_BGP permit 10
match ip address BGP_Advertise

ip access-list standard BGP_Advertise
permit 10.3.1.0 0.0.0.255
permit 10.3.2.0 0.0.0.255
permit 10.3.3.0 0.0.0.255
permit 10.3.4.0 0.0.0.255
permit 10.3.5.0 0.0.0.255
permit 10.3.6.0 0.0.0.255
permit 10.3.7.0 0.0.0.255
permit 10.3.8.0 0.0.0.255

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 5 (4 ratings)
Nagendra Kumar ... Mon, 05/10/2010 - 02:04

HI Wilson,

Can you explain more about what you are trying to acheive. I am not seeing any advertise-map config on the description.

From the descriptiona and the config I assume, you are trying to understand the behaviour of route-map Red_to_BGP. If so Please find the details below,

This route-map is to control the OSPF routes getting redistributing into BGP. From ACL, I can see that you have permitted 8 prefix to be distributed from OSPF to BGP. So only these prefixes will be redistributed and others will not be.

If the above is not your issue, Please let us know.

Regards,

Nagendra

wilson_1234_2 Mon, 05/10/2010 - 04:23

Yes, that is what I am trying to achieve.

I want only the acl subnets advertised into BGP, which are distributed from OSPF.

But, they are not being sent out to the BGP peer.

When I do a "sh ip bgp nei advertised-routes" I see 0 subnets being advertised.

BGP is up and communicating with peer

Nagendra Kumar ... Mon, 05/10/2010 - 04:37

Hi Wilson,

As pointed by Giuseppe, you need one more entry on PREPEND to permit other prefixes.

Configuration has been perfectly mentioned in Giuseppe's reply

Regards,

Nagendra

Giuseppe Larosa Mon, 05/10/2010 - 02:44

Hello Richard,

with your current configuration:

route-map PREPEND permit 10
match ip address prefix-list  default-only
set as-path prepend 60001 60001 60001

ip  prefix-list default-only seq 5 permit 0.0.0.0/0

you are sending only a default route to the peer, if you want to send other prefixes you need to add a second route-map clause

route-map PREPEND permit 20

! without the match line all BGP prefixes are sent out without any prepending

match ip address BGP_Advertise

Hope to help

Giuseppe

wilson_1234_2 Mon, 05/10/2010 - 06:23

Thanks Giuesppe,

I wondered if that was it, so adding the second route-map cannot be done like what is done below?

redistribute ospf 1 metric 1000 route-map Red_to_BGP

Only one route-map is allowed or it was done incorrectly?

Giuseppe Larosa Mon, 05/10/2010 - 06:45

Hello Richard,

you had a route-map in place filtering routes toward peer:  route-map PREPEND

later you have decided to import some OSPF routes into BGP using route-map Red_to_BGP.

This route-map creates locally generated BGP routes for the IP prefixes permitted by the ACL invoked within the route-map.

However, towards the BGP peer the route filter applied is still the first one, route-map PREPEND, and you need to update it in order to reflect the new needs.

Hope to help

Giuseppe

wilson_1234_2 Sun, 05/30/2010 - 16:25

Giuseppe,

I updated the route-map to the following:

route-map Advertised_2_BGP permit 5
match ip address DR_CUBE
set as-path prepend 65001 65001 65001
!
route-map Advertised_2_BGP permit 10
match ip address BGP_Advertise
!
route-map Advertised_2_BGP permit 15
match ip address prefix-list Default_Only

Now all of the prefixes are being prepended DR_CUBE, BGP_Advertise and Default_Only are all showing the pre-pended path.

Should Clause 5 be clause 20 instead?

Actions

Login or Register to take actions

This Discussion

Posted May 9, 2010 at 8:02 PM
Stats:
Replies:8 Avg. Rating:5
Views:3198 Votes:0
Shares:0
Tags: No tags.

Discussions Leaderboard