ROS软路由论坛 ROSABC.com 网络方案网络工程交流

 找回密码
 会员注册

QQ登录

只需一步,快速开始

查看: 6806|回复: 3

[原创] RouterOS Switch介绍

[复制链接]
发表于 2013-9-5 16:35:27 | 显示全部楼层 |阅读模式

马上注册成为ROSABC会员,随时发帖回复。

您需要 登录 才可以下载或查看,没有账号?会员注册

x
这里根据mik官方资料简单介绍下基于RouterBOARD中RouterOS的switch功能的基本介绍,让大家对switch功能有一定了解。

       该功能主要介绍的是基于RouterBOARD的RouterOS交换芯片功能(该功能从v4.0版本开始出现)

       当前RouterBOARD使用了几种类型的交换芯片,这些芯片有不同的功能。他们大多都具备基本的Port Switching功能(端口交换功能),但他们之间还有些区别,如下交换芯片功能区别:



功能

Atheros8316 Atheros8327Atheros8227Atheros7240ICPlus175DOther

端口交换 支持 支持 支持 支持 支持 支持

端口镜像 支持 支持 支持 支持 支持 无

Host table 2048条 2048 条 1024 条 2048 条 无 无

Vlan数 4096 条 4096 条 4096 条 16 条 无 无

Rule数 32条 92 条 无 无 无 无  

ROS教程http://www.ros360.com

下面是对应的RB设备与交换芯片型号:

Atheros8316 包含:

   RB493G(ether1+ether6~ether9, ether2~ether5),

   RB1200(ether1~ether5),

   RB450G(所有接口,ether1可选项),

   RB435G(所有接口,ether1可选项),

   RB750G (ether1~ether5)

   RB1100(ether1~ether5, ether6~ether10).

Atheros8327 包含:

   RB2011系列(ether1~ether5+sfp1)

   RB750GL(ether1~ether5)

   RB751G-2HnD(ether1~ether5)

   RB951G-2HnD(ether1~ether5)

   RB1100AH(ether1~ether5, ether6~ether10)

   RB1100AHx2(ether1~ether5, ether6~ether10).

Atheros8227 包含:

   RB2011系列(ether6~ether10).

Atheros7240 包含:

   RB750(ether2~ether5),

   RB750UP(ether2~ether5),

   RB751U-2HnD(ether2~ether5)

   RB951-2n(ether2~ether5)

ICPlus175D 包含:

   后期RB450(ether2~ether5)

   后期RB433系列(ether2~ether3).

ICPlus175C包含:

   早期RB450(ether2~ether5)

   早期RB433系列(ether2~ether3).

ICPlus178C 包含

   RB493系列(ether2~ether9)



命令行下的操作路径/interface ethernet switch ,该菜单下列出了系统中所有的交换芯片:


[admin@MikroTik] /interface ethernet switch> print
Flags: I - invalid
#   NAME     TYPE         MIRROR-SOURCE   MIRROR-TARGET
0   switch1  Atheros-8316 ether2          none
根据交换芯片类型,获得各自的配置功能和参数

端口交换


交换功能让交换组内地端口实现限速转发,就像以太网交换机一样。配置这个功能仅需要把所需端口指定到同一个“master port”,一个master端口将把流量传递给RouterOS,RouterOS通过连接master端口与所有交换组接口通信。

例如,下面是一个5给以太网接口的RouterBOARD


[admin@MikroTik] > interface ethernet print
Flags: X - disabled, R - running, S - slave
#    NAME      MTU   MAC-ADDRESS       ARP        MASTER-PORT      SWITCH
0 R  ether1    1500  00:0C:42:3E:5D:BB enabled
1    ether2    1500  00:0C:42:3E:5D:BC enabled    none             switch1
2    ether3    1500  00:0C:42:3E:5D:BD enabled    none             switch1
3    ether4    1500  00:0C:42:3E:5D:BE enabled    none             switch1
4 R  ether5    1500  00:0C:42:3E:5D:BF enabled    none             switch1

我们配置3个交换端口,包含ether3、ether4和ether5:

[admin@MikroTik] /interface ethernet> set ether4,ether5 master-port=ether3
[admin@MikroTik] /interface ethernet> print
Flags: X - disabled, R - running, S - slave
#    NAME      MTU   MAC-ADDRESS       ARP        MASTER-PORT      SWITCH
0 R  ether1    1500  00:0C:42:3E:5D:BB enabled
1    ether2    1500  00:0C:42:3E:5D:BC enabled    none             switch1
2 R  ether3    1500  00:0C:42:3E:5D:BD enabled    none             switch1
3  S ether4    1500  00:0C:42:3E:5D:BE enabled    ether3           switch1
4 RS ether5    1500  00:0C:42:3E:5D:BF enabled    ether3           switch1

ether3现在是这个组的master端口。注意:之前RouterOS会将相关数据传给ether4和ether5接口,但现在ether3被标记为master端口,所有到ethter4和ether5的数据都会传给ether3。


1.png


事实上这个配置类似于RouterBOARD有3个以太网接口,通过ether3连接到交换芯片,这样在这个配置中出现了4个端口,即并不是ether3作为master,而是ether3连接到了交换芯片端口:

2.png



这里的RouterBOARD是5端口,看看5端口的交换情况:


3.png

这里能看到,当一个端口接收到一个数据包,首先会传递给交换逻辑处理。交换逻辑决定数据包去哪一个端口。传递数据包是向RouterOS,同样也可以被称为传递给交换芯片(cpu port)。即交换转发数据包给cpu port,数据包开始被RouterOS某个接口处理进入的数据。当数据包不必通过交换逻辑发送到cpu port处理,也就不占用任何的CPU时钟周期,这样所有帧转发实现限速转发。

发表于 2014-8-9 21:43:05 | 显示全部楼层
支持一下  o(∩_∩)o
发表于 2014-9-28 11:30:52 | 显示全部楼层

支持一下  o(∩_∩)o
发表于 2014-10-24 11:02:08 | 显示全部楼层
看看 新人学习中哦
您需要登录后才可以回帖 登录 | 会员注册

本版积分规则

不良信息举报Q:2000617

软路由

不良信息举报Q:2000617|Archiver|ROS软路由论坛 ROSABC.com 网络方案网络工程交流

GMT+8, 2024-5-19 20:09 , Processed in 0.114277 second(s), 25 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表