CN101188564B - A Realization Method of Multiple Spanning Tree Protocol - Google Patents

A Realization Method of Multiple Spanning Tree Protocol Download PDF

Info

Publication number
CN101188564B
CN101188564B CN2007101883971A CN200710188397A CN101188564B CN 101188564 B CN101188564 B CN 101188564B CN 2007101883971 A CN2007101883971 A CN 2007101883971A CN 200710188397 A CN200710188397 A CN 200710188397A CN 101188564 B CN101188564 B CN 101188564B
Authority
CN
China
Prior art keywords
protocol
spanning tree
imstp
instance
multiple spanning
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN2007101883971A
Other languages
Chinese (zh)
Other versions
CN101188564A (en
Inventor
钱锐
邵军
伏朝晖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN2007101883971A priority Critical patent/CN101188564B/en
Publication of CN101188564A publication Critical patent/CN101188564A/en
Application granted granted Critical
Publication of CN101188564B publication Critical patent/CN101188564B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种多生成树协议的实现方法,所述方法包括:在交换机上开启多生成树协议MSTP、以及基于QINQ或者二层VPN的多生成树协议iMSTP;设置生成树子实例,获得生成树子实例拓扑;出口交换机输出经过生成树子实例拓朴转发的用户数据。所述获得生成树子实例拓扑,必须先根据iMSTP ID进行iMSTP模式的判断。采用本发明方法,不但解决了现有MSTP协议对QINQ协议和二层VPN协议支持不足的问题,且能区分二层协议下的不同VLAN业务,增强了VLAN业务的扩展性。

The invention discloses a method for realizing multiple spanning tree protocol, the method includes: enabling multiple spanning tree protocol MSTP and multiple spanning tree protocol iMSTP based on QINQ or Layer 2 VPN on a switch; setting spanning tree sub-instances to obtain Spanning tree sub-instance topology; the egress switch outputs user data forwarded through the spanning tree sub-instance topology. In order to obtain the topology of the sub-instance of the spanning tree, the iMSTP mode must first be judged according to the iMSTP ID. The method of the invention not only solves the problem that the existing MSTP protocol does not support the QINQ protocol and the two-layer VPN protocol, but also can distinguish different VLAN services under the two-layer protocol, and enhances the scalability of the VLAN service.

Description

一种多生成树协议的实现方法 A Realization Method of Multiple Spanning Tree Protocol

技术领域technical field

本发明涉及数据通讯领域,尤其涉及一种多生成树协议的实现方法。The invention relates to the field of data communication, in particular to a method for realizing multiple spanning tree protocols.

背景技术Background technique

STP(Spanning-Tree Protocol,生成树协议)从诞生的那一刻起,决定了其作为一个“小”协议决定“大”协议的特性。这里所谓“大小”,是指协议本身而言,但生成树协议却比任何路由协议、MPLS(多协议标记交换)协议都要重要的多。From the moment STP (Spanning-Tree Protocol, Spanning Tree Protocol) was born, it has determined its characteristics as a "small" protocol and a "big" protocol. The so-called "size" here refers to the protocol itself, but the spanning tree protocol is much more important than any routing protocol and MPLS (Multiprotocol Label Switching) protocol.

生成树协议在其历史发展中经历了三个阶段:第一代生成树协议:SSTP/RSTP(简单生成树协议/快速生成树协议);第二代生成树协议:PVST/PVST+(VLAN(虚拟局域网)生成树协议);第三代生产树协议:MSTP协议(Multi Spanning-Tree Protocol-多生成树协议)。The spanning tree protocol has gone through three stages in its historical development: the first generation spanning tree protocol: SSTP/RSTP (simple spanning tree protocol/rapid spanning tree protocol); the second generation spanning tree protocol: PVST/PVST+ (VLAN (virtual LAN) Spanning Tree Protocol); the third generation of Spanning Tree Protocol: MSTP (Multi Spanning-Tree Protocol-Multiple Spanning Tree Protocol).

第一代生成树协议虽然简单、快捷,但是在IEEE 802.1Q协议大行其道的今天,由于该协议主要涉及VLAN的实现,SSTP或者RSTP对VLAN实例无法区分,也不能对分属不同VLAN业务进行操作,第一代生成树协议已不能满足IEEE 802.1Q协议的要求。Although the first-generation spanning tree protocol is simple and fast, but today the IEEE 802.1Q protocol is popular, because the protocol mainly involves the realization of VLAN, SSTP or RSTP cannot distinguish VLAN instances, nor can they operate on services belonging to different VLANs. The first generation spanning tree protocol can no longer meet the requirements of the IEEE 802.1Q protocol.

为了解决对VLAN业务无能为力的局面,第二代生成树协议应运而生,但是采用该生成树协议,每一个VLAN都要维持一个生成树实例,这样生成树实例数量要和VLAN一一对应,不但缺乏灵活性,而且当VLAN众多时,需要维持的生成树实例也会相应增多,给交换机带来很大负担,大大影响了交换机的性能。In order to solve the situation of being unable to do anything to VLAN services, the second-generation spanning tree protocol came into being. However, with this spanning tree protocol, each VLAN must maintain a spanning tree instance, so that the number of spanning tree instances must correspond to the VLAN one-to-one. Lack of flexibility, and when there are many VLANs, the number of spanning tree instances that need to be maintained will increase accordingly, which will bring a great burden to the switch and greatly affect the performance of the switch.

第三代生成树协议解决了前面两代协议都面临的问题,是一种可以区分VLAN而又可以对VLAN进行多种组合的多生成树实例,每一个生成树实例代表一系列的VLAN组合,这样MSTP便能很好的解决802.1Q协议的所有问题。The third-generation spanning tree protocol solves the problems faced by the previous two generations of protocols. It is a multi-spanning tree instance that can distinguish VLANs and make multiple combinations of VLANs. Each spanning tree instance represents a series of VLAN combinations. In this way, MSTP can well solve all the problems of the 802.1Q protocol.

随着数据通讯领域日益IP化的趋势必然要求对不同VLAN业务给予支持,在这种趋势下,QINQ(或称SVLAN,即VLAN堆叠)协议和二层VPN(虚拟专用网)协议诞生了,这种用二层协议区分不同业务的思想必然要求生成树协议做出相应对策,但生成树协议发展到MSTP协议就停滞不前了。从目前数据通讯的特点看,现有MSTP协议只能根据参与多生成树计算的交换机端口的VLAN ID进行区分,并根据不同的多生成树实例和VLAN ID的映射进行生成树拓朴计算。对于QINQ协议涉及的双VLAN标签协议或者多层VLAN标签协议以及二层VPN协议需要区分不同VLAN业务的操作却不能支持,而且VLAN业务可扩展性差,没有给未来发展提供必要空间。With the increasingly IP-based trend in the data communication field, it is necessary to support different VLAN services. Under this trend, the QINQ (or SVLAN, VLAN stacking) protocol and the Layer 2 VPN (Virtual Private Network) protocol were born. The idea of using Layer 2 protocol to distinguish different services will inevitably require corresponding countermeasures from Spanning Tree Protocol, but the development of Spanning Tree Protocol to MSTP protocol has stagnated. Judging from the characteristics of current data communication, the existing MSTP protocol can only be distinguished according to the VLAN ID of the switch port participating in the multi-spanning tree calculation, and the spanning tree topology calculation is performed according to the mapping between different multi-spanning tree instances and VLAN IDs. The double-VLAN tagging protocol or multi-layer VLAN tagging protocol and Layer 2 VPN protocol involved in the QINQ protocol cannot support operations that need to distinguish between different VLAN services, and the scalability of VLAN services is poor, which does not provide the necessary space for future development.

发明内容Contents of the invention

本发明的目的是提出一种多生成树协议的实现方法,用以克服现有技术中MSTP协议对QINQ协议和二层VPN协议支持不足的问题。The purpose of the present invention is to propose a method for implementing the Multiple Spanning Tree Protocol, so as to overcome the insufficient support of the MSTP protocol for the QINQ protocol and the Layer 2 VPN protocol in the prior art.

为了实现上述发明目的,本发明具体是这样实现的:In order to realize the above-mentioned purpose of the invention, the present invention is specifically realized like this:

一种多生成树协议的实现方法,包括如下步骤:A method for implementing multiple spanning tree protocols, comprising the steps of:

步骤1,需要经过交换机转发的数据报文进入交换机,交换机开启iMSTP多生成树协议,在协议报文中增加iMSTP协议字段,并根据对iMSTP协议字段设置,进行iMST生成树子实例的设置;Step 1, the data message that needs to be forwarded by the switch enters the switch, the switch enables the iMSTP multiple spanning tree protocol, adds the iMSTP protocol field in the protocol message, and sets the iMST spanning tree sub-instance according to the setting of the iMSTP protocol field;

步骤2,通过协议报文增加的字段,进行生成树子实例拓扑计算;Step 2, perform spanning tree sub-instance topology calculation through the fields added in the protocol message;

步骤3,交换机转发输出经过生成树子实例拓扑转发的数据报文。In step 3, the switch forwards and outputs the data packets forwarded through the spanning tree sub-instance topology.

其中所述步骤2中,计算生成树子实例拓扑,包括如下步骤:Wherein said step 2, calculating spanning tree sub-instance topology includes the following steps:

步骤2a,进行iMST模式判断;Step 2a, judge the iMST mode;

步骤2b,进行区域根选举;Step 2b, conduct regional root election;

步骤2c,进行路径开销计算。In step 2c, path cost calculation is performed.

其中所述步骤2a中,根据在所述设置的iMSTP协议字段中设置的iMSTP ID进行iMSTP模式判断;Wherein in said step 2a, carry out iMSTP pattern judgment according to the iMSTP ID that is set in the iMSTP agreement field of described setting;

所述iMSTP ID的取值是由VLAN组网方式决定;The value of the iMSTP ID is determined by the VLAN networking mode;

若采用QINQ方式组网,则iMSTP ID取值为QINQ的内层VLAN标签的VLAN ID;If the QINQ network is used, the iMSTP ID value is the VLAN ID of the inner VLAN tag of QINQ;

若采用二层VPN方式组网,则iMSTP ID取值为二层VPN边缘接口所配置的trunk值或者二层VPN中给不同业务所分配的VCID值。If Layer 2 VPN is used for networking, the value of iMSTP ID is the trunk value configured on the edge interface of Layer 2 VPN or the VCID value assigned to different services in Layer 2 VPN.

所述的多生成树协议的实现方法,所述步骤1中,在进行交换机开启iMSTP多生成树协议前,先进行MSTP多生成树协议的开启。In the implementation method of the multiple spanning tree protocol, in the step 1, before the switch opens the iMSTP multiple spanning tree protocol, the MSTP multiple spanning tree protocol is first opened.

其中所述步骤1中,若没有设置iMST生成树子实例,则进行MST多生成树实例拓扑计算,根据多生成树实例拓扑,交换机转发输出数据报文。In step 1, if no iMST spanning tree sub-instance is set, MST multiple spanning tree instance topology calculation is performed, and the switch forwards the output data message according to the multiple spanning tree instance topology.

采用本发明所述的多生成树协议的实现方法,不但解决了现有MSTP协议对QINQ协议和二层VPN协议支持不足的问题,可以区分二层协议下的不同VLAN业务,还增强了VLAN业务的扩展性。Adopting the realization method of the Multiple Spanning Tree Protocol of the present invention not only solves the problem that the existing MSTP protocol supports insufficient QINQ protocol and Layer 2 VPN protocol, but also can distinguish different VLAN services under the Layer 2 protocol, and also enhances the VLAN service scalability.

附图说明Description of drawings

此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。The accompanying drawings described here are used to provide a further understanding of the present invention and constitute a part of the application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations to the present invention.

图1是本发明中QINQ模式下iMST的结构框图;Fig. 1 is the structural block diagram of iMST under the QINQ pattern among the present invention;

图2是本发明中VPLS VLAN模式下iMST的结构框图;Fig. 2 is the structural block diagram of iMST under VPLS VLAN mode among the present invention;

图3是本发明中VPLS VCID模式下iMST的结构框图;Fig. 3 is the structural block diagram of iMST under VPLS VCID mode among the present invention;

图4是本发明的具体实施例的处理流程图;Fig. 4 is the processing flowchart of the specific embodiment of the present invention;

图5是对采用本发明方法组成的IP网络设备系统进行功能验证测试的系统结构图。Fig. 5 is a system structure diagram for performing a function verification test on the IP network equipment system formed by the method of the present invention.

图6是采用本发明方法改造现有的MSTP协议的BPDU报文的结构示意图。Fig. 6 is a schematic diagram of the structure of the BPDU message of the existing MSTP protocol modified by the method of the present invention.

具体实施方式Detailed ways

本发明所述方法,主要包括如下步骤:Method of the present invention mainly comprises the steps:

步骤1,在交换机上开启多生成树协议MSTP、以及基于QINQ或者二层VPN的多生成树协议iMSTP(带有生成树子实例的MSTP协议);对于没有配置多生成树协议iMSTP的交换机,其数据报文直接按照已生成的多生成树MST拓扑进行转发。Step 1, open the Multiple Spanning Tree Protocol MSTP on the switch, and the Multiple Spanning Tree Protocol iMSTP based on QINQ or Layer 2 VPN (the MSTP protocol with a spanning tree sub-instance); Data packets are forwarded directly according to the generated multiple spanning tree (MST) topology.

步骤2,配置生成树子实例,获得生成树子实例拓扑;Step 2, configure the spanning tree sub-instance to obtain the topology of the spanning tree sub-instance;

在进行生成树子实例的配置时,应先进行iMSTP模式的判断,所述iMSTP模式是根据iMSTP ID来标识的,由于VLAN组网方式不同,所述iMSTP ID的取值也不同。When configuring the spanning tree sub-instance, the judgment of the iMSTP mode should be carried out first. The iMSTP mode is identified according to the iMSTP ID. Due to the different VLAN networking methods, the values of the iMSTP ID are also different.

若采用QINQ方式组网,则需要将iMSTP模式设置为QINQ模式,并将QINQ的内层VLAN标签的VLAN ID指定为iMSTP ID;If QINQ is used for networking, you need to set the iMSTP mode to QINQ mode, and specify the VLAN ID of the inner VLAN tag of QINQ as the iMSTP ID;

若采用二层VPN方式组网,需要区分trunk VLAN(二层VPN边缘接口配置成trunk VLAN)方式和VCID方式:If the Layer 2 VPN is used for networking, it is necessary to distinguish between the trunk VLAN (the Layer 2 VPN edge interface is configured as a trunk VLAN) method and the VCID method:

若采用trunk VLAN方式,则将二层VPN边缘接口所配置的trunk值赋给iMSTP ID;If the trunk VLAN mode is used, assign the trunk value configured on the Layer 2 VPN edge interface to the iMSTP ID;

若采用VCID方式,则将各二层VPN中给不同业务所分配的VCID值赋给iMSTP ID;If the VCID method is adopted, assign the VCID value assigned to different services in each Layer 2 VPN to the iMSTP ID;

步骤3,需要经过交换机转发的数据报文进入交换机,并按照生成树子实例拓朴进行转发,可通过专门的命令查询各个生成树子实例的拓朴状态;不同的生成树子实例的拓朴应该不同。Step 3: The data packets that need to be forwarded by the switch enter the switch and are forwarded according to the topology of the spanning tree sub-instances. The topology status of each spanning tree sub-instance can be queried through special commands; the topology of different spanning tree sub-instances should be different.

步骤4,出口交换机输出经过生成树子实例拓朴转发的用户数据。In step 4, the egress switch outputs the user data forwarded through the spanning tree sub-instance topology.

属于不同业务的数据报文都可以按照不同的生成树子实例拓朴进行转发,然后经过报文解析,验证报文的正确性、完整性。Data packets belonging to different services can be forwarded according to different spanning tree sub-instance topologies, and then the correctness and integrity of the packets can be verified through packet analysis.

下面结合附图对本发明的具体实施例作进一步的详细描述。Specific embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings.

如图4所示,本发明中iMSTP处理流程,包括以下步骤:As shown in Figure 4, the iMSTP processing flow in the present invention includes the following steps:

步骤401,交换机收到用户数据报文;Step 401, the switch receives the user data message;

步骤402,交换机判断是否开启MSTP多生成树协议,若是,则转入步骤403,否则,转入步骤408;Step 402, the switch judges whether to open the MSTP multiple spanning tree protocol, if so, then proceed to step 403, otherwise, proceed to step 408;

步骤403,交换机判断是否开启iMSTP多生成树协议,若是,则转入步骤404,否则,转入步骤406;Step 403, the switch judges whether to open the iMSTP multiple spanning tree protocol, if so, then proceed to step 404, otherwise, proceed to step 406;

所述步骤402或步骤403中,开启多生成树协议(MSTP或iMSTP)是这样实现的,即使能交换机上的多生成树实例,在交换机全局配置模式下,开启一使能命令(例如:enable spanning-tree);然后执行该命令指定生成树模式(MSTP或iMSTP)(例如:spanning-tree mode MSTP)。In the step 402 or step 403, enabling the Multiple Spanning Tree Protocol (MSTP or iMSTP) is implemented in such a way that even if the multiple spanning tree instance on the switch is enabled, in the switch global configuration mode, an enabling command (for example: enable spanning-tree); then execute this command to specify the spanning tree mode (MSTP or iMSTP) (for example: spanning-tree mode MSTP).

步骤404,在iMSTP协议报文中增加iMSTP协议字段,根据对iMSTP协议字段的设置,交换机对是否设置iMST生成树子实例进行判断,若是,则转入步骤405,否则,转入步骤406;Step 404, increase the iMSTP protocol field in the iMSTP protocol message, according to the setting of the iMSTP protocol field, the switch judges whether to set the iMST spanning tree sub-instance, if so, then proceed to step 405, otherwise, proceed to step 406;

所述设置iMST子实例,是指在交换网络中增加生成树种类iMST,iMST和MST、SST和RST相互独立,而后应在交换机中增加对iMST支持的模式,即iMSTP模式,但是,iMSTP和MSTP的配置(即拓扑)是相互独立且能够共存的。The setting iMST sub-instance refers to increasing the spanning tree type iMST in the switching network, iMST and MST, SST and RST are independent of each other, and then should increase the mode supported by iMST in the switch, i.e. the iMSTP mode, however, iMSTP and MSTP configurations (i.e. topologies) are independent of each other and can co-exist.

步骤405,进入iMST多生成树协商模式,计算生成树子实例拓扑,然后转入步骤407;Step 405, enter the iMST multi-spanning tree negotiation mode, calculate the spanning tree sub-instance topology, and then turn to step 407;

所述计算生成树子实例拓扑,包括如下步骤:The computing spanning tree sub-instance topology includes the following steps:

步骤5a,进行iMSTP模式判断;Step 5a, judge iMSTP mode;

步骤5b,进行区域根选举;Step 5b, perform regional root election;

步骤5c,进行路径开销计算。In step 5c, path cost calculation is performed.

步骤406,进入MST多生成树协商模式,计算生成树实例拓扑;Step 406, enter the MST multi-spanning tree negotiation mode, and calculate the spanning tree instance topology;

所述计算生成树拓扑,包括如下步骤:The computing spanning tree topology includes the following steps:

步骤6a,进行区域根选举;Step 6a, perform regional root election;

步骤6b,进行路径开销计算。In step 6b, path cost calculation is performed.

步骤407,交换机协议层通知驱动层,按已计算好的拓朴结构生成转发通道;Step 407, the switch protocol layer notifies the driver layer to generate forwarding channels according to the calculated topology;

步骤408,交换机转发经过拓朴后的用户数据报文。Step 408, the switch forwards the user data packets after the topology.

如图6所示,以QINQ协议为例,为了能够提供iMSTP协议支持,针对QINQ接口,改造现有的MSTP协议的BPDU(桥协议数据单元)报文,增加一个长度为18bit的iMSTP(Inside MSTP)协议字段,该字段镶嵌在原有MSTP协议字段内部,标识QINQ接口所属MST实例中的iMST子实例,该iMST子实例对应内层VLAN标签的VLAN ID(即,嵌套的802.1Q标签所表示的生成树实例号)指定为iMSTP ID,iMSTP ID协议字段的其他部分与现有的MSTP ID字段一样。As shown in Figure 6, taking the QINQ protocol as an example, in order to provide iMSTP protocol support, for the QINQ interface, the BPDU (Bridge Protocol Data Unit) message of the existing MSTP protocol is transformed, and an iMSTP (Inside MSTP) message with a length of 18 bits is added. ) protocol field, which is embedded in the original MSTP protocol field, and identifies the iMST sub-instance in the MST instance to which the QINQ interface belongs. Spanning tree instance number) is specified as the iMSTP ID, and other parts of the iMSTP ID protocol field are the same as the existing MSTP ID field.

上述iMST子实例在进行配置前,首先在QINQ交换网中,增加生成树种类iMST,增加iMST生成树与增加MST生成树的方式都是一样的,且增加后的iMST与MST、SST、RST都是相互独立的;然后对增加的生成树子实例进行配置(增加的iMST生成树子实例的配置独立于现有的MST生成树实例配置,但是二者却是可以共存的)。Before configuring the above iMST sub-instance, first add the spanning tree type iMST in the QINQ switching network. are independent of each other; then configure the added spanning tree sub-instance (the configuration of the added iMST spanning tree sub-instance is independent of the configuration of the existing MST spanning tree instance, but the two can coexist).

iMST称为“子实例”,用实例号表示为x.y,其中x为实例号,y为子实例号。x表示在没有设置生成树子实例情况下,MST的实例号,它可对应于一些列的VLAN的集合(在QINQ条件下,即位于外层VLAN标签的集合);y表示在设置了生成树子实例的情况下,iMST子实例号对应于内层私网VLAN的集合(在QINQ条件下,即位于内层VLAN标签的集合)。The iMST is called a "sub-instance", which is represented by an instance number as x.y, where x is the instance number and y is the sub-instance number. x represents the instance number of the MST when the spanning tree sub-instance is not set, which can correspond to a set of VLANs in a series (under QINQ conditions, that is, the set of outer VLAN tags); y represents the set of spanning tree In the case of a sub-instance, the iMST sub-instance number corresponds to the set of inner private network VLANs (under the condition of QINQ, that is, the set of inner VLAN tags).

例如,在QINQ条件下,外层VLAN记为VLAN10,内层VLAN记为VLAN20,可以设定MST实例1对应于外层VLAN标签VLAN10,而iMST实例1.1对应于内层VLAN标签VLAN20,那么当iMST启用,数据报文进行交互时,所走的拓朴环境就由内层的VLAN20决定,而并非外层的VLAN10。不同的iMST子实例可以挂在同一个MST实例下,如图1所示。For example, under the condition of QINQ, the outer VLAN is marked as VLAN10, and the inner VLAN is marked as VLAN20. It can be set that MST instance 1 corresponds to the outer VLAN tag VLAN10, and iMST instance 1.1 corresponds to the inner VLAN tag VLAN20. Then when iMST If enabled, when data packets interact, the topological environment will be determined by the inner VLAN20 instead of the outer VLAN10. Different iMST sub-instances can be linked to the same MST instance, as shown in Figure 1.

iSMT子实例必须依附于MST实例,但如果不清楚公网VLAN ID到底为何值、或者根本无需按照公网VLAN标签进行生成树计算,那么可以采用设置MST实例1VLAN ID1-4094(对于QINQ协议,带VLAN标签的数据报文中,有一个12bit长度的VLAN ID字段,该字段用于存放VLAN ID值,该值的取值空间为1至4094)的方法,所有iMST子实例绑定MST实例1,即1.y。The iSMT sub-instance must be attached to the MST instance, but if you don’t know what the value of the public network VLAN ID is, or you don’t need to calculate the spanning tree according to the public network VLAN tag, you can set the MST instance 1 VLAN ID1-4094 (for the QINQ protocol, with In the data packet of the VLAN tag, there is a 12-bit VLAN ID field, which is used to store the VLAN ID value, and the value space of this value is from 1 to 4094). All iMST sub-instances are bound to MST instance 1, That is 1.y.

对于二层VPN协议,以VPLS(虚拟专用局域网)协议为例,为了能够提供iMSTP协议支持,在进行iMST配置时,首先应该解决iMST对于VPLS的支持上的一难点,即私网内层VLAN标签的不确定性。所谓私网内层标签的不确定性,针对的是交换机(具体是指具有MPLS功能的高端路由交换机)。For the Layer 2 VPN protocol, take VPLS (Virtual Private Local Area Network) protocol as an example. In order to provide iMSTP protocol support, when configuring iMST, you should first solve a difficulty in iMST’s support for VPLS, that is, the inner VLAN tag of the private network. uncertainty. The so-called uncertainty of the inner label of the private network is aimed at switches (specifically, high-end routing switches with MPLS functions).

若要解决上述难点,那么应该先获得PE入口侧端口的封装方式(PE入口侧端口的封装模式决定了二层VPN内存标签的实现方式),在VPLS网络中,在PE侧xconnect接口有两种封装方式:access VLAN和trunk VLAN。To solve the above difficulties, you should first obtain the encapsulation mode of the PE ingress port (the encapsulation mode of the PE ingress port determines the implementation of Layer 2 VPN memory labels). In the VPLS network, there are two types of xconnect interfaces on the PE side. Encapsulation method: access VLAN and trunk VLAN.

若PE侧xconnect接口已经配置为trunk方式,由于增加了iMST的配置模式的VPLS VLAN网,针对VPLS报文特点,MPLS标签内封装的VLAN标签进行生成树子实例匹配。这种方式类似于QINQ方式,iMSTP将PE侧xconnect接口trunk封装值所匹配的iSMT子实例填充到交换机BPDU报文中的iMSTP ID字段,采用对P路由交换机逐一配置,在进行MPLS标签分配之前,就计算好生成树子实例拓朴,如图2所示,其余可以沿用QINQ方式进行实施。If the xconnect interface on the PE side has been configured in the trunk mode, due to the addition of the VPLS VLAN network in the iMST configuration mode, according to the characteristics of the VPLS packet, the VLAN tag encapsulated in the MPLS tag is used for spanning tree sub-instance matching. This method is similar to the QINQ method. iMSTP fills the iMSTP ID field in the BPDU message of the switch with the iSMT sub-instance matching the trunk encapsulation value of the xconnect interface on the PE side, and configures the P routing switches one by one. Before MPLS label distribution, After the spanning tree sub-instance topology is calculated, as shown in Figure 2, the rest can be implemented using the QINQ method.

若PE侧xconnect接口配置为access方式,对于access VLAN,私网内层标签是不会携带802.1Q标签的,这样就给区分私网带来困难,而且目前的VPLS内层标签分配采用空闲、随机的方式,从16-1048575随机分配,难以预先知道VPLS内层标记具体是如何分配的。If the xconnect interface on the PE side is configured as the access mode, for the access VLAN, the inner label of the private network will not carry the 802.1Q label, which will make it difficult to distinguish the private network. The method is randomly allocated from 16 to 1048575, and it is difficult to know in advance how the VPLS inner layer marks are allocated.

为了解决上述问题,在PE侧xconnect接口进行VCID的配置,将各二层VPN中给不同业务所分配的VCID值赋给iMSTP ID,即,增加iMSTP配置模式下VPLS VCID功能,该功能表示私网业务按照自身VCID进行区分,iMSTP将私网VPN VCID值去配置iMST子实例并填充到交换机BPDU报文中的iMSTPID字段,并且在P路由交换机上逐一配置,以此计算并建立新的基于VCID的拓朴,在此基础上进行TCP报文握手、建立MPLS标签绑定,如图3所示,其余可以沿用QINQ方式进行实施。In order to solve the above problems, VCID configuration is performed on the xconnect interface on the PE side, and the VCID values assigned to different services in each Layer 2 VPN are assigned to the iMSTP ID, that is, the VPLS VCID function in the iMSTP configuration mode is added. The business is distinguished according to its own VCID. iMSTP configures the iMST sub-instance with the private network VPN VCID value and fills it into the iMSTPID field in the switch BPDU message, and configures it one by one on the P routing switch to calculate and establish a new VCID-based Topology, on this basis, perform TCP message handshake and establish MPLS label binding, as shown in Figure 3, and the rest can be implemented in the QINQ mode.

综上所述,对于二层VPN协议,在进行生成树子实例拓朴计算时,仅需要确定内层标签值和iMSTP ID的一一对应的关系,若确定了二层VPN的内存标签(即一个入参数),则可套用QINQ内存标签(即一个入参数)的解决方式,将这个入参数代入拓朴计算方法中,得出生成树子实例拓朴。To sum up, for the Layer 2 VPN protocol, when calculating the topology of the spanning tree sub-instance, it is only necessary to determine the one-to-one correspondence between the inner label value and the iMSTP ID. If the memory label of the Layer 2 VPN is determined (ie One input parameter), then the solution of QINQ memory tag (that is, one input parameter) can be applied, and this input parameter is substituted into the topology calculation method to obtain the spanning tree sub-instance topology.

图5是本发明对IP网络设备进行功能验证测试的系统结构图,使用测试仪的两个端口分别与被测试设备的两个用户接入端口相连,分别记作端口1和端口2,四台被测设备组成环网。Fig. 5 is the system structural diagram that the present invention carries out functional verification test to IP network equipment, uses two ports of tester to be connected with two user access ports of tested equipment respectively, is denoted as port 1 and port 2 respectively, four The devices under test form a ring network.

若所述被测设备的iMSTP模式采用QINQ方式组网,则具体测试步骤包括:If the iMSTP mode of the device under test adopts the QINQ mode networking, the specific test steps include:

步骤1,被测设备所有互联接口配置成QINQ接口,并且连接测试仪的两台被测设备起到PE作用,将用户侧单802.1Q标签的报文转换成为公网上双802.1Q标签的报文;Step 1. Configure all interconnection interfaces of the device under test as QINQ interfaces, and the two devices under test connected to the tester function as PEs, converting packets with a single 802.1Q label on the user side into packets with dual 802.1Q labels on the public network ;

步骤2,在所有被测设备上配置iMSTP,针对用户侧的不同VLAN映射iMSTP子实例,设置iMSTP模式为QINQ,完成iMSTP配置后即可观察子生成树(iMSTP)建立情况;Step 2, configure iMSTP on all devices under test, map iMSTP sub-instances for different VLANs on the user side, set the iMSTP mode to QINQ, and observe the establishment of the sub-spanning tree (iMSTP) after completing the iMSTP configuration;

步骤3,测试仪1端口、2端口互发各种802.1Q标签的用户报文,然后在各个被测设备上观察流量流经情况,可以尝试断去其中一些链路,考察流量是否会中断。Step 3: Ports 1 and 2 of the tester send user packets with various 802.1Q tags to each other, and then observe the flow of traffic on each device under test. You can try to disconnect some of the links to check whether the traffic will be interrupted.

若所述被测设备的iMSTP模式采用二层VPN模式组网,则具体测试步骤包括:If the iMSTP mode of the device under test adopts Layer 2 VPN mode networking, the specific test steps include:

步骤1,将与测试仪直连的设备上配置VFI用户接口,并将VCID与iMSTP子实例进行映射;设置iMSTP模式为VPLS VCID;完成iMSTP配置后即可观察子生成树(iMST)建立情况;Step 1, configure the VFI user interface on the device directly connected to the tester, and map the VCID with the iMSTP sub-instance; set the iMSTP mode to VPLS VCID; after completing the iMSTP configuration, you can observe the establishment of the sub-spanning tree (iMST);

步骤2,设备上配置VPLS,可以观察VPLS标签是否分配成功、PW伪线是否建立成功;Step 2, configure VPLS on the device, you can observe whether the VPLS label is assigned successfully and whether the PW pseudowire is successfully established;

步骤3,测试仪端口1、端口2互发各种VFI用户报文,然后在各个被测设备上观察流量流经情况;可以尝试断去其中一些链路,考察流量是否会中断;Step 3: Port 1 and port 2 of the tester send various VFI user messages to each other, and then observe the flow of traffic on each device under test; you can try to disconnect some of the links to check whether the traffic will be interrupted;

步骤4,改变iMSTP模式为VPLS VLAN,重复步骤2、3。Step 4, change the iMSTP mode to VPLS VLAN, repeat steps 2 and 3.

所述被测IP网络设备需具备如下功能,VLAN相关功能、QINQ功能、路由功能、二层VPN功能;The IP network device under test needs to have the following functions, VLAN-related functions, QINQ functions, routing functions, and Layer 2 VPN functions;

所述VLAN相关功能包括,用户VLAN隔离功能、802.1Q封装功能。所述QINQ功能包括,支持双Q标签的二层数据转发。所述路由功能包括,用于通过配置生成路由,建立L2VPN伪线。所述二层VPN功能包括,支持VPLS、VPWS(Virtual Private Wire Service,虚拟专用线路服务)等功能。The VLAN-related functions include user VLAN isolation and 802.1Q encapsulation. The QINQ function includes supporting Layer 2 data forwarding with double Q labels. The routing function includes generating routes through configuration and establishing L2VPN pseudowires. The Layer 2 VPN function includes supporting functions such as VPLS and VPWS (Virtual Private Wire Service, Virtual Private Wire Service).

所述测试仪包括:配置模块:根据对接设备的借口类型进行相应的配置,根据测试需求配置整机测试的流量等;发送模块:对配置好的测试流量进行发送;收模块:接收被测设备发送的流量并进行统计计算等。The tester includes: configuration module: perform corresponding configuration according to the interface type of the docking device, and configure the traffic of the whole machine test according to the test requirements; sending module: send the configured test traffic; receive module: receive the device under test Send traffic and perform statistical calculations, etc.

以上所述的实施例,是本发明较优选的两种方式,本领域的技术人员在本发明的技术方案范围内进行的任何通常变化和替换都应该包含在本发明的保护范围内。The above-described embodiments are two preferred modes of the present invention, and any common changes and substitutions made by those skilled in the art within the scope of the technical solutions of the present invention should be included in the protection scope of the present invention.

Claims (4)

1. the implementation method of a Multiple Spanning Tree Protocol is characterized in that, comprises the steps:
Step 1, need to enter switch through the data message that switch is transmitted, switch is opened and is had the Multiple Spanning Tree Protocol iMSTP that generates the tree example, in protocol massages, increase the iMSTP protocol fields, and according to being provided with of iMSTP protocol fields obtained the setting that iMST generates the tree example, be provided with iMSTP ID in the described iMSTP protocol fields, the value of described iMSTP ID is to be determined by the VLAN networking mode, if adopt the networking of QINQ mode, then iMSTP ID value is the VLAN ID of the inner VLAN label of QINQ; If adopt the networking of two-layer VPN mode, then iMSTP ID value is to VCID value that different business distributed in the trunk value that disposed of two-layer VPN edge interface or the two-layer VPN;
Step 2 is carried out the iMSTP pattern according to the iMSTP ID that is provided with in the described iMSTP protocol fields and is judged, generates tree example topology and calculates;
Step 3, switch are transmitted output through generating the data message that tree example topology is transmitted.
2. the implementation method of Multiple Spanning Tree Protocol as claimed in claim 1 is characterized in that, in the described step 2, calculates and generates tree example topology, comprises the steps:
Step 2b carries out regional root election;
Step 2c carries out path cost and calculates.
3. the implementation method of Multiple Spanning Tree Protocol as claimed in claim 1 is characterized in that, in the described step 1,
Before carrying out switch unlatching iMSTP Multiple Spanning Tree Protocol, carry out the unlatching of MSTP Multiple Spanning Tree Protocol earlier.
4. the implementation method of Multiple Spanning Tree Protocol as claimed in claim 3 is characterized in that, in the described step 1,
Do not generate the tree example if iMST is set, then carry out MST Multiple Spanning Tree Instance topology and calculate, according to the Multiple Spanning Tree Instance topology, switch is transmitted the dateout message.
CN2007101883971A 2007-11-21 2007-11-21 A Realization Method of Multiple Spanning Tree Protocol Expired - Fee Related CN101188564B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007101883971A CN101188564B (en) 2007-11-21 2007-11-21 A Realization Method of Multiple Spanning Tree Protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007101883971A CN101188564B (en) 2007-11-21 2007-11-21 A Realization Method of Multiple Spanning Tree Protocol

Publications (2)

Publication Number Publication Date
CN101188564A CN101188564A (en) 2008-05-28
CN101188564B true CN101188564B (en) 2010-06-02

Family

ID=39480760

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007101883971A Expired - Fee Related CN101188564B (en) 2007-11-21 2007-11-21 A Realization Method of Multiple Spanning Tree Protocol

Country Status (1)

Country Link
CN (1) CN101188564B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101854358B (en) * 2010-05-10 2013-01-23 北京东土科技股份有限公司 Realization method of multiple-spanning-tree link switching performance optimization
CN101873229B (en) * 2010-06-24 2013-02-27 东软集团股份有限公司 Network topology discover method and device based on SNMP (Simple Network Management Protocol)
CN103621012A (en) * 2011-06-20 2014-03-05 赫思曼自动化控制有限公司 Method for reactionless, redundant coupling of communication networks by means of the rapid spanning tree protocol
DE102011082965A1 (en) 2011-09-19 2013-01-24 Siemens Aktiengesellschaft Method for operating a network arrangement and network arrangement
KR102543905B1 (en) * 2018-08-13 2023-06-15 삼성전자 주식회사 Method and apparatus for providing 5g ethernet service
CN115967591B (en) * 2021-10-11 2025-04-01 中国电信股份有限公司 QinQ message processing method and device, storage medium and electronic device
CN114070788B (en) * 2021-11-05 2023-03-24 电信科学技术第五研究所有限公司 Method for realizing STP by switch under switching chip not supporting STP

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1510873A (en) * 2002-12-26 2004-07-07 华为技术有限公司 Implementation Method of Domain Root Switching Based on Multiple Spanning Tree Protocol
CN1521985A (en) * 2003-01-28 2004-08-18 华为技术有限公司 A Priority Coordination Method for Multiple Spanning Tree Protocol Bridges

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1510873A (en) * 2002-12-26 2004-07-07 华为技术有限公司 Implementation Method of Domain Root Switching Based on Multiple Spanning Tree Protocol
CN1521985A (en) * 2003-01-28 2004-08-18 华为技术有限公司 A Priority Coordination Method for Multiple Spanning Tree Protocol Bridges

Also Published As

Publication number Publication date
CN101188564A (en) 2008-05-28

Similar Documents

Publication Publication Date Title
CN111901235B (en) Method and device for processing routing, and method and device for data transmission
CN104937885B (en) Global VLAN for fabric switches
CN101188564B (en) A Realization Method of Multiple Spanning Tree Protocol
US8964745B2 (en) SPB based multicast forwarding method and SPBM bridge
CN105591868B (en) A kind of cut-in method and device of Virtual Private Network VPN
US9853833B2 (en) Individual virtual private local area network service conversion to a different virtual private network service
CN102611618B (en) Route protection converting method and device
CN102185711B (en) Method and equipment for detecting link failure in hybrid network
US20120147893A1 (en) E-Tree Interoperability Between MPLS Domain Devices and Ethernet Domain Devices
Fang et al. The evolution of carrier ethernet services-requirements and deployment case studies [next-generation carrier ethernet]
CN105515802B (en) Network virtualization method and device
CN101047636B (en) Method and system for end-to-end pseudowire emulation virtual leased line access virtual private network
WO2021208664A1 (en) Message detection method, device and system
CN103188123B (en) Method for realizing E-tree service and provider edge devices
CN100428737C (en) A Method to Simplify VPN Network Deployment
CN105812198B (en) Method and device for monitoring end-to-end of bridge network
WO2011038646A1 (en) Two-layer forwarding method for a pseudo wire (pw) service and system thereof
Allan et al. Provider link state bridging
CN101247334B (en) Virtual private local area network service network and implementation method and provider edge router
CN101170514A (en) Method and device for implementing access control between access circuit interfaces
CN104601426B (en) Network edge device reconstructing method and device
CN103379187A (en) Data processing method and gateway network element
CN103634210B (en) Find the method and apparatus of the opposite end PE equipment of VPLS example
CN104717119A (en) Method and system for realizing bridge connection between L2 VPN and L3 VPN
CN100531157C (en) Method for realizing two-layer VPN and three-layer VPN interconnecting and interworking

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100602

Termination date: 20161121

CF01 Termination of patent right due to non-payment of annual fee