Lee,
Thanks for the pointer ... as per the snmpcmd(1) documentation , the file
is supposed to exist in the following path ...
/usr/local/etc/snmp/snmp.conf  or ~/.snmp/snmp.conf ...
I don't see them ... guess will have to make one ....
Will revert with the outcome once I try it out.

-Hemanth


On Tue, Jul 19, 2016 at 9:43 PM, Lee <ler...@gmail.com> wrote:

> On 7/19/16, Hemanth Kumar <hemanthn...@gmail.com> wrote:
> > HI,
> > I am trying to figure out a way by which I can send following trap
> command
> > without adding/mentioning the port number.
>
> Set the port number in snmp.conf?
>        defaultPort PORT
>               defines the default UDP port that client SNMP
> applications will attempt to connect to.  This can be overridden  by
>               explicitly including a port number in the AGENT
> specification.  See the snmpcmd(1) manual page for more details.
>
>               If not specified, the default value for this token is 161.
>
>
> Regards,
> Lee
>
>
> >  The receiver is receiving the
> > trap when the custom port number is mentioned
> > snmptrap -v 2c -c rscommunity <DEST-IP-ADDRESS>:166 ""
> > TRAP-TEST-MIB::demotraps  SNMPv2-MIB::sysLocation.0 s "some message"
> >
> > By default, the following command does not require the port number to be
> > mentioned when the snmptrapd is using the default port-161.
> > snmptrap -v 2c -c rscommunity <DEST-IP-ADDRESS> ""
> > TRAP-TEST-MIB::demotraps  SNMPv2-MIB::sysLocation.0 s "some message"
> >
> > Additional info:
> > firewall opened for the above mentioned custom port
> > SELINUX
> > /etc/sysconfig/selinux has the following edit  "SELINUX=disabled"
> > (essentially SELINUX is off)
> >
> >
> > So far, I have been following the
> > http://www.net-snmp.org/tutorial/tutorial-5/commands/snmptrap.html to
> > understand/test
> >
> >
> > Test Bed
> > 2xservers with NET-SNMP version:  5.7.2 on CentOS 7.2
> >
> > Thanks in advance
> > -Hemanth
> >
>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to