In a VPLS service, multiple BGP families and protocols can be enabled at the same time. When bgp-evpn is enabled, bgp-ad and bgp-mh are supported as well. A single RD is used per service and not per BGP family/protocol.
The following rules apply:
The VPLS RD is selected based on the following precedence:
Manual RD or auto-rd always take precedence when configured.
If no manual/auto-rd configuration, the RD is derived from the bgp-ad>vpls-id.
If no manual/auto-rd/vpls-id configuration, the RD is derived from the bgp-evpn>evi, except for bgp-mh, which does not support evi-derived RD.
If no manual/auto-rd/vpls-id/evi configuration, there is not be RD and the service fails.
The selected RD (see above rules) is displayed by the Oper Route Dist field of the show service id bgp command.
The service supports dynamic RD changes, for instance, the CLI allows the vpls-id be changed dynamically, even if it is used to auto-derive the service RD for bgp-ad, bgp-vpls, or bgp-mh.
When the RD changes, the active routes for that VPLS are withdrawn and re-advertised with the new RD.
If one of the mechanisms to derive the RD for a specified service is removed from the configuration, the system selects a new RD based on the above rules. For example, if the vpls-id is removed from the configuration, the routes are withdrawn, the new RD selected from the evi, and the routes re-advertised with the new RD.
This reconfiguration fails if the new RD already exists in a different VPLS/Epipe.
Because the vpls-id takes precedence over the evi when deriving the RD automatically, adding evpn to an existing bgp-ad service does not impact the existing RD. The latter is is important to support bgp-ad to evpn migration.