Today I did a lab focused on MPLS L3 VPN. Today was the first day actually configuring this from scratch so it was fun and a great learning experience. I ran into several snags along the way but that's ok.(sample topology attached)
First Task is to get the core(PE1, PE2, PE3, PE4) up and running. First thing to decide on is which protocol do we want to use to distribute the MPLS labels. By default I believe LDP is enabled now on recent versions of IOS. So on each of the PE routers I enabled LDP, configured the LDP router id as the loopback of each router. Once I got that up, I figured ok, time to check my LDP neighbor relationships come up. They did not !!!!
Took a trip to the good Doc CD and saw that when using Loopbacks for LDP distibution, we need to advertise that loopback in the network but as a /32 host route only.
http://www.cisco.com/en/US/docs/ios-xml/ios/mp_ldp/configuration/12-4t/mp-ldp-overview.html#GUID-C5755CFC-818B-4A02-B35C-741A15E422EC
So now that I advertised the loopbacks, all of my LDP neighbor relationships were established. Next, configured BGP As # 1 for the core, and configured iBGP full mesh in the core. Activated each of the neighbors in the the vpnv4 address family, and enabled the send community extended, so that the attributes could be exchanged across the MPLS cloud. When I enabled the neighbors in vpnv4 AF, you no longer can see them when using the sh ip bgp sum command. At first I thought what happened to my neighbors? I ran show tcp brief and still saw the BGP sessions established(179) and my LDP session(646). Learned when you have the neighbors configured in vpnv4, you need to use the command sh bgp vpnv4 unicast all summary commmand, and they show up phew!
Next I configured the VRF CustomerA and CustomerB(along with the appropriate RD's and route-target imports/exports and assigned then as per the diagram. Then I enabled the PE-CE routing which was pretty straightforward. On the PE side, we need to redistribution from OPSF to BGP under the ipv4 address-family VRF config mode, so that the CE routes, can transit the MPLS, and the remote Customer site, can import the route-target and get the routes in its routing table transparently.
Next was enabling BGP as the PE-CE, and this screwed me up big time. I had it all configured perfect except one commmand. For some reason, The 10.10.x.x routes were not making it across the VPN. I found after 2 hours that I needed to enable as-override. Essentially, for example, when SW4 sends an update to PE4, its an eBGP update, When that traveres the mpls, and tries to export import to SW2, SW2 denies it as it sees its own AS100. So on R1 and R4, need to configure neigbor x.x.x.x as-override, and then routes were now exchanging. Painful lesson for sure, but now I will most likely remember it ;)