Community discussions

MikroTik App
 
User avatar
jfrater
newbie
Topic Author
Posts: 30
Joined: Fri Jun 08, 2007 9:05 pm
Location: Costa Rica
Contact:

Listing the routing table via SNMP

Wed May 18, 2011 8:51 am

Hi, I want to get the routing table from a router but with no luck, everything else like IP and interfaces have no problem.

Is there a way to do that on routerOS? I've tried v 4.9 5.0 and 5.2 and nothing.... :(


Thanks

Jorge Frater
 
User avatar
jfrater
newbie
Topic Author
Posts: 30
Joined: Fri Jun 08, 2007 9:05 pm
Location: Costa Rica
Contact:

Re: Listing the routing table via SNMP

Mon May 23, 2011 1:36 am

Well to answer my own question, if I force the SNMP program to use SNMP v1 it works, it does detect the router to be v2 compatible and thats why I only tried v2, but at least on RouterOS 4.9 it works with v1

Jorge
 
dvop
just joined
Posts: 1
Joined: Wed Jun 08, 2011 11:12 am

Re: Listing the routing table via SNMP

Wed Jun 08, 2011 2:54 pm

Hi, I have the same problem:

If a fetch the routing table via SNMP a get an empty result.

# snmpwalk -v1 -c public 10.x.y.z 1.3.6.1.2.1.4.21

Problem appeared from RouterOS version 5.0 (tested on 5.0rc till 5.4). In RouterOS 4.x, everything works. Tested on multiple routers.

In 5.x version, when I perform snmpwalk, it seems both IP address table (1.3.6.1.2.1.4.20) and ARP table (1.3.6.1.2.1.4.22) are OK. Only routing table is not accessible via SNMP. Tried both version 1 and 2c.

Thanks for any advice.

Petr
 
davidsm
just joined
Posts: 11
Joined: Wed Nov 05, 2008 1:48 am

Re: Listing the routing table via SNMP

Tue Jun 14, 2011 8:25 am

I'm having the same problem. I'm trying to monitor my OSPF status by checking the default route.

In v4.17:

snmpwalk -v2c -c public 172.20.0.1 iso.org.dod.internet.mgmt.mib-2.ip.ipRouteTable.ipRouteEntry.ipRouteNextHop.0.0.0.0
RFC1213-MIB::ipRouteNextHop.0.0.0.0 = IpAddress: 202.168.24.69


v5.4:

snmpwalk -v2c -c public 172.20.0.2 iso.org.dod.internet.mgmt.mib-2.ip.ipRouteTable.ipRouteEntry.ipRouteNextHop.0.0.0.0
RFC1213-MIB::ipRouteNextHop.0.0.0.0 = No Such Instance currently exists at this OID
 
meshnet
Frequent Visitor
Frequent Visitor
Posts: 57
Joined: Tue Jun 01, 2004 6:57 pm

Re: Listing the routing table via SNMP

Tue Jul 09, 2013 11:11 pm

I know this is an old post, but was there ever a working solution to this bug?

From a 5.25 router, I can only read about 320 routes from snmp.

From a 4.17 router, connected by ethernet to the same router, I can get all 632 routes from snmp.

Both show the same routes in winbox under /ip route...

Thanks,
Richard
 
meshnet
Frequent Visitor
Frequent Visitor
Posts: 57
Joined: Tue Jun 01, 2004 6:57 pm

Re: Listing the routing table via SNMP

Tue Jul 09, 2013 11:22 pm

And what is interesting is that it looks like the results from the 5.25 router are
skipping every other route entry that should be in the snmpwalk.
It prints one, then skips one, prints one, skips one..

If I try to query the oid directly ( that should be there, and is on the other router ), I get

"No Such Instance currently exists at this OID"

Richard
 
meshnet
Frequent Visitor
Frequent Visitor
Posts: 57
Joined: Tue Jun 01, 2004 6:57 pm

Re: Listing the routing table via SNMP

Wed Jul 10, 2013 4:54 pm

I recieved the typical "Upgrade to the latest 6.x version, and test it" from support...

Great..

Richard
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26385
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Listing the routing table via SNMP

Wed Jul 10, 2013 4:56 pm

I recieved the typical "Upgrade to the latest 6.x version, and test it" from support...

Great..

Richard
You are using an old version which is very unlikely getting any updates. All issues are fixed only in v6 now, so if there was a bug, it is very likely v6 has it fixed. "Please upgrade" is a very reasonable response.
 
meshnet
Frequent Visitor
Frequent Visitor
Posts: 57
Joined: Tue Jun 01, 2004 6:57 pm

Re: Listing the routing table via SNMP

Wed Jul 10, 2013 9:33 pm

5.25 is not that old.

I have IPSEC tunnels on this router, also..
So, when I upgrade to 6.1, and it kills my IPSEC tunnels, that is a fix?

Thanks,
Richard
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26385
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Listing the routing table via SNMP

Thu Jul 11, 2013 2:11 pm

If you have a SNMP problem in v5.25, and an IPsec problem in v6.1, you are really out of luck. Both these issues are very rare, and happen only in specific circumstances. v6.2 has the IPsec issue fixed.

v6.2 is here: http://www.mikrotik.com/download/share/ ... be-6.2.npk (MIPS-BE). Change the name to get other build files.
 
Numenori
just joined
Posts: 15
Joined: Tue Jun 04, 2013 5:50 pm

Re: Listing the routing table via SNMP

Thu Jul 11, 2013 4:20 pm

Normis, what about changelog for 6.2?
 
User avatar
semakka
Member Candidate
Member Candidate
Posts: 196
Joined: Mon Sep 11, 2006 10:59 am
Location: Moraira, Alicante, Spain
Contact:

Re: Listing the routing table via SNMP

Sat Aug 17, 2013 2:45 pm

have you tried commenting the
  • mibs :
line in
  • /etc/snmp/snmp.conf
in case of a linux machine from which you do the query.
had the same problem and that solved it.

Semakka
 
saturn
just joined
Posts: 2
Joined: Wed Aug 21, 2013 1:27 pm

Re: Listing the routing table via SNMP

Wed Aug 21, 2013 1:33 pm

I have the same (can't get default route via snmp) problem on 5.11, 5.16, 5.24, 5.25, 6.1, 6.2 versions of RouterOS.
have you tried commenting the
  • mibs :
line in
  • /etc/snmp/snmp.conf
in case of a linux machine from which you do the query.
had the same problem and that solved it.
There is no effect after this.
 
User avatar
semakka
Member Candidate
Member Candidate
Posts: 196
Joined: Mon Sep 11, 2006 10:59 am
Location: Moraira, Alicante, Spain
Contact:

Re: Listing the routing table via SNMP

Thu Aug 22, 2013 3:28 pm

can you give more info about how you do the query and what for?
 
saturn
just joined
Posts: 2
Joined: Wed Aug 21, 2013 1:27 pm

Re: Listing the routing table via SNMP

Sat Aug 31, 2013 2:29 pm

can you give more info about how you do the query and what for?
Yes, I execute follow command and get:
root@ocs:~# snmpget -v 2c -c %my_read_comm% 10.10.0.10 .1.3.6.1.2.1.4.21.1.7.0.0.0.0
iso.3.6.1.2.1.4.21.1.7.0.0.0.0 = No Such Instance currently exists at this OID
 
chaigeo
just joined
Posts: 15
Joined: Fri Mar 07, 2014 7:41 pm

Re: Listing the routing table via SNMP

Fri Mar 07, 2014 7:50 pm

Well, i have the same problem to all RB.
I can get with snmp only one route not all routing table.
Checked to v6.4 and 6.9 with snmpwalk snmpget whatsup,dude..only one route returns.
Tried everything.
The only tool i can get all routing table is Ipreasoning Mib Browser with getbulk. (not working either here with simple get).

any help will be appreciated..

G.
 
chaigeo
just joined
Posts: 15
Joined: Fri Mar 07, 2014 7:41 pm

Re: Listing the routing table via SNMP

Mon Mar 10, 2014 11:39 am

Checked with v5.26 works!
Problem exists in v6.xx

G.
 
chaigeo
just joined
Posts: 15
Joined: Fri Mar 07, 2014 7:41 pm

Re: Listing the routing table via SNMP

Mon May 26, 2014 6:36 pm

Hello,

Any update from mikrotik?

thanks in advance,

George

Who is online

Users browsing this forum: Bing [Bot], iDaemon, jaclaz, pturmel, qwertykolea and 190 guests