Community discussions

 
ivan07
newbie
Posts: 25
Joined: Wed Mar 04, 2015 2:57 am

Re: Metarouter images

Mon Mar 16, 2015 9:16 am

A MetaROUTER doesn't see any interfaces except for the ones that you assign to that MetaROUTER.
yes, I assigned SFP interface to Metarouter:
[admin@MikroTik] /metarouter interface> print
Flags: X - disabled, A - active
# VIRTUAL-MACHINE TYPE STATIC-INTERFACE VM-MAC-ADDRESS
0 A mr2 static ether1
1 A mr2 static sfp1

But it does not appear in openwrt (only eth0-ether1) :(

root@metarouter:/# ifconfig
eth0 Link encap:Ethernet HWaddr
inet addr:10.7.7.13 Bcast:10.7.7.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7547 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7343466 (7.0 MiB) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Also, MetaROUTERs do not have direct control over the interfaces, so they won't see things like link statistics and the like. The physical interface is abstracted from the MetaROUTER.
Yes, I know it but there is only eth0 in openwrt and nothing else :(
Best way to make an interface available to a MetaROUTER is to create a virtual interface, assign it to the MetaROUTER, and bridge it to the SFP (or ethernet, or wireless, or whatever) interface.
thanks for the advice, I will try also this way.
 
User avatar
NathanA
Forum Veteran
Forum Veteran
Posts: 801
Joined: Tue Aug 03, 2004 9:01 am

Re: Metarouter images

Mon Mar 16, 2015 12:58 pm

Yes, I know it but there is only eth0 in openwrt and nothing else :(
Okay, you didn't explain this. Your problem is not your RouterOS configuration. You need to edit /etc/config/network in OpenWRT and make sure that there is a section for every interface. If you run "ifconfig eth1" you will see that it exists, but it just isn't up and configured to do anything (because you didn't configure it).

You need to read the OpenWRT documentation to learn how to format the OpenWRT network config file correctly.
root@metarouter:/# ifconfig
"ifconfig" by itself on Linux very famously only displays information on "up" interfaces. If the interface is not "up" then it will not show up in the list. You need to do "ifconfig -a" on Linux to show all interfaces, up or not. If you are used to other Unixes, this may come as a surprise, but this is Linux Networking 101. "man 8 ifconfig" should help.

-- Nathan
 
iqt
just joined
Posts: 22
Joined: Fri Jun 07, 2013 11:04 am

Re: Metarouter images

Fri May 08, 2015 9:03 pm

I just had a look into the 3.3.5-patch mentioned by Nathan - I think I will start to incorporate it piece by piece... and as far as I know any unaligned memory access on a mips box should lead to a crash.
I just noticed that both in OpenWRT trunk and in the Barrier Breaker branch that it looks like somebody already developed similar fixes for the same memory accesses that MikroTik included in their official patch: https://dev.openwrt.org/browser/branche ... acks.patch. Maybe some of them got missed?

-- Nathan
I tried to combine the 902-unaligned_access_hacks.patch, hecke's patch and original 3.3.5-patch here: https://github.com/iqt4/openwrt

The good news: system boots, no "unaligned" messages so far. The bad news: the whole system reboots without warning. ROS log entry: System rebooted because of kernel failure

I don't have the knowledge to debug this. Any help is appreciated.

Dirk
 
User avatar
NathanA
Forum Veteran
Forum Veteran
Posts: 801
Joined: Tue Aug 03, 2004 9:01 am

Re: Metarouter images

Fri May 15, 2015 2:18 pm

The good news: system boots, no "unaligned" messages so far. The bad news: the whole system reboots without warning. ROS log entry: System rebooted because of kernel failure
Let's not run ahead of ourselves and make assumptions. This may or may not be because of the patches. You need to do more testing to prove your hypothesis of where the problem lies. Have you tried other OpenWRT MetaROUTER images (NOT Barrier Breaker based, but ones that have been proven solid and are being used on production routers by others) on the same router that you are getting these kernel panics on, and are they stable, or are you seeing similar problems?

In my opinion, a MetaROUTER guest should never be able to cause the host to crash. If it does, then I count that as a RouterOS bug. As I have mentioned in other posts to this forum in the past, I have seen many bizarre things re: MetaROUTER on MIPSBE in recent versions (6.2x) of RouterOS to the point where I don't trust it anymore. What version of RouterOS are you trying this image of yours on, and what model of RouterBoard are you testing against? I can personally vouch for RouterOS 6.9 running on RB450G. If you are running a current version of RouterOS, try downgrading to something before 6.12 and see if those kernel panics of yours go away.

If you run further tests and the kernel panics prove to be specific to this Barrier Breaker image of yours, shoot a copy of a prebuilt image to me (either as a URL or an attachment) via e-mail to nathana@fsr.com and I'll take a look.

-- Nathan
 
iqt
just joined
Posts: 22
Joined: Fri Jun 07, 2013 11:04 am

Re: Metarouter images

Sun May 17, 2015 9:37 pm

The good news: system boots, no "unaligned" messages so far. The bad news: the whole system reboots without warning. ROS log entry: System rebooted because of kernel failure
Let's not run ahead of ourselves and make assumptions. This may or may not be because of the patches. You need to do more testing to prove your hypothesis of where the problem lies. Have you tried other OpenWRT MetaROUTER images (NOT Barrier Breaker based, but ones that have been proven solid and are being used on production routers by others) on the same router that you are getting these kernel panics on, and are they stable, or are you seeing similar problems?

In my opinion, a MetaROUTER guest should never be able to cause the host to crash. If it does, then I count that as a RouterOS bug. As I have mentioned in other posts to this forum in the past, I have seen many bizarre things re: MetaROUTER on MIPSBE in recent versions (6.2x) of RouterOS to the point where I don't trust it anymore. What version of RouterOS are you trying this image of yours on, and what model of RouterBoard are you testing against? I can personally vouch for RouterOS 6.9 running on RB450G. If you are running a current version of RouterOS, try downgrading to something before 6.12 and see if those kernel panics of yours go away.

If you run further tests and the kernel panics prove to be specific to this Barrier Breaker image of yours, shoot a copy of a prebuilt image to me (either as a URL or an attachment) via e-mail to nathana@fsr.com and I'll take a look.

-- Nathan
Nathan, I have a RB450G with ROS 6.25 and OpenWRT AA from liquidcz was running without a problem. Barrier Breaker recently got security patches (and has newer versions, which is not my main focus), that was reason to try it. I don't have a spare Routerboard available to check different ROS versions - my children would kill me if I shut down the internet ;)

I agree with you, that MetaROUTER guest must not crash the host. However, according to autosupout.rif it happens:
19:27:39 system,error,critical System rebooted because of kernel failure
19:27:39 system,error,critical router was rebooted without proper shutdown
Reboot happened approximately every 30 minutes, until I stopped the MetaROUTER. ROS 6.25 was running without a problem for several month (without Barrier Breaker as MetaROUTER).

To conclude: The Mikrotik Wiki is providing a MetaROUTER patch for an ancient release of OpenWRT. liquidcz provides AA (thank you for your work!). hecke and others tried to apply the known patches to recent Barrier Breaker without success (and without support from Mikrotik). As you mentioned, recent versions of ROS (6.2x) do not look very promising at all. Thus, I will stay with my current ROS 6.25 and for missing features I use my age-old Qnap TS-109 running Debain wheezy ;)

Thank you for your support - Dirk
 
mIRCon
just joined
Posts: 3
Joined: Sun May 17, 2015 12:35 pm

Re: Metarouter images

Mon May 18, 2015 2:02 am

Nathan, I have a RB450G with ROS 6.25 and OpenWRT AA from liquidcz was running without a problem. Barrier Breaker recently got security patches (and has newer versions, which is not my main focus), that was reason to try it. I don't have a spare Routerboard available to check different ROS versions - my children would kill me if I shut down the internet ;)

I agree with you, that MetaROUTER guest must not crash the host. However, according to autosupout.rif it happens:
19:27:39 system,error,critical System rebooted because of kernel failure
19:27:39 system,error,critical router was rebooted without proper shutdown
Reboot happened approximately every 30 minutes, until I stopped the MetaROUTER. ROS 6.25 was running without a problem for several month (without Barrier Breaker as MetaROUTER).

To conclude: The Mikrotik Wiki is providing a MetaROUTER patch for an ancient release of OpenWRT. liquidcz provides AA (thank you for your work!). hecke and others tried to apply the known patches to recent Barrier Breaker without success (and without support from Mikrotik). As you mentioned, recent versions of ROS (6.2x) do not look very promising at all. Thus, I will stay with my current ROS 6.25 and for missing features I use my age-old Qnap TS-109 running Debain wheezy ;)

Thank you for your support - Dirk
I can confirm the very same but on RouterOS 6.28 version running hecke's BB image as MetaROUTER.
Even Hecke confirmed it's not stable and needs more patching to make it functional.
I'm also not sure why Mikrotik stopped with providing new patches and modification since it can only make their product better and even more widely used.

By the way, anyone got Liquid's AA with asterisk gui running? It's missing 3 dependency packages and I'm wondering if they can be compiled on our own machines (not sure if they [packages] need some patching as well for AA or we can just patch using standard mips subversion)?
 
User avatar
NathanA
Forum Veteran
Forum Veteran
Posts: 801
Joined: Tue Aug 03, 2004 9:01 am

Re: Metarouter images

Tue May 19, 2015 9:49 am

So, I can also confirm that the BB images floating around cause routers to crash and reboot. For me, on a test 450G, it happens approx. every 4 minutes. It turns out that it is actually causing a kernel panic on the host router. This is not 100% clear when testing on a recent version of RouterOS (6.28 in this case) because it looks like MikroTik developers have suppressed kernel panic output to the console in newer versions (which I'm not sure why they think that helps anybody?!?), but when I downgraded my test router to 6.9, the crashes still happened at the same intervals, and with 6.9 I actually got a kernel panic report on the serial console whenever it happened. After the crash, the watchdog (if enabled) would cause the router to reboot.
I agree with you, that MetaROUTER guest must not crash the host. However, according to autosupout.rif it happens:
I can confirm the very same but on RouterOS 6.28 version running hecke's BB image as MetaROUTER.
Even Hecke confirmed it's not stable and needs more patching to make it functional.
Right, but hecke was referring to the crashes that were happening only within the guest because of OpenWRT kernel bugs, not crashes that were happening on the host, which until now nobody else had even brought up in previous discussions about this image (this is totally new information; all previous discussions about BB instability referred to the guest crashing whenever it received data over the virtual ethernet interface), and which he likely cannot do anything about since fixing this kind of crash is MikroTik's responsibility...I don't know why you would expect that any changes that hecke might make to the BB image would fix the router crashes and reboots. It's certainly possible that he or somebody else might find a way to work around the RouterOS bug by making changes in the BB kernel, but it is a RouterOS bug! If Windows running on top of VMware crashed, and that caused VMware itself to also crash (taking all other running guests down with it), you would not blame the VMware crash on Windows, even if Windows itself was known to be buggy. The host should never crash as a result of something that the guest does, legally or illegally.

Even if the host router was not crashing and rebooting all the time with the BB image, I'm not sure why anybody would want to use this image since the guest itself is constantly kernel panicing whenever it receives network data from the host.

Now, it turns out that the kernel panic occurring on the host is also happening within exactly the same function (skb_put) as when the BB guest's kernel panics, and it is panicing for a very similar reason (packet length received by guest is some ridiculously astronomical value), which is very interesting. It does suggest that if the bug in the guest's kernel is fixed, it might very well also stabilize the host. But that doesn't mean that there isn't still a bug in the host that needs to be fixed.

Here is a sample panic report from the host kernel:
skb_over_panic: text:ceea47bc len:202688 put:202688 head:cefaa800 data:cefaa840 tail:0xcefdc000 end:0xcefaaf40 dev:<NULL>
Kernel bug detected[#1]:
Cpu 0
$ 0   : 00000000 00000000 00000080 c03c0000
$ 4   : 00000001 c03c1418 00000001 c0266a54
$ 8   : 0000000a 00000000 0000000a 20646576
$12   : 00000000 00000001 00000000 00000000
$16   : cefa47a8 ced98d80 cee15c00 00000001
$20   : 000000d0 0000000d 00000080 c03c0000
$24   : 00000002 c0266330                  
$28   : c03b2000 c03b3d00 00000009 c02a59f0
Hi    : 00000000
Lo    : 19d60000
epc   : c02a59f0 skb_put+0x78/0x84
    Not tainted
ra    : c02a59f0 skb_put+0x78/0x84
Status: 1000d203    KERNEL EXL IE 
Cause : 10000024
PrId  : 0001800a (MIPS 24Kc)
Process swapper (pid: 0, threadinfo=c03b2000, task=c03b5c10, tls=00000000)
Stack : ced98e40 ceea47bc 000317c0 000317c0 cefaa800 cefaa840 cefdc000 cefaaf40
        c03958fc c03c0000 00000009 ceea47bc ced98e40 6cb2ecc0 00000000 00000001
        cefa47a8 0000012c c03d0000 c03d0000 c0420000 00000080 c03c0000 c03d0000
        c03d7e88 c02afa74 c040e018 00000fbf 00000000 c010eaa0 ffffe03f c0383e9c
        00000001 00000001 c0410000 c0410000 c040e024 00000100 c040e018 c03c14a0
        ...
Call Trace:
[<c02a59f0>] skb_put+0x78/0x84
[<ceea47bc>] vm_release_queue+0x7a8/0x1468 [net-back@0xceea4000]


Code: 2484595c  0c0ce9ee  01202821 <0200000d> 03e00008  00000000  27bdffc0  afb20020  afb1001c 
---[ end trace dd086ffc4df0a0d9 ]---
Kernel panic - not syncing: Fatal exception in interrupt

panicSaver: dumping panic to flash
flash: erase f
flash: prg f
spi_program_sector 0000000f
Somebody (I suppose this will end up being me...*sigh*) will need to open a bug report with MikroTik with information on how to reproduce, autosupouts created after the crash, and a copy of the BB image that can be used to reproduce this.
I'm also not sure why Mikrotik stopped with providing new patches and modification since it can only make their product better and even more widely used.
I would guess because OpenWRT is a constant moving target that changes kernel versions like every few weeks. MikroTik tends to stick with one kernel and fine-tunes it over the course of an entire release (RouterOS 6.x has used a heavily-patched Linux 3.3.5 kernel for the entirely of the 6.x series). MikroTik trying to keep up with OpenWRT changes would be nuts; I don't blame them one bit for not constantly updating the MR guest patches for OWRT.

Ideally, if OWRT wants MetaROUTER to be a supported platform, then somebody on the OpenWRT development team needs to be the one to keep the MR release working and up-to-date. That's how all of the other officially-supported OWRT platforms work. Do you see any of the other router manufacturers (Linksys, Netgear, etc.) actively contributing to OpenWRT development for their particular products? Yeah, didn't think so. :(
By the way, anyone got Liquid's AA with asterisk gui running? It's missing 3 dependency packages and I'm wondering if they can be compiled on our own machines (not sure if they [packages] need some patching as well for AA or we can just patch using standard mips subversion)?
I tried to address this earlier in this post. The problem is that liquidcz only took the asterisk-gui package from my Kamikaze patch, and did not port over my modified version of the asterisk18 package included in the same patch sets. My asterisk-gui package is not compatible with the stock asterisk18 package from any version of OpenWRT. He will need to port my asterisk18 packages over to his AA buildroot and rebuild the Asterisk packages for his repository. (It looks like -force-depends won't work in this case because there is just too much missing/different between stock OpenWRT asterisk18 and mine.)

Alternatively, you (or anybody else) can take a basic AA buildroot, make whatever changes to it (if any) that liquidcz made to his, copy over my asterisk18 and asterisk-gui packages from my Kamikaze patches that I publish freely, and build your own copy of AA with my Asterisk changes baked in.

-- Nathan
 
mIRCon
just joined
Posts: 3
Joined: Sun May 17, 2015 12:35 pm

Re: Metarouter images

Tue May 19, 2015 10:58 am

I can confirm the very same but on RouterOS 6.28 version running hecke's BB image as MetaROUTER.
Even Hecke confirmed it's not stable and needs more patching to make it functional.
Right, but hecke was referring to the crashes that were happening only within the guest because of OpenWRT kernel bugs, not crashes that were happening on the host, which until now nobody else had even brought up in previous discussions about this image (this is totally new information; all previous discussions about BB instability referred to the guest crashing whenever it received data over the virtual ethernet interface), and which he likely cannot do anything about since fixing this kind of crash is MikroTik's responsibility...I don't know why you would expect that any changes that hecke might make to the BB image would fix the router crashes and reboots. It's certainly possible that he or somebody else might find a way to work around the RouterOS bug by making changes in the BB kernel, but it is a RouterOS bug! If Windows running on top of VMware crashed, and that caused VMware itself to also crash (taking all other running guests down with it), you would not blame the VMware crash on Windows, even if Windows itself was known to be buggy. The host should never crash as a result of something that the guest does, legally or illegally.

Even if the host router was not crashing and rebooting all the time with the BB image, I'm not sure why anybody would want to use this image since the guest itself is constantly kernel panicing whenever it receives network data from the host.

Now, it turns out that the kernel panic occurring on the host is also happening within exactly the same function (skb_put) as when the BB guest's kernel panics, and it is panicing for a very similar reason (packet length received by guest is some ridiculously astronomical value), which is very interesting. It does suggest that if the bug in the guest's kernel is fixed, it might very well also stabilize the host. But that doesn't mean that there isn't still a bug in the host that needs to be fixed.
Exactly, but my point was if they (Mikrotik) isn't much interested in fixing the source of a problem then we (as community, but mostly thinking of you, hacke and liquid as main contributors) can maybe do a temporarily fix just to avoid guest crashes which in the end will avoid host crashes (basically fixing it from the inside-out instead of outside-in as it should be).
I'm also not sure why Mikrotik stopped with providing new patches and modification since it can only make their product better and even more widely used.
I would guess because OpenWRT is a constant moving target that changes kernel versions like every few weeks. MikroTik tends to stick with one kernel and fine-tunes it over the course of an entire release (RouterOS 6.x has used a heavily-patched Linux 3.3.5 kernel for the entirely of the 6.x series). MikroTik trying to keep up with OpenWRT changes would be nuts; I don't blame them one bit for not constantly updating the MR guest patches for OWRT.

Ideally, if OWRT wants MetaROUTER to be a supported platform, then somebody on the OpenWRT development team needs to be the one to keep the MR release working and up-to-date. That's how all of the other officially-supported OWRT platforms work. Do you see any of the other router manufacturers (Linksys, Netgear, etc.) actively contributing to OpenWRT development for their particular products? Yeah, didn't think so. :(
That's very true but there is slight difference in a way that Mikrotik actually provides virtualization enviroment unlike most of mentioned manufacturers of SOHO network equipment. When you're applying OpenWRT ifmrware on such equipment you're losing warranty and support so it's totally user/community based operating system which is running on compatible chipsets and CPUs. Mikrotik, howerver, can be used as host for virtual machines running OpenWRT so it0s a bit different. It's not, by all means, their duty to patch and provide support for every possible build and operating system but it would be nice if they make some patch for at least major versions of most popular OSes or provide more details about it so people can make patches themselves much easier. It's just a suggestion and it's not some kind of forced expectation or a must have option.
By the way, anyone got Liquid's AA with asterisk gui running? It's missing 3 dependency packages and I'm wondering if they can be compiled on our own machines (not sure if they [packages] need some patching as well for AA or we can just patch using standard mips subversion)?
I tried to address this earlier in this post. The problem is that liquidcz only took the asterisk-gui package from my Kamikaze patch, and did not port over my modified version of the asterisk18 package included in the same patch sets. My asterisk-gui package is not compatible with the stock asterisk18 package from any version of OpenWRT. He will need to port my asterisk18 packages over to his AA buildroot and rebuild the Asterisk packages for his repository. (It looks like -force-depends won't work in this case because there is just too much missing/different between stock OpenWRT asterisk18 and mine.)
-- Nathan
Yeah, that sheds more light on the issue. I have seen your post regarding that on a previous page but I was just checking if someone else maybe managed to recompile missing dependencies or provide new ones for Liquid's AA build. It would be too much to actually expect someone who voluntarily did some work and shared it with everyone to do whatever we (the end users / consumer of such a free piece of someone else's code and work) wish and fix whatever we find somehow important or necessary for our own needs, so I just wanted to keep some discussion regarding it just in case someone else's maybe found a solution or so..

By the way, I have tried your Kamikaze based image Nathan and I got host reboots by watchdog as well. It mainly happened when I issued a reboot or poweroff command in guest. Pardon me if I haven't noticed some warning or post about such problem but I did the usual configuring and settings in openWRT instance after which I like to do a reboot and suddenly noticed whole Mikrotik reboot. It's Mikrotik RB2011UiAS-2HnD running on v6.28. It happened twice (for each reboot and poweroff command) and after second host crash I lost gui web interface so I would have to reinstall whole image again for more tests..
Not sure if anyone else who runs Nathan's Kamikaze customized build has encountered similar issues but I'm reporting it in this thread to keep things up to date in one place. I haven't tested it on earlier versions since other Mikrotik RBs I currently have are pretty limited in matter of resources so it's not possible to run metaRouters on them and the main one is actually in production but I use it for occasional tests hoping it won't make much reboots :)

Miron

Edit: discard last two paragraphs because I didn't do my homework with reading previous posts correctly. Reboot issue is addressed in this thread: http://forum.mikrotik.com/viewtopic.php?f=2&t=86765 and I thought that Nathan fixes were applied as well but didn't read carefully how to use it.
 
User avatar
NathanA
Forum Veteran
Forum Veteran
Posts: 801
Joined: Tue Aug 03, 2004 9:01 am

Re: Metarouter images

Tue May 19, 2015 2:01 pm

Edit: discard last two paragraphs because I didn't do my homework with reading previous posts correctly. Reboot issue is addressed in this thread: http://forum.mikrotik.com/viewtopic.php?f=2&t=86765 and I thought that Nathan fixes were applied as well but didn't read carefully how to use it.
Just to clarify for everyone, the patch that I provided in that other post does not fix or workaround the RouterOS MR reboot bug. It only enables the ability to send shutdown or reboot command to OpenWRT guests from the host. It is still possible (and likely) that the host will crash and reboot if you shut down or reboot the guest in this way (or any other way).

Supposedly 6.29rc15 finally fixes this RouterOS bug. I have not yet had the chance to test and verify this claim. But if anybody is encountering this problem, they might try to upgrade to the latest 6.29rc release and see if the MR reboot host crash problem goes away.

-- Nathan
 
mIRCon
just joined
Posts: 3
Joined: Sun May 17, 2015 12:35 pm

Re: Metarouter images

Wed May 20, 2015 1:01 pm

Supposedly 6.29rc15 finally fixes this RouterOS bug. I have not yet had the chance to test and verify this claim. But if anybody is encountering this problem, they might try to upgrade to the latest 6.29rc release and see if the MR reboot host crash problem goes away.

-- Nathan
New RouterOS 6.29 (final) can be expected this week, so I will test it for sure, thus no need to test any of it's RCs.
Hopefully more things will be fixed along with bad excessive NAND writes introduced in recent builds so it's some kind of "a must" update anyway...
 
MikroTikFan
Member Candidate
Member Candidate
Posts: 196
Joined: Sat Aug 02, 2014 1:13 am

Re: Metarouter images

Tue Nov 24, 2015 8:56 pm

I need to setup OpenVPN UDP connection to OpenWRT router.
Afrer last fix to SSL bugs probably I need last version of openwrt.

Please help me and provide last openwrt image for RB2011UiAS


Thank's in advance!
 
jinzhanhua
just joined
Posts: 9
Joined: Sun Nov 22, 2015 6:05 am

Re: Metarouter images

Wed Nov 25, 2015 4:53 am

liquidcz
I tried another ether, but my lan dhcp dont work. Work only on ether1. Metarouter catch ip from isp dhcp server. Pings and so on work perfect.
May be root of problem is droped packets in eth0 interface, how can i diagnostic why packets drop?

P.S. can you add nano text editor at next builds? vi not friendly for me...
Well, lets try to create dynamic metarouter interface and bridge it with ether2.

Ad nano,.. just opkg update, opkg install nano .
liquidcz, hehey!!! it work!!! DHCP not work again, but i configure interface manualy.

But another one question. When i try to ping mikrotik host, i see latency over 1-10ms. It normal?
And in repo broken depencies
Installing asterisk-gui (2.1.0-rc1) to root...
Downloading http://openwrt.wk.cz/attitude_adjustment/mr-mips/packages/asterisk-gui_2.1.0-rc1_mr-mips.ipk.
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for asterisk-gui:
 * 	asterisk18-res-phoneprov * 	asterisk18-app-meetme * 	asterisk18-app-page * 
 * opkg_install_cmd: Cannot install package asterisk-gui.

Hi,
DHCP of dnsmasq didn't work under my CRS125 too.
you can install isc-dhcp-server-ipv4 package.
I tested ok.
 
nicolino
just joined
Posts: 11
Joined: Tue Dec 15, 2015 12:49 am

Re: Metarouter images

Tue Dec 15, 2015 2:34 am

Edit: discard last two paragraphs because I didn't do my homework with reading previous posts correctly. Reboot issue is addressed in this thread: http://forum.mikrotik.com/viewtopic.php?f=2&t=86765 and I thought that Nathan fixes were applied as well but didn't read carefully how to use it.
Just to clarify for everyone, the patch that I provided in that other post does not fix or workaround the RouterOS MR reboot bug. It only enables the ability to send shutdown or reboot command to OpenWRT guests from the host. It is still possible (and likely) that the host will crash and reboot if you shut down or reboot the guest in this way (or any other way).

Supposedly 6.29rc15 finally fixes this RouterOS bug. I have not yet had the chance to test and verify this claim. But if anybody is encountering this problem, they might try to upgrade to the latest 6.29rc release and see if the MR reboot host crash problem goes away.

-- Nathan

I'm on 6.32.3 and the host is still crashing when traffic is received over the Vif.....

Been searching the forums for updates on this topic with no luck.... anyone have any news about it?

Mikrotik perhaps? hello? years for fixing a bug? really?

Thanks,
Nico
 
nicolino
just joined
Posts: 11
Joined: Tue Dec 15, 2015 12:49 am

Re: Metarouter images

Tue Dec 15, 2015 2:41 am

liquidcz,

Would you mind compiling a package for me please? I need the latest package possible for OpenConnect (http://www.infradead.org/openconnect/) for your most stable build (I think it was kamikaze that didn't crash the host or reboot.)

Thanks A LOT in advance, I'm not a unix guy and even tried building my own images, but it was overwhelming and a very big challenge to even start the building env... I'd really appreciate you building up that package for me, older versions just don't work for me, I think I need >6.x.

Thank you!
Nico
 
User avatar
dynek
Member Candidate
Member Candidate
Posts: 193
Joined: Tue Jan 21, 2014 10:03 pm

Re: Metarouter images

Tue Dec 15, 2015 10:23 pm

 
nicolino
just joined
Posts: 11
Joined: Tue Dec 15, 2015 12:49 am

Re: Metarouter images

Tue Dec 15, 2015 11:59 pm


erm well.. nope, it's not there ... that's v4.08. Already tried it and does not work for my need, that's why I'm asking for a version >=6.x. Latest is v7.06...

And not sure if AA was still having host crashes...

Thanks for commenting anyway.
 
User avatar
dynek
Member Candidate
Member Candidate
Posts: 193
Joined: Tue Jan 21, 2014 10:03 pm

Re: Metarouter images

Wed Dec 16, 2015 10:36 pm

My bad, I didn't see you were mentioning a version.
 
Chega
just joined
Posts: 16
Joined: Fri Dec 04, 2015 12:18 pm

Re: Metarouter images

Wed Feb 03, 2016 10:44 pm

Hi all. Two days I build openwrt image with different version of OpenWRT... but stability of build images very bad... some times services crashed, some times router go to cyclical reboot...(I was trying Barrier Breaker 14.07, Attitude Adjustment 12.09 and kamikaze). I need one minimal openwrt vm on my 2011uias-2hnd-in with mosquitto(mqtt broker) package and with max stability...anyone can advise me where I can download such image with such stability? Or suggest what build of OpenWrt choose for builder to build Stable minimal image for virtualization?
 
ApelPro
just joined
Posts: 2
Joined: Sun Feb 21, 2016 9:08 am

Re: Metarouter images

Sun Feb 21, 2016 9:48 am

Hello!

I'm Install OpenWRT in Metarouter and configure it. But the opkg source not found (wget returned 1). The network is okay I think, I can ping sites: facebook.com, google.com.. I'm test downloads.openwrt.com and get IP from DNS, but can't ping that ip. After test it from realPC, I can't ping it. I think the site is dead (or don't answer the ICMP packet I know, but why?). In opkg.conf "http://downloads.openwrt.org/snapshots/ ... s/packages" the default, but I'm search a lot and find things to use like".../generic/packages", ".../packages/packages" after try to add this line "src/gz metarouter http://openwrt.pantele.com.ua/trunk/metarouter/packages" but doesn't work... The DNS server can't translate openwrt.pantele.com.ua..

OpenWRT close aid for metarouter or I'm doing something wrong?

I am not add a password to root but it's funny if it is the problem... :)

Has anyone can help me?

Thanks, and sorry for horrible english. :D
 
Chega
just joined
Posts: 16
Joined: Fri Dec 04, 2015 12:18 pm

Re: Metarouter images

Tue Feb 23, 2016 12:10 am

Hello!

I'm Install OpenWRT in Metarouter and configure it. But the opkg source not found (wget returned 1). The network is okay I think, I can ping sites: facebook.com, google.com.. I'm test downloads.openwrt.com and get IP from DNS, but can't ping that ip. After test it from realPC, I can't ping it. I think the site is dead (or don't answer the ICMP packet I know, but why?). In opkg.conf "http://downloads.openwrt.org/snapshots/ ... s/packages" the default, but I'm search a lot and find things to use like".../generic/packages", ".../packages/packages" after try to add this line "src/gz metarouter http://openwrt.pantele.com.ua/trunk/metarouter/packages" but doesn't work... The DNS server can't translate openwrt.pantele.com.ua..

OpenWRT close aid for metarouter or I'm doing something wrong?

I am not add a password to root but it's funny if it is the problem... :)

Has anyone can help me?

Thanks, and sorry for horrible english. :D
Use this...Luke
#src/gz packages http://download.bmsoft.de/mikrotik/12.0 ... -mips/pack

#src/gz packages http://openwrt.wk.cz/attitude_adjustmen ... s/packages
 
ApelPro
just joined
Posts: 2
Joined: Sun Feb 21, 2016 9:08 am

Re: Metarouter images

Sun Feb 28, 2016 9:46 am

Thank you for your answer! And sorry..
I can solve problem, downloaded other OpenWRT and copy the string from opkg.conf, then installed back the Kamikaze and put the string into opkg.conf. That's works fine. :)
 
irghost
Member Candidate
Member Candidate
Posts: 281
Joined: Sun Feb 21, 2016 1:49 pm

Re: Metarouter images

Thu Jul 07, 2016 9:27 pm

how can i install virtual linux on RB951
i need to run php on this virtual to control hotspot
MTCNA MTCRE MTCTCE MTCUME MTCWE MTCIPv6E MTCINE
 
nicolino
just joined
Posts: 11
Joined: Tue Dec 15, 2015 12:49 am

Re: Metarouter images

Thu Jul 07, 2016 10:10 pm

how can i install virtual linux on RB951
i need to run php on this virtual to control hotspot
Let me google that for you: http://bfy.tw/6dek
All the upcoming questions you will run into have an answer right on this thread... Read it, doesn't hurt. :)
 
irghost
Member Candidate
Member Candidate
Posts: 281
Joined: Sun Feb 21, 2016 1:49 pm

Re: Metarouter images

Thu Jul 07, 2016 11:39 pm

how can i install virtual linux on RB951
i need to run php on this virtual to control hotspot
Let me google that for you: http://bfy.tw/6dek
All the upcoming questions you will run into have an answer right on this thread... Read it, doesn't hurt. :)
u know i don't have time to search all of this topic
little busy
MTCNA MTCRE MTCTCE MTCUME MTCWE MTCIPv6E MTCINE
 
User avatar
dynek
Member Candidate
Member Candidate
Posts: 193
Joined: Tue Jan 21, 2014 10:03 pm

Re: Metarouter images

Fri Jul 08, 2016 1:09 pm

One of the funniest answer I have ever read: your time is worth less than mine so please do the searching for me.
 
jarda
Forum Guru
Forum Guru
Posts: 7604
Joined: Mon Oct 22, 2012 4:46 pm

Re: Metarouter images

Fri Jul 08, 2016 3:08 pm

Many of people are like this here... Shame on them.
 
irghost
Member Candidate
Member Candidate
Posts: 281
Joined: Sun Feb 21, 2016 1:49 pm

Re: Metarouter images

Sat Jul 09, 2016 12:14 am

Many of people are like this here... Shame on them.
there is so much spam post  like ur post
so its hard to find my answer in 7 page ( 40 post for each )
i find my answer in YouTube video not in ur spams
MTCNA MTCRE MTCTCE MTCUME MTCWE MTCIPv6E MTCINE
 
jarda
Forum Guru
Forum Guru
Posts: 7604
Joined: Mon Oct 22, 2012 4:46 pm

Re: Metarouter images

Sat Jul 09, 2016 7:32 am

I am sorry to be responsible for your inability to search. What other of your insufficiencies am I responsible for in addition?
 
vortex
Forum Veteran
Forum Veteran
Posts: 714
Joined: Sat Feb 16, 2013 6:10 pm

Re: Metarouter images

Sat Jul 09, 2016 1:50 pm

I am confused by virtual interfaces and firewall.

What are the steps needed to add avahi forwarding between 2 routerboard interfaces?

Thanks
 
User avatar
dynek
Member Candidate
Member Candidate
Posts: 193
Joined: Tue Jan 21, 2014 10:03 pm

Re: Metarouter images

Sat Jul 09, 2016 5:59 pm

I guess you will have to bridge your virtual interfaces with each vlan into which it should belong so avahi can broadcast frames on both vlans.
 
vortex
Forum Veteran
Forum Veteran
Posts: 714
Joined: Sat Feb 16, 2013 6:10 pm

Re: Metarouter images

Sun Jul 10, 2016 12:25 am

I failed completely at performing a basic OpenWRT networking configuration allowing me to ping the routerboard.

Is there a web interface?
 
maaboo
just joined
Posts: 8
Joined: Sat Jul 30, 2016 6:57 pm

Re: Metarouter images

Sat Jul 30, 2016 8:17 pm

Is it possible to run Chaos Calmer 15.05.1 as Metarouter? I haven't seen any references.
 
BeepDog
just joined
Posts: 10
Joined: Tue Jan 21, 2014 3:41 am

Re: Metarouter images

Tue Aug 09, 2016 7:02 am

I too am looking for a way to run mr-ppc images with the latest version. I'd love to get something working so that I can build my own image. I've tried some things, but I run into many build failures that I'm not really sure what they mean. And openwrt is on github now too.

What I've done so far:

Git clone https://github.com/openwrt/openwrt and then update the packages from: https://github.com/openwrt/packages following the instructions there.

I then applied a 1.3 patch that I found other people had made elsewhere on the forums: http://www.kriskinc.com/mikrotik-metarouter referencing this post: http://forum.mikrotik.com/viewtopic.php?t=75849#p382330

And then make menuconfig, and make. It usually fails trying to build the kernel...

EDIT:

actually on 15.05.01 I managed not even to get to the kernel building part:
gdate.c: In function 'g_date_strftime':
gdate.c:2497:7: error: format not a string literal, format string not checked [-Werror=format-nonliteral]
       tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm);
       ^~~~~~
cc1: some warnings being treated as errors
EDIT: I got past the strftime error by using 15.05, not 15.05.1.

And then that gets me this error, which is *also* new to me, but it's late and I'm tired, so more research will have to happen tomorrow.
make[4]: Entering directory '/home/dkowis/gitwork/metarouter/openwrt/build_dir/host/u-boot-2014.10'
#
# configuration written to .config
#
*** Default configuration is based on 'sandbox_defconfig'
make[4]: Leaving directory '/home/dkowis/gitwork/metarouter/openwrt/build_dir/host/u-boot-2014.10'
make -C /home/dkowis/gitwork/metarouter/openwrt/build_dir/host/u-boot-2014.10 tools-only
make[4]: Entering directory '/home/dkowis/gitwork/metarouter/openwrt/build_dir/host/u-boot-2014.10'
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/config.h
  GEN     include/autoconf.mk
In file included from include/linux/compiler.h:54:0,
                 from /home/dkowis/gitwork/metarouter/openwrt/build_dir/host/u-boot-2014.10/arch/sandbox/include/asm/bitops.h:20,
                 from include/linux/bitops.h:110,
                 from /home/dkowis/gitwork/metarouter/openwrt/build_dir/host/u-boot-2014.10/include/common.h:20:
include/linux/compiler-gcc.h:114:30: fatal error: linux/compiler-gcc6.h: No such file or directory
 #include gcc_header(__GNUC__)
                              ^
compilation terminated.
make[6]: *** [/home/dkowis/gitwork/metarouter/openwrt/build_dir/host/u-boot-2014.10/scripts/Makefile.autoconf:64: include/autoconf.mk] Error 1
make[5]: *** [/home/dkowis/gitwork/metarouter/openwrt/build_dir/host/u-boot-2014.10/Makefile:464: silentoldconfig] Error 1
make[4]: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.
make[4]: Leaving directory '/home/dkowis/gitwork/metarouter/openwrt/build_dir/host/u-boot-2014.10'
make[3]: *** [Makefile:48: /home/dkowis/gitwork/metarouter/openwrt/build_dir/host/u-boot-2014.10/.built] Error 2
make[3]: Leaving directory '/home/dkowis/gitwork/metarouter/openwrt/tools/mkimage'
make[2]: *** [tools/Makefile:123: tools/mkimage/compile] Error 2
make[2]: Leaving directory '/home/dkowis/gitwork/metarouter/openwrt'
make[1]: *** [tools/Makefile:121: /home/dkowis/gitwork/metarouter/openwrt/staging_dir/target-powerpc_uClibc-0.9.33.2/stamp/.tools_install_yynyynynynyyyyyyyyynyyyyyyyyynyyyyynnyyynnyynynyy] Error 2
make[1]: Leaving directory '/home/dkowis/gitwork/metarouter/openwrt'
make: *** [/home/dkowis/gitwork/metarouter/openwrt/include/toplevel.mk:183: world] Error 2

Final edit of tiredness:
Build doesn't support gcc6. That's the problem. I'm going to have to get gcc5 set up on here or something.
 
BeepDog
just joined
Posts: 10
Joined: Tue Jan 21, 2014 3:41 am

Re: Metarouter images

Sun Aug 14, 2016 6:15 pm

Okay, made some progress after setting up an ubuntu 16.04.1 system. Unfortunately, I haven't made much progress. I am having trouble with the kernel config
make kernel_menuconfig
is how you configure the kernel for your target, unfortunately that errors. I can run the menuconfig, but something having to do with it's saving isn't working.

I have saved the kernel config to an alternate location, so maybe I can figure out how it injects it, and then get that working. Something obviously isn't quite right.
#
# configuration written to .config
#


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

make[3]: Leaving directory '/home/dkowis/gitwork/metarouter/openwrt/build_dir/target-powerpc_uClibc-0.9.33.2/linux-mr-ppc/linux-3.3.8'
/home/dkowis/gitwork/metarouter/openwrt/scripts/kconfig.pl '>'   /home/dkowis/gitwork/metarouter/openwrt/build_dir/target-powerpc_uClibc-0.9.33.2/linux-mr-ppc/linux-3.3.8/.config > /home/dkowis/gitwork/metarouter/openwrt/target/linux/mr-ppc/config-3.3
Parse error at /home/dkowis/gitwork/metarouter/openwrt/scripts/kconfig.pl line 137, <FILE> line 856.
Makefile:19: recipe for target 'menuconfig' failed
make[2]: *** [menuconfig] Error 255
make[2]: Leaving directory '/home/dkowis/gitwork/metarouter/openwrt/target/linux/mr-ppc'
Makefile:13: recipe for target 'menuconfig' failed
make[1]: *** [menuconfig] Error 2
make[1]: Leaving directory '/home/dkowis/gitwork/metarouter/openwrt/target/linux'
/home/dkowis/gitwork/metarouter/openwrt/include/toplevel.mk:134: recipe for target 'kernel_menuconfig' failed
make: *** [kernel_menuconfig] Error 2
 
pe1chl
Forum Guru
Forum Guru
Posts: 5927
Joined: Mon Jun 08, 2015 12:09 pm

Re: Metarouter images

Sun Aug 14, 2016 7:10 pm

BeepDog: I would be interested as well in a modern, generic Linux image instead of the OpenWRT thing.
 
HighTower
just joined
Posts: 13
Joined: Wed Feb 18, 2015 4:06 pm

Re: Metarouter images

Fri Aug 26, 2016 11:40 pm

and what is the latest revision of opewrt which can be compiled to use in metarouter?
 
CsXen
Frequent Visitor
Frequent Visitor
Posts: 92
Joined: Wed Sep 10, 2014 8:31 pm
Location: Budapest - Hungary

Re: Metarouter images

Fri Sep 09, 2016 10:33 pm

Hi.
Has anybody a working (almost current) OpenWRT image for MetaRouter with a working FFMPEG package for mr-mips platform ?
(Or a working samplicator package... it would be sufficient for me, to clone UDP packets to their destinations.)

Best regards: CsXen
 
expert
Frequent Visitor
Frequent Visitor
Posts: 92
Joined: Sun Dec 04, 2016 1:22 pm

Re: Metarouter images

Sun Dec 04, 2016 1:35 pm

Latest images found there: http://openwrt.wk.cz/
 
expert
Frequent Visitor
Frequent Visitor
Posts: 92
Joined: Sun Dec 04, 2016 1:22 pm

Re: Metarouter images

Mon Dec 05, 2016 10:44 am

Do exists some more images other than OpenWRT?
Found short note on Debian/DebWRT http://dev.debwrt.net/ticket/274 but there seems not be any progress.
It it possible to run RouterOS in metarouter?
 
pe1chl
Forum Guru
Forum Guru
Posts: 5927
Joined: Mon Jun 08, 2015 12:09 pm

Re: Metarouter images

Mon Dec 05, 2016 4:18 pm

For running RouterOS in MetaRouter you don't need an image! That is the default image.
 
expert
Frequent Visitor
Frequent Visitor
Posts: 92
Joined: Sun Dec 04, 2016 1:22 pm

Re: Metarouter images

Mon Dec 05, 2016 7:43 pm

For running RouterOS in MetaRouter you don't need an image! That is the default image.
Are you sure? It does not work for me. It's RB450G, ROS 6.37.2.
[expert@rb] /metarouter> add name="test" memory-size=32
[expert@rb] /metarouter> console test 
[Ctrl-A is the prefix key]

Starting...
Generating SSH 2048bit RSA host key...
Generating SSH 1024bit DSA host key...
Starting services...
info failed: std failure: timeout (13)
 
lojzik
just joined
Posts: 3
Joined: Thu Jan 31, 2013 8:33 pm

Re: Metarouter images

Thu Jan 19, 2017 11:05 am

Is there some stable openwrt image for 6.38.1(951G-2HnD)? I tried different version from http://openwrt.wk.cz/ (AA, trunk) on some last few ROS versions and it's very unstable with:
"system,error,critical router was rebooted without proper shutdown by watchdog timer"
 
expert
Frequent Visitor
Frequent Visitor
Posts: 92
Joined: Sun Dec 04, 2016 1:22 pm

Re: Metarouter images

Thu Jan 19, 2017 11:39 am

Is there some stable openwrt image for 6.38.1(951G-2HnD)? I tried different version from http://openwrt.wk.cz/ (AA, trunk) on some last few ROS versions and it's very unstable with:
"system,error,critical router was rebooted without proper shutdown by watchdog timer"
It seems that OpenWRT under metarouter not supported by neither MikroTik (anymore) nor by OpenWRT upstream project.
Personally I would not rely on thirdparty sources for any production environments.
 
VK2XXY
just joined
Posts: 16
Joined: Mon Jun 15, 2015 5:01 am

Re: Metarouter images

Tue Sep 19, 2017 6:39 am

Is IPv6 operational in any of these OpenWRT images?
 
amidreza
just joined
Posts: 1
Joined: Fri Jul 07, 2017 8:44 pm
Location: iran
Contact:

Re: Metarouter images

Fri Nov 03, 2017 12:00 pm

Hi everyone, I had many problems with metarouters when I had Asterisk . But last month I tried again and it works fine . I can use it but Im worried to set it up in other places.
 
nicolino
just joined
Posts: 11
Joined: Tue Dec 15, 2015 12:49 am

Re: Metarouter images

Fri Jan 05, 2018 8:26 pm

Hi everyone, I had many problems with metarouters when I had Asterisk . But last month I tried again and it works fine . I can use it but Im worried to set it up in other places.
Nice!! Could you please share with us which RoterOS and OpenWRT versions did you use? if possible also include what repositories

Thanks
 
itmethod
newbie
Posts: 28
Joined: Tue Feb 18, 2014 8:44 pm

Re: Metarouter images

Thu May 10, 2018 6:02 pm

As you know, new RouterOS versions now support other OS images for MetaRouter, so we welcome you - the users - to try this, and make new images that work. If you share your ready made images, that actually work with RouterOS MetaRouter, and add meaningful features (for example Asterix for VOIP, IPcop for firewall etc.), I will give you a Level6 license for an article in the Wiki and the Image.
I have created an OpenWRT metarouter image that comes with anonymity software Tor and Privoxy pre-installed and configured. Wiki article is available in the wiki at http://wiki.mikrotik.com/wiki/Use_Metar ... y_Software which describes how to set up a NAT network that uses Tor to protect user privacy.
The image link for that wiki article is broken.
 
alli
newbie
Posts: 35
Joined: Tue Jan 24, 2017 5:43 pm

Re: Metarouter images

Thu May 31, 2018 5:56 pm

This is lede for metaroute:
https://github.com/cuihaoleo/lede-mr-mips
 
cusco
newbie
Posts: 34
Joined: Tue Jun 29, 2010 2:34 pm

Re: Metarouter images

Tue Aug 14, 2018 7:03 pm

This is lede for metaroute:
https://github.com/cuihaoleo/lede-mr-mips
Any pre-built images available?
 
nicolino
just joined
Posts: 11
Joined: Tue Dec 15, 2015 12:49 am

Re: Metarouter images

Tue Aug 14, 2018 7:21 pm

This is lede for metaroute:
https://github.com/cuihaoleo/lede-mr-mips
Any pre-built images available?
Same here, I'm completely new to building a kernel... I can barely install ubuntu from a livecd LOL.So using someone else build+packages would be greatly appreciated.
 
pe1chl
Forum Guru
Forum Guru
Posts: 5927
Joined: Mon Jun 08, 2015 12:09 pm

Re: Metarouter images

Tue Aug 14, 2018 7:39 pm

I think Metarouter running something else than RouterOS is a long abandoned concept...
 
User avatar
IPANetEngineer
Trainer
Trainer
Posts: 1053
Joined: Fri Aug 10, 2012 6:46 am
Location: Jackson, MS, USA
Contact:

Re: Metarouter images

Tue Aug 14, 2018 10:56 pm

I think Metarouter running something else than RouterOS is a long abandoned concept...
Unfortunately I think yo're right...we all got so excited when CCR came out that it could be an inexpensive hypervisor but I don't think it will happen.
Global - MikroTik Support & Consulting - English | Francais | Español | Portuguese +1 855-645-7684
https://iparchitechs.com/services/mikro ... l-support/ mikrotiksupport@iparchitechs.com
 
starter48
just joined
Posts: 1
Joined: Tue Dec 12, 2017 6:19 am

Re: Metarouter images

Wed Aug 15, 2018 5:14 am

This is lede for metaroute:
https://github.com/cuihaoleo/lede-mr-mips
Any pre-built images available?
For RB2011: viewtopic.php?f=15&t=128998 it does work with ROS v6.42.6
 
User avatar
NathanA
Forum Veteran
Forum Veteran
Posts: 801
Joined: Tue Aug 03, 2004 9:01 am

Re: Metarouter images

Wed Aug 15, 2018 12:21 pm

Even MetaROUTER running RouterOS inside of itself seems to be a long-abandoned concept. The problems with stability are endemic to MetaROUTER itself and don't have anything to do with the OpenWRT patches. There are so many unaddressed stability bugs that affect MetaROUTER both on mipsbe and ppc that it is unusable even for RouterOS-as-guest.

For when I need a good value single-board-computer, I still use RouterBoards, but simply replace RouterOS with OpenWRT entirely. In some cases this means I install 2 RouterBoards for a customer instead of 1: one RouterBoard to run RouterOS and do routing, and a second RouterBoard to run OpenWRT and whatever custom applications the client needs. Twice as expensive, but at least it is completely stable. It would be nice to be able to put everything on one device, but v7 is still vaporware and MetaROUTER on v6 has so much bit-rot at this point that I don't see that happening anytime soon.

-- Nathan
 
talz
newbie
Posts: 31
Joined: Wed Mar 15, 2017 9:01 pm

Re: Metarouter images

Wed Oct 31, 2018 10:59 pm

hi guys.

I work for a company that heavily uses mikrotiks, and as one of the only software developers that works for my company, I've written tons of code using the mikrotik scripting language. Unfortunately, it is by far the worst programming/scripting language I have ever had the displeasure of working with. I could write a book on all the things that it does, or is missing that annoy me. I have been looking for a way to run Python on a mikrotik forever, and was aware that you could replace RouterOS with OpenWRT completely, but we have too many techs that know how to use RouterOS, and don't know how to use Linux, to be able to remove RouterOS from our devices completely.

Recently, I was able to get OpenWRT running in metarouter, and actually install Python2.7. I was then able to use some python routeros libraries to talk to the host mikrotik device using the mikrotik API! In theory, that means I can replace all my mikrotik scripts that run on the device itself with Python scripts that run in metarouter, and Python can perform all the logic, like checking if WAN links are up or down, changing routes between WAN links, sending email alerts about rogue DHCP servers, and whatever else needs doing.

Nathan's comment about MetaRouter not being stable is concerning however. It would be amazing if I could use Python, but not if it means we're going to have stability issues. So far, in my testing, I haven't come across any obvious stability issues, but I've only been play around with metarouter for the past day or two.

What kind of issues are common with running OpenWRT on metarouter?
 
nicolino
just joined
Posts: 11
Joined: Tue Dec 15, 2015 12:49 am

Re: Metarouter images

Wed Oct 31, 2018 11:38 pm

Hey Talz,

Nice to see you are also trying to leverage this great (but unfortunately abandoned) feature.

If your read through the entire thread you will find the most common issue is the metarouter guest OpenWRT kernel crashing, causing the host (yes, your actual, real, physical MK router) crash as well.
Believe it or not.

I think there was one OpenWRT version not crashing but with some other issues I don't recall right now.

Hope you hit the correct version and results are stable for your implementation. Please stay around and share any good or bad news you might have.

Regards, thank you!
Nico
 
talz
newbie
Posts: 31
Joined: Wed Mar 15, 2017 9:01 pm

Re: Metarouter images

Wed Oct 31, 2018 11:51 pm

Interesting...

It seems like I actually ran into that yesterday. I think I was using http://openwrt.wk.cz/trunk/mr-mips/open ... 079.tar.gz.
It worked for a bit, and then my RB493 started booting up, and then losing power after a few seconds and rebooting.
My 493 wasn't new - it was just out of the box of our old devices, so I figured there was probably something wrong with it, but this would explain it.

I later tried openwrt-mr-mips-rootfs-31411-basic.tar.gz, and that seemed to be working fine. I don't think it has died once today.
 
talz
newbie
Posts: 31
Joined: Wed Mar 15, 2017 9:01 pm

Re: Metarouter images

Thu Nov 01, 2018 12:27 am

This may already be covered at some point in the previous 8 pages of this thread, but this has been my experience over the past 24 hours trying to get Python running in Metarouter on RB493AH:

Working Image: http://openwrt.wk.cz/trunk/mr-mips/open ... sic.tar.gz
RouterOS Version: RouterOS v6.40.9

Had no problems copying the image to my 493, going to MetaRouter, importing it, and starting it up.
I created a dynamic interface for it under Metarouter --> Interfaces, and added vif1 to my LAN bridge on the 493.
This let OpenWRT grab an IP using its DHCP client, which was already running.
It did NOT configure a DNS server automatically however - not sure why, so I added "nameserver 8.8.8.8" to /etc/resolv.conf.
I don't know if I just missed something, or if it's some sort of bug - I didn't really look into it too hard.

At this point, I had internet, which let me download and install python 2.7, and its requirements:
wget http://openwrt.wk.cz/trunk/mr-mips/packages/libpthread_0.9.33-104_mr-mips.ipk
wget http://openwrt.wk.cz/trunk/mr-mips/packages/zlib_1.2.5-1_mr-mips.ipk
wget http://openwrt.wk.cz/trunk/mr-mips/packages/libffi_3.0.10-1_mr-mips.ipk
wget http://openwrt.wk.cz/trunk/mr-mips/packages/python-mini_2.7.3rc2-2_mr-mips.ipk
wget http://openwrt.wk.cz/trunk/mr-mips/packages/python_2.7.3rc2-2_mr-mips.ipk

opkg install *.ipk

rm -v *.ipk

This should give you working python2.7.
To talk to the host mikrotik using Mikrotik API, you have a few choices:

  1. https://github.com/rtician/routeros
  2. https://github.com/socialwifi/RouterOS-api

Option 1 is a project that doesn't seem to have any SSL support (can't use the Mikrotik API SSL protocol), so it should work out of the box.
Option 2 is slightly harder to get to work.

In both cases, the problem you'll likely run into is SSL. OpenWRT keeps things lean, and doesn't include SSL support out of the box.
As far as I can tell, normally, you can install SSL using opkg without much effort. Unfortunately, http://openwrt.wk.cz/trunk/mr-mips/packages/, which is a repository of pre-built packages that will work on the MIPS CPU the RB493AH has, does not appear to have the SSL package. This means:
  • You can't use wget to download anything that starts with https (SSL encrypted web pages)
  • You need to modify RouterOS-api to disable SSL support, or it won't run

To get around the fact that you can't download anything from HTTPS, I just downloaded stuff on a different computer, and used SCP to copy it over to OpenWRT.
Note: OpenWRT's tar also didn't seem to like extracting some of the packages I was downloading, so if you have a .tar.gz file you need to extract, you might need to extract it on a different machine and scp it as an extracted folder.

To get around RouterOS_api having built-in SSL support, which causes "import routeros_api" to fail (complains about importing of _ssl), you need to disable ssl. Find and modify api_socket.py in that project, and do 2 things:
  • Comment out "import ssl"
  • In get_socket(), right before this line
    • if ssl_context is None and use_ssl:
    add this:
    • if ssl_context or use_ssl: raise Exception("SSL not supported on OpenWRT")

It's probably enough to just comment out the import line, but I added a bit of extra code in case I ever forget, and try to use api_ssl.
At this point, as long as your current working directory has the routeros_api folder in it, you should be able to import routeros_api and use it.
If you want to install routeros_api system-wide, you can either move the entire routeros_api dir anywhere that's in python's sys.path (I haven't tried this, but it'll probably work), or use Python's SetupTools.

To use SetupTools, which is actually required in order to install a bunch of packages from PyPi, you can do this:
  • Download the setup tools zip file from https://pypi.org/project/setuptools/#files on any other machine
  • Extract it
  • SCP the extracted folder to OpenWRT
  • cd into that folder on openwrt
  • Run "python setup.py install"
  • Delete the setup tools folder to save space - it's now installed system-wide

At that point, you can go back to the RouterOS_API directory, and run "python setup.py install" on that, which will install it system-wide.
If it complains about failing to import "six", you can download that from pypi and install it with "python setup.py install" just like everything else.

Having setuptools installed will let you download and install many of the packages found on pypi's website.
It seems like most packages work, as long as they don't have C binaries that need to be compiled first - OpenWRT doesn't have a gcc compiler pre-installed.

You can even download and install pip from pypi, and it seems to work fine, except for the fact that the pypi repos are ssl-protected, and with OpenWRT not having SSL support, pip fails to fetch anything.

SSL isn't totally essential for what I'm trying to do, but my 493 should have plenty of hard drive space for it (about 70MB free - I would think it would fit), so it would be nice to have. Unfortunately, as far as I can tell, the only way to get it working is to use the toolchain to cross-compile ssl binaries on a different system, and move them to OpenWRT, unless someone out there is nice enough to do this and put them online. I haven't tried this yet - maybe I will at some point.

Essentially, what this lets you do is install any packages from github or pypi that are pure python. If you need to do mikrotik discovery using MNDP, or talk to a mikrotik using mac telnet, have a look at https://github.com/pjoe/py-mactelnet. Its MNDP script is pure python, and works great. It's mac-telnet script uses netifaces, which is a C module, making it not work out of the box, but as far as I can tell, the only thing netifaces does is make it easier for the mac-telnet script to grab the MAC and IP of the interfaces on OpenWRT, which can be done without netifaces, so it probably wouldn't take much effort to remove the dependency on netifaces.

If this is interesting to anyone, but they're having trouble following my rushed explanation, let me know, and I'll try to clarify.
 
nicolino
just joined
Posts: 11
Joined: Tue Dec 15, 2015 12:49 am

Re: Metarouter images

Thu Nov 01, 2018 1:48 am

Interesting, Talz... very!

I've been mostly playing around with the API via PHP annd externally only, but I like the idea of having my custom app "inside" the Routeros either to use python instead of embedded scripting or to develope some custom feature.

I follow you on the missing SSL libs, you can always start from scratch and build your own OpenWRT patching as instructed in the official metarouter documentation or using some of the modified patching scripts available on this thread for newer kernels. With that, you can get whatever openwrt packages you want pre-installed, all of them, or just build your own repo and be so nice to put it on the internet available for all the dums like me not being able to build a system on my own! :P (true story)
 
td32
Frequent Visitor
Frequent Visitor
Posts: 92
Joined: Fri Nov 18, 2016 5:55 am

Re: Metarouter images

Thu Nov 01, 2018 1:51 am

i think you can get the ssl packages directly from the openwrt website, available with each release
example
https://archive.openwrt.org/chaos_calmer/15.05/ar71xx/mikrotik/packages/
 
nicolino
just joined
Posts: 11
Joined: Tue Dec 15, 2015 12:49 am

Re: Metarouter images

Thu Nov 01, 2018 3:29 am

i think you can get the ssl packages directly from the openwrt website, available with each release
example
https://archive.openwrt.org/chaos_calmer/15.05/ar71xx/mikrotik/packages/

But would those work for the patched kernel? Also, how would you manage dependencies? Sorry about my ignorance, I'm most likely asking silly questions...
 
talz
newbie
Posts: 31
Joined: Wed Mar 15, 2017 9:01 pm

Re: Metarouter images

Thu Nov 01, 2018 6:06 pm

i think you can get the ssl packages directly from the openwrt website, available with each release
example
https://archive.openwrt.org/chaos_calmer/15.05/ar71xx/mikrotik/packages/

The release we are working with is Attitude Adjustment (12.09), so I guess the repo for that would be:

https://archive.openwrt.org/attitude_ad ... 09/ar71xx/

I don't see any SSL packages in that repo.
There are packages with the word "ssl" in the name, but those are just SSL modules for specific software, which I assume would all depend on a system ssl package that needs to be installed, which I can't find.

Edit: I think I found it. openssl-util_1.0.1e-1_ar71xx.ipk. I'm gonna give it a try.
Edit 2: opkg says "Packages for openssl-util found, but incompatible with the architectures configured"

What's the relation between MIPS, and AR71xx?
We use a lot of devices like 493s, 751s, 750s, 912s, and 52HPn grooves, all of which are MIPSBE.
If we need to use gcc to compile binaries, do they need to be AR71xx? MIPS? MIPSBE?

Almost all software I write is for regular x86_64, so I don't usually have to deal with different CPU architectures.

It looks like the RB493AH has an AR7161 CPU, which I guess falls within AR71xx.
What's an architecture? A CPU can have more than one architecture? It sounds like it, since the repo is for AR71xx, but it is complaining that the architecture doesn't match.
 
td32
Frequent Visitor
Frequent Visitor
Posts: 92
Joined: Fri Nov 18, 2016 5:55 am

Re: Metarouter images

Thu Nov 01, 2018 9:15 pm

what about this
http://openwrt.wk.cz/trunk/mr-mips/packages/openssl-util_1.0.1-1_mr-mips.ipk
 
talz
newbie
Posts: 31
Joined: Wed Mar 15, 2017 9:01 pm

Re: Metarouter images

Thu Nov 01, 2018 10:29 pm

Bloody safari!

I did a search in my safari browser on that page for ssl. Turns out it only showed me words that started with ssl! Anything separated by a - or a _ was considered a new word, so it found some ssl packages, but not the main openssl package!

I totally missed it.

Trying it now. It installs fine with opkg, assuming you grab its dependencies as well:
opkg install libopenssl_1.0.1-1_mr-mips.ipk openssl-util_1.0.1-1_mr-mips.ipk zlib_1.2.5-1_mr-mips.ipk

Initially, wget still couldn't download https stuff, but that's probably because by default, that openwrt image comes with wget-nossl.
Installing the regular wget from that same repo fixed the issue, and wget works fine with https now.

Unfortunately, it doesn't appear that this fixes Python's inability to use ssl. Doing "import ssl" complains about a missing _ssl module. My iMac has a _ssl.so file that lets it import "_ssl", but I can't copy it over since that's compiled for a different architecture. Maybe one of the other packages has this. I'll look around some more.
 
moham96
just joined
Posts: 23
Joined: Thu Dec 21, 2017 3:08 pm

Re: Metarouter images

Mon Mar 18, 2019 8:03 pm

Hi,
why doesn't mikrotik push their changes to mainline linux and official openwrt instead of releasing a patch for each version ? I hope Mikrotik engineers can provide us with an answer.
this will ensure that the metarouter will always be supported,and maintained by linux kernel experts, all bugs will be ironed and fixed upstream.
sending patches to mainline linux is a bit of a long process but it's well worth it.

Regards
 
User avatar
flaviojunior
Trainer
Trainer
Posts: 19
Joined: Thu Nov 17, 2016 6:27 pm
Location: Brazil
Contact:

Re: Metarouter images

Wed Mar 20, 2019 3:12 pm

Any news about update MetaRouter on RouterOS?
It's a very good feature that we can you to use Zabbix, PRTG........... and another thousands features all in one.
I used QoS Reflector on PRTG, it's a script on python running on a linux that reflect UDP packages from PRTG and with it he calculate the Quality of the Link.
But to install Python on a OpenWRT I can run the image on a 750 router because of the size, the only router today that could do it is 2011. Now we are using small PCs to use the QoS Reflector on our clients, but I want to use again RouterOS MetaRouter for it.
Points:
Make all routers ARM, MMIPS and Tile work with MetaRouter (All hEX, 3011, 4011, 1100AHx4, CCRs)
And put the Image on a external drive (USB, SDCard...)

Maybe:
Create a way to clone the running image
Replication on diferent routers to make HA

Will be a new product of mikrotik, Virtualization HA.
Mikrotik Certified Trainer, Network Specialist.
Number 1 consultant Brazil, Rio de Janeiro
MTCNA, MTCRE, MTCWE, MTCTCE, MTCUME, MTCIPv6E, MTCINE, MTCSE

Who is online

Users browsing this forum: No registered users and 2 guests