fwm snmp_trap

Description

Sends an SNMPv1 Trap to the specified host.

Notes:

Syntax

fwm [-d] snmp_trap [-v <SNMP OID>] [-g <Generic Trap Number>] [-s <Specific Trap Number>] [-p <Source Port>] [-c <SNMP Community>] <Target> ["<Message>"]

Parameters

Parameter

Description

-d

Runs the command in debug mode.

Use only if you troubleshoot the command itself.

Best Practice - If you use this parameter, then redirect the output to a file, or use the script command to save the entire CLI session.

For complete debug instructions, see the description of the fwm process in sk97638.

-v <SNMP OID>

Specifies an optional SNMP OID to bind with the message.

-g <Generic Trap Number>

Specifies the generic trap number.

One of these values:

  • 0 - For coldStart trap

  • 1 - For warmStart trap

  • 2 - For linkDown trap

  • 3 - For linkUp trap

  • 4 - For authenticationFailure trap

  • 5 - For egpNeighborLoss trap

  • 6 - For enterpriseSpecific trap (this is the default value)

-s <Specific Trap Number>

Specifies the unique trap type.

Valid only of generic trap value is 6 (for enterpriseSpecific).

Default value is 0.

-p <Source Port>

Specifies the source port, from which to send the SNMP Trap packets.

-c <SNMP Community>

Specifies the SNMP community.

<Target>

Specifies the managed target host, to which to send the SNMP Trap packets.

Enter an IP address of a resolvable hostname.

"<Message>"

Specifies the SNMP Trap text message.

Example - Sending an SNMP Trap from a Management Server and capturing the traffic on the Security Gateway

[Expert@MGMT:0]# fwm snmp_trap -g 2 -c public 192.168.3.52 "My Trap Message"
[Expert@MGMT:0]#
 
[Expert@MyGW_192.168.3.52:0]# tcpdump -s 1500 -vvvv -i eth0 udp and host 192.168.3.51
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 1500 bytes
22:49:43.891287 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: UDP (17), length: 103) 192.168.3.51.53450 > MyGW_192.168.3.52.snmptrap: [udp sum ok] { SNMPv1 { Trap(58) E:2620.1.1 192.168.3.240 linkDown 1486440 E:2620.1.1.11.0="My Trap Message" } }

Pressed CTRL+C

[Expert@MyGW_192.168.3.52:0]#