CM SNMP question | docsis.org

You are here

CM SNMP question

2 posts / 0 new
Last post
emkowale
CM SNMP question

Hello,

Does anyone know if there is an SNMP key to tell which upstream card a CM is on?

Thanks,
Eric

kwesibrunee
Yes There is

Yes There is

docsIfCmtsCmStatusUpChannelIfIndex (1.3.6.1.2.1.10.127.1.3.3.1.5)

it is indexed by docsIfCmtsCmStatusIndex which I call a modemId

you can get the modemid by querying the following docsIfCmtsCmStatusMacAddress this grabs the modemId by mac address the mac address is encoded as decimal by each octet.
here is some PHP code to get the modemId
<?php
function getModemId($macAddress, $cmtsAddress, $community) {
$formattedMac = split("_", ereg_replace("_$", "", chunk_split($macAddress, 2, "_")));
$formattedMac2 = array_map("hexdec", $formattedMac);
$formattedMac = join (".", $formattedMac2);
snmp_set_quick_print(1);
$modemId = snmpget($cmtsAddress, $community, ".1.3.6.1.2.1.10.127.1.3.7.1.2." . $formattedMac);
return $modemId;
}
function getUpstreamInterface($modemId, $cmtsAddress, $community) {
snmp_set_quick_print(1);
//Get Upstream Index
$upstreamIndex = snmpget($cmtsAddress, $community, "1.3.6.1.2.1.10.127.1.3.3.1.5." . $modemId);
$upstreamName = snmpget($cmtsAddress, $community, "1.3.6.1.2.1.2.2.1.2.".$upstreamIndex);
return $upstreamName;
}

//Given the mac 000011112222 you would do this
$modemId = getModemId("000011112222", "10.0.0.1", "public");
$upstreamName = getUpstreamInterface($modemId, "10.0.0.1", "public");
?>

Log in or register to post comments