03-12-2018 08:52 AM - edited 03-05-2019 10:05 AM
Hi all,
I'm looking to use a Prefix-List and Route-Map for controlling the networks being advertised into BGP, out to an MPLS network.
Of course, I could simply do
router bgp 65000
network 10.1.0.0 mask 255.255.0.0
network 10.11.0.0 mask 255.255.0.0
neighbor ..............
However, can the networks be put into a Prefix-List and Route-Map ? I know I can add a Route-Map to a Neighbor xx.xx.xx.xx but I'm assuming that this is just filtering the networks without actually advertising them.
Therefore, could I change the network statements to "network 10.0.0.0 mask 255.0.0.0" and then add 10.1.0.0 and 10.11.0.0 to a route-map ?
I'm just looking for a simple and easy way to control subnets being advertised while providing a very descriptive method which will make it very easy for anyone in the future to follow as to what is going on ?
Solved! Go to Solution.
03-12-2018 02:14 PM
Hi,
How would I best advertise everything in BGP out to the MPLS on the basis that everything in BGP has been redistributed from EIGRP into BGP from the Lan ?
I am sorry but I am not sure what you are asking about. Can you perhaps try rewording your question?
Either way, once routes have been injected into BGP, whether through network commands or through redistribute commands, they will automatically be advertised from your router to all its BGP peers without further configuration. In IOS, there is nothing you need to configure on top to get the routes injected into BGP on your router to be advertised further.
Please feel welcome to ask further!
Best regards,
Peter
03-12-2018 09:36 AM
Hello,
The approach of "network 10.0.0.0 mask 255.0.0.0 ..." would not work because in BGP, the "network" command has to match the network-to-be-advertised exactly. This is different to IGP protocols where you could configure a large network, and all directly connected network falling under it would get advertised.
However, the networks you want to advertise in BGP are already present in your routing table from another source - perhaps directly connected, perhaps from an IGP. What would typically be done in these cases is a simple redistribution - "redistribute connected route-map ...", or "redistribute eigrp 1 route-map ...", and the referenced route-map would then refer to the ACL or prefix-list that would select the appropriate networks to be advertised. So instead of naming the networks one by one, you would have them redistributed, and in the "redistribute" command, you would use the route-map to pick the routes you're interested in redistributing, and thus, advertising in BGP.
Do you think this would be a viable approach for you?
Best regards,
Peter
03-12-2018 10:33 AM
Thanks for that.
How would I best advertise everything in BGP out to the MPLS on the basis that everything in BGP has been redistributed from EIGRP into BGP from the Lan ?
03-12-2018 02:14 PM
Hi,
How would I best advertise everything in BGP out to the MPLS on the basis that everything in BGP has been redistributed from EIGRP into BGP from the Lan ?
I am sorry but I am not sure what you are asking about. Can you perhaps try rewording your question?
Either way, once routes have been injected into BGP, whether through network commands or through redistribute commands, they will automatically be advertised from your router to all its BGP peers without further configuration. In IOS, there is nothing you need to configure on top to get the routes injected into BGP on your router to be advertised further.
Please feel welcome to ask further!
Best regards,
Peter
03-23-2018 10:36 AM - edited 03-26-2018 04:49 AM
Sorry to resurrect this again after such a lapse in time. It's not working for me at all. For instance, if I remove the line "network 10.250.10.2 mask 255.255.255.255"then this drops out of the local BGP Topology table and stops advertising
router bgp 65000
bgp log-neighbor-changes
neighbor xx.xx.xx.xx remote-as yyyy
!
address-family ipv4
network 10.10.1.0 mask 255.255.255.0
network 10.10.11.0 mask 255.255.255.0
network 10.250.10.2 mask 255.255.255.255 (router loopback interface)
redistribute eigrp 100 route-map SEND-TO-BGP
neighbor xx.xx.xx.xx activate
neighbor xx.xx.xx.xx route-map NGN-MSVC-BGP-IN in
neighbor xx.xx.xx.xx route-map NGN-MSVC-BGP-OUT out
exit-address-family
!
ip prefix-list SEND-TO-BGP seq 10 permit 10.10.11.0/24
ip prefix-list SEND-TO-BGP seq 20 permit 10.10.1.0/24
ip prefix-list SEND-TO-BGP seq 30 permit 10.250.10.2/32
!
route-map NGN-MSVC-BGP-OUT permit 10
match ip address prefix-list SEND-TO-BGP
set as-path prepend 65000 65000
!
03-26-2018 05:14 AM
Hello,
Not a problem - please apologize my late response.
Hmmm... If removing any network command causes the network to drop out from BGP then the redistribution is not really working as expected, obviously.
Quickly checking your configuration you have posted, however, I do not see any route-map SEND-TO-BGP present. I see a prefix-list of that name, but no route-map. Perhaps that's the problem in your configuration. Can you try adding this to your config?
route-map SEND-TO-BGP permit 10 match ip address prefix-list SEND-TO-BGP
Best regards,
Peter
03-26-2018 09:31 AM
I hadn't realized that I had the route-map pointing at the ip prefix-list.
However, I have fixed that and it still won't work. I tried clear ip bgp * soft too but no joy
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