From: Hobbs (deadheadblues@gmail.com)
Date: Sun Jan 18 2009 - 15:52:30 ARST
Thank you Howard, that looks like it does the trick...
Version 1, traps get sent to both hosts:
R1#sho run | inc snmp
snmp-server enable traps bgp
snmp-server enable traps pim neighbor-change rp-mapping-change
invalid-pim-message
snmp-server host 2.2.2.2 public bgp
snmp-server host 3.3.3.3 public pim
R1#
R1#clear ip bgp *
R1#
00:11:49: %BGP-5-ADJCHANGE: neighbor 172.12.14.4 Down User reset
00:11:49: SNMP: Queuing packet to 2.2.2.2
00:11:49: SNMP: V1 Trap, ent bgp, addr 172.12.12.1, gentrap 6, spectrap 2
bgpPeerEntry.14.172.12.14.4 = 00 00
bgpPeerEntry.2.172.12.14.4 = 1
00:11:49: SNMP: Queuing packet to 3.3.3.3
00:11:49: SNMP: V1 Trap, ent bgp, addr 172.12.13.1, gentrap 6, spectrap 2
bgpPeerEntry.14.172.12.14.4 = 00 00
bgpPeerEntry.2.172.12.14.4 = 1
00:11:49: SNMP: Packet sent via UDP to 2.2.2.2
00:11:49: SNMP: Packet sent via UDP to 3.3.3.3
Version 2c, traps get sent to one as desired:
R1#sho run | inc snmp
snmp-server enable traps bgp
snmp-server enable traps pim neighbor-change rp-mapping-change
invalid-pim-message
snmp-server host 2.2.2.2 version 2c public bgp
snmp-server host 3.3.3.3 version 2c public pim
R1#
R1#clear ip bgp *
R1#
00:13:09: %BGP-5-ADJCHANGE: neighbor 172.12.14.4 Down User reset
R1#
00:13:09: SNMP: Queuing packet to 2.2.2.2
00:13:09: SNMP: V2 Trap, reqid 21, errstat 0, erridx 0
sysUpTime.0 = 78967
snmpTrapOID.0 = bgpTraps.2
bgpPeerEntry.14.172.12.14.4 = 00 00
bgpPeerEntry.2.172.12.14.4 = 1
00:13:09: SNMP: Packet sent via UDP to 2.2.2.2
R1#
I did not know that this was a difference between version 1 and 2c. Is this
a fundamental difference in the protocol or just the way the router behaves?
thanks!
On Sun, Jan 18, 2009 at 10:11 AM, Howard Hooper
<Howard.Hooper@dupre.co.uk>wrote:
> Hi,
>
> Have you tried specifiying snmp version 2c in your host 2.2.2.2 command?
>
>
> HTH
>
> Howard
>
> _____
>
> From: nobody@groupstudy.com on behalf of Hobbs
> Sent: Sun 18/01/2009 16:47
> To: Pavel Bykov
> Cc: ccielab@groupstudy.com
> Subject: Re: Filtering trap types for a specific snmp-server
>
>
>
> HI Pavel, thanks for the reply,
>
> What I wanted to do was send BGP traps to one host, and OSPF traps to
> another...that's where I was headed with my example. It seems this is not
> possible...even the chapter in routing tcp/ip vol 2 has the same type of
> example
>
> On Sun, Jan 18, 2009 at 3:50 AM, Pavel Bykov <slidersv@gmail.com> wrote:
>
> > If you look at DOCCD, it says that "by default, all of the traps are sent
> > to host". Logically, you need to disable traps you DON'T WANT to send.
> > But it didn't work for me that way either... :(
> >
> > On Fri, Jan 16, 2009 at 12:23 AM, Hobbs <deadheadblues@gmail.com> wrote:
> >
> >> Hello,
> >>
> >> I am working on some snmp stuff and I thought we could limit the traps
> we
> >> send to specific servers by putting the name of trap at the end of the
> >> snmp-server host command. However, while testing this it doesn't seem to
> >> work the way I expected it. I only want to send BGP traps to 2.2.2.2 yet
> >> below OSPF traps are also getting sent.
> >>
> >> R8 has the following SNMP config:
> >>
> >> R8#sho run | inc snmp
> >> snmp-server enable traps bgp
> >> snmp-server enable traps ospf state-change
> >> snmp-server host 2.2.2.2 public bgp
> >>
> >> R8#debug snmp packets
> >> SNMP packet debugging is on
> >> R8#clear ip ospf process
> >> Reset ALL OSPF processes? [no]: yes
> >>
> >> *Mar 2 00:52:10.817: SNMP: Queuing packet to 2.2.2.2
> >> *Mar 2 00:52:10.817: SNMP: V1 Trap, ent ospfTrap.2, addr 192.168.78.8,
> >> gentrap 6, spectrap 16
> >> ospfGeneralGroup.1 = 192.168.78.8
> >> ospfIfEntry.1 = 192.168.8.8
> >> ospfIfEntry.2 = 0
> >> ospfIfEntry.12 = 7
> >>
> >> There's much more SNMP packets regarding OSPF after this.
> >>
> >> Why are OSPF traps sent if I did not enable them for the server 2.2.2.2?
> >>
> >> Am I misunderstanding the way this is supposed to work?
> >>
> >> thanks,
> >>
> >>
> >> Blogs and organic groups at http://www.ccie.net
> >>
> >> _______________________________________________________________________
> >> Subscription information may be found at:
> >> http://www.groupstudy.com/list/CCIELab.html
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> > --
> > Pavel Bykov
> > ----------------
> > Don't forget to help stopping the braindumps, use of which reduces value
> of
> > your certifications. Sign the petition at http://www.stopbraindumps.com/
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
>
>
>
>
>
>
>
>
> This message has been scanned for viruses by MailController -
> www.MailController.altohiway.com
> _Click
>
https://www.mailcontroller.altohiway.com/sr/G7H2eF84q1fTndxI!oX7UjfDHnKINIuqp
8PnxFszsdOKv+j8NcfzZbga2c+8FfndON+me4MB1oRmYIqzE2R4VA==<https://www.mailcontr
oller.altohiway.com/sr/G7H2eF84q1fTndxI%21oX7UjfDHnKINIuqp8PnxFszsdOKv+j8Ncfz
Zbga2c+8FfndON+me4MB1oRmYIqzE2R4VA==> to report this email as spam.
>
>
>
> CONFIDENTIALITY NOTICE:
> This e-mail (and any attachments) are confidential, legally privileged
> and/or protected by copyright. This e-mail is intended only for the
> addressee or the person responsible for delivering it to the addressee. If
> you receive this e-mail in error please notify the sender by replying by
> e-mail or telephone immediately (telephone 01635 55 55 55. If calling from
> outside the UK 0044 1635 55 55 55) and then delete this e-mail (and any
> attachments) from your system, entirely. You should not disclose the
> contents of this e-mail (and any attachments) to any other person and no
> copies should be made.
> Company registration number: 1520800
> Registered Office: du Pri plc, Vo-Tec Centre, Hambridge Lane, Newbury,
> Berkshire. RG14 5TN.
Blogs and organic groups at http://www.ccie.net
This archive was generated by hypermail 2.1.4 : Sun Mar 01 2009 - 09:43:38 ARST