Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SNMP trap-source for INFORMS

Status
Not open for further replies.

Michoud

Technical User
Dec 27, 2005
33
US
I've been using SNMP traps to monitor when an interface on my routers comes up. Now I want to change from using TRAPS to INFORMs messages.

When I change the configuration to use INFORMs I get the messages at my SNMP Manager but the trap-source is no longer the interface I specified.

Here was the working configuration:
snmp-server trap-source Loopback0
snmp-server enable traps snmp linkup
snmp-server host 10.10.10.10 public snmp

This is the configuration I want to use:
snmp-server trap-source Loopback0
snmp-server enable traps snmp linkup
snmp-server host 10.10.10.10 inform version 2c public

When I receive the INFORMs at the SNMP Manager the source shows the IP address of FA0. My first thought was I need to change the "trap-source" command to "inform-source" but there is no such command.


Anyone have any ideas? Thanks!
 
Turns out the new command for this is snmp-server source-interface informs Loopback0. It still doesn't work though, its still reporting the source interface as FastEthernet0 instead of LoopBack0. I've tried reapplying the commands, reloading the router ... still no luck.
 
Do you have "ip unnumbered int lo0" under fa0? A loopback interface is always up, so I can't see how this will work. Post a sh run, scrubbed of ip addresses and passwords...

Burt
 
I'm not trying to monitor lo0, I'm trying to monitor when Async1 comes up. I just want the source-interface reported by the trap as lo0. The command snmp-server source-interface informs Loopback0 should do it but when I receive the trap the source-interface shows the ip address of FA0.

The problem showed up with I switched from traps to informs. When I was using traps, the source interface was being reported as lo0.

Current configuration : 5239 bytes
!
! Last configuration change at 09:44:55 CST Tue Nov 25 2008 by daddy
!
version 12.4
no service pad
service tcp-keepalives-in
service tcp-keepalives-out
service timestamps debug datetime msec localtime show-timezone
service timestamps log datetime msec localtime show-timezone
service password-encryption
!
hostname test_location
!
boot-start-marker
boot-end-marker
!
logging buffered 51200 warnings
enable secret 5 xyz
!
no aaa new-model
memory-size iomem 5
clock timezone CST -6
clock summer-time CDT recurring
!
!
dot11 syslog
no ip source-route
!
!
ip cef
!
!
no ip domain lookup
ip domain name booya.com
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
multilink bundle-name authenticated
chat-script modem "" ATZ TIMEOUT 30 OK atdt\T TIMEOUT 60 CONNECT \c
chat-script setautoanswer "" AT&FS0=7 OK AT&Y0 OK AT&W0 OK
!
!
username dad password 7 dad
username mom password 7 mom
!
!
archive
log config
hidekeys
!
!
!
class-map match-any RTPT
match ip dscp ef
class-map match-any CBT
match access-group 110
match access-group 110
class-map match-any NBT
match access-group 111
match access-group 111
!
!
policy-map AQ
class RTPT
priority percent 10
class CBT
bandwidth percent 60
set ip dscp af31
class NBT
bandwidth percent 30
set ip dscp af21
class class-default
set ip dscp default
!
!
!
!
interface Loopback0
ip address 10.3.255.125 255.255.255.255
!
interface Loopback1
no ip address
!
interface FastEthernet0
ip address 10.3.125.254 255.255.255.252
duplex auto
speed auto
no cdp enable
max-reserved-bandwidth 100
service-policy output AQ
!
interface FastEthernet1
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet2
!
interface FastEthernet3
shutdown
!
interface FastEthernet4
shutdown
!
interface FastEthernet5
shutdown
!
interface FastEthernet6
shutdown
!
interface FastEthernet7
shutdown
!
interface FastEthernet8
shutdown
!
interface FastEthernet9
switchport mode trunk
!
interface Vlan1
ip address 10.3.125.1 255.255.255.224
ip verify unicast reverse-path
!
interface Vlan2
ip address 10.3.125.33 255.255.255.224
ip access-group PV in
ip verify unicast reverse-path
!
interface Async1
bandwidth 28
ip unnumbered Loopback0
encapsulation ppp
dialer in-band
dialer idle-timeout 660
dialer map ip 10.10.1.95 name N modem-script modem broadcast 1-800-123-4567
dialer map ip 10.10.1.0 name N modem-script modem broadcast 1-800-123-4567
dialer watch-group 1
dialer-group 1
async dynamic routing
async mode interactive
no peer default ip address
ppp authentication chap
routing dynamic
!
router eigrp 1
network 10.0.0.0
distribute-list 1 out
no auto-summary
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 10.10.1.1
ip route 0.0.0.0 0.0.0.0 10.10.1.95 200
ip route 10.10.1.95 255.255.255.255 Async1
!
!
no ip http server
no ip http secure-server
!
ip access-list extended PV
permit icmp any any
permit ip any 10.10.1.0 0.0.0.255
permit ip any host 10.3.125.2
permit ip any host 10.3.125.3
permit ip any 20.20.0.0 0.0.255.255
permit ip any host 10.10.20.57
deny ip any any log
!
logging 10.255.254.223
access-list 1 permit 10.3.255.125
access-list 1 permit 10.3.125.0 0.0.0.255
access-list 23 permit 10.10.10.0 0.0.0.7
access-list 100 deny eigrp any any
access-list 100 deny ip any host 224.0.0.9
access-list 100 deny ip any 10.255.254.0 0.0.0.255
access-list 100 deny udp any any eq snmp
access-list 100 permit ip any 10.0.0.0 0.255.255.255
access-list 110 remark CBT
access-list 110 permit ip any host 10.10.1.17
access-list 110 remark RT
access-list 110 permit ip any host 10.10.1.39
access-list 110 permit ip any host 10.10.1.49
access-list 110 permit ip any host 10.10.1.56
access-list 110 remark DS
access-list 110 permit ip any host 10.10.1.40
access-list 111 remark NBT
access-list 111 permit ip 10.0.0.0 0.255.255.255 10.0.0.0 0.255.255.255
dialer watch-list 1 ip 10.10.1.0 255.255.255.0
dialer-list 1 protocol ip list 100
snmp-server community test RO
snmp-server community test2 RW
snmp-server source-interface informs Loopback0
snmp-server enable traps snmp linkup
snmp-server host 10.10.10.10 inform version 2c test
!
!
!
!
!
!
control-plane
!
banner login ^CC
WARNING: You are accessing a private network.
Unauthorized access is strictly prohibited. Violators
will be prosecuted to the full extent of the law.
Your source address has been captured.
^C
!
line con 0
logging synchronous
login local
line 1
password 7 xyz
script startup setautoanswer
login
modem InOut
modem autoconfigure discovery
transport input all
autoselect during-login
autoselect ppp
stopbits 1
speed 115200
flowcontrol hardware
line aux 0
login local
line vty 0 4
login local
transport input telnet ssh
line vty 5 15
login local
transport input telnet ssh
!
ntp clock-period 17180152
ntp server 10.255.254.223
!
webvpn context Default_context
ssl authenticate verify all
!
no inservice
!
end
 
Bump.

So here's what got it to work. I removed all of the snmp-server commands and then only entered these commands:

snmp-server source-interface informs Loopback0
snmp-server enable traps snmp linkup
snmp-server host 10.10.10.10 inform version 2c public

With this configuration my management station receives the trap source as Lookback0.

The kicker is, it only works until the router is rebooted. After a reload, I still receive the traps but now the source interface is showing the IP address of FA0. A double check of the config shows that nothing has changed since reload. (Yes, I made sure I saved the configuration between reloads ... tried multiple times).


What gives?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top