OpenWrt Forum Archive

Topic: New Project: MikroConf Router Configuration Interface

The content of this topic has been archived on 10 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

This is an announcement for a new project called MikroConf.

MikroConf is a command-line administration interface, similar to those
found in commercial routers. It glues together various embedded Linux
components (busybox, etc...) under a consistent and familiar (de-facto)
command-line interface.

With MikroConf you can do things like:

Router> en
Router# conf term
Router(config)# hostname OpenWRT
OpenWRT(config)# end
OpenWRT# write
OpenWRT# show run

Of course this is a very simple example. You can do much more
sophisticated configurations with MikroConf.

It is convenient and enjoyable to work with, even for the seasoned Linux
administrator due to a number of more-or-less unique to MikroConf features:

1. It supports (in a safe manner) in-line scripting in the Tcl
Programming Language. Regular configuration commands and Tcl commands
can be intertwined on the command prompt.
2. It supports an event-based/reactive configuration paradigm. Tcl
procedures can be registered to be invoked when certain events occur
(e.g. link up/down).
3. Automation of repeated tasks via parameterized macros (Tcl procs).
4. Command output can be captured, filtered, manipulated, emailed etc.
5. Usability features such as: ANSI terminal colors and highlights, full
screen editing of configuration, and others.

Of course, as expected by such an interface, it supports all the
standard command-line editing conveniences: in-help, command
abbreviations, command expansion, history substitutions, command-line
editing keys and others.

It is written in Tcl and C. It has a very clean and well-documented
design, which makes it particularly easy to extend with new
configuration modules. There is complete documentation on the framework,
design document, and a tutorial on how to write new modules in Tcl.
Users will find a Getting Started Guide and a command reference with
description on each supported command.

It comes with a patch that fully integrates it to OpenWRT's development
environment. Currently the patch is for r20079 svn revision of OpenWRT-dev sources.
Download with:
svn co -r 20079 svn://svn.openwrt.org/openwrt/trunk
And apply the patch that you will find in MikroConf's downloads section.
There are also ready-to-use VirtualBox & VMWare OpenWRT images that
you can try it out without going through the building phase.

Current configuration capabilities, with more are coming soon:

* Basic Commands and Services
* Low-level System/Kernel Configuration
* Firmware Operations
* Local and Remote File System Access and Maintenance
* Network and Host Troubleshooting and Communication Tools
* VTY Configuration
* Syslog and Logging
* Network Time Protocol Client Support
* Interface Configuration
* Basic IP Configuration (dhcp, static routing, etc.)
* Layer 2 Network Discovery

MikroConf is actively looking for developers to join in, among other roles.
It will soon be possible to contribute to MikroConf as a student, in the
context of Google Summer of Code 2010, having Tcl/Tk as the mentoring organization.

Main Web Page: http://mikroconf.sourceforge.net/
Screenshots: http://sourceforge.net/project/screensh … _id=297197
Command Reference: http://sourceforge.net/apps/mediawiki/m … onf_Module
Help Wanted: http://sourceforge.net/apps/mediawiki/m … ow_to_help

very nice project though this can be done with quagga to a certain extent

Unlike MikroConf, quagga is solely for routing functions. A future goal is actually to integrate on a library level with quagga, so that all guagga functionality becomes available through MikroConf interface.

I am very interested in trying this software out, however I've been pretty unsuccessful with the openwrt virtualbox image you've provided.

It boots up fine, but when I try to enter MikroConf Shell (mcsh) it throws the error:

Timeout waiting: error flushing "sock8": broken pipe

system log shows

Aug 28 21:40:19 Router daemon.alert MikroConf: Background error: error reading "sock13": interrupted system call

I've tried on two different computers, both running Ubuntu 10.04 (one is x86_64). I have created the serial port as host pipe, following your instructions.

Hello,

I have it running on my Netgear WNDR3700, and I have to say... GREAT WORK! I had to modify a few Makefiles to get it to compile properly, but it was trivial (-fPIC).

I wrote a VRRP module using VRRPD, and I will post it here and to your trac later tonight when I get home. It is far from perfect, but I was hoping that you could look at it and give me input as far as improvements I could make to it.

Regards!

This looks really cool (to a Cisco router-guy smile  ), but I have problem trying it out..

Looks to me that there is something wrong with the VirtualBox image on the website.
Get the same "broken pipe" error that aport writes about above. Both over the serial port as well as in the virtualbox gui.
And I can't figure out how to compile it either. sad

(Last edited by Treq on 10 Sep 2010, 15:03)

Treq,

What issues do you run into when compiling?

Hi aport,

The main problem is that I am not much of a programmer and I just don't know enough about compiling to get it done right..
I can compile OpenWRT easy enough, but when it comes to two source trees and how it all works together, I am lost..

I get as far as this:
1. Get openwrt trunk to the right revision number (20079).
2. Apply that Mikrconf patch.
3. Get mikroconf source downloaded.
4. In mikroconf directory do:

kkrohn@Hugin:~/openwrt/mikroconf$ make all
cd mcd && make
make[1]: Entering directory `/home/kkrohn/openwrt/mikroconf/mcd'
cc  -c lib.c -o lib.o
lib.c:6:17: error: tcl.h: No such file or directory
lib.c:8: error: expected ‘)’ before ‘clientData’
make[1]: *** [lib.o] Error 1
make[1]: Leaving directory `/home/kkrohn/openwrt/mikroconf/mcd'
make: *** [all] Error 2

I am not even sure what this SVN and independent build is supposed to do.
I mean, wouldn't it be better to either make a package or if a patch to OpenWRT is really necessary, keep the whole Mikroconf thing in that patch?
And not patch + separate compile?
.. but what do I know?   smile

Think this is a BRILLIANT idea, though.
Getting proper CLI on at least the router-related parts of OpenWRT would be ..... amazing.

Hi Treq,

Tonight I can make a tarball with all the packages. You'll just extract it into openwrt/package/ then make menuconfig. Mikroconf depends on some tcl libs, and I had to modify the Makefiles to get them to compile for my ar71xx target.

Hi aport,

yeah? Really?    Sweet!  smile
Would it compile for x86 too, you think?

Treq wrote:

Hi aport,

yeah? Really?    Sweet!  smile
Would it compile for x86 too, you think?

I apologize for not holding up my end of the deal; I get really busy at work sad

I was just going to post the packages in Makefile form, not compiled... but I suppose I can.

My target is big-endian MIPS but I'll try to get some x86 packages too. I can't guarantee they'll work though.

Here's the first part: http://rapidshare.com/files/421989966/m … age.tar.gz

Extract that into your openwrt/package/ dir and you can select Mikroconf in make menuconfig.

The mikroconf package in there includes the source code since I was testing/modifying it and didn't want to deal with patching just yet.

The discussion might have continued from here.