SNMP Programming...

Discussion in 'Visual Basic ( VB )' started by maledomains, Nov 15, 2007.

  1. maledomains

    maledomains New Member

    Joined:
    Nov 15, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Can any one tell me how to read SNMP traps from Router????

    read from port udp 162.

    OS:Windows 2003 server

    Programming:vb.net,c#.

    If possible thro wmi please provide some samples.....
     
  2. brajrajsingh

    brajrajsingh New Member

    Joined:
    Jan 18, 2008
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    Traps are only send to your machine if it is configured as an SNMP Manager at your router.
    You can try capturing all the SNMP packet from the router Using ethereal.
     
  3. maledomains

    maledomains New Member

    Joined:
    Nov 15, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    i need source code in .net to read traps
     
  4. brajrajsingh

    brajrajsingh New Member

    Joined:
    Jan 18, 2008
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    SNMP Traps are nothing but packets coming to at port 162 So read the UDP Socket at 162 port no. and you will get the full SNMP Trap PDU.
     
  5. maledomains

    maledomains New Member

    Joined:
    Nov 15, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    No itz encrypted msg cant read as usual...
    please provide some way of reading it...
     
  6. brajrajsingh

    brajrajsingh New Member

    Joined:
    Jan 18, 2008
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    It is because the router is sending the SNMP V3 traps which supports encryption so the packets can be read by the SNMP manager which is configured in the router for which you require admin rights at the router and you shall be able to view and modify the router configuration . using the manual provided.
    Other way to remove encryption is that at the router you configure it to through SNMP V1 or V2c traps at your IP. and then you can capture it from ethereal and view them.
     
  7. brajrajsingh

    brajrajsingh New Member

    Joined:
    Jan 18, 2008
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    Here important thing is that you are the adminstrator of the router or an user.
    If you are an user you can try accessing the various information about the router using public community. (This is the community mostly configured for user.)
    If you are the adminstrator then you can do a lot by going through the manual of the router.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice