sorry forget this one with the snmp-server enable traps syslog, a little
different format, just the trap...
Router(config)#do sh run | s snmp
snmp-server enable traps snmp linkdown linkup
snmp-server host 172.16.1.61 version 2c PUBLIC
Router(config)#int f0/1
Router(config-if)#shut
Router(config-if)#no shut
Router(config-if)#
*Mar 1 03:55:43.923: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed
state to up
*Mar 1 03:55:44.923: %LINEPROTO-5-UPDOWN: Line protocol on Interface
FastEthernet0/1, changed state to up
*Mar 1 03:55:44.931: SNMP: Queuing packet to 172.16.1.61
*Mar 1 03:55:44.931: SNMP: V2 Trap, reqid 32, errstat 0, erridx 0
sysUpTime.0 = 1414492
snmpTrapOID.0 = snmpTraps.4
ifIndex.2 = 2
ifDescr.2 = FastEthernet0/1
ifType.2 = 6
lifEntry.20.2 = up
*Mar 1 03:55:45.183: SNMP: Packet sent via UDP to 172.16.1.61
Router(config-if)#
*Mar 1 03:56:54.403: %LINK-5-CHANGED: Interface FastEthernet0/1, changed
state to administratively down
*Mar 1 03:56:55.403: %LINEPROTO-5-UPDOWN: Line protocol on Interface
FastEthernet0/1, changed state to down
*Mar 1 03:56:55.411: SNMP: Queuing packet to 172.16.1.61
*Mar 1 03:56:55.411: SNMP: V2 Trap, reqid 33, errstat 0, erridx 0
sysUpTime.0 = 1421540
snmpTrapOID.0 = snmpTraps.3
ifIndex.2 = 2
ifDescr.2 = FastEthernet0/1
ifType.2 = 6
lifEntry.20.2 = administratively down
*Mar 1 03:56:55.663: SNMP: Packet sent via UDP to 172.16.1.61
On Sat, Oct 3, 2009 at 2:01 PM, garry baker <baker.garry_at_gmail.com> wrote:
> this is a good one to play with the debug and let the router show you what
> it thinks about these settings, see below:
>
> Router#sh debugging
> SNMP:
> SNMP packet debugging is on
>
>
> Router#sh ip int br
> Interface IP-Address OK? Method Status
> Protocol
> FastEthernet0/0 172.16.1.1 YES manual up
> up
> FastEthernet0/1 unassigned YES unset administratively down
> down
>
> Router#sh run | s snmp
> snmp-server enable traps snmp linkdown linkup
> snmp-server enable traps syslog
> snmp-server host 172.16.1.61 version 2c PUBLIC
>
> Router#conf t
> Enter configuration commands, one per line. End with CNTL/Z.
> Router(config)#int f0/1
> Router(config-if)#no shut
> Router(config-if)#
> *Mar 1 03:32:56.499: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed
> state to up
> *Mar 1 03:32:56.535: SNMP: Queuing packet to 172.16.1.61
> *Mar 1 03:32:56.539: SNMP: V2 Trap, reqid 14, errstat 0, erridx 0
> sysUpTime.0 = 1277653
> snmpTrapOID.0 = ciscoSyslogMIB.2.0.1
> clogHistoryEntry.2.12 = LINK
> clogHistoryEntry.3.12 = 4
> clogHistoryEntry.4.12 = UPDOWN
> clogHistoryEntry.5.12 = Interface FastEthernet0/1, changed state to up
> clogHistoryEntry.6.12 = 1277650
> *Mar 1 03:32:57.499: %LINEPROTO-5-UPDOWN: Line protocol on Interface
> FastEthernet0/1, changed state to up
> *Mar 1 03:32:57.539: SNMP: Queuing packet to 172.16.1.61
> *Mar 1 03:32:57.539: SNMP: V2 Trap, reqid 15, errstat 0, erridx 0
> sysUpTime.0 = 1277753
> snmpTrapOID.0 = ciscoSyslogMIB.2.0.1
> clogHistoryEntry.2.13 = LINEPROTO
> clogHistoryEntry.3.13 = 6
> clogHistoryEntry.4.13 = UPDOWN
> clogHistoryEntry.5.13 = Line protocol on Interface FastEthernet0/1,
> changed state to up
> clogHistoryEntry.6.13 = 1277750
> *Mar 1 03:32:57.563: SNMP: Queuing packet to 172.16.1.61
> *Mar 1 03:32:57.563: SNMP: V2 Trap, reqid 16, errstat 0, erridx 0
> sysUpTime.0 = 1277756
> snmpTrapOID.0 = snmpTraps.4
> ifIndex.2 = 2
> ifDescr.2 = FastEthernet0/1
> ifType.2 = 6
> lifEntry.20.2 = up
>
>
> THEN change the SNMP-SERVER settings, no more UPDOWN messages:
>
> Router(config)#snmp-server host 172.16.1.61 version 2c PUBLIC config
> Router(config)#do sh run | s snmp
> snmp-server enable traps snmp linkdown linkup
> snmp-server enable traps syslog
> snmp-server host 172.16.1.61 version 2c PUBLIC config
>
> Router(config)#do sh ip int br
> Interface IP-Address OK? Method Status
> Protocol
> FastEthernet0/0 172.16.1.1 YES manual up
> up
> FastEthernet0/1 unassigned YES unset up
> up
> Router(config)#int f0/1
> Router(config-if)#shut
> Router(config-if)#
> *Mar 1 03:34:38.363: %LINK-5-CHANGED: Interface FastEthernet0/1, changed
> state to administratively down
> *Mar 1 03:34:39.363: %LINEPROTO-5-UPDOWN: Line protocol on Interface
> FastEthernet0/1, changed state to down
> Router(config-if)#no shut
> Router(config-if)#
> *Mar 1 03:35:35.935: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed
> state to up
> *Mar 1 03:35:36.935: %LINEPROTO-5-UPDOWN: Line protocol on Interface
> FastEthernet0/1, changed state to up
>
>
> ANOTHER CHANGE and TEST with key WORD SYSLOG and syslog traps enabled:
>
> Router#sh run | s snmp
> snmp-server enable traps syslog
> snmp-server host 172.16.1.61 version 2c PUBLIC syslog
> Router#conf t
> Enter configuration commands, one per line. End with CNTL/Z.
> Router(config)#exit
> Router#
> *Mar 1 03:42:06.759: %SYS-5-CONFIG_I: Configured from console by console
> *Mar 1 03:42:06.807: SNMP: Queuing packet to 172.16.1.61
> *Mar 1 03:42:06.807: SNMP: V2 Trap, reqid 25, errstat 0, erridx 0
> sysUpTime.0 = 1332679
> snmpTrapOID.0 = ciscoSyslogMIB.2.0.1
> clogHistoryEntry.2.21 = SYS
> clogHistoryEntry.3.21 = 6
> clogHistoryEntry.4.21 = CONFIG_I
> clogHistoryEntry.5.21 = Configured from console by console
> clogHistoryEntry.6.21 = 1332676
> *Mar 1 03:42:07.059: SNMP: Packet sent via UDP to 172.16.1.61
>
> Router#conf t
> Enter configuration commands, one per line. End with CNTL/Z.
> Router(config)#int f0/1
> Router(config-if)#shut
> Router(config-if)#
> *Mar 1 03:42:43.383: %LINK-5-CHANGED: Interface FastEthernet0/1, changed
> state to administratively down
> *Mar 1 03:42:43.427: SNMP: Queuing packet to 172.16.1.61
> *Mar 1 03:42:43.427: SNMP: V2 Trap, reqid 26, errstat 0, erridx 0
> sysUpTime.0 = 1336341
> snmpTrapOID.0 = ciscoSyslogMIB.2.0.1
> clogHistoryEntry.2.22 = LINK
> clogHistoryEntry.3.22 = 6
> clogHistoryEntry.4.22 = CHANGED
> clogHistoryEntry.5.22 = Interface FastEthernet0/1, changed state to
> administratively down
> clogHistoryEntry.6.22 = 1336338
> *Mar 1 03:42:43.679: SNMP: Packet sent via UDP to 172.16.1.61
> *Mar 1 03:42:44.383: %LINEPROTO-5-UPDOWN: Line protocol on Interface
> FastEthernet0/1, changed state to down
> *Mar 1 03:42:44.431: SNMP: Queuing packet to 172.16.1.61
> *Mar 1 03:42:44.431: SNMP: V2 Trap, reqid 27, errstat 0, erridx 0
> sysUpTime.0 = 1336442
> snmpTrapOID.0 = ciscoSyslogMIB.2.0.1
> clogHistoryEntry.2.23 = LINEPROTO
> clogHistoryEntry.3.23 = 6
> clogHistoryEntry.4.23 = UPDOWN
> clogHistoryEntry.5.23 = Line protocol on Interface FastEthernet0/1,
> changed state to down
> clogHistoryEntry.6.23 = 1336438
> *Mar 1 03:42:44.683: SNMP: Packet sent via UDP to 172.16.1.61
>
>
>
> On Sat, Oct 3, 2009 at 5:38 AM, Adrian <ccie2323_at_gmail.com> wrote:
>
>> Hi thanks for the reply,
>> So does it mean that configuration 1 will
>> send both mac-notification and linkup and linkdown traps while
>> configuration
>> 2 will only send mac-notification traps?
>>
>>
>> *Configuration 1*
>> snmp-server enable traps mac-notification
>> snmp-server enable traps snmp linkup linkdown
>> snmp-server host 172.16.1.61 traps version 2c public
>>
>> *Configuration 2*
>> snmp-server enable traps mac-notification
>> snmp-server enable traps snmp linkup linkdown
>> snmp-server host 172.16.1.61 traps version 2c public mac-notification snmp
>>
>>
>> On Sat, Oct 3, 2009 at 4:32 AM, Usain TheThunderbolt <
>> fordownloadsccie_at_gmail.com> wrote:
>>
>> > They will accomplish the same thing , the second config will restrict
>> > the traps sent to the management station to just the ones specified in
>> > the snmp-server command . This prevents the sending of all traps in
>> > case other ones have been enabled
>> >
>> > On 10/2/09, Adrian <ccie2323_at_gmail.com> wrote:
>> > > Hi Experts,
>> > > I'm abit confused with regards configuration of snmp
>> > traps.
>> > > I would like to know the difference between the below 2.
>> > >
>> > > *Configuration 1*
>> > > snmp-server enable traps mac-notification
>> > > snmp-server enable traps snmp linkup linkdown
>> > > snmp-server host 172.16.1.61 traps version 2c public
>> > >
>> > > *Configuration 2*
>> > > snmp-server enable traps mac-notification
>> > > snmp-server enable traps snmp linkup linkdown
>> > > snmp-server host 172.16.1.61 traps version 2c public mac-notification
>> > snmp
>> > >
>> > >
>> > > Blogs and organic groups at http://www.ccie.net
>> > >
>> > >
>> _______________________________________________________________________
>> > > Subscription information may be found at:
>> > > http://www.groupstudy.com/list/CCIELab.html
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> >
>> >
>> > --
>> > Warm Regards ,
>> > Usain TheThunderbolt
>> >
>> > CCNAX3 (Voice , Security , Wireless )
>>
>>
>> Blogs and organic groups at http://www.ccie.net
>>
>> _______________________________________________________________________
>> Subscription information may be found at:
>> http://www.groupstudy.com/list/CCIELab.html
>>
>>
>>
>>
>>
>>
>>
>>
>
>
> --
> Garry L. Baker
>
> "There is no 'patch' for stupidity." - www.sqlsecurity.com
>
-- Garry L. Baker "There is no 'patch' for stupidity." - www.sqlsecurity.com Blogs and organic groups at http://www.ccie.netReceived on Sat Oct 03 2009 - 14:11:40 ART
This archive was generated by hypermail 2.2.0 : Sun Nov 01 2009 - 07:50:59 ART