電訊茶室's Archiver

角色 發表於 2018-3-4 22:55

VirtualBox + RouterOS——Case Study 005

[i=s] 本帖最後由 角色 於 2018-3-5 00:08 編輯 [/i]

Please see the following diagram:

[attach]4067[/attach]

Objectives:

1. Change the CHR RouterOS to become a general purpose eight-port switch
2. The PC's are able to be mutually pingable

Procedures:

1. Provide the VirtuBox motherboard with 8 ports[code]VBoxManage modifyvm R1C --nic1 intnet
VBoxManage modifyvm R1 --nic2 intnet
VBoxManage modifyvm R1 --nic3 intnet
VBoxManage modifyvm R1 --nic4 intnet
VBoxManage modifyvm R1 --nic5 intnet
VBoxManage modifyvm R1 --nic6 intnet
VBoxManage modifyvm R1 --nic7 intnet
VBoxManage modifyvm R1 --nic8 intnet

VBoxManage modifyvm R1 --intnet1 Cable1
VBoxManage modifyvm R1 --intnet2 Cable2
VBoxManage modifyvm R1 --intnet3 Cable3
VBoxManage modifyvm R1 --intnet4 Cable4
VBoxManage modifyvm R1 --intnet5 Cable5
VBoxManage modifyvm R1 --intnet6 Cable6
VBoxManage modifyvm R1 --intnet7 Cable7
VBoxManage modifyvm R1 --intnet8 Cable8

VBoxManage modifyvm R1 --nicpromisc1 allow-vms
VBoxManage modifyvm R1 --nicpromisc2 allow-vms
VBoxManage modifyvm R1 --nicpromisc3 allow-vms
VBoxManage modifyvm R1 --nicpromisc4 allow-vms
VBoxManage modifyvm R1 --nicpromisc5 allow-vms
VBoxManage modifyvm R1 --nicpromisc6 allow-vms
VBoxManage modifyvm R1 --nicpromisc7 allow-vms
VBoxManage modifyvm R1 --nicpromisc8 allow-vms[/code]#

2. Boot the Router R1 VM and add the following commands to make router to be a 8-port general purpose switch[code]/interface bridge add name=bridge1
/interface bridge port add bridge=bridge1 interface=ether1
/interface bridge port add bridge=bridge1 interface=ether2
/interface bridge port add bridge=bridge1 interface=ether3
/interface bridge port add bridge=bridge1 interface=ether4
/interface bridge port add bridge=bridge1 interface=ether5
/interface bridge port add bridge=bridge1 interface=ether6
/interface bridge port add bridge=bridge1 interface=ether7
/interface bridge port add bridge=bridge1 interface=ether8[/code]#

3. Configure the PC1, PC3, PC6 and PC8
Before configure them, perform[code]system reset-configure no-defaults=yes[/code]#

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

For PC1[code]/ip address add address=10.10.10.1/24 interface=ether1[/code]#

For PC2[code]/ip address add address=10.10.10.3/24 interface=ether1[/code]#

For PC3[code]/ip address add address=10.10.10.6/24 interface=ether1[/code]#

For PC4[code]/ip address add address=10.10.10.8/24 interface=ether1[/code]#

Now all the PC's are able to ping each other.

[attach]4068[/attach]

頁: [1]

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