VPNV4: Clarification on RD, Import and export

Hello,
first experiments with MPLS + BGP + VPNV4 for a new project. Few experience on MPLS, some more on OSPF and BGP.
I got all working as wanted (except traceroute which shown a “blank” first hop).
I’d like some explanation on the 3 properties in VPNV4.

  • RD is prepended in each route when exchanged over BGP. I see it on wireshark.
  • Export route target allows to inject additional RD into VRF.
  • Import route target defines which RD I’ll import in VRF

How exactly combines the 3 above? Because it works even if I set both Import/export while RD can be different.
So far my first explain is that RD is added to each prefix (within a vrf) by BGP engine internally, then with export you tell BGP to send them outside. But then it should not work if RD is different from export (while it works).
Tried new help document but without luck
Thanks to any who can shed some ligth in my dark mind.
Luca

RD - route distinguisher
RT - route target

those are not the same. Route target is advertised as extended community and used to importing/exporting prefixes to BGP VPN based on import/export rt rules.

RD is to distinguish overlapping prefixes.

2 Likes

Hello, thanks for answer, understood the point.
Bye