Support Support Downloads Knowledge Base Juniper Support Portal 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

[Junos] How to catch inbound traffic according to forwarding-class when using BA classifier

0

0

Article ID: KB36837 KB Last Updated: 27 Apr 2021Version: 1.0
Summary:

How can I catch the inbound traffic according to the forwarding-class when using BA classifier? For example, how many NC traffic comes from a certain interface through NC classification, and how much default traffic is there? Can I do this without MF classifiers “then count” method?

Solution:

The inbound queue is not enabled by default.

There are 3 methods:

  1. CLI using 'forwarding-class-accounting':

    # set interfaces ae0 forwarding-class-accounting direction both
    
    user@router#run show interfaces forwarding-class-counters ae0
    
    Physical interface: ae0, Enabled, Physical link is Up
      Interface index: 128, SNMP ifIndex: 501
       Aggregate Forwarding-class statistics :
           Forwarding-class statistics : best-effort
            Input Bytes     :               4194740                     0 bps
            Output Bytes    :               4096456                     0 bps
            Input packets   :                  4145                     0 pps
            Output packets  :                  4100                     0 pps
           Forwarding-class statistics : expedited-forwarding
            Input Bytes     :                     0                     0 bps
            Output Bytes    :                     0                     0 bps
            Input packets   :                     0                     0 pps
            Output packets  :                     0                     0 pps
           Forwarding-class statistics : assured-forwarding
            Input Bytes     :                     0                     0 bps
            Output Bytes    :                     0                     0 bps
            Input packets   :                     0                     0 pps
            Output packets  :                     0                     0 pps
           Forwarding-class statistics : network-control
            Input Bytes     :                  3256                     0 bps
            Output Bytes    :                  2757                     0 bps
            Input packets   :                    38                     0 pps
            Output packets  :                    37                     0 pps
        IPv4 Forwarding-class statistics :
           Forwarding-class statistics : best-effort
            Input Bytes     :                     0                     0 bps
            Output Bytes    :               4096456                     0 bps
            Input packets   :                     0                     0 pps
            Output packets  :                  4100                     0 pps
           Forwarding-class statistics : expedited-forwarding
            Input Bytes     :                     0                     0 bps
            Output Bytes    :                     0                     0 bps
            Input packets   :                     0                     0 pps
            Output packets  :                     0                     0 pps
           Forwarding-class statistics : assured-forwarding
            Input Bytes     :                     0                     0 bps
            Output Bytes    :                     0                     0 bps
            Input packets   :                     0                     0 pps
            Output packets  :                     0                     0 pps
           Forwarding-class statistics : network-control
            Input Bytes     :                    74                     0 bps
            Output Bytes    :                  2757                     0 bps
            Input packets   :                     1                     0 pps
            Output packets  :                    37                     0 pps
       IPv6 Forwarding-class statistics :
           Forwarding-class statistics : best-effort
            Input Bytes     :                     0                     0 bps
            Output Bytes    :                     0                     0 bps
            Input packets   :                     0                     0 pps
            Output packets  :                     0                     0 pps
           Forwarding-class statistics : expedited-forwarding
            Input Bytes     :                     0                     0 bps
            Output Bytes    :                     0                     0 bps
            Input packets   :                     0                     0 pps
            Output packets  :                     0                     0 pps
           Forwarding-class statistics : assured-forwarding
            Input Bytes     :                     0                     0 bps
            Output Bytes    :                     0                     0 bps
            Input packets   :                     0                     0 pps
            Output packets  :                     0                     0 pps
           Forwarding-class statistics : network-control
            Input Bytes     :                     0                     0 bps
            Output Bytes    :                     0                     0 bps
            Input packets   :                     0                     0 pps
            Output packets  :                     0                     0 pps
        MPLS Forwarding-class statistics :
           Forwarding-class statistics : best-effort
            Input Bytes     :               4194740                     0 bps
            Output Bytes    :                     0                     0 bps
            Input packets   :                  4145                     0 pps
            Output packets  :                     0                     0 pps
           Forwarding-class statistics : expedited-forwarding
            Input Bytes     :                     0                     0 bps
            Output Bytes    :                     0                     0 bps
            Input packets   :                     0                     0 pps
            Output packets  :                     0                     0 pps
           Forwarding-class statistics : assured-forwarding
            Input Bytes     :                     0                     0 bps
            Output Bytes    :                     0                     0 bps
            Input packets   :                     0                     0 pps
            Output packets  :                     0                     0 pps
           Forwarding-class statistics : network-control
            Input Bytes     :                  3182                     0 bps
            Output Bytes    :                     0                     0 bps
            Input packets   :                    37                     0 pps
            Output packets  :                     0                     0 pps
        Layer2 Forwarding-class statistics :
           Forwarding-class statistics : best-effort
            Input Bytes     :                     0                     0 bps
            Output Bytes    :                     0                     0 bps
            Input packets   :                     0                     0 pps
            Output packets  :                     0                     0 pps
           Forwarding-class statistics : expedited-forwarding
            Input Bytes     :                     0                     0 bps
            Output Bytes    :                     0                     0 bps
            Input packets   :                     0                     0 pps
            Output packets  :                     0                     0 pps
           Forwarding-class statistics : assured-forwarding
            Input Bytes     :                     0                     0 bps
            Output Bytes    :                     0                     0 bps
            Input packets   :                     0                     0 pps
            Output packets  :                     0                     0 pps
           Forwarding-class statistics : network-control
            Input Bytes     :                     0                     0 bps
            Output Bytes    :                     0                     0 bps
            Input packets   :                     0                     0 pps
            Output packets  :                     0                     0 pps
        Others Forwarding-class statistics :
           Forwarding-class statistics : best-effort
            Input Bytes     :                     0                     0 bps
            Output Bytes    :                     0                     0 bps
            Input packets   :                     0                     0 pps
            Output packets  :                     0                     0 pps
           Forwarding-class statistics : expedited-forwarding
            Input Bytes     :                     0                     0 bps
            Output Bytes    :                     0                     0 bps
            Input packets   :                     0                     0 pps
            Output packets  :                     0                     0 pps
           Forwarding-class statistics : assured-forwarding
            Input Bytes     :                     0                     0 bps
            Output Bytes    :                     0                     0 bps
            Input packets   :                     0                     0 pps
            Output packets  :                     0                     0 pps
           Forwarding-class statistics : network-control
            Input Bytes     :                     0                     0 bps
            Output Bytes    :                     0                     0 bps
            Input packets   :                     0                     0 pps
            Output packets  :                     0                     0 pps
  2. Use CLI with the same function as above

    #set chassis fpc X pic X traffic-manager mode ingress-and-egress (Committing changes to traffic-manager automatically restarts any necessary components (PICs, DPCs, or FPCs).)

  3. Use OID. Refer to the OIDs below:

    1.3.6.1.4.1.2636.3.15.4.1 (jnxCosQstatEntry for egress)
    1.3.6.1.4.1.2636.3.15.7.1 (jnxCosIngressQstatEntry for ingress)

    Find the SNMP index of the interface:

    user@router# run show interfaces xe-0/1/4 extensive
    Physical interface: xe-0/1/4, Enabled, Physical link is Up
      Interface index: 195, SNMP ifIndex: 685, Generation: 203          //It’s 685
    
    user@router# run show snmp mib get 1.3.6.1.4.1.2636.3.15.7.1.3.685.0  //this is for Ingress Q0
    jnxCosIngressQstatQedPkts.685.0 = 1433347
    
    user@router# run show snmp mib get 1.3.6.1.4.1.2636.3.15.7.1.3.685.3  //this is for Ingress Q3
    jnxCosIngressQstatQedPkts.685.3 = 724522
    
    user@router# run show snmp mib get 1.3.6.1.4.1.2636.3.15.4.1.3.685.0  //this is for Egress Q0  
    jnxCosQstatQedPkts.685.0 = 2413853
    
    user@router# run show snmp mib get 1.3.6.1.4.1.2636.3.15.4.1.3.685.3  //this is for Egress Q3
    jnxCosQstatQedPkts.685.3 = 581335

     

    user@router# run show interfaces xe-0/1/4 extensive
    
    Physical interface: xe-0/1/4, Enabled, Physical link is Up
      Interface index: 195, SNMP ifIndex: 685, Generation: 203          //It’s 685
    
    user@router# run show snmp mib get 1.3.6.1.4.1.2636.3.15.7.1.3.685.0  //this is for Ingress Q0
    jnxCosIngressQstatQedPkts.685.0 = 1433347
    
    user@router# run show snmp mib get 1.3.6.1.4.1.2636.3.15.7.1.3.685.3  //this is for Ingress Q3
    jnxCosIngressQstatQedPkts.685.3 = 724522
    
    user@router# run show snmp mib get 1.3.6.1.4.1.2636.3.15.4.1.3.685.0  //this is for Egress Q0  
    jnxCosQstatQedPkts.685.0 = 2413853
    
    user@router# run show snmp mib get 1.3.6.1.4.1.2636.3.15.4.1.3.685.3  //this is for Egress Q3
    jnxCosQstatQedPkts.685.3 = 581335

Related Links

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