BGP and VPLS Path Selection for Multihomed PE Routers
The BGP and VPLS path selection procedures are used to select the best path between the remote PE router and one of the multihomed PE routers. As part of these path selection procedures, one of the multihomed PE routers is made the designated VE device. The designated VE device effectively acts as the endpoint for the VPLS pseudowire from the remote PE router. Once a multihomed PE router is made the designated VE device, a pseudowire can be created between the remote PE router and the multihomed PE router.
In the VPLS documentation, the word router in terms such as PE router is used to refer to any device that provides routing functions.
Routes from multihomed PE routers connected to the same customer site share the same site ID, but can have different route distinguishers and block offsets. On each PE router in the VPLS network, the best path to the multihomed PE router is determined by completing the following VE device-selection procedures on each route advertisement received from a multihomed PE router:
BGP designated VE device-selection procedure—Runs before the VPLS designated VE device-selection procedure. However, the BGP designated VE device-selection procedure is used only when the route distinguishers for the multihomed PE routers are identical. If the route distinguishers are unique, only the VPLS designated VE device-selection procedure is run.
VPLS designated VE device-selection procedure—Runs after the BGP designated VE device-selection procedure. However, if the route distinguishers for each multihomed PE router are unique, the advertisements are not considered relevant to the BGP designated VE device-selection procedure. As a consequence, only the VPLS designated VE device-selection procedure is used.
The BGP designated VE device-selection procedure is as follows:
If the advertisement has the down bit set to 0, the advertisement is discarded.
Select the path with a higher preference. The preference attribute is obtained from the site-preference configured using the
site-preference
statement at the [edit routing-instances routing-instance-name protocols vpls site site-name] hierarchy level. If the site-preference is 0, the preference attribute is obtained from the local-preference.If the preference values are the same, select the path with the lower router-id.
If the router-ids are the same, the routes are from the same PE router and the advertisement is considered to be an update.
Once the BGP designated VE device-selection procedure is complete, the VPLS designated VE device-selection procedure begins. This procedure is carried out regardless of the outcome of the BGP designated VE device-selection procedure:
If the advertisement has the down bit set to 0, the advertisement is discarded.
Select the path with a higher preference. The preference attribute is obtained from the site-preference configured using the
site-preference
statement at the [edit routing-instances routing-instance-name protocols vpls site site-name] hierarchy level. If the site-preference is 0, the preference attribute is obtained from the local-preference.If the preference values are the same, select the path with the lower router-id.
If the router-ids are the same, select the path with a lower route distinguisher.
If the route distinguishers are the same, select the path with the lower block offset value.
If the block offset values are the same, the advertisement is considered to be an update.
Once the BGP and VPLS path selection procedures have been completed and the designated VE devices have been selected, a pseudowire can be created between the remote PE router and the multihomed PE router.
When the remote PE router establishes or refreshes a pseudowire to the local PE router, it verifies that the prefix is in the range required for the site ID based on the block offset and label range advertised by the designated VE device. If the prefix is out of range, the pseudowire status is set to out of range.
The following cases outline the potential decisions that could be made when a PE router completes the BGP and VPLS path selection procedures for a Layer 2 advertisement in the VPLS network:
The PE router originated one of the multihomed advertisements and selected its own advertisement as the best path.
This PE router has been selected as the designated VE device. Selection as the designated VE device triggers the creation of pseudowires to and from the other PE routers in the VPLS network. When the remote customer site is also multihomed, the designated VE device triggers the creation of pseudowires to and from only the designated VE device for the remote site.
The PE router originated one of the multihomed advertisements but did not select its own advertisement as the best path.
This PE router is one of the redundant PE routers for the multihomed site; it was not selected as the designated VE device. However, if this PE router has just transitioned from being the designated VE device (meaning it was receiving traffic from the remote PE routers addressed to the mulithomed customer site), the PE router tears down all the pseudowires that it had to and from the other PE routers in the VPLS network.
The PE router receives the multihomed advertisements and selects a best path; it does not originate any of these advertisements because it is not connected to the multihomed customer site.
If the preferred path to the customer site (the designated VE device) has not changed, nothing happens. If the preferred path has changed, this PE router brings up pseudowires to and from the newly designated VE device and tears down the pseudowires to and from the previously designated VE device.
If this PE router does not select a best path after running the BGP and VPLS path selection process, the local PE router does not consider the remote site to exist.
When a VE device receives an advertisement for a Layer 2 NLRI which matches its own site ID but the site is not multihomed, the pseudowire between it and the transmitting PE router transitions to a site collision state and is not considered to be up.