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;