一种基于业务等级交换的交换系统及其交换方法 技术领域 Switching system and switching method based on service level switching
本发明涉及数据通信技术,具体地说,涉及城域网的弹性分组环( Res i lient Packet Ring, 筒称 RPR )技术, 尤其涉及以太网业务与 RPR技术中的三类业务 等级相适配以 ½于不同业务等级进行调度的系统和方法。 The present invention relates to data communication technology, and in particular, to a flexible packet ring (RPR) technology of a metropolitan area network, and in particular, it relates to adapting an Ethernet service to three types of service levels in the RPR technology to System and method for scheduling at different service levels.
背景技术 Background technique
弹性分组环 RPR技术是一项新兴技术,其目的在于组建具有带宽可复用的、 各个站点具有公平算法以保证各个站点的带宽占用率的、 具有环保护和服务质 量 QoS ( Qual i ty of Service )能力的数据传输网絡, 主要针对城域骨干环网 和城 i或接入环网。 2000年 12月 IEEE专门成立了 IEEE802. 17标准组, 制定基 于 RPR技术的能够组建 RPR环的 RPR MAC ( Media Access Control )层标准。 Resilient packet ring RPR technology is an emerging technology, the purpose of which is to build a bandwidth with reusable bandwidth, each site has a fair algorithm to ensure the bandwidth occupancy of each site, with ring protection and quality of service (QoS) ) Capable data transmission networks, which are mainly targeted at metropolitan backbone ring networks and city i or access ring networks. In December 2000, the IEEE specifically established the IEEE802.17 standard group, and formulated an RPR MAC (Media Access Control) layer standard based on RPR technology that can form RPR rings.
RPR技术最主要的特征之一是对传输的业务进行了分类, 业务分成人、 B、 C 三类, 其中 A类为实时业务; B类又分成两类: B-CIR ( Commi tted Information Rate )为承诺速率等级业务, B-EIR ( Excess Information Rate )为超过承诺 速率等级的业务; C类为尽力而为业务。 以上三类业务通过帧结构中定义的 Service Class区分业务类别。 One of the most important features of RPR technology is to classify the transmitted services. The services are divided into three categories: people, B, and C, of which A is real-time services; B is divided into two categories: B-CIR (Committed Information Rate) For committed rate class services, B-EIR (Excess Information Rate) is a service that exceeds the committed rate class; Class C is a best effort service. The above three types of services are distinguished by the Service Class defined in the frame structure.
目前有艮多业务都是承载在以太网上的, 如果采用 RPR技术建设城域网, 则如何将以太网的业务桥接到 RPR环路上, 并且将以太网业务适配到 RPR技术 的 A/B/C三类业务等级上, 保证用户业务才艮据优先等级进行传送是迫切需要解 决的问题。 目前尚未发现有相关的技术文献。 At present, many services are carried on Ethernet. If RPR technology is used to build a metropolitan area network, how to bridge Ethernet services to RPR loops and adapt Ethernet services to A / B / On the third level of service class C, it is an urgent problem to ensure that user services are transmitted according to the priority level. No related technical literature has been found.
发明内容 Summary of the invention
本发明所要解决的技术问题是提供一个基于业务等级交换的交换系统及其
交换方法, 包括以太网系统与弹性分组环网之间的基于业务等级的交换和桥接 系统以及基于业务等级的调度系统, 包括以太网业务适配到弹性分组环网中的 业务分类方法和同时存在多种分类方法时的优选方法, 以实现将以太网业务桥 接到弹性分组环环路上。 The technical problem to be solved by the present invention is to provide a switching system based on service level switching and A switching method, including a service level-based switching and bridging system between an Ethernet system and an elastic packet ring network, and a service level-based scheduling system, including a service classification method for cooperating Ethernet services into an elastic packet ring network and coexistence The preferred method when multiple classification methods are used to bridge the Ethernet service to the elastic packet ring loop.
本发明的技术方案如下: The technical scheme of the present invention is as follows:
一种基于业务等级交换的交换系统, 包括多个 RPR设备, 所述 RPR设备包 括两个 RPR环路侧端口和一组用户侧端口, 所述 RPR设备通过 RPR环路侧端口 组成 RPR环,通过用户侧端口发送和接收以太网业务帧; 其特征在于, 所述 RPR 设备还包括 RPR帧处理单元、 业务分类处理单元、 上环交换单元和调度单元; 所述 RPR帧处理单元, 用于对从 RPR环路侧端口 $ Γ入的 RPR帧进行处理, 根据 RPR帧是否是本站点的下环业务, 将该 RPR帧分发到相应的用户侧端口, 或者发送到首要传送队列或次要传送队列中; A switching system based on service level switching includes multiple RPR devices. The RPR device includes two RPR ring-side ports and a group of user-side ports. The RPR device forms an RPR ring through the RPR ring-side ports. The user-side port sends and receives Ethernet service frames; characterized in that the RPR device further includes an RPR frame processing unit, a service classification processing unit, a ring switching unit, and a scheduling unit; the RPR frame processing unit is configured to The RPR frame received by the RPR loop-side port $ Γ is processed, and the RPR frame is distributed to the corresponding user-side port or sent to the primary transmission queue or secondary transmission queue according to whether the RPR frame is a downlink service of the site. In
所述业务分类处理单元, 用于对从用户侧端口输入的以太网业务帧进行业 务等级分类, 并发送到相应的业务队列中; The service classification processing unit is configured to classify an Ethernet service frame input from a user-side port into a service level, and send the service class to a corresponding service queue;
所述上环交换单元, 用于选择业务帧的输出环, 并将该业务帧发送到该输 出环的对应等级业务队列中排队, 等待调度; The ring switching unit is configured to select an output ring of a service frame, and send the service frame to a service queue at a corresponding level of the output ring to wait in a queue;
所述调度单元, 用于对首要传送队列和次要传送队列中的业务帧, 以及输 出环的不同等级业务队列中的业务帧进行统一调度,通过 RPR环路侧端口输出。 The scheduling unit is configured to uniformly schedule the service frames in the primary transmission queue and the secondary transmission queue, and the service frames in the service queues of different levels on the output ring, and output them through the RPR loop-side port.
在所述基于业务等级交换的交换系统中, 还包括一组业务分类模式配置寄 存器, 与 RPR设备的用户侧端口——对应; 所述业务分类模式配置寄存器用于 存储对应用户侧端口的业务分类模式, 向所述业务分类处理单元提供从对应的 用户侧端口输入的业务帧的分类模式。 The service level switching-based switching system further includes a set of service classification mode configuration registers corresponding to the user-side port of the RPR device; the service classification mode configuration register is used to store the service classification of the corresponding user-side port Mode, providing the service classification processing unit with a classification mode of a service frame input from a corresponding user-side port.
一种基于业务等级交换的交换方法, 包括:
步驟一、 根据从 RPR环路输入的 RPR帧的目的地址, 判断该 RPR帧是否是 本站点的下环业务, 如果是, 则将该 RPR帧分发到相应的用户侧端口; 如果不 是, 则根据该 RPR帧的业务等级将其发送到首要发送队列或次要发送队列中; 转至步骤四; A switching method based on service level switching includes: Step 1: Determine whether the RPR frame is a loop-down service of the site according to the destination address of the RPR frame input from the RPR loop. If so, distribute the RPR frame to the corresponding user-side port; if not, then Send the RPR frame to the primary sending queue or the secondary sending queue according to the service level of the RPR frame; go to step four;
步骤二、 对从用户侧端口输入的以太网业务帧进行业务等级分类; 步骤三、 选择业务帧的输出环, 并将业务帧发送到该输出环的对应等级业 务队列中; Step 2: Classify the service level of the Ethernet service frame input from the user-side port; Step 3: Select the output ring of the service frame and send the service frame to the service queue at the corresponding level of the output ring;
步骤四、 对上述首要传送队列和次要传送队列中的业务帧, 以及输出环的 不同等级业务队列中的业务帧进行统一调度, 并输出到相应的 RPR环。 Step 4. The service frames in the primary transmission queue and the secondary transmission queue, and the service frames in the service queues of different levels of the output ring are uniformly scheduled, and output to the corresponding RPR ring.
本发明所述基于业务等级交换的交换系统及其交换方法, 通过对业务的分 类以及对全部业务的统一调度, 实现了以太网业务与 RPR环路的桥接, 提供了 一种有效的针对 RPR技术的交换系统及交换方法, 本发明可以融合多种业务分 类技术, 给最终用户进行业务分类, 并对不同等级的业务进行不同的处理, 从 而对不同等级的用户提供不同的服务和价格带来了多种策略。 The switching system and switching method based on service level switching of the present invention realizes bridging of Ethernet services and RPR loops by classifying services and uniformly scheduling all services, and provides an effective RPR technology Switching system and switching method, the present invention can integrate a variety of service classification technologies, classify end users and perform different processing on different levels of services, thereby providing different services and prices for different levels of users. Multiple strategies.
附图说明 BRIEF DESCRIPTION OF THE DRAWINGS
图 1是本发明交换系统的结构示意图; FIG. 1 is a schematic structural diagram of an exchange system of the present invention;
图 2是本发明交换方法的流程示意图。 FIG. 2 is a schematic flowchart of an exchange method according to the present invention.
具体实施方式 detailed description
下面结合附图和实施例对本发明技术方案做进一步的详细描述。 The technical solution of the present invention is described in further detail below with reference to the drawings and embodiments.
本发明的基于业务等级交换的交换系统, 如图 1所示, 包括由多个 RPR设 备构成的 RPR环, RPR设备中包括 RPR帧处理单元、 业务分类处理单元、 上环 交换单元、 调度单元、 2个 RPR环路侧端口以及一组用户侧端口, 从 RPR环路 侧端口输入输出的帧均是 RPR帧, 在 RPR帧中都带有业务等级分类标识, 表明
该 RPR帧的业务等级是人、 B或 C; 而用户侧端口一般是以太网端口, 从该端口 输入输出的帧是以太网帧, 其帧结构中不带有 A、 B、 C业务等级分类标识。 多 个 RPR设备通过 RPR环路侧端口组成一个 RPR环, RPR设备的主要工作模式有 交换模式和路由模式两种, 以下实施例是针对交换模式下的业务分类, 但同样 也适用于采用路由模式的 RPR设备。 The switching system based on service level switching of the present invention, as shown in FIG. 1, includes an RPR ring composed of multiple RPR devices. The RPR device includes an RPR frame processing unit, a service classification processing unit, a ring switching unit, a scheduling unit, Two RPR loop-side ports and a set of user-side ports. The frames input and output from the RPR loop-side ports are RPR frames, and the RPR frames carry the service level classification identifier, indicating that The service level of the RPR frame is human, B, or C; and the user-side port is generally an Ethernet port. The frames input and output from this port are Ethernet frames, and the frame structure does not include A, B, and C service level classifications. Logo. Multiple RPR devices form an RPR ring through the RPR loop-side port. The main working modes of the RPR device are switching mode and routing mode. The following embodiments are classified for services in the switching mode, but they are also applicable to the routing mode. RPR equipment.
从 RPR环路侧端口输入的 RPR帧, 进入 RPR帧处理单元中处理, RPR帧处 理单元才艮据 RPR帧的目的 MAC地址判断该 RPR帧是否是本站点的下环业务, 如 果是, 则才艮据该 RPR帧结构中的扩展目的地址, 以及目的 MAC地址与用户侧端 口之间的对应关系的 MAC地址表, 将该 RPR帧分发到相应的用户侧端口。 如果 该 RPR帧不是本站点的下环业务, 则将该 RPR帧按照其业务等级分类标识放入 首要传送队列 PTQ或次要传送队列 STQ中。 The RPR frame input from the RPR loop-side port is processed in the RPR frame processing unit, and the RPR frame processing unit judges whether the RPR frame is a loop-down service of the site according to the destination MAC address of the RPR frame. If yes, then According to the extended destination address in the RPR frame structure and the MAC address table of the correspondence between the destination MAC address and the user-side port, the RPR frame is distributed to the corresponding user-side port. If the RPR frame is not a downlink service of the site, the RPR frame is placed in the primary transmission queue PTQ or the secondary transmission queue STQ according to its service level classification identifier.
而从 RPR设备的用户侧端口输入的以太网业务帧, 则由业务分类处理单元 对其进行 A/B/C业务等级的分类。 经过业务等级分类的业务帧输出到上环交换 单元中, 由上环交换单元选择业务帧的输出环, 并输出业务帧到对应输出环的 相应等级业务队列中, 等待调度。 首要传送队列 PTQ和次要传送队列 STQ中的 业务, 与输出环的 A、 B、 C三类等级业务队列中的业务, 统一由调度单元进行 调度, 从 RPR环路侧端口输出。 The Ethernet service frame input from the user-side port of the RPR device is classified by the service classification processing unit into A / B / C service levels. The service frame classified by the service level is output to the ring switching unit, and the ring switching unit selects the output ring of the service frame, and outputs the service frame to the corresponding level service queue of the corresponding output ring, waiting for scheduling. The services in the primary transmission queue PTQ and the secondary transmission queue STQ and the services in the output ring A, B, and C three-level service queues are uniformly scheduled by the scheduling unit and output from the RPR loop-side port.
业务分类处理单元对以太网业务帧进行分类处理, 可以有两种方式。 一种 是直接对以太网业务帧进行业务分类, 由于以太帧结构不带有 RPR的业务等级 分类标识, 因此需根据以太帧头的信息进行分类, 将相应的业务等级标识放入 与该以太网业务帧对应的控制字段中, 然后在进行调度前, 将该以太网业务帧 转换成 RPR帧。 另一种是在进行业务等级分类之前, 先将以太网业务帧转换成 RPR帧, 此时该 RPR帧中的业务等级标识被赋予缺省的业务等级, 如 C类业务;
然后进行业务等级分类处理, 重新对 RPR帧中的业务等级标识赋值。 在交换系统中, 还可以包括一組业务分类模式配置寄存器, 分别对应每个 用户侧端口, 用于存储各用户侧端口的业务等级分类模式。 当从用户侧端口输 入的以太网帧进入业务分类处理单元后, 由业务分类处理单元查询该端口对应 的业务分类模式配置寄存器, 获得该端口输入的业务帧的业务分类模式, 然后 业务分类处理单元根据相应的业务分类模式再进行业务分类。 The service classification processing unit performs classification processing on the Ethernet service frame in two ways. One is to classify the Ethernet service frames directly. Because the Ethernet frame structure does not carry the service level classification identifier of the RPR, it is necessary to classify according to the information of the Ethernet frame header, and put the corresponding service level identifier into the Ethernet. In the control field corresponding to the service frame, the Ethernet service frame is then converted into an RPR frame before scheduling. The other is to convert the Ethernet service frame into an RPR frame before classifying the service level. At this time, the service level identifier in the RPR frame is given a default service level, such as a class C service. Then, a service level classification process is performed, and a service level identifier in the RPR frame is re-assigned. In the switching system, a set of service classification mode configuration registers may also be included, corresponding to each user-side port, and used to store the service-level classification mode of each user-side port. After the Ethernet frame input from the user-side port enters the service classification processing unit, the service classification processing unit queries the service classification mode configuration register corresponding to the port, obtains the service classification mode of the service frame input from the port, and then the service classification processing unit Business classification is performed according to the corresponding business classification model.
图 2给出了本发明基于业务等级交换的交换方法流程示意图, 首先确定业 务帧是由 RPR环路侧端口输入的还是由用户侧端口输入的, 如果是从 RPR环路 侧端口输入的, 则进行 RPR帧处理; 如果是从用户侧端口输入的业务帧, 则进 行业务分类处理和上环交换处理; 最后对上述业务帧进行调度处理。 下面对上 述每一步骤进行详细地描述。 FIG. 2 shows a flow chart of a switching method based on service level switching according to the present invention. First, it is determined whether a service frame is input from an RPR loop-side port or a user-side port. If it is input from an RPR loop-side port, then Perform RPR frame processing; if it is a service frame input from a user-side port, perform service classification processing and ring exchange processing; and finally, perform scheduling processing on the above service frame. Each step is described in detail below.
对从 RPR环路侧端口输入的 RPR业务帧进行处理的步骤, 包括: 根据 RPR 帧的目的 MAC地址, 判断该 RPR帧是否是本站点的下环业务, 对于本站点的下 环业务, 将该 RPR帧分发到对应的用户侧端口; 对于非本站点下环业务, 将该 RPR帧根据所带业务等级分类标识送到首要传送队列 PTQ或次要传送队列 STQ 中, 如果是 A类业务, 则送到首要传送队列 PTQ中; 对于 B类和 C类业务, 则 放入次要传送队列 STQ中。 The step of processing the RPR service frame input from the RPR ring-side port includes: determining whether the RPR frame is a ring service of the site according to the destination MAC address of the RPR frame, and for the ring service of the site, Distribute the RPR frame to the corresponding user-side port. For non-loop services on the site, send the RPR frame to the primary transmission queue PTQ or secondary transmission queue STQ according to the service class classification identifier. If it is class A The service is sent to the primary transmission queue PTQ; for the type B and C services, it is placed in the secondary transmission queue STQ.
对从用户侧端口输入的以太网业务帧进行业务分类处理, 是指将以太网业 务帧对应 RPR环的 A/B/C业务等级进行分类。 Classifying the Ethernet service frames input from the user-side port refers to classifying the A / B / C service levels of the Ethernet service frames corresponding to the RPR ring.
对以太网业务帧进行业务分类处理, 可以有两种处理方式。 一种是先直接 对以太网帧进行分类, 然后在进行调度操作之前,再将以太网帧转换成 RPR帧。 一种是在进行业务等级分类之前,先将以太网帧转换成 RPR帧,即新建一个 RPR 帧, 将以太网帧的内容填入该 RPR帧的相应部分, 此时 RPR帧中带有的业务等
级标识被赋予缺省的业务等级标识值, 如 C类业务, 然后进行业务等级分类处 理, 对该值重新赋值。 There are two types of processing methods for Ethernet service frames. One is to directly classify the Ethernet frames, and then convert the Ethernet frames into RPR frames before performing the scheduling operation. One is to convert the Ethernet frame into an RPR frame before classifying the service level. That is, a new RPR frame is created, and the content of the Ethernet frame is filled into the corresponding part of the RPR frame. At this time, the services carried in the RPR frame Wait The level identifier is assigned a default service level identifier value, such as a class C service, and then the service level classification process is performed, and the value is re-assigned.
对以太网业务帧的业务分类方法可以有以下几种: 基于端口的业务分类方 法; 基于虚拟局域网标识 VLAN ID的业务分类方法; 基于源 /目的 MAC地址组的 业务分类方法;以及根据 IEEE802. 17标准中制定的 IEEE802. 3业务等级(Class of Service , 筒称 COS )位与 IEEE802. 17的 A、 B、 C业务的映射进行分类的 方法。 There are several methods for classifying Ethernet service frames: port-based service classification methods; virtual LAN identification VLAN ID-based service classification methods; source / destination MAC address group-based service classification methods; and IEEE802. 17 A method for classifying the mapping of the IEEE 802.3 Class of Service (COS) bits and the IEEE 801.7 A, B, and C services formulated in the standard.
下面对各业务分类方法 说明。 The classification of each service is explained below.
基于端口的业务分类方法, 是指根据输入业务帧的用户側端口的端口号进 行业务分类, 具体是: 为每个用户侧端口设置一个缺省业务类别配置项, 如表 1 所示。 从用户侧端口输入的业务帧, 按照该端口的缺省业务类别配置项配置 其业务等级。 如果端口的缺省业务类别为 00, 则该端口的业务帧被分类为 C类 业务; 如果端口的缺省业务类别为 01 , 则该端口的业务帧被分类为 B类业务; 如果端口的缺省业务类别为 10, 则该端口的业务帧被分类为 A1类业务; 如杲 端口的缺省业务类别为 11 , 则该端口的业务帧被分类为 AO类业务。 在标准中 对 A类业务又分成了 A1和 AO两小类, 其中 AO类业务的等级更高。 The port-based service classification method refers to classifying services according to the port number of the user-side port of the input service frame. Specifically, a default service category configuration item is set for each user-side port, as shown in Table 1. A service frame input from a user-side port is configured with a service level according to a default service category configuration item of the port. If the default service class of the port is 00, the service frame of the port is classified as a class C service; if the default service class of the port is 01, the service frame of the port is classified as a class B service; The provincial service category is 10, and the service frame of the port is classified as A1 service; if the default service category of the port is 11, the service frame of the port is classified as AO service. In the standard, Class A services are divided into two sub-categories, A1 and AO. Among them, the class of AO services is higher.
表 1 Table 1
变量名 定 义 Variable name definition
Port ID 用户侧端口号 Port ID User-side port number
Service Class 缺省业务等级 Service Class default service level
00: C类 00: Class C
01: B类
10: Al类 01: Class B 10: Al
11: AO类 11: AO class
基于 VLAN ID的业务分类方法, 是指根据从用户侧端口输入的业务帧所带 的虚拟局域网标识 VLAN ID号进行分类, 具体是: 设置 VLAN ID号与业务等级 的映射表, 如表 1所示, 从用户侧端口输入的业务帧根据其所带的 VLAN ID号 与业务等级的映射配置成相应的业务等级。如果业务帧带有 802. 1Q标记,并且 其中的 VLAN ID是有效的, 则使用该 VLAN ID号进行业务分类; 如果 VLAN ID 无效, 则查询表 3, 获得该用户侧端口的缺省 VLAN ID号, 并将其作为该业务 帧的 VLAN ID号, 然后进行业务分类。 如果 VLAN ID号为 00, 则该端口的业务 帧被分类为 C类业务; 如果 VLAN ID号为 01 , 则该端口的业务帧被分类为 B类 业务; 如果 VLAN ID号为 10,则该端口的业务帧被分类为 A1类业务;如果 VLAN ID号为 11 , 则该端口的业务帧被分类为 AO类业务。 The VLAN ID-based service classification method refers to classifying according to the virtual LAN identification VLAN ID number carried by the service frame input from the user-side port. Specifically, the mapping table of the VLAN ID number and the service level is set, as shown in Table 1. The service frame input from the user-side port is configured to the corresponding service level according to the mapping of the VLAN ID number and the service level carried by the user frame. If the service frame is marked with 802.1Q and the VLAN ID is valid, the VLAN ID number is used for service classification; if the VLAN ID is invalid, query Table 3 to obtain the default VLAN ID number of the user-side port. And use it as the VLAN ID number of the service frame, and then classify the service. If the VLAN ID is 00, the service frame of the port is classified as a class C service; if the VLAN ID is 01, the service frame of the port is classified as a class B service; if the VLAN ID is 10, the port The service frame of the port is classified as a type A1 service; if the VLAN ID number is 11, the service frame of the port is classified as a type of AO service.
表 2 Table 2
变量名 定 义 Variable name definition
VLAN ID 虚拟局 i或网标识 VLAN ID Virtual Office i or Network ID
Serv ice Clas s 缺省业务等级 Serv ice Clas s default service level
00: C类 00: Class C
01 : B类 01: Class B
10: A1类 10: Class A1
11 : AO类 11: AO class
表 3 table 3
变量名 定 义
Port ID 用户侧端口号 Variable name definition Port ID User-side port number
PVID 该端口的缺省 VLAN ID PVID The default VLAN ID of the port
基于源 /目的 MAC地址组的业务分类方法,是根据业务帧所带的源 MAC地址 和目的 MAC地址对业务帧进行业务等级分类,具体是:设置源 /目的 MAC地址组 与业务类别的映射表,如表 4所示,其中源 /目的 MAC地址组可以是 MAC-MAC(即 源 MAC地址和目的 MAC地址都是特定的)类型 MAC地址组或者 MAC- ANY (即源 MAC地址是特定的,但是目的 MAC地址是任意的)类型 MAC地址组或者 ANY- MAC (即目的 MAC地址是特定的, 但是源 MAC地址是任意的)类型 MAC地址组, 从 用户侧端口输入的业务帧根据表 4所示的映射表进行业务分类。 首先从用户侧 端口输入的业务帧中提取目的 MAC地址和源 MAC地址, 再进行 MAC流匹配, 首 先进行 MAC-MAC类型的 MAC流匹配, 即用提取到的目的 MAC地址和源 MAC地址 与表 4 中的 DesMAC + SrcMAC 进行匹配, 如果匹配成功, 则以该条目对应的 ServiceClas s 项的配置值作为该业务帧的业务等级; 如果匹配不成功则进行 MAC- ANY类型的 MAC流匹配,即匹配源 MAC地址是否等于 SrcMAC,并且目的 MAC 地址等于 DesMAC等于全 F, 如果匹配成功, 则以该条目对应的 ServiceClass 项的配置值作为该业务帧的业务等级; 如果匹配不成功, 则进行 ANY-MAC类型 的 MAC流匹配, 即匹配源 MAC地址是否等于 SrcMAC等于全 F, 并且目的 MAC地 址等于 DesMAC, 如果匹配成功, 则以该条目对应的 ServiceClass项的配置值 作为该业务帧的业务等级, 否则认为该业务帧的业务等级为 C类。 The service classification method based on the source / destination MAC address group is to classify the service frame according to the source MAC address and the destination MAC address carried in the service frame. Specifically, it sets the mapping table between the source / destination MAC address group and service class As shown in Table 4, the source / destination MAC address group can be a MAC-MAC (that is, the source MAC address and the destination MAC address are specific) type MAC address group or MAC-ANY (that is, the source MAC address is specific, However, the destination MAC address is arbitrary) type MAC address group or ANY-MAC (that is, the destination MAC address is specific, but the source MAC address is arbitrary) type MAC address group. The service frame input from the user-side port is according to Table 4. The mapping table shown below performs service classification. First, the destination MAC address and source MAC address are extracted from the service frame input by the user-side port, and then MAC flow matching is performed. First, MAC-MAC type MAC flow matching is performed. DesMAC + SrcMAC in 4 matches. If the match is successful, the configuration value of the ServiceClas s item corresponding to the entry is used as the service level of the service frame. If the match is not successful, MAC-ANY type MAC flow matching is performed, that is, matching. Whether the source MAC address is equal to SrcMAC and the destination MAC address is equal to DesMAC equal to full F. If the match is successful, the configuration value of the ServiceClass item corresponding to the entry is used as the service level of the service frame; if the match is not successful, ANY-MAC is performed Type MAC flow matching, that is, whether the source MAC address is equal to SrcMAC is equal to full F, and the destination MAC address is equal to DesMAC. If the match is successful, the configuration value of the ServiceClass item corresponding to the entry is used as the service level of the service frame, otherwise it is considered The service level of this service frame is Class C.
表 4 Table 4
变量名 定 义 Variable name definition
SrcMAC 源 MAC地址, 当该值为全 F时表示 MAC地址为任意值
DesMAC 目的 MAC地址,当该值为全 F时表示 MAC地址为任意值SrcMAC source MAC address. When the value is all F, the MAC address is arbitrary. DesMAC destination MAC address. When the value is full F, the MAC address is arbitrary.
Service Class 业务等级 Service Class
00: C类 00: Class C
01: B类 01: Class B
10: A1类 10: Class A1
11: AO类 11: AO class
根据 IEEE802. 3业务等级 COS位与 IEEE802. 17的 A、 B、 C业务的映射进行 分类的方法, 包括: 确定业务帧是否带有 802. 1Q标记,如果业务帧带有 802. 1Q 标记,则才艮据标记中的 COS位的值查找 802. 1P-802. 17的 A/B/C业务的映射表, 取得具体的业务分类值作为该业务帧的业务等级; 如果业务帧不带有 802. 1Q 标记, 则认为 COS位的值为 0, 然后查找映射表, 获得该业务帧的业务等级。 802. IP- 802. 17的 A/B/C业务的映射表中记载了 802. 3 COS位与 802. 17的 A/B/C 业务的对应关系。 A method for classifying according to the mapping of IEEE802.3 service level COS bits and IEEE802.17 A, B, and C services includes: determining whether a service frame is marked with 802.1Q, and if a service frame is marked with 802.1Q, then According to the value of the COS bit in the tag, the A / B / C service mapping table of 802.1P-802.17 is searched, and the specific service classification value is obtained as the service level of the service frame; if the service frame does not carry 802 1Q flag, the value of the COS bit is considered to be 0, and then the mapping table is looked up to obtain the service level of the service frame. The mapping table of the 802. IP- 802. 17 A / B / C service records the correspondence between the 802.3 COS bit and the 802. 17 A / B / C service.
对以太网帧进行业务分类的方法有多种, 可在同一系统中同时存在, 对此 本发明还提供了一种基于端口的优选方法, 因为所有的业务都是通过某一个用 户侧端口进入 RPR环的, 因此可以在用户侧端口对业务分类方法进行控制。 具 体是: 在每个端口设置基于端口的业务分类模式配置寄存器, 如表 5所示, 当 业务帧从用户侧端口进入时, 会首先查询该用户侧端口的业务分类模式配置寄 存器, 然后艮据具体配置的业务分类模式, 采用相应的方法进行业务分类。 There are multiple methods for classifying Ethernet frames for services, which can coexist in the same system. The present invention also provides a preferred method based on ports, because all services enter RPR through a certain user-side port. Ring, so you can control the service classification method at the user-side port. Specifically, a port-based service classification mode configuration register is set on each port. As shown in Table 5, when a service frame enters from a user-side port, the service classification mode configuration register of the user-side port is first queried, and then according to For the specific service classification mode, the corresponding method is used for service classification.
表 5 table 5
变量名 定 义 Variable name definition
Port ID 用户侧端口号
SCMode 业务分类模式配置寄存器 Port ID User-side port number SCMode business classification mode configuration register
00: 根据 802. IP区分业务等級, 为缺省值 00: Differentiate the service level according to 802. IP, which is the default value
01: 根据端口区分业务等级 01: Differentiating service levels based on ports
10: 根据 Vlan ID区分业务等级 10: Differentiate service levels based on Vlan ID
11: 根据 MAC地址组区分业务等级 11: Differentiate service levels based on MAC address groups
业务帧经过业务分类处理后, 进行上环交换处理, 包括: 根据到目的站点 的最短路径原则选择业务帧的输出环, 并将业务帧分别发送到对应输出环的 After the service frame is processed by the service classification, the ring exchange processing is performed, including: selecting an output ring of the service frame according to the shortest path principle to the destination site, and sending the service frame to the corresponding output ring respectively.
A/B/C类业务队列中排队, 等待调度。 A / B / C service queues are waiting in the queue.
调度处理步骤是对从 RPR环路进入的非本站点业务帧,即首要传送队列 PTQ 和次要传送队列 STQ中的业务帧, 以及从用户侧端口进入的 A/B/C类业务队列 中的业务帧进行统一调度, 按照 PTQ/STQ/A/B/C的顺序, 将业务帧从相应的输 出环路输出。 The scheduling processing steps are for the non-local service frames entering from the RPR loop, that is, the service frames in the primary transmission queue PTQ and the secondary transmission queue STQ, and the A / B / C service queues entering from the user-side port. The service frames are uniformly scheduled, and the service frames are output from the corresponding output loop in the order of PTQ / STQ / A / B / C.
以下给出本发明的一个较佳实施例。 A preferred embodiment of the present invention is given below.
当业务帧从用户侧某个端口进入时, 首先进行业务分类处理。 When a service frame enters from a port on the user side, service classification processing is performed first.
1、 业务分类处理过程 1. Business classification process
1 )检查该业务帧是从哪个端口进入的, 假设从端口 i进入; 1) Check from which port the service frame enters, assuming that it enters from port i;
2 )查找端口 i的业务分类模式配置寄存器,获得端口 i的业务分类模式值, 如表 5中的 SCMode值, 如果值是 00, 表示根据 802. 1P对业务帧进行分类, 则 转至步骤 3 ); 如果值是 01 , 表示根据端口对业务帧进行分类, 则转至步骤 4 ); 如果值是 10, 表示才艮据 Vlan ID对业务帧进行分类, 则转至步骤 5 ); 如果值 是 11 , 表示 ^艮据 MAC地址组对业务帧进行分类, 则转至步骤 6 )。 2) Find the service classification mode configuration register of port i to obtain the service classification mode value of port i, as shown in the SCMode value in Table 5. If the value is 00, it means to classify the service frame according to 802.1P, then go to step 3. ); If the value is 01, it means to classify the service frame according to the port, then go to step 4); If the value is 10, it means to classify the service frame according to the Vlan ID, then go to step 5); If the value is 11, indicating that the service frame is classified according to the MAC address group, and then go to step 6).
3 )如果该业务帧带有 802. 1Q标记, 则根据标记中的 COS位的值, 查找 802. 1P-802. 17的 A/B/C业务的映射表, 取得具体的业务分类值作为该业务帧
的业务等级; 如果该业务帧不带有 802. 1Q标记, 则认为 COS位的值为 0, 然后 进行查找, 获得该业务帧的业务等级; 转至步骤 7 )。 3) If the service frame is marked with 802.1Q, then according to the value of the COS bit in the mark, look up the mapping table of 802.1P-802.17 A / B / C service, and obtain the specific service classification value as the Business frame If the service frame is not marked with 802.1Q, the value of the COS bit is considered to be 0, and then a search is performed to obtain the service level of the service frame; go to step 7).
4 )查找端口 i的端口缺省业务类别配置, 如表 1所示, 获得的具体的业务 分类值作为该业务的业务等级。 然后转至步驟 7 )。 4) Find the default service class configuration of port i. As shown in Table 1, the specific service classification value obtained is used as the service level of the service. Then go to step 7).
5 )如果该业务帧带有 802. 1Q标记, 则确定标记中的 VLAN ID是否有效, 如果有效, 则根据该 VLAN ID值查找基于 VLAN ID的业务类别配置, 获得对应 的业务类别值作为该业务帧的业务等级; 如果无效,则取该端口的缺省 VLAN ID 值作为该业务帧的 VLAN ID, 再进行查找, 获得该业务帧的业务等级; 然后转 至步骤 7 )。 5) If the service frame is marked with 802.1Q, determine whether the VLAN ID in the tag is valid, and if it is valid, search for a VLAN ID-based service category configuration according to the VLAN ID value, and obtain a corresponding service category value as the service The service level of the frame; if it is invalid, the default VLAN ID value of the port is taken as the VLAN ID of the service frame, and a search is performed to obtain the service level of the service frame; then, go to step 7).
6 )才艮据该业务帧的源 MAC地址和目的 MAC地址查找业务类别配置, 如杲找 到匹配的项, 则取该项对应的业务类别值作为该业务的业务等级, 否则使用缺 省的业务类别值 -C类。 然后转至步骤 7 )。 6) The service type configuration is searched according to the source MAC address and the destination MAC address of the service frame. If a matching item is found, the service class value corresponding to the item is used as the service level of the service. Otherwise, the default service is used. Category value-category C. Then go to step 7).
7 )进行上环交换处理。 7) Perform ring exchange processing.
2、 上环交换处理 2. Shelf exchange processing
1 )根据业务帧所带的目的 MAC地址查找上环选择表, 上环选择表提供目的 MAC地址与当前该用户所在的 RPR站点的 MAC地址根据最短路径原则得到的 RPR 环路选择的对应关系, 通过查表得到业务帧的输出 RPR环路 j。 1) Find the ring selection table according to the destination MAC address carried in the service frame. The ring selection table provides the correspondence between the destination MAC address and the RPR ring selection obtained based on the shortest path principle for the MAC address of the current RPR site of the user. Get the output RPR loop j of the service frame by looking up the table.
2 ) # ^居经过业务分类处理得到的业务等级, 将该业务帧送到 RPR环路 j 的 A/B/C业务队列中。 2) The service level obtained by the service classification process is sent to the A / B / C service queue of the RPR loop j.
3 )将以太网业务帧转换成 RPR帧, 等待进行调度处理。 3) Convert the Ethernet service frame into an RPR frame and wait for scheduling processing.
3、 RPR帧处理 3. RPR frame processing
对从 RPR环路进入的 RPR帧进行处理。 Processes RPR frames coming from the RPR loop.
1 )检查业务帧从 RPR的哪个环路进入, 假设是环路 k;
2 )判断该业务的 RPR帧的目的 MAC地址是否是本站点的, 如果是, 则转步 骤 3 ), 否则转步骤 5 )。 1) Check which loop of the RPR the service frame enters, assuming loop k; 2) Determine whether the destination MAC address of the RPR frame of the service belongs to this site, and if yes, go to step 3), otherwise go to step 5).
3 )提取 RPR帧中扩展封装的 802. 3帧的目的 MAC地址, 查找下环 MAC地址 表, 下环 MAC地址表包含 MAC地址和本地端口的对应关系, 获得该业务帧需要 输出的本地端口号 m。 3) Extract the destination MAC address of the 802.3 frame that is encapsulated in the RPR frame, and search the lower ring MAC address table. The lower ring MAC address table contains the correspondence between the MAC address and the local port, and obtain the local port number that the service frame needs to output. m.
4 )从该 RPR帧中剥离出 802. 3帧, 并且从本地端口 m输出。 流程结束。 4) 802.3 frames are stripped from the RPR frame and output from the local port m. The process ends.
5 )将 RPR帧根据 RPR帧中的业务等级分别放到首要传送队列 PTQ和次要传 送队列 STQ中, 其中 A类业务放到 PTQ, 其他业务放到 STQ中。 然后进行调度 处理。 5) The RPR frame is placed in the primary transmission queue PTQ and the secondary transmission queue STQ according to the service level in the RPR frame, of which the Class A service is placed in the PTQ, and the other services are placed in the STQ. Then the scheduling process is performed.
4、 调度处理 4. Scheduling
依次调度 PTQ/STQ/A/B/C 5个队列的业务帧, 并且从对应输出环路输出, 该调度处理遵循 IEEE802. 17的定义。 Service frames of 5 queues of PTQ / STQ / A / B / C are scheduled in turn, and output from the corresponding output loop. This scheduling process follows the definition of IEEE802.17.
本发明的系统及方法是一种有效的针对 RPR技术的交换系统, 该方法可以 融合多种业务分类技术, 给最终用户进行业务分类, 并针对不同等级的业务进 行不同的处理,从而对不同等级的用户提供不同的服务和价格带来了多种策略。 The system and method of the present invention is an effective switching system for RPR technology. The method can integrate multiple service classification technologies, classify services to end users, and perform different processing for different levels of services, thereby different levels of services. Of users provide different services and prices bring multiple strategies.
虽然本发明的业务类别分类方法已在本发明具体实施例中被说明和描述, 但很明显本发明是不受此分类方法的限制, 在不偏离 所附权利要求书所确定 的本发明技术方案的构思和范围的条件下, 本领域的技术人员将会考虑到许多 修正、 更换、 变化、 替代和等效的内容, 而这些内容都应属于本发明的保护范 围。
Although the business category classification method of the present invention has been illustrated and described in the specific embodiments of the present invention, it is obvious that the present invention is not limited by this classification method, and does not deviate from the technical solution of the present invention determined by the appended claims Under the conditions of the concept and scope, those skilled in the art will consider many amendments, replacements, changes, substitutions and equivalent contents, and these contents should all belong to the protection scope of the present invention.