電訊茶室's Archiver

角色 發表於 2018-3-4 19:40

VirtualBox + RouterOS——Case Study 003

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

Please take a look at the following diagram:

[attach]4060[/attach]

Objective:
1. Set up the router R1 such that it could be pingable 192.168.55.1
2. Add dns to R1 such that the website [url]www.abc.com[/url] can be pingable.

Procedure:

1. Configure the VirutalBox motherboard for router R1[code]VBoxManage modifyvm R1 --nic1 bridged
VBoxManage modifyvm R1 --bridgeadapter1 'en6: Thunderbolt Ethernet 3'[/code]#

If you found unwanted interface, you may the command "showvminfo R1" to display which NIC number to provide the unwanted interface. Once the interface number is confirmed, for example NIC8, you use the following command to remove the interface[code]/VBoxManage modifyvm R1 --nic8 none[/code]#

2. Reboot the R1 VM and reset the router R1[code]/system reset-configuration no-defaults=yes[/code]#

3. Remove the dhcp client[code]/ip dhcp-client remove 0[/code]#

The router initialisation process is complete, we can configure the router as the objectives.

4. Configure the IP address of ether1 of router R1[code]/ip address add address=192.168.55.29/24 interface=ether1[/code]#

5. Now you are able to ping the IP address 192.168.55.1.

[attach]4062[/attach]

[attach]4061[/attach]

6. If we ping [url]www.abc.com[/url], you can receive errors because the host name is not resolvable. In order to overcome this issue, you can use the following command[code]/ip dns set server=192.168.55.1[/code]#

7. Also you need add a default route to the Internet gateway 192.168.55.1[code]/ip route add gateway=192.168.55.1[/code]#

8. Now you able to ping the website "www.abc.com".

[attach]4064[/attach]

[attach]4063[/attach]

頁: [1]

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