Virtual Routers EcoRouter Documentation / Virtual Routers
Each routing table will be stored in so called virtual router (VR). The quantity of VR supported on the one device depends on hardware platform. The range varies from 510 to 4094 instances.
The virtual routers are totally insulated from each other and the main router (Default Router) which ar created on.
Virtual routers configuration and show commands
In the configuration mode use the virtual-router <NAME> command to create new or configure existing virtual router. The VR's name is case sensitive and must have length 12 symbols maximum. Only uppercase and lowercase latin letters and numbers are allowed in VR's name.
The created VR has a default security profile.
See the available virtual router configuration commands in the table below.
Command | Description |
---|---|
bind <INTERFACE_NAME> | Bind interface to virtual router. ATTENTION When interface is switched from the main router to VR and back all interface's parameters will be reset |
configuration file <имя файла> | Create file for saving VR's configuration |
description <TEXT> | Create description for VR |
load {bgp | isis | ospf | pim | rip | vrrp} | Load protocols to virtual router:
|
In the administration mode use the login virtual-router <NAME> command to enter the CLI of a new VR.
The VR's CLI is similar to the main one but contains fewer functions. For example VR has no ports (L2 interfaces), it is impossible to create L3 interfaces but only configure ones loaded from the main router.
The L2 function parameters are always to be configured on the main router.
For example for creating the bridge and load into it the L3 interface from virtual router the following actions must be performed:
- create bridge and interface into the main router,
- in the main router bind the port and the interface to the bridge,
- configure tag operations,
- apply the interface to VR,
- enter the VR's CLI and specify interface's IP address.
Virtual router configuration example
Creating an interface on the main router. Its furthe configuration will be done on the virtual router.
ecorouter(config)#interface e2
ecorouter(config-int)#exit
Creating VR named VR10 in the configuration mode of the main router.
ecorouter(config)#virtual-router VR10
Loading BGP protocol to the virtual router.
ecorouter(config-vr)#load bgp
ecorouter(config-vr)#exit
Applying the interface to the virtual router.
ecorouter(config-vr)#bind e2
The interface can be applied to the virtual router by the virtual-router-forwarding <VR_NAME> command in the interface configuration mode.
The file for saving VR's configuration must be created. In the configuration mode of the main router in context VR configuration mode use the configuration file <FILE_NAME> command to create the configuration file.
ecorouter(config-vr)#configuration file VR10
The further interface and routing configuring (IP-address, description, including into routing protocol, administrative control) of virtual router is made on VR's CLI.
ecorouter#login virtual-router VR10
EcoRouterOS version 3.2.0 EcoRouter 07/06/16 15:53:00
ecorouter>enable
In the administration mode of VR use the show running-config command to show the virtual router's parameters.
VR10#show running-config
!
no service password-encryption
!
hostname VR10
!
logging monitor 7
!
mpls propagate-ttl
!
line con 0
login
line vty 0 802
login
!
interface e2
ip mtu 1500
ip address 1.1.1.1/24
!
end
Show commands
In the administration mode use the show virtual-router command to show information about created virtual routers and loaded protocols.
ecorouter#show virtual-router
Virtual Router VR10
VR ID: 1
Router ID: 1.1.1.1
Loaded Protocols: bgp
In the administration mode use the show running-config command to see the sections related to the VR and binded interfaces.
ecorouter#show running-config
!
...
!
virtual-router VR10
configuration file VR10
load bgp
!
...
!
interface e2
ip mtu 1500
connect port te1 service-instance 100
virtual-router-forwarding VR10
ip access-group 001 in
!