Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[MX] Example - MPLS sampling on MX series routers

0

0

Article ID: KB22622 KB Last Updated: 13 Jun 2012Version: 1.0
Summary:
This article provides a configuration to sample MPLS flows on MX series routers.

Symptoms:
To sample MPLS flows and export these flows to a cflowd collector.

Cause:

Solution:

Test topology:

R1(PE) < ge-1/0/2.100 ------ ge-1/3/7.100 > R2(P) < ge-1/0/2.200 ------ ge-1/3/7.200 > R3(PE)

Configuration of router R2:
[edit]
lab@R2# show interfaces ge-1/3/7                                                     
vlan-tagging;
mtu 1500;
unit 100 {
    vlan-id 100;
    family inet {
        address 100.100.100.2/30;
    }
    family mpls {
        filter {
            input mpls_sample;
        }
    }
}

[edit]
lab@R2# show services
flow-tap {
    tunnel-interface vt-8/0/0.0;
}
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 2 ];   
            }
        }
    }
}

[edit]
lab@R2# show forwarding-options
sampling {
    input {
        rate 1;
    }
    family mpls {
        output {
            flow-inactive-timeout 30;
            flow-active-timeout 60;
            flow-server 1.2.3.4 {
                port 2055;
                version9 {
                    template {
                        mpls-ipv4-template-1;
                    }
                }
            }
            interface sp-8/0/0 {
                source-address 1.1.1.1;
            }
        }
    }
}

[edit]
lab@R2# show firewall family mpls filter mpls_sample
term default {
    then {
        count mpls-in;
        sample;
        accept;
    }
}

[edit]
lab@R2# show chassis
fpc 8 {
    pic 0 {
        tunnel-services;
    }
}

Verification:

lab@R2# run show services accounting aggregation template template-name mpls-ipv4-template-1 extensive
  MPLS label 1: 299776, MPLS label 2: 0, MPLS label 3: 0
  Source address: 172.100.100.1, Destination address: 127.0.0.1, Top Label Address: 172.100.100.3
  Source port: 51203, Destination port: 3503
  Protocol: 17, TOS: 0, TCP flags: 0
  Source mask: 32, Destination mask: 0
  Input SNMP interface index: 613, Output SNMP interface index: 612
  Start time: 5832510, End time: 6063500
  Packet count: 51, Byte count: 4284    < look for incrementing counters
Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search