電訊茶室's Archiver

角色 發表於 2018-3-1 09:14

VirtualBox + RouterOS——Routing and Switching

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

====
最新消息,可以用Wireshark接入VirtualBox,然后看看那里的frame是怎样走的。
====
估计这里有不少人用RouterOS,有很多settings都不敢在现在的production RouterOS router在弄,而又由于budget所限,所以又不会购买多MikroTik routers,那么怎样办呢?大家学习过CCNA,CCNP,都有很多模拟器如Packet Tracer。那么RouterOS是否有同类的东西呢?答案是有的,就是VirtualBox + RouterOS,(之前用过GNS3,可能由于我用MacOS,又是老版本,而GNS3有不太支持,如果你是用PC,可以考虑用VirtualBox + RouterOS + GNS3,但是我不建议,先学好VirtualBox + RouterOS这个组合,然后再加入GNS3)。

好了说了那么多,怎样开始呢?你要先下载VirtualBox和RouterOS。

下载links:
VirtualBox:[url]https://www.virtualbox.org/[/url]
RouterOS,你可以有两个选择,1)用X86 RouterOS试用版(一天,累计加起来,没有限制,速度跟买License一样),2)CHR RouterOS (试用版可以长期使用,但是限速1Mbps),如果学习用CHR RouterOS已经足够了。[url]https://mikrotik.com/download[/url]

注意:X86 RouterOS (选X86 CD image (ISO format),CHR RouterOS (Cloud Core Router)选vdi format (给VirtualBox)

VirtualBox manual在安装VirtualBox里有链接,你点击就可以了。RouterOS有丰富的Wiki [url=https://wiki.mikrotik.com/wiki/Manual:TOC]Link[/url]

安装也没有什么难度,在安好一个,需要就clone另外一个,用full clone。
还有vm与vm事的沟通记住把每个NIC adaptor的Promiscuous Mode设成Allow vms,或者Allow all。(我花了好几天的时间才能搞懂,不然的话把RouterOS编程一个Layer 2 managed switch都不行!!!)

在建造network时牵涉很多网线,我们就用“Internat network”,你把它看成hub就可以,如果hub只有两个vm’s,那么你就把它看成LAN cable就可以。如果你的VM要接互联网就选择Bridged Adaptor。(VirtualBox还有很多modes,你边看边搜索有关资料就可以)。

你可以建立很多个routers,L2/L3 managed switches,terminal devices(ping network用)那么你可以迈向快速学习RouterOS的Routing and Switching东西,而不花太多金钱购买硬件。

===
现在在我的MacBook Pro 里(2015买,512G SSD 16G Ram)安装VirtualBox和RouterOS,在最初还加入了GNS3,但是出现很多的问题,所以改为只有VirtualBox + RouterOS,日后再看GNS3。

我的目的是主要使用RouterOS,它可以Router,Switch,Terminal。Router and Terminal已经没有什么问题,留下来的就只有Switch。希望可以再花点时间把RouterOS编程Managed Layer2 switch。

角色 發表於 2018-3-1 09:15

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

Case Study 001: [url=http://www.telecom-cafe.com/forum/viewthread.php?tid=7146&extra=page%3D1]Link[/url]
- Set up two routers such that they can be mutually pingable.

Case Study 002: [url=http://www.telecom-cafe.com/forum/viewthread.php?tid=7147&extra=page%3D1]Link[/url]
- Same as CS001 but with one of port connected to the Internet such that both WAN ports of each router can be pingable by the outside world.

Case Study 003: [url=http://www.telecom-cafe.com/forum/viewthread.php?tid=7148&extra=page%3D1]Link[/url]
- Setup one router with static IP. It can access the Internet.

Case Study 004: [url=http://www.telecom-cafe.com/forum/viewthread.php?tid=7149&extra=page%3D1]Link[/url]
- Same as CS003 but the WAN receives dynamic IP from the DHCP server.

Case Study 005: [url=http://www.telecom-cafe.com/forum/viewthread.php?tid=7150&extra=page%3D1]Link[/url]
- How to change RouterBoard to become a managed switch

Case Study 006: [url=http://www.telecom-cafe.com/forum/viewthread.php?tid=7151&extra=page%3D1]Link[/url]
- WAN configured a DHCP client (can access the Internet) and two LAN with static IPs

Case Study 007: [url=http://www.telecom-cafe.com/forum/viewthread.php?tid=7153&extra=page%3D1]Link[/url]
- Set up two routers whose WAN is configured as a DHCP client. Some of router ports are configured as a bridge with two LAN ports.

RouterOS Commands [url=http://www.telecom-cafe.com/forum/viewthread.php?tid=7131&extra=page%3D1]Link[/url]

VirtualBox Commands [url=http://www.telecom-cafe.com/forum/viewthread.php?tid=7138&extra=page%3D1]Link[/url]

Wireshark
[url]https://www.lifewire.com/wireshark-tutorial-4143298[/url]

角色 發表於 2018-3-1 09:15

[i=s] 本帖最後由 角色 於 2018-3-7 10:14 編輯 [/i]

Reference on Switching
How LAN Switches Work [url=https://computer.howstuffworks.com/lan-switch.htm]Link[/url]

Reference on Routing
How Routers Work [url=https://computer.howstuffworks.com/router.htm]Link[/url]

Switching
[url]http://units.folder101.com/cisco/sem1/Notes/ch8-switching/switching.htm[/url]

RouterOS参考帖子:
[url]https://www.mobile01.com/topicdetail.php?f=110&t=3205444[/url]

角色 發表於 2018-3-1 09:15

[i=s] 本帖最後由 角色 於 2018-3-13 20:30 編輯 [/i]

RouterOS-learning in YouTube Channel

MikroTik RouterOS
[url]https://www.youtube.com/watch?v=76nK1LXyPMA&list=PLCvN_Pl1Blxh2ejJCGI4T-xzL3VrYtsKS[/url]

角色 發表於 2018-3-1 09:15

备用帖子5

角色 發表於 2018-3-1 09:15

备用帖子6

角色 發表於 2018-3-1 09:16

备用帖子7

角色 發表於 2018-3-1 09:16

备用帖子8

角色 發表於 2018-3-1 09:17

备用帖子9

角色 發表於 2018-3-1 09:17

备用帖子10

角色 發表於 2018-3-1 09:17

备用帖子11

角色 發表於 2018-3-1 09:17

备用帖子12

角色 發表於 2018-3-1 09:18

备用帖子13

角色 發表於 2018-3-1 09:18

备用帖子14

角色 發表於 2018-3-1 09:18

备用帖子15

角色 發表於 2018-3-1 09:19

备用帖子16

角色 發表於 2018-3-1 23:25

终于把整套VirtualBox与RouterOS CHR搞通,之前就是因为promiscuous mode没有设好,它default是deny,所以vm与vm不能沟通,导致switching没有办法连起来,把promiscuous mode=allow vms就可以。

角色 發表於 2018-3-3 18:00

哈哈,最近也把Wireshark接入,那么就可以知道那里的packets是怎样走的。

角色 發表於 2018-3-5 20:06

I have already built several examples in the form of case studies with the VirtualBox commands and RouterOS commands for anyone who is interested in building their virtual labs.

Should you have any questions, please feel free to raise. I shall answer your questions whenever I have time available.

頁: [1]

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