Community discussions

MikroTik App
 
blastcomm
just joined
Topic Author
Posts: 17
Joined: Thu Sep 02, 2004 11:05 pm

SNMP reading with Multiple network paths

Thu Aug 21, 2008 7:52 pm

I've run into a problem with SNMP reads and I'm hoping it's just something stupid I've overlooked. I searched the forum and haven't found this topic discussed, let me know if I've missed the thread.

The Scenario:
Mikrotik Router fed with Multiple feeds as part of a loop (OSPF Routing), OSPF Costing setup so one path is better than another. Interface 1 is all traffic incoming to the router, Interface 2 is all traffic leaving the router.

The problem:
When both links are active, SNMP Reads to the Mikrotik Time out. If One link is dropped, so traffic is going in and out of the same interface, The reads work just fine. I've tried doing an SNMP read of the IP on the OSPF interface, and Setting up a loopback interface with a /32 address, neither one lets me SNMP if both links are active. Everything always responds fine to pings. If the Paths are Equal cost, SNMP reads work just fine.

Anyone else run into this?
Is there something simple I'm missing, or do I have to go and mess around with firewall output rules and try to force the SNMP Traffic leaving the router over a specific interface.

-Nate
 
changeip
Forum Guru
Forum Guru
Posts: 3830
Joined: Fri May 28, 2004 5:22 pm

Re: SNMP reading with Multiple network paths

Thu Aug 21, 2008 9:51 pm

I screwed around for an hour trying to make this work. There was no combination of route marking, input output chain stuff, redirect, etc that will make it work for me. I really wish this could be fixed to reply on the IP that the request came in on - Microsoft SNMP does this! Maybe we both need to send requests to support to ask that they fix it. Almost all of our MT routers are multihomed now and it's becoming a bigger pain to deal with.

I know UDP is stateless. I know I _should_ be able to use the NAT redirect function to place it in the connection table and reply with the same IP. Doesn't work like I'd expect it to.

Request: Please let the snmp packets leave with the same IP as the original request, no matter what interface it is sent from.
 
blastcomm
just joined
Topic Author
Posts: 17
Joined: Thu Sep 02, 2004 11:05 pm

Re: SNMP reading with Multiple network paths

Thu Aug 21, 2008 10:22 pm

At least I'm not the only one with this problem. I will send a request to support and see what they have to say.
 
awsmith
newbie
Posts: 45
Joined: Wed May 31, 2006 8:18 am

Re: SNMP reading with Multiple network paths

Sun Aug 24, 2008 9:15 am

Try placing an IP on a loopback (bridge with no ports attached) interface and query that IP?

I have seen problems querying a MT and it sending the response out the port with the IP queried, even if the proper path was out a different port.
 
changeip
Forum Guru
Forum Guru
Posts: 3830
Joined: Fri May 28, 2004 5:22 pm

Re: SNMP reading with Multiple network paths

Sun Aug 24, 2008 8:19 pm

did that. empty bridge (loopback), used redirect, tried using a :6161 with dst-nat, nothing I did would make the snmpd respond on the same IP it was requested on.
 
blastcomm
just joined
Topic Author
Posts: 17
Joined: Thu Sep 02, 2004 11:05 pm

Re: SNMP reading with Multiple network paths

Tue Aug 26, 2008 5:10 pm

I also tried with the Loopback address. Does not work
 
blastcomm
just joined
Topic Author
Posts: 17
Joined: Thu Sep 02, 2004 11:05 pm

Re: SNMP reading with Multiple network paths

Mon Nov 10, 2008 11:58 pm

After working with support on this, It is possible. Basically, you need to mark the connections of SNMP Traffic coming in on an interface, then based on the connection-mark, set the routing mark to the same interface on it's way back out of the router.

Here are the step I've implemented.

1. Create a new static default route (0.0.0.0/0) for each uplink interface. Set a Distinct routing mark on each new route.
Example: dst-address=0.0.0.0/0 gateway=10.10.10.1 routing-mark=snmprouting1

2. Create Mangle Rules to mark the connections of Inbound SNMP Traffic.
Example: Chain=input action=mark-connection new-connection-mark=snmp1 protocol=udp dst-port=161 in-interface=ether1 passthrough=yes

3 Create Mangle Rules to Mark routing of the Outbound connection based on the connection mark
Example: Chain=output action=mark-routing new-routing-mark=snmprouting1 passthrough=yes connection-mark=snmp1

Who is online

Users browsing this forum: bdivrik, Bing [Bot], jaclaz, viacheslav1988, yan and 199 guests