To configure a policy to send community traffic over a specific LSP, include the policy-statement statement:
- policy-statement policy-name {
-
- term term-name {
- from community community-name;
-
- then {
-
install-nexthop (except | lsp lsp-name | lsp-regex lsp-regular-expression);
- accept;
- }
- }
- }
You can include the policy-statement statement at the following hierarchy levels:
To prevent the installation of any matching next hops, include the install-nexthop statement with the except option:
-
install-nexthop except;
You can include the install-nexthop statement at the following hierarchy levels:
To assign traffic from a community to a specific LSP, include the install-nexthop statement with the lsp lsp-name option and the accept statement:
-
install-nexthop lsp lsp-name;
- accept;
You can include these statements at the following hierarchy levels:
You can also use a regular expression to select an LSP from a set of similarly named LSPs for the install-nexthop statement. To configure a regular expression, include the install-nexthop statement with the lsp-regex option and the accept statement:
-
install-nexthop lsp-regex lsp-regular-expression;
- accept;
You can include these statements at the following hierarchy levels:
The following example illustrates how you might configure a regular expression in a Layer 2 circuit policy. You create three LSPs to handle gold-tier traffic from a Layer 2 circuit. The LSPs are named alpha-gold, beta-gold, and delta-gold. You then include the install-nexthop statement with the lsp-regex option with the LSP regular expression .*-gold at the [edit policy-options policy-statement policy-name term term-name then] hierarchy level:
- [edit policy-options]
- policy-statement gold-traffic {
-
- term to-gold-LSPs {
- from community gold;
-
- then {
-
install-nexthop lsp-regex .*-gold;
- accept;
- }
- }
- }
The community gold Layer 2 circuits can now use any of the -gold LSPs. Given equal utilization across the three -gold LSPs, LSP selection is made at random.
You need to apply the policy to the forwarding table. To apply a policy to the forwarding table, configure the export statement at the [edit routing-options forwarding-table] hierarchy level:
- [edit routing-options forwarding-table]
- export policy-name;