標題: VirtualBox + RouterOS——Case Study 001 [打印本頁] 作者: 角色 時間: 2018-3-4 16:52 標題: VirtualBox + RouterOS——Case Study 001
本帖最後由 角色 於 2018-3-4 17:38 編輯
请看下图:
[attach]4052[/attach]
Configuration:
1. Set up two routers and connected via their ether1 interface.
Objective:
1. How to set up the VirtualBox motherboard for the above configuration.
2. How to set up the Routers for the above configuration.
3. Via the RouterOS terminal, we are able to ping the opposite router.
Procedures:
1. Clone two routers (R1 and R2) from the CHR RouterOS.
via the GUI commands, (you may use host console commands)
2. Initialise the VirtualBox motherboards of R1 and R2
Configure VirtulBox motherboards for router R1
VBoxManage modifyvm R1 --nic1 intnet
VBoxManage modifyvm R1 --nic2 none
VBoxManage modifyvm R1 --nic3 none
VBoxManage modifyvm R1 --nic4 none
VBoxManage modifyvm R1 --nic5 none
VBoxManage modifyvm R1 --nic6 none
VBoxManage modifyvm R1 --nic7 none
VBoxManage modifyvm R1 --nic8 none
VBoxManage modifyvm R1 --intnet1 Cable1
VBoxManage modifyvm R1 --nicpromisc1 allow-vms
複製代碼
#
Configure VirtualBox motherboard for router R2
VBoxManage modifyvm R2 --nic1 intnet
VBoxManage modifyvm R2 --nic2 none
VBoxManage modifyvm R2 --nic3 none
VBoxManage modifyvm R2 --nic4 none
VBoxManage modifyvm R2 --nic5 none
VBoxManage modifyvm R2 --nic6 none
VBoxManage modifyvm R2 --nic7 none
VBoxManage modifyvm R2 --nic8 none
VBoxManage modifyvm R2 --intnet1 Cable1
VBoxManage modifyvm R2 --nicpromisc1 allow-vms
複製代碼
#
3. Initialise R1 and R2
Initialise R1
/system reset-configuration no-defaults=yes
複製代碼
#
Reboot R1 and remove the dhcp client
/ip dhcp-client remove 0
複製代碼
#
Initialise R2
/system reset-configuration no-defaults=yes
複製代碼
#
Reboot R2 and remove the dhcp client
/ip dhcp-client remove 0
複製代碼
#
The initialisation of both routers R1 and R2 is complete. The next step is to configure the routers as per the requirements.
4. Configure R1 and R2
Configure R1 for the address 192.168.0.1/24 at interface ether1
Please note that a dynamic route will be set up when the above interface ip-address-setting commands are issued.
5. Observe the arp table in R1 and R2 before ping (/ip arp print)
6. In R1 terminal, issue the following command
/ping 192.168.0.2
複製代碼
#
or In R2 terminal, issue the following command
/ping 192.168.0.1
複製代碼
#
7. Observe the arp table changes after ping
Remarks:
1. Since the VirtualBox was installed on a MacOS platform, we are able to the cut-and-paste method to copy commands to the RouterOs terminals. We have to type commands manually. If the VirtualBox is installed on PC platform, additional software can be installed such that the cut-and-paste method can be used.
2. In order to ease the operation, we may use one of the interfaces to be the router access port such that ssh and/or Winbox can be used to configure the RouterOS.