SNMP Questions |

You are here

SNMP Questions

6 posts / 0 new
Last post
Anonymous (not verified)
SNMP Questions


This is a two parter. First of all, does anyone know of an SNMP string that will reboot all Cable Modems?

Also, I need a way to look behind the Cable Modem via SNMP to see the ip and or mac of the cpe. Any ideas?


Anonymous (not verified)
SNMP Questions

CPE list

see docsDev MIBS
I use snmpwalk snmpset from GNU net-snmp

Here are the OIDS you are looking for.

Reset MODEM example PHP

snmpset($host, "private", ".","i",1);

This has worked with every model of modem I have tried it with. Replace private with your snmp password

CPE Mac and IP is a bit tricky but doable.

again PHP
// Get the Mac and device type from the OIds
$cpes = snmpwalk($host, "private", ".");
$type = snmpwalk($host, $readpass,".");
// look at each one
if (ereg_replace(".*= ", "",$type[$t]) !='4')
$modemclients[$t] = ereg_replace("^e", "", ereg_replace(".*= |Hex:|[^0-9A-Fa-f]", "",$cpes[$t]));

$modemclients will contain a list of all the cpes in the arp table of the modem. that are not the modem.

There is also an OID for IP address too but it was very difficult to script access to, so I got it from our dhcp server instead.

Anonymous (not verified)


Thanks. Works like a charm. What is the $type for?


SNMP Questions

$type is a value that will tell you if the MAC address is an internal CPE(like a USB port on a cable modem would look like a CPE and have it's own MAC address but is Internal) or External(NIC card in a PC)

1 = Other
2 = Invalid
3 = External CPE
4 = Internal CPE
5 = Management

Generally you will only see 3 or 4

Here is the OID description of $value
The status of this entry. The meanings of the
values are:
other(1) : none of the following. This would
include the case where some other
MIB object (not the corresponding
instance of dot1dTpFdbPort, nor an
entry in the dot1dStaticTable) is
being used to determine if and how
frames addressed to the value of
the corresponding instance of
dot1dTpFdbAddress are being
invalid(2) : this entry is not longer valid
(e.g., it was learned but has since
aged-out), but has not yet been
flushed from the table.
learned(3) : the value of the corresponding
instance of dot1dTpFdbPort was
learned, and is being used.
self(4) : the value of the corresponding
instance of dot1dTpFdbAddress
represents one of the bridge's
addresses. The corresponding
instance of dot1dTpFdbPort
indicates which of the bridge's
ports has this address.
mgmt(5) : the value of the corresponding
instance of dot1dTpFdbAddress is
also the value of an existing
instance of dot1dStaticAddress.

Reset PacketCable Device,

Any spec related to this, let's assume i'm trying to reset Packetcable, and some in using phone call at that time, i should avoid the RESET, what is the SPec/RFC

Log in or register to post comments