I just began working for my school's networking department, and I was assigned a project to develop a program to listen for traps from SNMP network devices.

The device I am testing with an Access Point Cisco Aironet 1242, I have been looking on line on how to do this, and I have come across multiple commands like snmptrapd in unix, but I do not see how I can apply this commands to create a program.

I need to use Perl, so I am already able to log in into the access point with Expect, and start the enable mode, but once I am there I do not know what to do. My program must listen to linkup and linkdown traps.

I have been reading the AP man entries (via ? and then <ENTER> on the terminal), but I have not seen something that I could use.

Any advise will be greatly appreciated.

On the other hand, if the format of this question does not belong to this site, please remove it. It is not my intention to break the rules, since I don't have a question on a specific problem, my question may be too broad for the site.


Seems like some confusion on your part. All you need to do on the AP is set it to send traps to the IP of your listener. Then, you need to build a listener - seems like you need to write a TCP server in Perl, so of course you couldn't use any existing SNMPD daemons.

You shouldn't be using Perl and Expect to login to the AP, unless you're also supposed to be using to enable and configure the trap-sender on it. To actually receive those traps, you need do nothing to or with the AP anymore.

  • It seems like I was totally out of the way, Thank you for pointing this out, I was totally clueless, at least now I know where to start looking. – ILikeTacos May 10 '12 at 20:13
  • OK - i see you're new to the site. Read the FAQ, and don't forget to mark my answer as "the answer." If you've got programming questions, post them to the site StackOverflow; that's for programmers. This site is for professional IT guys. – mfinni May 10 '12 at 21:12
  • SNMP uses UDP by default, so the management part (server) should listen to UDP instead of TCP. – L.R. Aug 23 '12 at 4:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.