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

[MX] SNMP OID bfdSessIndex changes after corresponding interface flaps

0

0

Article ID: KB37458 KB Last Updated: 09 Sep 2021Version: 1.0
Summary:

This article explains that the OID bfdSessIndex value changes after a corresponding interface flap as per Junos OS design. Since this is expected behavior, no action is required on the part of the user. 

Symptoms:

Customers may want to monitor BFD session status by using Simple Network Management Protocol (SNMP).

Cause:

To get other BFD related data, you would need to know the OID bfdSessEntry value. That is, each OID that is under bfdSessEntry would need to add bfdSessIndex to get a value.

If the BFD session is working in single-hop mode and an interface flaps, the bfdSessIndex will change, which is as per design.

Solution:

The following command shows the SNMP OIDs that correspond to BFD session status:

user@router>show snmp mib walk ascii bfdSessState
bfdSessState.20 = 4
The meaning of the output value can be determined based on the following values:
  • adminDown = 1

  • down = 2

  • init = 3

  • up = 4

Using these values, the above SNMP result would indicate that the state of BFD session(index 20) is up.

Refer to the CLI output for the same BFD session:

user@router>show bfd session
                                                  Detect   Transmit
Address                  State     Interface      Time     Interval  Multiplier
100.0.0.2                Up        ge-0/0/0.0     30.000    10.000       3

1 sessions, 1 clients
Cumulative transmit rate 0.1 pps, cumulative receive rate 0.1 pps

Now when the physical interface goes down, the BFD session gets deleted.

user@router>show interfaces ge-0/0/0 terse
Interface               Admin Link Proto    Local                 Remote
ge-0/0/0                up    down
ge-0/0/0.0              up    down inet     100.0.0.1/24
                                   multiservice
user@router>show bfd session

0 sessions, 0 clients
Cumulative transmit rate 0.0 pps, cumulative receive rate 0.0 pps

And when the physical interface comes back up, a new BFD session is created.

user@router>show interfaces ge-0/0/0 terse
Interface               Admin Link Proto    Local                 Remote
ge-0/0/0                up    up
ge-0/0/0.0              up    up   inet     100.0.0.1/24
                                   multiservice

user@router>show bfd session
                                                  Detect   Transmit
Address                  State     Interface      Time     Interval  Multiplier
100.0.0.2                Up        ge-0/0/0.0     30.000    10.000       3

1 sessions, 1 clients
Cumulative transmit rate 0.1 pps, cumulative receive rate 0.1 pps

Following this, the new BFD session's index (bfdSessIndex) will change. In the example, the value changed from 20 to 21.

user@router>show snmp mib walk ascii bfdSessState
bfdSessState.21 = 4

"bfdSessIndex" is used to represent a unique BFD session on the device. When a new BFD session is created, an unused value for bfdSessIndex is used. For example, if there is a single session, the new bfdSessIndex would increment by 1. If there are two sessions: one session index is 16 and the other session index is 17 and if session 1 flaps, the new session index would use 18, that is “16+2”. That is, the new BFD session index will always use the minimum unused value.

In Junos OS, "bfdSessIndex" is always the same as the local discriminator of the BFD session.

user@router>show snmp mib walk ascii bfdSessDiscriminator
bfdSessDiscriminator.21 = 21

user@router>show bfd session extensive | match discri
 Local discriminator 21, remote discriminator 18
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