Manual:Metarouter

From MikroTik Wiki
Revision as of 12:58, 22 December 2008 by Normis (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Overview

MetaRouter is a new feature in RouterOS 4.0 beta 1.

MetaRouter is used for the RB400 series boards to create virtual routers.

Commands

The /metarouter menu gives the following:

  • add - allows you to create a new virtual router
  • print - lets you list any virtual routers
  • enable - to enable a virtual router
  • disable - to disable a virtual router
  • console - lets you access the console of a virtual router
  • interface - lets you make network interface mappings

Example

 [admin@MikroTik] /metarouter> add
 [admin@MikroTik] /metarouter> print
 Flags: X - disabled 
 #   NAME                 MEMORY-SIZE DISK-SIZE     USED-DISK     STATE        
 0   mr0                  16MiB       0kiB          377kiB        running      
 [admin@MikroTik] /metarouter> console 0

(To get out of the console do ctrl-A and then q)


Interfaces

The interface command has the following options:

 [admin@MikroTik] /metarouter> interface add 
 comment    disabled        dynamic-mac-address  type            virtual-machine
 copy-from  dynamic-bridge  static-interface     vm-mac-address

To add an interface, and reboot the virtual router

 [admin@MikroTik] /metarouter> interface add  virtual-machine=mr0
 [admin@MikroTik] /metarouter> reboot 0

Once connected to its console using /metarouter console 0 you can see the new interface:

 [admin@mr0] > interface print 
 Flags: D - dynamic, X - disabled, R - running, S - slave 
 #     NAME                                              TYPE             MTU  
 0  R  ether1                                            ether            1500 

On the host physical router the interface appears as a virtual interface:

 [admin@MikroTik] > /interface print 
 Flags: D - dynamic, X - disabled, R - running, S - slave 
 #     NAME                                              TYPE             MTU  
 8  R  ether9                                            ether            1500 
 9  R  test                                              bridge           1500 
10 DR  vif1                                              vif              1500 

Creating a bridge between the virtual interface and a physical interface allows traffic to pass.