Creating Templates with Junos OS Groups to Apply Attributes to PCE-Initiated Label-Switched Paths
From the Path Computation Client (PCC) router’s command line interface, you can use the Junos OS groups statement with label-switched path (LSP) templates to define a set of LSP attributes to apply to PCE-initiated LSPs. Any PCE-initiated LSP that provides a name match with the regular expression (regex) name that is specified in the template automatically inherits the LSP attributes that are specified in the template. Thus, by associating PCE-initiated LSPs with a user-defined LSP template, you can automatically turn on (or turn off) LSP attributes across all LSPs that provide a name match with the regex name that is specified in the template.
The following example show how you can use templates to apply auto-bandwidth and link-protection attributes to LSPs. For example, when auto-bandwidth is enabled, LSP auto-bandwidth parameters must be configured from the router, even when the LSP has been delegated. Under no circumstances can the NorthStar Controller modify the bandwidth of an externally controlled LSP when auto-bandwidth is enabled. A PCC enforces this behavior by returning an error if it receives an LSP update for an LSP that has auto-bandwidth enabled. Currently, there is no way to signal through PCEP when auto-bandwidth is enabled, so the NorthStar Controller cannot know in advance that the LSP has auto-bandwidth enabled. However, if auto-bandwidth is enabled by way of a template, the NorthStar Controller knows that the LSP has auto-bandwidth enabled and disallows modification of bandwidth.
To configure and apply groups to assign auto-bandwidth and link protection attributes to label-switched paths:
From the PCC router CLI, configure groups to specify that any PCE-initiated LSP that provides a name match with the specified prefix will inherit the LSP attributes defined in the template:
Configure a group to specify that an LSP that provides a name match with the prefix AUTO-BW-* will inherit the LSP auto-bandwidth attributes defined in the
AUTO-BW-TEMPLATE
template.[edit groups AUTO-BW-GROUP]user@PE1# set protocols mpls label-switched-path AUTO-BW-* autobandwidth adjust-interval 300user@PE1# set protocols mpls label-switched-path AUTO-BW-* autobandwidth adjust-threshold 20user@PE1# set protocols mpls label-switched-path AUTO-BW-* autobandwidth minimum-bandwidth 10muser@PE1# set protocols mpls label-switched-path AUTO-BW-* autobandwidth maximum-bandwidth 100muser@PE1# set protocols mpls label-switched-path AUTO-BW-* autobandwidth adjust-threshold-overflow-limit 5user@PE1# set protocols mpls label-switched-path AUTO-BW-* autobandwidth adjust-threshold-underflow-limit 5Configure a group to specify that any LSP that provides a name match with the prefix LINK-PROTECT-* will inherit the LSP link-protection attributes defined in the
LINK-PROTECT-TEMPLATE
template.[edit groups LINK-PROTECT-GROUP]user@PE1# set protocols mpls label-switched-path LINK-PROTECT-* hop-limit 5user@PE1# set protocols mpls label-switched-path LINK-PROTECT-* link-protectionuser@PE1# set protocols mpls label-switched-path LINK-PROTECT-* adaptive
- Configure the templates to apply the attributes defined
for the two groups in the previous step.[edit protocols mpls]user@PE1# set label-switched-path AUTO-BW-TEMPLATE apply-groups AUTO-BW-GROUPuser@PE1# set label-switched-path AUTO-BW-TEMPLATE templateuser@PE1# set label-switched-path LINK-PROTECT-TEMPLATE apply-groups LINK-PROTECT-GROUPuser@PE1# set label-switched-path LINK-PROTECT-TEMPLATE template
- Apply the auto-bandwidth and link-protection templates
to assign the auto-bandwidth and link-protection attributes to any
LSPs that match the corresponding regex-based character-string.[edit protocols mpls lsp-external-controller pccd]user@PE1# set pce-controlled-lsp AUTO-BW-* label-switched-path-template AUTO-BW-TEMPLATEuser@PE1# set pce-controlled-lsp LINK-PROTECT-* label-switched-path-template LINK-PROTECT-TEMPLATE
- Create LSPs from the NorthStar Controller by specifying LSP names based on the regex-based name defined in Step 1.
- Verify the LSP configuration on the PCC router.user@PE1> show mpls lsp detail