I have a Juniper MX router that is accepting SNMP requests. Problem is I am sending UDP requests to one interface, and it is replying on another. The target IP is that which is assigned to lo0.1 but the router is replying on lo0.0. This is problematic as the IP address for lo0.0 is what is specified on an exterior firewall. Is there a way to define what interface needs to reply to the snmp requests?
Not being a JunOS expert, but in Cisco-land the
snmp source-address x.x.x.x command would fix your issue. Here's the JunOS documentation I was able to locate:
Syntax source-address address; Hierarchy Level [edit snmp trap-options]
The router is going to reply to the source IP address of the SNMP packet, right? I imagine that you would look in the routing table for the route to the subnet of the source packet to determine where the response goes. Normally, this would be the same interface that it received that packet on. You could always to some type of policy-based routing where you could force traffic desitned to [source address of SNMP packet] out of interface [whichever].
Hope that helps.