As asked by few friends, i thoughts its a good idea to share it with all.
What is METAROUTER?
as defined by Greg
“Metarouter is a way to have logical routers running on your routerboard. In essence, you create a virtual router on your RB, then you assign some interfaces to it. You then can hand this virtual router off to a customer hand allow them to administer it without effecting any of the core functions necessary on the device. .”
Also on METAROUTER you can use openwrt image to host tiny linux and its few apps in it. like APACHE, asterisk etc. web server was in highly demand by local cable operator who wanted to host NON payment/reminder page to be shown at there clients.
Currently MetaRouter can be used on
- RB4xx, RB7xx series, RB900 series, RB2011.xx boards
- Listed PPC boards: RB1000, RB1100, RB1100AH and RB800.
Hardware Software Used in this guide:
Routerboard Model = RB2011UiAS-2HnD
Mikrotik ROS version = 6.27
Howto install METAROUTER
First download OPENWRT image into mikrotik. Open New Terminal, and issue following command …
/tool fetch url=http://openwrt.wk.cz/trunk/mr-mips/openwrt-mr-mips-rootfs-31411-basic.tar.gz
Now import the openwrt downloaded in above step,
As showed in the mage below …
Now we need to add virtual network interface into this machine. We also have to provide valid network configuration with internet access so that it can download required software later. For this demonstration purposes I added manual IP , but you can use virtual bridge and use your mikrotik DHCP serve to allow internet access to the metarouter machine or whatever you prefer to establish network connectivity.
In the below pic, I selected ETHER2 which is LAN interface of mikrotik host.
.
Now double click on newly created machine and select CONSOLE and press enter key few times to get command prompt.
.
Edit the network configuration file.
vi /etc/config/network
Press “i” to enter edit mode.
and configure the network as per your local need.
Add DNS server entry for resolving internet hosts …
vi /etc/resolv.conf
After setting network configuration, save and exit. enable/restart the network services so changes can take effect.
/etc/init.d/network enable
/etc/init.d/network restart
Now try to ping any internet site to verify the connectivity. On successful attempt, you should get reply.
.
.
Howto install APACHE web server in METAROUTER to host your files.
Install APACHE web server with OPKG (like yum or apt-get)
Edit the opkg file
vi /etc/opkg.conf
Change a string in first line, as it should be like below one …
src/gz snapshots http://openwrt.wk.cz/trunk/mr-mips/packages
Now update opkg (like you do in ubuntu to update apt-get)
opkg update
opkg install apache
its better if you restart your mikrotik routerboard with reboot command so that all changes should take effect properly otherwise you MAY see few errors on accessing apache.
Now start apache service
apachctl start
(or restart as required)
Access via browser
html index files are placed at
/usr/share/htdocs
To be continued ….
Regard’s
Syed Jahanzaib
Filed under: Mikrotik Related
