cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
20056
Views
29
Helpful
4
Replies

SNMP Source interface issue

Vijay Bhargav
Level 1
Level 1

Hi All,

Is it necessary to mention snmp-server trap-source <interface name> while configuring SNMP in a router/switch?. what if we do not configure this command on a device having multiple interfaces?

Regards,

VB

2 Accepted Solutions

Accepted Solutions

AFROJ AHMAD
Cisco Employee
Cisco Employee

Hi ,

If you don't configure this command then devices uses "the closest interface to the destination"

 

snmp-server trap-source <interface name>

This command specifies the interface (and consequently the IP address) that should be used to send SNMP traps. If you have a separate network for management tasks (a good idea), you can use this command to ensure that traps are sent only over the management network.

 

Thanks-

Afroz

***Ratings Encourages Contributors ***

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****

View solution in original post

The original post had a two part question, so I will provide a two part answer.

1) Is it necessary to specify the trap source interface? No it is not necessary to specify the trap source interface. Traps will be sent anyway but it becomes more difficult to predict what source address will be used.

2) What happens if we do not configure it. As Afroz explains the device will use what it considers to be the closest interface at that particular time to send the trap. The result is that as interface status may change or as routing table information changes some traps may be sent with Gig0/1 as the source while other traps are sent with Gig0/2 as the source. The reality is that all these traps are from the same device but it will be difficult to see that as you look at the received traps and see different sources.

 

So I would say that while it is not necessary it is certainly recommended, especially when the device has more than one interface that could potentially serve as the source.

 

HTH

 

Rick

HTH

Rick

View solution in original post

4 Replies 4

AFROJ AHMAD
Cisco Employee
Cisco Employee

Hi ,

If you don't configure this command then devices uses "the closest interface to the destination"

 

snmp-server trap-source <interface name>

This command specifies the interface (and consequently the IP address) that should be used to send SNMP traps. If you have a separate network for management tasks (a good idea), you can use this command to ensure that traps are sent only over the management network.

 

Thanks-

Afroz

***Ratings Encourages Contributors ***

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****

The original post had a two part question, so I will provide a two part answer.

1) Is it necessary to specify the trap source interface? No it is not necessary to specify the trap source interface. Traps will be sent anyway but it becomes more difficult to predict what source address will be used.

2) What happens if we do not configure it. As Afroz explains the device will use what it considers to be the closest interface at that particular time to send the trap. The result is that as interface status may change or as routing table information changes some traps may be sent with Gig0/1 as the source while other traps are sent with Gig0/2 as the source. The reality is that all these traps are from the same device but it will be difficult to see that as you look at the received traps and see different sources.

 

So I would say that while it is not necessary it is certainly recommended, especially when the device has more than one interface that could potentially serve as the source.

 

HTH

 

Rick

HTH

Rick

Thanks Afroz and Rich for clarifying. It helped me a lot.

 

Regards,

VB

m-ko
Level 1
Level 1

When you specific snmp-server trap-source interface, what will happen if that interface or link is down?

Review Cisco Networking for a $25 gift card