電訊茶室's Archiver

角色 發表於 2018-3-4 16:52

VirtualBox + RouterOS——Case Study 001

[i=s] 本帖最後由 角色 於 2018-3-4 17:38 編輯 [/i]

请看下图:
[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[code]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[/code]#

Configure VirtualBox motherboard for router R2[code]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[/code]#

3. Initialise R1 and R2

Initialise R1[code]/system reset-configuration no-defaults=yes[/code]#

Reboot R1 and remove the dhcp client[code]/ip dhcp-client remove 0[/code]#

Initialise R2[code]/system reset-configuration no-defaults=yes[/code]#

Reboot R2 and remove the dhcp client[code]/ip dhcp-client remove 0[/code]#

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[code]/ip address add address=192.168.0.1/24 interface=ether1[/code]#

Configure R2 for the address 192.168.0.2/24 at interface ether1[code]/ip address add address=192.168.0.2/24 interface=ether1[/code]#

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[code]/ping 192.168.0.2[/code]#

or In R2 terminal, issue the following command[code]/ping 192.168.0.1[/code]#

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.

頁: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.