Smarts NPM: BGPSession not discovered in BGP topology for Juniper MX Router
search cancel

Smarts NPM: BGPSession not discovered in BGP topology for Juniper MX Router

book

Article ID: 332153

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

Symptoms:


BGPSession not discovered in BGP topology for Juniper MX routers.

Environment

VMware Smart Assurance - SMARTS

Cause

The devices return the value of BgpLocalAs (1.3.6.1.2.1.15.2.0) as null. This configuration is not supported in Smarts. 

BGP sessions cannot be discovered in BGP topology if BgpLocalAs (1.3.6.1.2.1.15.2.0) is returned as null. BGP code proceeds with discovery based on the following code:

BGP.import file defines the BGP-General-Driver

ICF_SNMPDiscoveryDriver::BGP-General-Driver {
    ReadsRulesFrom = GA_RuleSet::BGP-General-RS {
        fileName = "bgp/ic-bgp-general.asl"
    }
    ReadsInputFrom = SNMP_WalkFE::BGP-General-FE {
        rootOIDs = {
            #bgpVersion
                {220, ".1.3.6.1.2.1.15.1"},
            #bgpLocalAS
                {100, ".1.3.6.1.2.1.15.2"}
,
            #bgpIdentifier
                {250, ".1.3.6.1.2.1.15.4"}        }
   }
   waitForCompletion = TRUE
   ElementTypeGlob = "BGP"
   Priority = 10
}


The driver calls an ASL script (bgp/ic-bgp-general.asl) that will query the device for the local AS number.

//  The local autonomous system number.
BGP_LOCAL_AS {
    oid:".2.0"  fs
    value:integer fs
    do {
        index = 0;
        oidName = "bgpLocalAs";
        bgpLocalAs = string(value);
    }
}


If SNMP output of query on BgpLocalAs OID (1.3.6.1.2.1.15.2.0) is null, that value is returned as 0. The logic within the driver then decides the device is not a BGP speaker, and moves onto the next device. 

INITIALIZE_POSTPROC do {
    localBgpName = factory->BGPServicePrefix.sysName;
    localBgpObj = object(factory->bgpServiceClass, localBgpName);

    if ((bgpIdentifier == "0.0.0.0") || (bgpLocalAs == "0")) {
        if (detailDebug) {
            print(ASLNAME.sysName." - Not BGP Speaker");
        }
        //if (!localBgpObj->isNull()) {
        //    localBgpObj->remove();
        //}
        stop();
    }
}

Resolution

The resolution to discover BGP objects for devices returning BgpLocalAs as null would be to make this MIB visible in the global configuration in device.