返回列表 發帖

VirtualBox + RouterOS——Case Study 001

本帖最後由 角色 於 2018-3-4 17:38 編輯

请看下图:


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
  1. VBoxManage modifyvm R1 --nic1 intnet
  2. VBoxManage modifyvm R1 --nic2 none
  3. VBoxManage modifyvm R1 --nic3 none
  4. VBoxManage modifyvm R1 --nic4 none
  5. VBoxManage modifyvm R1 --nic5 none
  6. VBoxManage modifyvm R1 --nic6 none
  7. VBoxManage modifyvm R1 --nic7 none
  8. VBoxManage modifyvm R1 --nic8 none

  9. VBoxManage modifyvm R1 --intnet1 Cable1

  10. VBoxManage modifyvm R1 --nicpromisc1 allow-vms
複製代碼
#

Configure VirtualBox motherboard for router R2
  1. VBoxManage modifyvm R2 --nic1 intnet
  2. VBoxManage modifyvm R2 --nic2 none
  3. VBoxManage modifyvm R2 --nic3 none
  4. VBoxManage modifyvm R2 --nic4 none
  5. VBoxManage modifyvm R2 --nic5 none
  6. VBoxManage modifyvm R2 --nic6 none
  7. VBoxManage modifyvm R2 --nic7 none
  8. VBoxManage modifyvm R2 --nic8 none

  9. VBoxManage modifyvm R2 --intnet1 Cable1

  10. VBoxManage modifyvm R2 --nicpromisc1 allow-vms
複製代碼
#

3. Initialise R1 and R2

Initialise R1
  1. /system reset-configuration no-defaults=yes
複製代碼
#

Reboot R1 and remove the dhcp client
  1. /ip dhcp-client remove 0
複製代碼
#

Initialise R2
  1. /system reset-configuration no-defaults=yes
複製代碼
#

Reboot R2 and remove the dhcp client
  1. /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
  1. /ip address add address=192.168.0.1/24 interface=ether1
複製代碼
#

Configure R2 for the address 192.168.0.2/24 at interface ether1
  1. /ip address add address=192.168.0.2/24 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
  1. /ping 192.168.0.2
複製代碼
#

or In R2 terminal, issue the following command
  1. /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.
附件: 您需要登錄才可以下載或查看附件。沒有帳號?註冊

返回列表