標題: VirtualBox + RouterOS——Case Study 007 [打印本頁] 作者: 角色 時間: 2018-3-5 15:12 標題: VirtualBox + RouterOS——Case Study 007
本帖最後由 角色 於 2018-3-5 19:21 編輯
Please see the following figure:
[attach]4072[/attach]
General description:
There are two locations where have two routers connected to the Internet. The PCs under the router are able to ping the WAN port of the opposite router.
Objectives:
1. Create two routers with four interfaces. One of them is connected to the Internet via dhcp client mode. As shown in the figure, R1's e2 will be connected to the Internet. Interface e1 and e3 are connected a bridge name bridge1. R2's e3 will be connected to the Internet. Interfaces e1 and e2 are connected to a bridge named bridge2.
2. PC1 and PC2 are able to ping WAN IP of R2. Similarly for the case of PC3 and PC4. They are able to ping the WAN IP of R1 as well.
Procedures:
1. Clone two routers R1 and R2 from the RouterOS CHR
2. Configure the VirtualBox motherboard for 4 NIC interfaces for each router
R1: NIC2 configured as a bridge adapter, NIC1, NIC3 and NIC4 as 'internal network'
R2: NIC3 configured as a bridge adaptor, NIC1,NIC2 and NIC4 as 'internal network'
4. System reset R1 and R2 using the following commands
/system reset-configuration no-defaults=yes
複製代碼
#
5. Remove the default dhcp client in R1 and R2 using the command
/ip dhcp-client remove 0
複製代碼
#
In general, there is only one default dhcp-client in the list.
6. Configure ether2 of R1 and ether3 of R2 as the dhcp-clients
R1:
/ip dhcp-client add interface=ether2 disabled=no
複製代碼
#
R2:
/ip dhcp-client add interface=ether3 disabled=no
複製代碼
#
7. Check if R1 and R2 are able to get IP address from the dhcp server using the following command
/ip dhcp-client print
複製代碼
[attach]4073[/attach]
[attach]4074[/attach]
Please note the setting for allow-remote-requests is 'no', it means any remote device (PC) requests dns from this server is not allowed. If you want to do so, you have to set it to yes using the command
/ip dns set allow-remote-requests=yes
複製代碼
#
8. Now we are going to configure ether1,ether3 and ether4 of R1 to form a bridge named 'bridge1'
R1:
/interface bridge add name=bridge1
/interface bridge port add bridge=bridge1 interface=ether1
/interface bridge port add bridge=bridge1 interface=ether3
/interface bridge port add bridge=bridge1 interface=ether4
複製代碼
#
9. Set the IP address for interface bridge1 for R1