Community discussions

MikroTik App
 
kasparskr
MikroTik Support
MikroTik Support
Topic Author
Posts: 139
Joined: Mon Jul 27, 2015 11:46 am

RouterOS Virtual Labs

Wed Aug 19, 2015 1:21 am

We recently released a test version of our upcoming product Cloud Hosted Router (CHR) - a virtual RouterOS instance for the x86_64 architecture. The test version we currently offer has 1mbps limit per interface (in future we will offer unlimited speed with a paid subscription). Otherwise, it's a fully functional RouterOS.

RouterOS Virtual Labs can be used in various scenarios, for example, to try out configuration before deploying it in production, when preparing for MikroTik Certification test or using CHR as a router for virtual servers, just to name a few.

Following are basic instructions to get started on creating RouterOS Virtual Labs using GNS3 (Graphical Network Simulator) tool on Windows desktop machine, Windows 8.1 to be specific but it should be similar on other Windows versions as well, just make sure it is 64bit version.

NOTE. GNS3 can be run also on Linux and Mac machines.

As of this writing (August 2015) the newest version of GNS3 is v1.3.9, it can be obtained here - https://github.com/GNS3/gns3-gui/releases/tag/v1.3.9 (or just head to http://www.gns3.com). As a hypervisor GNS3 can use either VirtualBox or Qemu. For running CHR, we suggest Qemu. It is already bundled with GNS3 installation. Currently, the newest version of Qemu for Windows is v2.4.0, but with GNS3 included is v2.2.0. If you want the newest, you can download it from http://qemu.weilnetz.de/w64/ and install separately. During installation, GNS3 will check for existing Qemu installation on your computer and will use that if true. In this guide, we will use separately installed Qemu.

1) Install Qemu (using default settings)

2) Install GNS3 (GNS3-1.3.9-all-in-one.exe) and uncheck Qemu
01_CHR_GNS3.png
Setup will download additional installation files as necessary.

NOTE. SolarWinds Response tool reports that computer name can only contain 'a-z', 'A-Z', '0-9', '.' and '-' as characters. Underscore '_' is not valid and if you want to use this tool computer name will have to be changed.

3) For Virtual RouterOS instances to have access to the Internet (or at least Windows host machine) a loopback interface has to be created and Internet Connection Sharing enabled.

To do so, execute command: 'hdwwiz.exe' (as Administrator) - Add Hardware Wizard will open.

Install the hardware that I manually select from a list (Advanced) -> Network Adapters -> Microsoft -> Microsoft Loopback adapter. If there is no such choice Microsoft KM-TEST Loopback Adapter should be chosen.
02_CHR_GNS3.png
Open 'Control Panel -> Network and Sharing center -> Change adapter settings'. There will be a new network adapter and it should have a name 'Ethernet 2' (or some other number if there are more ethernet devices on the computer). For the sake of recognizability, we suggest renaming the interface to 'Loopback' or some other apparent name.

Next, enable Internet Connection Sharing, select the network interface which is used to connect your computer to the network (WiFi or wired) and open Properties -> Sharing. Enable 'Allow other network users to connect through this computer's Internet connection' and select 'Loopback' as Home Network Connection:
03_CHR_GNS3.png
Windows will automatically assign IP 192.168.137.1 to that interface and enable DHCP server on it.
04_CHR_GNS3.png
It is suggested to reboot the computer at this point!

4) Download newest CHR image (.img file) here - http://www.mikrotik.com/download

5) Open GNS3. To make it easier to move GNS3 projects between various computers, it is suggested to change GNS3 Paths (My projects, My binary images) to a universal folder, e.g. C:\GNS3. By default, it is C:\Users\YOUR_USERNAME\GNS3\... It can be changed in Edit -> Preferences
05_CHR_GNS3.png
6) Create RouterOS template: Edit -> Preferences -> Qemu VM's -> New -> Type: Default -> Choose a name -> Choose amount of RAM to allocate for one RouterOS instance: 64MB is suggested -> Chose disk image that was downloaded in step 4. Change network adapters to desired amount, e.g. 4
06_CHR_GNS3.png
Now RouterOS template is available from Browse Routers side panel.
07_CHR_GNS3.png
7) GNS3 has been set up for creating your RouterOS Virtual Lab. Drag and Drop RouterOS template on the main screen as many times as you need virtual routers. Connect them with links. To have access to the host computer's Loopback interface, add 'Cloud' instance and configure its Ethernet to use that interface.
08_CHR_GNS3.png
Connect it to the RouterOS instance via Switch. As there already is a DHCP server on Windows Loopback interface, IP address on RouterOS can be obtained automatically, just configure
/ip dhcp-client
accordingly.

8) Boot routers one by one: right clicking on each and choosing Start. Or click "play" icon on top to start all instances at once. Double-clicking with a mouse on a running instance will open a terminal to its console.

9) To manage RouterOS instances via Winbox from Windows machine, enable RoMON on all routers:
/tool romon set enabled=yes
and connect using RoMON to the RouterOS instance which is directly connected to Loopback interface. Read more about RoMON on our wiki - http://wiki.mikrotik.com/wiki/Manual:RoMON
09_CHR_GNS3.png
To better distinguish routers from each other, rename each to have a different name, e.g.
/system identity set name=ROS_1
10) Here's a simple 4 router setup connected to the Internet via Loopback interface. Static routing was configured and each of them was able to connect to the internet via the CHR631-1 router.
10_CHR_GNS3.png
* GNS3 includes VPCS (Virtual PC Simulator) - a simple network testing tool which has some essential commands like traceroute, ping, arp built in. It even has DHCP client. It can be connected to router or switch as necessary. If full fledged OS is needed, Qemu can run it too. One thing to note - Qemu is rather slow in running generic Linux LiveCD's. VirtualBox is a better choice. As GNS3 supports both Qemu and VirtualBox, you can combine instances using both of these hypervisors.

* GNS3 installation has Wireshark bundled with it. Wireshark is a powerful network packet analyzer which can be used to capture traffic on an interface. To see traffic on a link in GNS3, right-click on it and chose 'Start capture'. Read more about Wireshark features here - https://www.wireshark.org/about.html

* GNS3 stores all project files under one folder which is movable to another computer. RouterOS template image file (.img) should also be copied together with the project itself and placed into 'GNS3/images' folder on target machine.

* Qemu stores images in qcow2 (copy-on-write) format. These images can be run separately from GNS3 if needed. For example, you could make a multiple virtual lab with multiple routers and afterwards deploy the same images in production. If in production environment different hypervisor is used, qcow2 image can be converted to various formats using 'qemu-img convert' command. See more - http://docs.openstack.org/image-guide/c ... rting.html

We're just scratching the surface here on what can be done with CHR using GNS3, the rest is up to you. We would love to see your virtual lab setups, please post screenshots in this thread.

---
Additional notes:

* When using Windows 8, if there are problems with pinging Loopback interface from the router or VPCS, try reinstalling Winpcap and run it using compatibility mode for Windows 7.

* If there are problems with pinging Loopback interface from the router or VPCS, check that your antivirus and/or firewall is not blocking traffic from virtual RouterOS instances to the host machine.

* When using Qemu as a hypervisor, it is possible to pass additional parameters using 'options' field in Qemu VM Configuration -> Advanced Settings. For available Qemu parameters see - http://wiki.qemu.org/download/qemu-doc.html
You do not have the required permissions to view the files attached to this post.
 
marrold
Member
Member
Posts: 427
Joined: Wed Sep 04, 2013 10:45 am

Re: RouterOS Virtual Labs

Wed Aug 19, 2015 1:53 am

I recently started using GNS3 with CHR images on a Windows laptop with modest RAM (4GB) connected to a remote GNS3server running on Ubuntu with 32GB of RAM.

It works perfectly!
 
nspk
just joined
Posts: 12
Joined: Thu Jul 25, 2013 9:42 pm

Re: RouterOS Virtual Labs

Sat Aug 22, 2015 12:50 pm

Kasparskr,
tutorial is great and everything works in Windows 10 for version 1.3.9 of GNS3. Can You make the same tutrial for next version 1.4.0 where will be used Vmware images for GNS3 and RouterOS?
 
snegurochka
just joined
Posts: 1
Joined: Thu Aug 27, 2015 12:23 pm

Re: RouterOS Virtual Labs

Thu Aug 27, 2015 12:27 pm

Great tutorial and works great!

May I ask you to do another one on unetlab? - www.unetlab.com

On the last release they added support for MikroTik RouterOS.

Would be great to see that too and your thought comparing gns and unetlab.

Thanks
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1742
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: RouterOS Virtual Labs

Wed Sep 02, 2015 7:04 pm

As someone who uses GNS3/virtualization daily to simulate customer networks as well as do development, labs and benchmarking, this is Awesome!

Will be trying this today so I can post my screenshots! :D
 
nspk
just joined
Posts: 12
Joined: Thu Jul 25, 2013 9:42 pm

Re: RouterOS Virtual Labs

Sun Sep 06, 2015 2:19 pm

Hello,
I have problem with:
1. I cannot capture packets beetwen CHR's links - i can do that beetwen ethernet switch link and CHR link.
2. After GNS3 update and CHR's image to newest CHR 6.32 - CHR's hosts in project stop working. In GNS everything look ok, images start up and links are green status, but if try to connect by console serial it looks like the CHR is hang(other thing i cannot pin it)
 
leonset
Member Candidate
Member Candidate
Posts: 256
Joined: Wed Apr 01, 2009 9:09 pm

Re: RouterOS Virtual Labs

Tue Sep 08, 2015 9:56 am

Is there any chance of emulating wireless interfaces with this setup?
For example, if you want to test WDS with some other settings and check how the network will behave.

I have used GNS before but I worked with ethernet like interfaces and did not try wireless ones.

Thank you
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: RouterOS Virtual Labs

Tue Sep 08, 2015 10:12 am

there are no wireless virtual interfaces available.

Next, in GNS3 - check if your images ahve configuration - if you swap out the image, it will lose the configuration. The best course of action would be to use '/system package update' for the upgrade.
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: RouterOS Virtual Labs

Tue Sep 08, 2015 3:08 pm

It should be noted that GNS3 (and I'm assuming MikroTik?) are not opposed to having wireless interfaces be available, and are willing to support them.

Case in point:
https://community.gns3.com/ideas/1139

The problem is there's no Hypervisor with such support. Not VirtualBox, not Qemu, not VMware even. Supporting a brand new type of virtual hardware is far different from making preexisting such devices communicate with one another (GNS3's job) or making an OS have compatible drivers (RouterOS' job).


I don't suppose MikroTik might have some spare time (and/or "know how") to contribute just one such device to just one open source Hypervisor (be it VirtualBox or Qemu) that is "conveniently" supported by RouterOS?
 
ondrugs
just joined
Posts: 2
Joined: Fri Sep 11, 2015 10:59 pm

Re: RouterOS Virtual Labs

Fri Sep 11, 2015 11:04 pm

thank you for this. i've got a virtual router up and running.

is it possible however to access the webUI when you put the cloud interface on a VRF interface? i'm a RouterOS noob, so forgive me if this is a stupid question.

my reasoning for this is to keep my management of the virtual routers totally separate from lab i want to run.
 
nspk
just joined
Posts: 12
Joined: Thu Jul 25, 2013 9:42 pm

Re: RouterOS Virtual Labs

Sun Sep 13, 2015 3:00 pm

Hello,
I have a problem do static routing the same like in first post's example. I cannot ping GNS interface 192.168.137.1 from R2/R3/R4 but I can ping any other site in Internet. Other thing i could download and upgrade to newest firmware pacakge in R1/R3/R4 but in R2 i get info that I cannot connect - Error connection timeout - this is strange because I can ping any site in Internet - without GNS interface 192.168.137.1. There are not any firewall configuration - everything is open.

Image

Config R1:
Image
Config R2:
Image
Config R3:
Image
Config R4:
Image
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: RouterOS Virtual Labs

Tue Sep 15, 2015 3:02 pm

for those with VirtualBox or others that have problem that router stops immediately after it boots up - make sure that you have enabled your VM to expose virtualization bit to the guest.

On virtual box you can do this liek this:
VBoxManage setextradata [vmname|global] VBoxInternal/CPUM/EnableHVP 1
 
nspk
just joined
Posts: 12
Joined: Thu Jul 25, 2013 9:42 pm

Re: RouterOS Virtual Labs

Tue Sep 15, 2015 3:31 pm

Janisk,
in my IP config is something wrong, or it is rather problem with GNS - problem defined post above.

I added to attachment and this link whole configuration to look.

http://niespielak.eu/niespielak.eu/ROS-Static.7z
You do not have the required permissions to view the files attached to this post.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: RouterOS Virtual Labs

Wed Sep 16, 2015 9:54 am

you have to set up routing everywhere, that includes host holding GNS interface with address 192.168.137.1

R1 can ping it as it is in the same network. you can check with traceroute where your packets are going and what and where is happening.
 
WISPa
just joined
Posts: 12
Joined: Wed Sep 16, 2015 11:52 am

Re: RouterOS Virtual Labs

Wed Sep 16, 2015 12:00 pm

I'm loving the ability to plan our network in my GNS3 lab, kudos for the low throughput x86 version!

GNS3 is great, but is currently causing me a few issues with resources. When running, 2 dynamips processes are created and each consumes a full CPU core. I'm running a quad core i5 machine here, which should be plenty, but these 2 processes are causing the machine to be unresponsive.

My setup is identical to that above - QEMU for virtualisation and the loopback interface for ICS in Windows. I have 6 ROS instances in my GNS3 project, plus a few generic GNS3 switches and the Cloud device connected to my loopback.

I've read around on idlepc settings related to IOS instances but can't seem to find any way to improve performance on the ROS VM. I noticed that the dynamips batch file that launches the processes instructs a below average priority to the process already.

Has anyone ran into the same problem and is there anything can be done to improve it?
 
WISPa
just joined
Posts: 12
Joined: Wed Sep 16, 2015 11:52 am

Re: RouterOS Virtual Labs

Wed Sep 16, 2015 5:57 pm

I'm loving the ability to plan our network in my GNS3 lab, kudos for the low throughput x86 version!

GNS3 is great, but is currently causing me a few issues with resources. When running, 2 dynamips processes are created and each consumes a full CPU core. I'm running a quad core i5 machine here, which should be plenty, but these 2 processes are causing the machine to be unresponsive.

My setup is identical to that above - QEMU for virtualisation and the loopback interface for ICS in Windows. I have 6 ROS instances in my GNS3 project, plus a few generic GNS3 switches and the Cloud device connected to my loopback.

I've read around on idlepc settings related to IOS instances but can't seem to find any way to improve performance on the ROS VM. I noticed that the dynamips batch file that launches the processes instructs a below average priority to the process already.

Has anyone ran into the same problem and is there anything can be done to improve it?
Huge facepalm moment for me. I had 2 Ethernet Switches in my topology and had configured a network loop. The high CPU usage was simply the 2 devices handling the huge traffic flowing over the loop.

I've since removed my loop and the CPU usage is now back down to almost zero.
 
nspk
just joined
Posts: 12
Joined: Thu Jul 25, 2013 9:42 pm

Re: RouterOS Virtual Labs

Fri Sep 18, 2015 8:29 pm

you have to set up routing everywhere, that includes host holding GNS interface with address 192.168.137.1

R1 can ping it as it is in the same network. you can check with traceroute where your packets are going and what and where is happening.
I check again configuration - I do traceroute on every router except R1 - all pings to 192.168.137.1 all blocked on R1. It is strange because host addresed 192.168.137.1 have routing and can ping all interfaces for all Routers. At R1 there is not ant firewall and policies.

Other thing I can do traceroute from R2,R3,R4 to example 8.8.8.8 - on traceroute history i get information that host 192.168.137.1 is ok and route packets to another host - but it still not working if I try to ping 192.168.137.1 from R2,R3,R4 - in opposite ping from 192.168.137.1 works ok to R1,R2,R3,R4 interface addresses...
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Sat Sep 19, 2015 11:55 am

hi,

i ve installed gns3 with the guide but when i try to enter the console of my router is says

127.0.0.1:2001 Network error:connection refused


Any idea please ???
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Sat Sep 19, 2015 12:33 pm

Hi, everybody i cannot make it to work.

When i am trying to connect to the console of the router i am getting the following error

127.0.0.1:2001 network error:connection refused

Am i missing something ?
 
nspk
just joined
Posts: 12
Joined: Thu Jul 25, 2013 9:42 pm

Re: RouterOS Virtual Labs

Sat Sep 19, 2015 1:48 pm

Hi, everybody i cannot make it to work.

When i am trying to connect to the console of the router i am getting the following error

127.0.0.1:2001 network error:connection refused

Am i missing something ?
Check If WinCap is installed correctly.
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Mon Sep 21, 2015 11:46 am

yes, winpcap is already installed and working fine.

I dont think this is the problem.


Thanks
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Tue Sep 22, 2015 11:48 am

yes, winpcap is already installed and working fine.

I dont think this is the problem.


Thanks

I am running windows 7 over bootcamp in my mac, do you think that is the reason for not working properly ?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26912
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: RouterOS Virtual Labs

Tue Sep 22, 2015 11:51 am

yes, winpcap is already installed and working fine.

I dont think this is the problem.


Thanks

I am running windows 7 over bootcamp in my mac, do you think that is the reason for not working properly ?
BootCamp is identical to just running on any other PC. So I don't think related to this fact.
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Tue Sep 22, 2015 1:26 pm

yes, winpcap is already installed and working fine.

I dont think this is the problem.


Thanks

I am running windows 7 over bootcamp in my mac, do you think that is the reason for not working properly ?
BootCamp is identical to just running on any other PC. So I don't think related to this fact.
OK, then what else should i check ?

Thanks Normis!!
 
abjornson
newbie
Posts: 27
Joined: Tue Mar 05, 2013 5:39 am

Re: RouterOS Virtual Labs

Thu Oct 01, 2015 1:12 am

I'm loving simulating Mikrotik networks in GNS3.

I'm having a trouble simulating Mikrotiks with more than 8 interfaces.

I am currently running Mikrotik's official cloud hosted router (CHR) image Cloud Hosted Router - MikroTik RouterOS

I am running GNS 1.3.10 on MacOS with the bundled qemu 0.14.1-gns3-osx

My virtual mikroiks are qemu emulated and use e1000 interfaces.

My problem is this:
  • If I check the "use legacy networking mode" on my virtual routers - I can link their interfaces together, which is great. However, routers configured with more than 8 interfaces wont start, and cant be connected to
  • If I uncheck the "use legacy networking mode" on my virtual routers - Routers with more than 8 interfaces will start, and i can connect to them. However, as soon as I link their interfaces together....the routers will no longer start and can't be connected to.


So I'm a bit stuck between a rock and a hard place. My network configurations need routers with more than 8 interfaces, but I need to connect them together.

Any troubleshooting advice greatly appreciated!
 
abjornson
newbie
Posts: 27
Joined: Tue Mar 05, 2013 5:39 am

Re: RouterOS Virtual Labs

Thu Oct 01, 2015 4:38 pm

If anyone else finds this question - I solved my problem through some assistance in the GNS3 forum:

https://community.gns3.com/message/48849#48849

The version of qemu bundled with GNS3 1.3.10 on OSX was older (0.14.1). I installed a newer version of qemu via homebrew (qemu 2.3.0) and everything works well. I can now run virtual Mikrotiks in GNS3 with 8+ interfaces and successfully link them together.
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Thu Oct 08, 2015 2:03 pm

Hi, Normis


Do you know if the CHR works on Windows 7 32bit ?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26912
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: RouterOS Virtual Labs

Thu Oct 08, 2015 2:07 pm

Hi, Normis


Do you know if the CHR works on Windows 7 32bit ?
in what software ?
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Thu Oct 08, 2015 3:31 pm

GNS3 with qemu
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Thu Oct 08, 2015 3:40 pm

Hi Normis,,

Is it possible to provide a guide on installing GNS3 and QEMU on osx ?

Can we use virtualbox instead of Qemu, is it working properly ?


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

Re: RouterOS Virtual Labs

Thu Oct 08, 2015 3:42 pm

See first post in this topic. it is Windows and GNS
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Thu Oct 08, 2015 4:55 pm

So we cannot run this setup on Windows 7 32bit ?
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: RouterOS Virtual Labs

Fri Oct 09, 2015 10:56 am

The CHR uses 64bit kernel. You have to have virtual environment to accommodate that. 32bit mode was scrapped altogether for the CHR.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26912
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: RouterOS Virtual Labs

Fri Oct 09, 2015 11:07 am

So we cannot run this setup on Windows 7 32bit ?
CHR can't run on Windows 32Bit, because it is 64Bit.
All Intel Core CPUs support Windows 64bit. Why are you running 32Bit Windows? Most likely your CPU supports 64Bit Windows.
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Fri Oct 09, 2015 12:13 pm

I am running windows in my MAC over bootcamp but it only support windows 7 32bit thats why i told you if you can support Windows 7 32bit
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26912
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: RouterOS Virtual Labs

Fri Oct 09, 2015 12:16 pm

I am running windows in my MAC over bootcamp but it only support windows 7 32bit thats why i told you if you can support Windows 7 32bit
Bootcamp does support Windows 64Bit actually.
Also, why do you need Windows at all? You can run VMware or GNS3 on MacOS directly. Then you will have CHR support also
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26912
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: RouterOS Virtual Labs

Fri Oct 09, 2015 12:19 pm

Screenshot 2015-10-09 12.17.52.png
You do not have the required permissions to view the files attached to this post.
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Fri Oct 09, 2015 12:43 pm

I ve tried to run it on my MAC also but it didn't work

My MAC is a MACBOOK late 2007 model and does support only GNS 0.84 vesrion and not the latest one

I had also many problems with qemuwrapper


I will try to run windows 7 64bit on Paralles i believe this should work without any problems


Thanks for your help
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Fri Oct 09, 2015 3:21 pm

Hi, Normis


I ve installed Windows 7 64bit and am still getting the following message when i am trying to connect to console


127.0.0.1:2049 network error:connection refused\

But if select to reload the router i am able to login to Mikrotik console.





I
Last edited by daras on Fri Oct 09, 2015 3:24 pm, edited 1 time in total.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26912
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: RouterOS Virtual Labs

Fri Oct 09, 2015 3:24 pm

I ve tried to run it on my MAC also but it didn't work

My MAC is a MACBOOK late 2007 model and does support only GNS 0.84 vesrion and not the latest one

I had also many problems with qemuwrapper


I will try to run windows 7 64bit on Paralles i believe this should work without any problems


Thanks for your help
Sorry but still, even that CPU is 64Bit :) As for the OS, I think you could upgrade to a newer one, where a better GNS is supported. Even 2008. Macs support newer OS.

And if it can't run a newer OS than 2007, maybe you should not use such machine for Virtual Environments either.
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Fri Oct 09, 2015 3:27 pm

I ve tried to run it on my MAC also but it didn't work

My MAC is a MACBOOK late 2007 model and does support only GNS 0.84 vesrion and not the latest one

I had also many problems with qemuwrapper


I will try to run windows 7 64bit on Paralles i believe this should work without any problems


Thanks for your help
Sorry but still, even that CPU is 64Bit :) As for the OS, I think you could upgrade to a newer one, where a better GNS is supported. Even 2008. Macs support newer OS.

And if it can't run a newer OS than 2007, maybe you should not use such machine for Virtual Environments either.

i am running OSX Lion that is the only version i can get in my MAC

Anyway its working but still getting the following message when i am trying to connect to console


127.0.0.1:2049 network error:connection refused

But if select to reload the router i am able to login to Mikrotik console

Strange things :D :D
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Sat Oct 10, 2015 12:24 pm

Hi, Normis

How can we emulate WAN connections in GNS3 i mean if i connect another Router in the cloud it will get another ip address in the subnet 192.168.137.0 but i want to get an ip address on another subnet say 192.168.135.0 is this possible ?


Thanks
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Fri Oct 23, 2015 3:09 pm

Hi,

How can we configure a point-to-point link (not wireless) ?

I think Cisco does the same with ppp connections
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Fri Oct 23, 2015 4:43 pm

We recently released a test version of our upcoming product Cloud Hosted Router (CHR) - a virtual RouterOS instance for the x86_64 architecture. The test version we currently offer has 1mbps limit per interface (in future we will offer unlimited speed with a paid subscription). Otherwise, it's a fully functional RouterOS.

RouterOS Virtual Labs can be used in various scenarios, for example, to try out configuration before deploying it in production, when preparing for MikroTik Certification test or using CHR as a router for virtual servers, just to name a few.

Following are basic instructions to get started on creating RouterOS Virtual Labs using GNS3 (Graphical Network Simulator) tool on Windows desktop machine, Windows 8.1 to be specific but it should be similar on other Windows versions as well, just make sure it is 64bit version.

NOTE. GNS3 can be run also on Linux and Mac machines.

As of this writing (August 2015) the newest version of GNS3 is v1.3.9, it can be obtained here - https://github.com/GNS3/gns3-gui/releases/tag/v1.3.9 (or just head to http://www.gns3.com). As a hypervisor GNS3 can use either VirtualBox or Qemu. For running CHR, we suggest Qemu. It is already bundled with GNS3 installation. Currently, the newest version of Qemu for Windows is v2.4.0, but with GNS3 included is v2.2.0. If you want the newest, you can download it from http://qemu.weilnetz.de/w64/ and install separately. During installation, GNS3 will check for existing Qemu installation on your computer and will use that if true. In this guide, we will use separately installed Qemu.

1) Install Qemu (using default settings)

2) Install GNS3 (GNS3-1.3.9-all-in-one.exe) and uncheck Qemu
01_CHR_GNS3.png
Setup will download additional installation files as necessary.

NOTE. SolarWinds Response tool reports that computer name can only contain 'a-z', 'A-Z', '0-9', '.' and '-' as characters. Underscore '_' is not valid and if you want to use this tool computer name will have to be changed.

3) For Virtual RouterOS instances to have access to the Internet (or at least Windows host machine) a loopback interface has to be created and Internet Connection Sharing enabled.

To do so, execute command: 'hdwwiz.exe' (as Administrator) - Add Hardware Wizard will open.

Install the hardware that I manually select from a list (Advanced) -> Network Adapters -> Microsoft -> Microsoft Loopback adapter. If there is no such choice Microsoft KM-TEST Loopback Adapter should be chosen.
02_CHR_GNS3.png
Open 'Control Panel -> Network and Sharing center -> Change adapter settings'. There will be a new network adapter and it should have a name 'Ethernet 2' (or some other number if there are more ethernet devices on the computer). For the sake of recognizability, we suggest renaming the interface to 'Loopback' or some other apparent name.

Next, enable Internet Connection Sharing, select the network interface which is used to connect your computer to the network (WiFi or wired) and open Properties -> Sharing. Enable 'Allow other network users to connect through this computer's Internet connection' and select 'Loopback' as Home Network Connection:
03_CHR_GNS3.png
Windows will automatically assign IP 192.168.137.1 to that interface and enable DHCP server on it.
04_CHR_GNS3.png
It is suggested to reboot the computer at this point!

4) Download newest CHR image (.img file) here - http://forum.mikrotik.com/viewtopic.php?f=21&t=98981

5) Open GNS3. To make it easier to move GNS3 projects between various computers, it is suggested to change GNS3 Paths (My projects, My binary images) to a universal folder, e.g. C:\GNS3. By default, it is C:\Users\YOUR_USERNAME\GNS3\... It can be changed in Edit -> Preferences
05_CHR_GNS3.png
6) Create RouterOS template: Edit -> Preferences -> Qemu VM's -> New -> Type: Default -> Choose a name -> Choose amount of RAM to allocate for one RouterOS instance: 64MB is suggested -> Chose disk image that was downloaded in step 4. Change network adapters to desired amount, e.g. 4
06_CHR_GNS3.png
Now RouterOS template is available from Browse Routers side panel.
07_CHR_GNS3.png
7) GNS3 has been set up for creating your RouterOS Virtual Lab. Drag and Drop RouterOS template on the main screen as many times as you need virtual routers. Connect them with links. To have access to the host computer's Loopback interface, add 'Cloud' instance and configure its Ethernet to use that interface.
08_CHR_GNS3.png
Connect it to the RouterOS instance via Switch. As there already is a DHCP server on Windows Loopback interface, IP address on RouterOS can be obtained automatically, just configure
/ip dhcp-client
accordingly.

8) Boot routers one by one: right clicking on each and choosing Start. Or click "play" icon on top to start all instances at once. Double-clicking with a mouse on a running instance will open a terminal to its console.

9) To manage RouterOS instances via Winbox from Windows machine, enable RoMON on all routers:
/tool romon set enabled=yes
and connect using RoMON to the RouterOS instance which is directly connected to Loopback interface. Read more about RoMON on our wiki - http://wiki.mikrotik.com/wiki/Manual:RoMON
09_CHR_GNS3.png
To better distinguish routers from each other, rename each to have a different name, e.g.
/system identity set name=ROS_1
10) Here's a simple 4 router setup connected to the Internet via Loopback interface. Static routing was configured and each of them was able to connect to the internet via the CHR631-1 router.
10_CHR_GNS3.png
* GNS3 includes VPCS (Virtual PC Simulator) - a simple network testing tool which has some essential commands like traceroute, ping, arp built in. It even has DHCP client. It can be connected to router or switch as necessary. If full fledged OS is needed, Qemu can run it too. One thing to note - Qemu is rather slow in running generic Linux LiveCD's. VirtualBox is a better choice. As GNS3 supports both Qemu and VirtualBox, you can combine instances using both of these hypervisors.

* GNS3 installation has Wireshark bundled with it. Wireshark is a powerful network packet analyzer which can be used to capture traffic on an interface. To see traffic on a link in GNS3, right-click on it and chose 'Start capture'. Read more about Wireshark features here - https://www.wireshark.org/about.html

* GNS3 stores all project files under one folder which is movable to another computer. RouterOS template image file (.img) should also be copied together with the project itself and placed into 'GNS3/images' folder on target machine.

* Qemu stores images in qcow2 (copy-on-write) format. These images can be run separately from GNS3 if needed. For example, you could make a multiple virtual lab with multiple routers and afterwards deploy the same images in production. If in production environment different hypervisor is used, qcow2 image can be converted to various formats using 'qemu-img convert' command. See more - http://docs.openstack.org/image-guide/c ... rting.html

We're just scratching the surface here on what can be done with CHR using GNS3, the rest is up to you. We would love to see your virtual lab setups, please post screenshots in this thread.

---
Additional notes:

* When using Windows 8, if there are problems with pinging Loopback interface from the router or VPCS, try reinstalling Winpcap and run it using compatibility mode for Windows 7.

* If there are problems with pinging Loopback interface from the router or VPCS, check that your antivirus and/or firewall is not blocking traffic from virtual RouterOS instances to the host machine.

* When using Qemu as a hypervisor, it is possible to pass additional parameters using 'options' field in Qemu VM Configuration -> Advanced Settings. For available Qemu parameters see - http://wiki.qemu.org/download/qemu-doc.html
Hi,

How are you connecting the routers together using the link button only ?

I did the same thing i added also static routes from one router to the other and i cannot ping each other
 
User avatar
BartoszP
Forum Guru
Forum Guru
Posts: 2975
Joined: Mon Jun 16, 2014 1:13 pm
Location: Poland

Re: RouterOS Virtual Labs

Fri Oct 23, 2015 5:30 pm

I "like" posts with quotation beeing at 99% level and comment with several words. :-(
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Tue Oct 27, 2015 2:13 pm

Hi, Normis


I 've enabled romon in all the routers like in your diagram with the 4 routers but i can only use winbox only to the one which is connected to the cloud.

Do i 've to enable something else for winbox ?

Thanks
 
KingBangBoom
just joined
Posts: 5
Joined: Wed Dec 02, 2015 10:34 am

Hardware support / Virtual ROS 6.33 x86

Wed Dec 02, 2015 12:10 pm

Hello,

is there a limit in how much RAM and how many CPUs i can use for my Virtual Mikrotik (x86) ROS 6.33?
Are there any further Hardware limitations ?

sincerely
KBB
 
Provesi
just joined
Posts: 1
Joined: Wed Dec 02, 2015 2:51 pm
Location: Brazil

Re: RouterOS Virtual Labs

Wed Dec 02, 2015 3:20 pm

Hi, Normis


I 've enabled romon in all the routers like in your diagram with the 4 routers but i can only use winbox only to the one which is connected to the cloud.

Do i 've to enable something else for winbox ?

Thanks
Hi Daras,

Did you set the roMON ports? You can use the following command to see your interfaces: /romon port print

For more information you can read http://wiki.mikrotik.com/wiki/Manual:RoMON

I hope that is usefull.
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Wed Dec 16, 2015 4:33 pm

Hi, normis


I want to simulate a VPN configuration with 2 routers connected through the internet and provide a LAN-to-LAN implementation using different types of VPN's such as L2TP, P2TP iPSEC.

Like in the diagram below



LAN1---|---------router 1----------(INTERNET CLOUD)-----------router 2----------|-----LAN2


Is this possible by adding 2 loopback interfaces in the cloud ?



Thanks
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: RouterOS Virtual Labs

Wed Dec 16, 2015 4:37 pm

Hi, normis


I want to simulate a VPN configuration with 2 routers connected through the internet and provide a LAN-to-LAN implementation using different types of VPN's such as L2TP, P2TP iPSEC.

Like in the diagram below



LAN1---|---------router 1----------(INTERNET CLOUD)-----------router 2----------|-----LAN2


Is this possible by adding 2 loopback interfaces in the cloud ?



Thanks
You don't need to use the Internet cloud - just connect router 1 and router 2 together, or else place a 3rd router in the middle and name it Internet. Make router 1 and router 2's default gateways point to router 1.

If you want to connect the same cloud to multiple devices, use a virtual switch between your cloud object and your routers.
 
User avatar
BartoszP
Forum Guru
Forum Guru
Posts: 2975
Joined: Mon Jun 16, 2014 1:13 pm
Location: Poland

Re: RouterOS Virtual Labs

Wed Dec 16, 2015 5:11 pm

Remember not to leave all three routers with default configuration. Change them to numbers wich will be easy to "spy".
For tests set for the first router LAN @ subnet 172.16.x.x LAN, for the second 10.y.y.y subnet and the third (the "Internet" one) could be left @ 192.168.88.0/24 subnet. It will be easy then to see packet flow and set rules.
 
mehvish
just joined
Posts: 1
Joined: Thu Dec 17, 2015 9:30 am

Re: RouterOS Virtual Labs

Thu Dec 17, 2015 9:38 am

hi..,
as just routers provides routes to the data packet in the network layer with the help of IP addresses similarly Diseases Attacks also helps in routing the visual scenario.

--
thanx n regards
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Fri Dec 18, 2015 9:35 am

Hi,

I did an upgrade to GNS version 1.3.13 and when i connect a Virtual PC to switch and try to connect via console
i am getting the following error

"executing the startup file PC1> goodby. The message says "network error: Software caused connection abort" restart in 5 sec.

Has anyone encounterd this problem ?
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Fri Dec 18, 2015 11:19 am

for anyone had this issue the following solution worked for me



I rename the file cygwin1.dll to cygwin1.dll.old in the folder C:\Program Files\GNS3\dynamips.

Then I performed a copy from cygwin1.dll who is in folder C:\Program Files\GNS3\vpcs toward the folder the folder C:\Program Files\GNS3\dynamips.

Till now everything works fine
 
daras
newbie
Posts: 40
Joined: Thu Sep 17, 2015 3:32 pm

Re: RouterOS Virtual Labs

Sat Dec 19, 2015 4:23 pm

for anyone had this issue the following solution worked for me



I rename the file cygwin1.dll to cygwin1.dll.old in the folder C:\Program Files\GNS3\dynamips.

Then I performed a copy from cygwin1.dll who is in folder C:\Program Files\GNS3\vpcs toward the folder the folder C:\Program Files\GNS3\dynamips.

Till now everything works fine
Did you 've any problem with the 6.34rc.img because i cannot get an ip address using the ip dhcp-client. ?
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: RouterOS Virtual Labs

Thu Jan 14, 2016 1:10 am

Hi. I just wanted to let everyone know that GNS 1.4.0 was released yesterday, and it now supports adding its own "appliances" (i.e. VMs, preconfigured for GNS3).

There's also a MikroTik CHR appliance (contributed by yours truly).

After installing GNS3 and Qemu, download and double click the .gns3a file, and at the version selection, click on the version you want, and click download to get the image (directly from MikroTik's servers). The rest is just following the instructions.

If you're using GNS3 on Windows with a local server, then prior to double clicking the appliance file, you'll need to enable experimental features from "Edit > Preferences > General > Miscellaneous > Enable experimental features (Dangerous, require restart)", click "Apply", and close GNS3.
 
User avatar
spippan
Member
Member
Posts: 463
Joined: Wed Nov 12, 2014 1:00 pm

Re: RouterOS Virtual Labs

Thu Jan 14, 2016 6:56 pm

greetings

i have set up GNS3 1.3.9 on win10x64 pro
i have QEMU 2.2.0
i have also set up a Loopback interface

my GNS3 setup:
-> 1x Cloud (has nio_gen_eth:Loopback as Ethernet interf.)
-->Switch (SW1) (<-- here is the problem!! i guess) (*)
--->RouterOS-vRouter (monolith)

i cannot connect eth1 from virtual rOS router to the Cloud interface (Loopback interface in windows)
in the console i get the error:
Server error from 127.0.0.1:8000: SW1: unable to create generic ethernet NIO

if i add the Host's Ethernet main interface to the "Cloud" (which shares its connection to the windows-loopback interface) it shows up as "nio_gen_eth:Ethernet"
to THIS new port i am then able to connect switchport 1 or 2 or X of SW1

on the "monolith" rOS vRouter i configured a dhcp-client on ether1 (ether1-gateway) but it gets no lease.

Image

Image

Image
 
TomosRider
Member Candidate
Member Candidate
Posts: 209
Joined: Thu Nov 20, 2014 1:51 pm

Re: RouterOS Virtual Labs

Fri Jan 15, 2016 9:52 am

Hello. This is a common bug that i had once, too.
First, try to disable Windows firewall. Delete your cloud instance, restart GNS3 and then create cloud instance again. This worked for me. Cheers!
 
DeamonMV
just joined
Posts: 18
Joined: Thu May 28, 2015 8:58 pm
Location: Ukraine Kharkov

Re: RouterOS Virtual Labs

Thu Jan 21, 2016 11:06 pm

Hi all.
I have problem with launch mikrotik in gns.
in console I cant get a proposals to enter of credentials.
The QEMU process have 50% of CPU.
http://s004.radikal.ru/i207/1601/fd/24961216648e.jpg

I have windows 10 pro x64
GNS 1.3.9 x64
QEMU 2.5.0 x64

and interestingly, once I got access to the console

What it can be?
UDP: After 10Min in console have see a proposal to enter login. but process of QEMU CPU ~35%.
http://s009.radikal.ru/i307/1601/0b/a092b2f09f0b.jpg
 
Williambannerman
just joined
Posts: 4
Joined: Fri Jan 22, 2016 12:22 pm

Re: RouterOS Virtual Labs

Fri Jan 22, 2016 12:32 pm

This is one of the new topic for me. Thank you for sharing this type of information. I want know more about this topic. I hope i will get it through your sharing links.Thanks.
 
krdinesh
just joined
Posts: 3
Joined: Thu Oct 02, 2014 1:44 am

Re: RouterOS Virtual Labs

Wed Feb 03, 2016 3:22 pm

Fine Tutorial, Thank you
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: RouterOS Virtual Labs

Wed Feb 03, 2016 3:30 pm

Hi all.
I have problem with launch mikrotik in gns.
in console I cant get a proposals to enter of credentials.
The QEMU process have 50% of CPU.
http://s004.radikal.ru/i207/1601/fd/24961216648e.jpg

I have windows 10 pro x64
GNS 1.3.9 x64
QEMU 2.5.0 x64

and interestingly, once I got access to the console

What it can be?
UDP: After 10Min in console have see a proposal to enter login. but process of QEMU CPU ~35%.
http://s009.radikal.ru/i307/1601/0b/a092b2f09f0b.jpg
Qemu 2.5.0 x64 works at all? I'm surprised. With that Qemu version, my VMs fail to start. 2.4.0 x64 is the last one working normally.

And why not upgrade to GNS 1.4.1 while you're at it?

Are you using RouterOS x86 or CHR? CHR is more optimized for VMs... It would probably consume less CPU when idle. I mean, I'd hope so.
 
networkfudge
Trainer
Trainer
Posts: 136
Joined: Mon May 20, 2013 2:47 pm

Re: RouterOS Virtual Labs

Mon Feb 15, 2016 6:23 pm

I tried to make this work with a local server (qemu image), I can drag and drop the CHR device into GNS3 and start it without any errors, however when I try to connect to the console I'm getting a blank putty screen.

I tried running the GNS3 VM and connected to it as a remote server from my windows laptop, exactly the same as above, blank putty screen. I tried doing the same from my desktop pc, again the same.

I tried running some IOS images, console works properly.

Any ideas?
 
networkfudge
Trainer
Trainer
Posts: 136
Joined: Mon May 20, 2013 2:47 pm

Re: RouterOS Virtual Labs

Mon Feb 15, 2016 8:08 pm

Other things I've tried:

I tried to connect from the terminal of the gns3 vm
ssh gns3@localhost -p 2005
.

Tried downgrading the vm to gns3 1.3 .

Also tried the older image chr_6_31.img

It still just hangs.

Thanks in advance for your suggestions
 
networkfudge
Trainer
Trainer
Posts: 136
Joined: Mon May 20, 2013 2:47 pm

Re: RouterOS Virtual Labs

Mon Feb 15, 2016 10:07 pm

Got it to work, with the qemu 32bit binary and only the 6_31 image so far
 
ivaaan
just joined
Posts: 4
Joined: Tue Feb 02, 2016 10:51 pm

Re: RouterOS Virtual Labs

Fri Feb 19, 2016 10:56 am

Hi there! Is there way to use switch OS into GNS3?
 
User avatar
alexcherry
just joined
Posts: 21
Joined: Tue Jan 11, 2011 5:01 pm

Re: RouterOS Virtual Labs

Sun Feb 21, 2016 1:21 am

Great tutorial and works great!

May I ask you to do another one on unetlab? - http://www.unetlab.com
On the last release they added support for MikroTik RouterOS.
Would be great to see that too and your thought comparing gns and unetlab.
Thanks
Hi, Unetlab is an awesome software, GNS3 cannot compare with it.
I'm using it a lot, check here manual for installation - http://isp-servis.com/?p=363

I hope that many people will move to Unetlab from GNS3, because GNS3 is old stuff. Just try unetlab and you will see the difference. On unetlab there is support of many different vendors, environment is very stable and you can easily run hundreds of routers on it without loosing time with Idle PC settings. I have CCIE friends who were using Unetlab only for exam preparation.

Here is my last topology created in Unetlab for example, which I use in my Mikrotik trainings :

Image
 
buzzdee
newbie
Posts: 35
Joined: Mon Apr 22, 2013 1:22 pm

Re: RouterOS Virtual Labs

Sun Feb 21, 2016 2:39 pm

Got it to work, with the qemu 32bit binary and only the 6_31 image so far
Had a similar experience - tried a few versions of GNS3, QEMU and CHR-Images and arrived at this working setup:

- GNS3 1.4.3
- QEMU 2.4.0 (released August 11th 2015) using qemu-system-x86_64w.exe
- CHR 6.33.5

It takes some time for the CHR-QEMU-VMs so start. Especially on first boot, console login may take a few minutes (not longer than five in my setups). You still need to have a switch if you want to connect a CHR to a Cloud - directly connecting results in errors.
 
networkfudge
Trainer
Trainer
Posts: 136
Joined: Mon May 20, 2013 2:47 pm

Re: RouterOS Virtual Labs

Mon Feb 22, 2016 9:48 pm

It takes some time for the CHR-QEMU-VMs so start. Especially on first boot, console login may take a few minutes (not longer than five in my setups). You still need to have a switch if you want to connect a CHR to a Cloud - directly connecting results in errors.
It's so slow it's ridiculous, and that's on a decent spec machine.
In the end I ran vmware esxi with multiple chr vms and set up my lab that way.

I'm about to try Unetlab as suggested above, I will let you know if its any good
 
networkfudge
Trainer
Trainer
Posts: 136
Joined: Mon May 20, 2013 2:47 pm

Re: RouterOS Virtual Labs

Mon Feb 22, 2016 10:45 pm

Hello Alex, I've followed your instructions, everything completes without any errors:
# /opt/qemu/bin/qemu-img convert -f vmdk -O qcow2 chr-6.34.1.vmdk hda.qcow2
# mkdir -p /opt/unetlab/addons/qemu/mikrotik-6.34.1
# mv hda.qcow2 /opt/unetlab/addons/qemu/mikrotik-6.34.1/
# /opt/unetlab/wrappers/unl_wrapper -a fixpermissions
but when its finished I can't see a mikrotik entry in the node list.
Any ideas?
 
buzzdee
newbie
Posts: 35
Joined: Mon Apr 22, 2013 1:22 pm

Re: RouterOS Virtual Labs

Thu Feb 25, 2016 10:33 am

Hello Alex, I've followed your instructions, everything completes without any errors:
# /opt/qemu/bin/qemu-img convert -f vmdk -O qcow2 chr-6.34.1.vmdk hda.qcow2
# mkdir -p /opt/unetlab/addons/qemu/mikrotik-6.34.1
# mv hda.qcow2 /opt/unetlab/addons/qemu/mikrotik-6.34.1/
# /opt/unetlab/wrappers/unl_wrapper -a fixpermissions
but when its finished I can't see a mikrotik entry in the node list.
Any ideas?
Funny, I went with that, too after my gns3-trials.
For Mikrotik to appear in the OS-List, I first had to update unetlab

http://www.unetlab.com/2014/11/upgrade- ... tallation/

The initial installation doesn't have a Mikrotik Template for the GUI, updateing retrofits that.

I got unetlab to work with VMware-Player. Tried it with Virtualbox first, but couldn't get any RouterOS Instances to run this way - the reason: qemu seems to need hardware virtualisation features which Virtualbox doesn't pass through to its virtual machines.
 
networkfudge
Trainer
Trainer
Posts: 136
Joined: Mon May 20, 2013 2:47 pm

Re: RouterOS Virtual Labs

Fri Feb 26, 2016 8:06 pm


Funny, I went with that, too after my gns3-trials.
For Mikrotik to appear in the OS-List, I first had to update unetlab

http://www.unetlab.com/2014/11/upgrade- ... tallation/

The initial installation doesn't have a Mikrotik Template for the GUI, updateing retrofits that.
Yes after updating I can create and start mikrotik nodes, but I can't access them when double clicking on the running node. Both Telnet and VNC say "connection refused"
 
User avatar
alexcherry
just joined
Posts: 21
Joined: Tue Jan 11, 2011 5:01 pm

Re: RouterOS Virtual Labs

Fri Feb 26, 2016 11:25 pm

Hi, yes, the first small issue - after installation you need to update version of unetlab to latest one - just run commands
apt-get update && apt-get install unetlab 
I think they will fix it soon.

Second question - when you add Mikrotik to Unetlab, you must chose "VNC" as type of default connection. After it, you click on the router icon and it will open your default VNC client. I'm using Chicken VNC and it works good. With VNC you get access to Mikrotik's CLI. But we want to access our lab routers with Winbox, true ? For achieving it, follow to the next step :

Add a network with type Pnet0 and connect this network to Mikrotik interface (you must setup IP address from your LAN or setup DHCP client on that Mikrotik interface) -> it will add a bridge to your physical interface and you can connect from PCs in your LAN to Mikrotik on Unetlab.

Write me please feedback. Maybe for last step you will need some more help. I don't run Unetlab on VMware now - I have physical machine with Unetlab Ubuntu distribution on it.
 
User avatar
alexap
Frequent Visitor
Frequent Visitor
Posts: 65
Joined: Thu Nov 05, 2015 3:20 pm

Re: RouterOS Virtual Labs

Tue May 10, 2016 8:48 pm

In gns3 you can connect to a router with winbox just by double clicking without loopback without putty-telnet?
 
leonset
Member Candidate
Member Candidate
Posts: 256
Joined: Wed Apr 01, 2009 9:09 pm

Re: RouterOS Virtual Labs

Thu May 12, 2016 9:51 am

In gns3 you can connect to a router with winbox just by double clicking without loopback without putty-telnet?
Not AFAIK, at least on Mac you have to setup a cloud device conected to a Tap interface in your MAC, then using Winbox neighbours (those 3 dots) virtual RouterOS will eventually show up. Anyway I always end up setting an administrative interface with an IP for each device...
 
User avatar
ilunne
just joined
Posts: 16
Joined: Fri Sep 30, 2016 3:14 am

Re: RouterOS Virtual Labs

Sun Oct 02, 2016 6:24 pm

Great tutorial and works great!

May I ask you to do another one on unetlab? - http://www.unetlab.com
On the last release they added support for MikroTik RouterOS.
Would be great to see that too and your thought comparing gns and unetlab.
Thanks
Hi, Unetlab is an awesome software, GNS3 cannot compare with it.
I'm using it a lot, check here manual for installation - http://isp-servis.com/?p=363

I hope that many people will move to Unetlab from GNS3, because GNS3 is old stuff. Just try unetlab and you will see the difference. On unetlab there is support of many different vendors, environment is very stable and you can easily run hundreds of routers on it without loosing time with Idle PC settings. I have CCIE friends who were using Unetlab only for exam preparation.

Here is my last topology created in Unetlab for example, which I use in my Mikrotik trainings :

Image
how can i add a custom startup script for mikrotik chr?
 
krupal
just joined
Posts: 1
Joined: Tue Apr 04, 2017 8:20 pm

Re: RouterOS Virtual Labs

Tue Apr 04, 2017 8:31 pm

can any one please help me with this. Getting access on winbox for the 1st router connected to the switch. But cant get access to the other router. Please help
Untitled.png
please check the attached image. Followed every steps shown in this tutorial
You do not have the required permissions to view the files attached to this post.
 
jdisurja
just joined
Posts: 5
Joined: Sat Apr 22, 2017 6:57 am
Location: Indonesia

Re: RouterOS Virtual Labs

Sat Apr 22, 2017 7:21 am

I got into trouble using GNS3+qemu. After I setting the mikrotik, interface, firewall, ip and then I save. The next day I open all the settings I made disappeared. Please help me

thank you
 
kbuska
newbie
Posts: 49
Joined: Fri Oct 15, 2010 7:45 pm

Re: RouterOS Virtual Labs

Tue Jul 17, 2018 5:48 pm

I'm trying to get CHR working on EVE-NG and it works but the interfaces dont seem to line up.

I will put 192.168.1.1/24 on R1:ether1 and 192.168.1.2/24 on R2:ether1. I will make a connection from R1:ether1 and R2:ether1. I will then try to ping 192.168.1.2 from R1 with no success. I will move the IP address on R2 to ether4 and suddenly the pings start working.

Has anyone experienced this issue and if so, is there a fix or workaround on this? Having interfaces that don't match the diagram is very confusing.

Thank you!
 
kriszos
just joined
Posts: 23
Joined: Thu Dec 21, 2017 3:08 pm

Re: RouterOS Virtual Labs

Wed Sep 05, 2018 8:42 pm

Has anyone experienced this issue and if so, is there a fix or workaround on this? Having interfaces that don't match the diagram is very confusing.
I am experiencing this issue too, and i got a solution:

1. you need to login to eve-ng

2. add new chr image http://www.eve-ng.net/documentation/how ... oud-router

3. mount this image
mount -o loop,offset=33554944 /opt/unetlab/addons/qemu/mikrotik-6.42.7/hda.qcow2 /mnt

4. open autorun file via text editor
nano /mnt/rw/autorun.scr

5. add the folowing:
:delay 5
/interface ethernet
set [ find default-name=ether1 ] name=ether1p
set [ find default-name=ether2 ] name=ether2p
set [ find default-name=ether3 ] name=ether3p
set [ find default-name=ether4 ] name=ether4p
set [ find default-name=ether5 ] name=ether5p
set [ find default-name=ether6 ] name=ether6p
set [ find default-name=ether7 ] name=ether7p
set [ find default-name=ether8 ] name=ether8p
set [ find default-name=ether9 ] name=ether9p
set [ find default-name=ether10 ] name=ether10p
set [ find default-name=ether11 ] name=ether11p
set [ find default-name=ether12 ] name=ether12p
set [ find default-name=ether13 ] name=ether13p
set [ find default-name=ether14 ] name=ether14p
set [ find default-name=ether15 ] name=ether15p
set [ find default-name=ether16 ] name=ether16p
set [ find default-name=ether17 ] name=ether17p
set [ find default-name=ether18 ] name=ether18p
set [ find default-name=ether19 ] name=ether19p
set [ find default-name=ether20 ] name=ether20p
set [ find default-name=ether21 ] name=ether21p
set [ find default-name=ether22 ] name=ether22p
set [ find default-name=ether23 ] name=ether23p
set [ find default-name=ether24 ] name=ether24p
set [ find default-name=ether25 ] name=ether25p
set [ find default-name=ether26 ] name=ether26p
set [ find default-name=ether27 ] name=ether27p
set [ find default-name=ether28 ] name=ether28p
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}00" ] name=ether1
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}01" ] name=ether2
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}02" ] name=ether3
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}03" ] name=ether4
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}04" ] name=ether5
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}05" ] name=ether6
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}06" ] name=ether7
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}07" ] name=ether8
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}08" ] name=ether9
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}09" ] name=ether10
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}0A" ] name=ether11
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}0B" ] name=ether12
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}0C" ] name=ether13
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}0D" ] name=ether14
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}0E" ] name=ether15
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}0F" ] name=ether16
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}10" ] name=ether17
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}11" ] name=ether18
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}12" ] name=ether19
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}13" ] name=ether20
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}14" ] name=ether21
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}15" ] name=ether22
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}16" ] name=ether23
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}17" ] name=ether24
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}18" ] name=sfp-sfpplus1
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}19" ] name=sfp-sfpplus2
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}1A" ] name=sfp-sfpplus3
set [ find orig-mac-address~"([0-9,A-F]{2}:){5}1B" ] name=sfp-sfpplus4
/tool romon
set enabled=yes secrets=romon_secret

6. save file and umount image
umount /mnt

7. ???
8. Profit
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 2098
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Krugersdorp (Home town of Brad Binder)
Contact:

Re: RouterOS Virtual Labs

Sun Jun 09, 2019 11:40 pm

I'm trying to get CHR working on EVE-NG and it works but the interfaces dont seem to line up.

I will put 192.168.1.1/24 on R1:ether1 and 192.168.1.2/24 on R2:ether1. I will make a connection from R1:ether1 and R2:ether1. I will then try to ping 192.168.1.2 from R1 with no success. I will move the IP address on R2 to ether4 and suddenly the pings start working.

Has anyone experienced this issue and if so, is there a fix or workaround on this? Having interfaces that don't match the diagram is very confusing.

Thank you!

Having similar issue with GNS3, suspect it is not EVE-NG but CHR image related.

Very frustrating!!
[admin@G10S11] > /int export
# jun/09/2019 20:39:22 by RouterOS 6.44.3
# software id =
#
#
#
/interface ethernet
set [ find default-name=ether3 ] name=ether1
set [ find default-name=ether1 ] name=ether2
set [ find default-name=ether2 ] name=ether3

 
User avatar
sebastia
Forum Guru
Forum Guru
Posts: 1782
Joined: Tue Oct 12, 2010 3:23 am
Location: Antwerp, BE

Re: RouterOS Virtual Labs

Tue Jun 11, 2019 1:12 pm

No issues here on GNS3: pings ok from one end to other
[admin@MikroTik] /interface ethernet> export
# jun/11/2019 10:13:21 by RouterOS 6.44.3
# software id = 
#
#
#

2R-setup.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
sebastia
Forum Guru
Forum Guru
Posts: 1782
Joined: Tue Oct 12, 2010 3:23 am
Location: Antwerp, BE

Re: RouterOS Virtual Labs

Wed Jun 12, 2019 5:21 pm

Just a heads-up: when running VPCS within the gns3-vm, it fully loads a core of cpu.
Running that same VPCS on the gns3server locally doesn't have this effefct: cpu load is minimal.
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 2098
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Krugersdorp (Home town of Brad Binder)
Contact:

Re: RouterOS Virtual Labs

Thu Jun 13, 2019 12:49 am

@sebastia,
I created a new "project" in gns3 today and again, one of the my routers mixed up the ether ports.

Would you mind sharing a bit more of your setup, i.e. Which version of gns3, using virtualbox, VMware player, workstation, etc?
 
User avatar
sebastia
Forum Guru
Forum Guru
Posts: 1782
Joined: Tue Oct 12, 2010 3:23 am
Location: Antwerp, BE

Re: RouterOS Virtual Labs

Thu Jun 13, 2019 1:02 am

Now:
gns3 Version 2.1.20 (current), NPcap v0.995 (with wincap compatible api) and gns3 vm. (=only components installed)
The vm is running on Hyper-V on Win10Pro. The vm was built "manually": minimal install Ubuntu 18.04.2 server + gns3-server packages.
 
himala002
just joined
Posts: 12
Joined: Fri Jun 25, 2021 10:16 am

Re: RouterOS Virtual Labs

Thu Jul 15, 2021 9:48 am

Is there're any images of Mikrotik that have a Wi-Fi interface in virtualization?

Who is online

Users browsing this forum: haianh, nanobahr, NanoTik and 16 guests