On the ingress router, create a constrained-path LSP in which the JUNOS software makes most of the forwarding decisions for the primary path, subject to constraints of the path to-hastings, and in which the secondary path is an explicit path. The primary path must transit green or yellow links and must stay away from red links. The primary path is periodically recomputed and reoptimized. Finally, this path always keeps the secondary path in hot-standby state for quick failover.
When the LSP is up—either because the primary or secondary path is up, or because both paths are up—the prefix 16.0.0.0/8 is installed in the inet.3 table so that all BGP routes whose BGP next hop falls within that range can use the LSP. Also, the prefix 17/8 is installed in the inet.0 table so that BGP can resolve only its next hop through that prefix. The route also can be reached with traceroute or ping. These two routes are in addition to the 11.1.1.1/32 route.
- [edit protocols]
- mpls {
-
- admin-groups {
- green 1;
- yellow 2;
- red 3;
- }
-
- path to-hastings {
- 14.1.1.1 loose;
- }
-
- path alt-hastings {
- 14.1.1.1 strict;
- 13.1.1.1 strict;
- 12.1.1.1 strict;
- 11.1.1.1 strict;
- }
-
- label-switched-path hastings {
- to 11.1.1.1;
- bandwidth 100m;
- install 16.0.0.0/8; # in inet.3; cannot use to traceroute
or ping
- install 17.0.0.0/8 active; # installed in inet.0;
can use to traceroute or ping
-
- primary to-hastings {
- admin-group { # further constraints for path computation
- include-all [ green yellow ];
- exclude red;
- }
- optimize-timer 3600; # reoptimize every hour
- }
-
- secondary alt-hastings {
- standby;
- no-cspf; # do not perform constrained-path computation
- }
- }
- interface all;