Community discussions

MikroTik App
 
flovin
just joined
Topic Author
Posts: 12
Joined: Wed Sep 21, 2005 11:46 am

Configuring RouterOS

Fri Jan 13, 2006 12:56 pm

Hello,

I was wondering if someone has made a clever way of configuring RouterOS boxes, I was thinking along the lines of writing a small application to set up the box, with a config based upon data from our customer database and documentation database- and then dumping the config automagically to the RB via tftp or similar.

The point of this would be enabling someone non-technical to configure a box, e.g. office personel, and at the same time ensuring that all configurations are reflected in the documentation and customer database.

The way I would like to do this is writing a program from which the user could choose which router to configure, it would be an isolated segment of course, we don't want the user to reset the configuration on other routers. This program would then be able to send mac-telnet commands to the router to do whatever I wanted to do.

But so far I've only seen an interactive mac-telnet client, the one included with the Neighbour Viewer.

Any clever way of doing this?

regards,
Flovin
 
User avatar
YazzY
Member Candidate
Member Candidate
Posts: 140
Joined: Fri May 28, 2004 3:26 pm
Location: Norway, Østfold
Contact:

Fri Jan 13, 2006 1:05 pm

Use expect to automaticaly login via ssh/telnet and send custom commands to your router.
The commands can be stored in any way you want as long as your application is able to fetch/read them.
Here is an example of how I coded something like that creating a simple CLI in shell and dialog.
http://yazzy.yazzy.org/coding/shell/rou ... uteros.txt
 
flovin
just joined
Topic Author
Posts: 12
Joined: Wed Sep 21, 2005 11:46 am

Fri Jan 13, 2006 1:14 pm

Thanks for the suggestion, I was originally thinking along those lines as well - but I'd like to be able to do it with MAC telnet, that way you could take the RB antennas out of the box, plug in the Ethernet cable.. after 30-45 seconds the box would be configured, without the user doing anything manually except selecting the customer. I did write some small script for the RB500, but they have a serial port - the RB antennas don't.

With your method we'd still need to go in with mac-telnet to set the IP before being able to configure. Though I guess that's still a lot better than nothing.

Of course, if Mikrotik could give me the source for the MAC telnet client and eventually the Neighbourhood Viewer...

Then I could make us all a neat little program for just that purpose...

regards,
Flovin
 
User avatar
YazzY
Member Candidate
Member Candidate
Posts: 140
Joined: Fri May 28, 2004 3:26 pm
Location: Norway, Østfold
Contact:

Fri Jan 13, 2006 1:21 pm

Put a script on your box that will find ethernet devices and add an IP to one of them at boot.
Then ship the equipement off to your customers and let them configure it over IP.
 
User avatar
jp
Long time Member
Long time Member
Posts: 603
Joined: Wed Mar 02, 2005 5:06 am
Location: Maine
Contact:

Fri Jan 13, 2006 7:23 pm

I have backed up and reloaded configurations using "export" to save configs to a file. This creates a text file, which you can change the mac addresses and other settings in, then ftp back to the box. there's probably a way to automate it using nasty bash scripts, sed, mysql client, expect, etc...

Who is online

Users browsing this forum: Bing [Bot], cedie, Google [Bot], sindy and 61 guests