cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2300
Views
20
Helpful
19
Replies

Route Tagging to eBGP from MP-BGP

Douglas Oman
Level 1
Level 1

I’m going to start off by saying I am not sure how to ask or explain this fully, but I will try my best.

 

I have a MP-BGP network that is geographically dispersed with currently two egress points via eBGP on different sides of the network. Most of the PE routers have multiple connections to each other, but some are spurs with no redundant paths. The eBGP points are used to peer with our peering partners for internet access to a particular VRF lets call this the “Internet” VRF. This VRF is known by all PE’s and it is required that all Subnets and Prefixes on this VRF can freely talk to one another no matter which PE they are on.

On the eBGP routers which have eBGP sessions to the Internet VRF on two different PE which are also the RR for the network. The eBGP router injects routes into the Internet VRF but also receives the routes and prefixes from the internet VRF. We have some routing policies on the eBGP routers that will prepend the AS path out to our peering partners depending on the subnet. This is done because we have specific sides of the network in which we prefer inbound connections come into. This prepending of the AS is done manually now as there are not a lot of subnets to worry about, but we are starting to head in the direction of IPv6 and will be providing /48 prefixes to each endpoint thus we need a way to create dynamic policies. I was heading down the path of trying to create unique a “Tag” for prefixes and subnets learned locally on each PE, but after digging I am not sure this is the correct route to go and not sure if its even possible. I have tried to dig through documentation but cannot figure out how to implement something like this.

The end goal is to create policies on the two eBGP routers that will dynamically prepend the AS for routes/prefixes that are local to particular PE (Not learned by another). Ideally each PE would have a unique Tag. This list would be manual and based on a Tag or something of the sort (Except prefixes/subnets).

Any advise or assistance is greatly appreciated! If you need more information, please ask.

19 Replies 19

may be double check my previous last solution I already do that using community-list

oiuytrewqsdsfgds.pngioiuoiouiouiou.png

Douglas Oman
Level 1
Level 1

I appreciate all the work you have done to lab this up. I was working on this and have come to the conclusion this particular setup will not work in my environment. I did have a lightbulb moment and don't know why I didn't think of this before, but I think the correct approach would be to create a route map for each PE with a unique extended community set and apply it to the redistribute connected & redistribute static statements in the BGP config. After all those are the two sets of prefixes I want to "Tag" or "Mark"- From what I read about when going down this path it should work but doesn't. Here is a snippet of the config pertinent to this:


vrf definition internet
rd 101:1
route-target export 101:1
route-target import 101:1
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family
!
route-map prefix-tag permit 5
set extcommunity rt 65534:311 additive
!
router bgp 65534
address-family ipv4 vrf internet
redistribute connected route-map prefix-tag
redistribute static route-map prefix-tag


When I look at the BGP information on another PE or even the local one I am testing on I am expecting to see two Extended communities – RT 101:1 and RT 65534:311 but I am only seeing the 101:1


Router1#show ip bgp vpnv4 vrf internet 5.5.5.0

BGP routing table entry for 101:1:5.5.5.0/24, version 339850
Paths: (2 available, best #2, table internet)
Advertised to update-groups:
140 145 45 143
Refresh Epoch 1
Local
10.206.1.1 (metric 2) (via default) from 10.206.1.6 (10.206.1.6)
Origin incomplete, metric 0, localpref 100, valid, internal
Extended Community: RT:101:1
Originator: 10.206.1.1, Cluster list: 10.206.1.6
mpls labels in/out nolabel/49
rx pathid: 0, tx pathid: 0
Refresh Epoch 3
Local, (Received from a RR-client)
10.206.1.1 (metric 2) (via default) from 10.206.1.1 (10.206.1.1)
Origin incomplete, metric 0, localpref 100, valid, internal, best
Extended Community: RT:101:1
mpls labels in/out nolabel/49
rx pathid: 0, tx pathid: 0x0

Yes but you use

 route-map

to add excomm to prefix learn from neighbor with IPv4 address family 
you need to add it to neighbor with VPNv4 address family.

Douglas Oman
Level 1
Level 1

Alright all - I though I tried this before, but I must not have done it in this matter, but I was able to get this working the way I expected. Using the same route map I had above I simply added it to both address family's within the vrf definition as an export map. 

Thank you all who have helped especially you @MHM Cisco World 

Glad your issue solve

Good luck freind

Review Cisco Networking for a $25 gift card