The following is a sample version 9 template configuration:
- services {
-
- flow-monitoring {
-
- version9 {
-
- template ip-template {
- flow-active-timeout 20;
- flow-inactive-timeout 120;
- ipv4-template;
- }
-
- template mpls-template-1 {
-
- mpls-template {
- label-position [1 3 4];
- }
- }
-
- template mpls-ipv4-template-1 {
-
- mpls-ipv4-template {
- label-position [1 5 7];
- }
- }
- }
- }
- }
The following is a sample firewall filter configuration for MPLS traffic:
- firewall {
-
- family mpls {
-
- filter mpls_sample {
-
- term default {
-
- then {
- accept;
- sample;
- }
- }
- }
- }
- }
The following sample configuration applies the MPLS sampling filter on a networking interface and configures the AS PIC to accept both IPv4 and MPLS traffic:
- interfaces {
-
- at-0/1/1 {
-
- unit 0 {
-
- family mpls {
-
- filter {
- input mpls_sample;
- }
- }
- }
- }
-
- sp-7/0/0 {
-
- unit 0 {
- family inet;
- family mpls;
- }
- }
- }
The following example applies the MPLS version 9 template to the sampling output and sends it to the AS PIC:
- forwarding-options {
-
- sampling {
-
- input {
-
- family mpls {
- rate 1;
- }
- }
-
- output {
- flow-active-timeout 60;
- flow-inactive-timeout 30;
-
- cflowd 1.2.3.4 {
- port 2055;
-
- version9 {
- template mpls-ipv4-template-1;
- }
- }
-
- interface sp-7/0/0 {
- source-address 1.1.1.1;
- }
- }
- }
- }