CN102916878B - Send method and the border router of message - Google Patents

Send method and the border router of message Download PDF

Info

Publication number
CN102916878B
CN102916878B CN201210456882.3A CN201210456882A CN102916878B CN 102916878 B CN102916878 B CN 102916878B CN 201210456882 A CN201210456882 A CN 201210456882A CN 102916878 B CN102916878 B CN 102916878B
Authority
CN
China
Prior art keywords
address
tlv
adjacent
message
path information
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.)
Active
Application number
CN201210456882.3A
Other languages
Chinese (zh)
Other versions
CN102916878A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201210456882.3A priority Critical patent/CN102916878B/en
Publication of CN102916878A publication Critical patent/CN102916878A/en
Application granted granted Critical
Publication of CN102916878B publication Critical patent/CN102916878B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the present invention provides a kind of method and the border router that send message, the method comprises the first message for setting up the first pseudo-circuit PW that ASBR2 receives ASBR1 transmission, according to a FEC TLV, first source IP address and the first corresponding relation determine the address of ASBR3 adjacent with the 3rd AS in the 2nd AS, and according to a FEC TLV, first source IP address and the second corresponding relation determine the address of ASBR4 adjacent with the 2nd AS in the 3rd AS, ASBR2 sends to ASBR3 the border router that the first message achieves to next AS and sends the first message for setting up a PW, set up the head node of PW without the need to obtaining the border router information of whole network, thus the border router information of non-adjacent AS overcomes when can not be known, be difficult to the shortcoming realizing multi-segment pseudo-wires road.

Description

发送报文的方法以及边界路由器Method of sending packets and border routers

技术领域 technical field

本发明实施例涉及通信技术领域,尤其涉及一种发送报文的方法以及边界路由器。The embodiment of the present invention relates to the technical field of communication, and in particular to a method for sending a message and a border router.

背景技术 Background technique

随着L2VPN技术的不断发展,L2VPN业务在运营商中的应用越来越多,其应用的场景也越来越多样。With the continuous development of L2VPN technology, more and more L2VPN services are used in operators, and the application scenarios are more and more diverse.

一般情况下,L2VPN业务可以通过在终端边界网络设备(TerminatingProvider Edge,以下简称:T-PE)之间建立伪线(Pseudowire,以下简称:PW)实现,目前,多采用在T-PE之间建立多段伪线路(Multi-Segment Pseudowire,以下简称:MS-PW),在进行MS-PW的配置时,各厂商广泛采用手工配置的方式来实现,而手工配置在运维中存在诸多不便,如当存在大量的L2VPN业务时,配置、维护、修改等都是非常繁琐的过程,所以动态MS-PW方案应运而生。In general, L2VPN services can be implemented by establishing a pseudowire (Pseudowire, hereinafter referred to as: PW) between terminal edge network devices (TerminatingProvider Edge, hereinafter referred to as: T-PE). Multi-Segment Pseudowire (hereinafter referred to as: MS-PW), when configuring MS-PW, various manufacturers widely use manual configuration to implement, but manual configuration has many inconveniences in operation and maintenance, such as when When there are a large number of L2VPN services, configuration, maintenance, and modification are very cumbersome processes, so the dynamic MS-PW solution emerges as the times require.

现有技术给出了一种通过配置显示路由器跳(Explicit Routing Hop)来实现转发等价类(Forwarding Equivalence Class,以下简称:FEC)报文逐跳转发,到达对端T-PE的技术方案,图1为现有技术实现动态MS-PW的示意图,如图1所示,给出了从本端T-PE1到对端T-PE2的链路,包括自治域(Autonomous Systems,以下简称AS)AS1、AS2……ASN共N个AS,其中T-PE1位于AS1中,T-PE2位于ASN中,边界路由器(Autonomous SystemsBorder Router,以下简称:ASBR)ASBR1为AS1的边界路由器,ASBR2和ASBR3为AS2的两个边界路由器,ASBRN为ASN的边界路由器。首先,T-PE1生成FEC报文0,其中包括整个伪线路中的边界路由器及目的伪线路终端边界网路设备信息,如ASBR1、ASBR2、ASBR3……ASBR2,T-PE2。T-PE1将FEC报文0发送给本自治域AS1的边界路由器ASBR1,ASBR1收到FEC报文0后,将自己从报文0中删除,更新为报文1,将报文1转发给下一个边界路由器,即自治域AS2的边界路由器ASBR2,ASBR2收到报文1后,再将自己从报文中删除,更新为报文2,将报文2转发给下一个边界路由器,即本自治域AS2的边界路由器ASBR3,中间省略的自治域的边界路由器重复上述动作,直到与对端T-PE2相连的边界路由器ASBRN收到上一个自治域的边界路由器转发来的报文N-1,ASBRN将自己从报文中删除,更新为报文N,将报文N直接递交给对端T-PE2,对端T-PE2根据接收策略进行内容匹配,若匹配成功,接收报文,匹配失败,直接丢弃。The existing technology provides a technical solution for forwarding equivalence class (Forwarding Equivalence Class, hereinafter referred to as: FEC) packets by hop-by-hop forwarding by configuring Explicit Routing Hop (Explicit Routing Hop) to reach the peer T-PE. , Figure 1 is a schematic diagram of implementing dynamic MS-PW in the prior art. ) AS1, AS2...ASN has N ASs in total, among which T-PE1 is located in AS1, T-PE2 is located in ASN, the border router (Autonomous Systems Border Router, hereinafter referred to as: ASBR) ASBR1 is the border router of AS1, ASBR2 and ASBR3 are Two border routers of AS2, ASBRN is the border router of ASN. First, T-PE1 generates FEC message 0, which includes the border routers in the entire pseudowire and the border network device information of the destination pseudowire terminal, such as ASBR1, ASBR2, ASBR3...ASBR2, T-PE2. T-PE1 sends FEC packet 0 to the border router ASBR1 of AS1 in the autonomous domain. After receiving FEC packet 0, ASBR1 deletes itself from packet 0, updates it to packet 1, and forwards packet 1 to the next A border router, that is, the border router ASBR2 of the autonomous domain AS2. After receiving message 1, ASBR2 deletes itself from the message, updates it to message 2, and forwards message 2 to the next border router, that is, the autonomous The border router ASBR3 of the domain AS2 and the border router of the autonomous domain omitted in the middle repeat the above actions until the border router ASBRN connected to the peer T-PE2 receives the message N-1 forwarded by the border router of the previous autonomous domain, ASBRN Delete itself from the message, update it to message N, and directly submit the message N to the peer T-PE2, and the peer T-PE2 performs content matching according to the receiving policy. If the match is successful, receive the message, and the match fails. Just discard.

在实现本发明的过程中,发明人发现现有技术中至少存在如下问题:In the process of realizing the present invention, the inventor finds that there are at least the following problems in the prior art:

由上述现有技术可知,为了保证MS-PW的正常通信,T-PE1或T-PE2要预先了解整个MS-PW路径中所有自治域的边界路由器信息,在跨多个自治域的场景中,非相邻的自治域的边界路由器信息在有些情况下是不可获知的,此时,用于建立PW的报文可能无法从一个AS发送到另一个AS,使得动态MS-PW技术将无法实施。It can be known from the above prior art that in order to ensure the normal communication of the MS-PW, T-PE1 or T-PE2 must know the border router information of all autonomous domains in the entire MS-PW path in advance. In the scenario of crossing multiple autonomous domains, In some cases, the border router information of non-adjacent autonomous domains cannot be known. At this time, the message used to establish a PW may not be sent from one AS to another AS, so that the dynamic MS-PW technology will not be implemented.

发明内容 Contents of the invention

本发明实施例提供一种发送报文的方法以及边界路由器,用于建立多段伪线路。The embodiment of the present invention provides a method for sending a message and a border router, which are used to establish a multi-segment pseudo-wire.

本发明第一方面提供一种发送报文的方法,所述方法应用于至少包括第一自治域(AS)、第二AS和第三AS的网络中,且所述第一AS与所述第二AS相邻,所述第三AS与所述第二AS相邻,所述方法包括:The first aspect of the present invention provides a method for sending messages, the method is applied to a network including at least a first autonomous domain (AS), a second AS, and a third AS, and the first AS and the second AS Two ASs are adjacent, the third AS is adjacent to the second AS, and the method includes:

所述第二AS中与所述第一AS相邻的边界路由器(ASBR2)接收所述第一AS中与所述第二AS相邻的ASBR1发送的用于建立第一伪线路PW的第一报文,所述第一报文包括第一转发等价类类型长度值(TLV)和第一路径信息TLV,所述第一路径信息TLV中包括第一源IP地址和第一目的IP地址,所述第一源IP地址包括第一PE的地址,所述第一目的IP地址包括第二PE的地址,所述第一PE为所述第一PW的第一端点,所述第二PE为所述第一PW的第二端点;The border router (ASBR2) adjacent to the first AS in the second AS receives the first message for establishing the first pseudowire PW sent by the ASBR1 adjacent to the second AS in the first AS. A message, the first message includes a first forwarding equivalence class type length value (TLV) and a first path information TLV, and the first path information TLV includes a first source IP address and a first destination IP address, The first source IP address includes an address of a first PE, the first destination IP address includes an address of a second PE, the first PE is a first end point of the first PW, and the second PE being the second endpoint of the first PW;

当所述第二PE在所述第二AS之外时,所述ASBR2根据所述第一转发等价类TLV、所述第一源IP地址和第一对应关系确定所述第二AS中与所述第三AS相邻的ASBR3的地址,所述第一对应关系包括所述第一转发等价类TLV、所述第一源IP地址和所述ASBR3的地址的对应关系;以及,所述ASBR2根据所述第一转发等价类TLV、所述第一源IP地址和第二对应关系确定所述第三AS中与所述第二AS相邻的ASBR4的地址,所述第二对应关系包括所述第一转发等价类TLV、所述第一源IP地址和所述ASBR4的地址的对应关系;When the second PE is outside the second AS, the ASBR2 determines according to the first forwarding equivalence class TLV, the first source IP address, and the first corresponding relationship The address of the ASBR3 adjacent to the third AS, the first correspondence includes the correspondence between the first forwarding equivalence class TLV, the first source IP address, and the address of the ASBR3; and, the ASBR2 determines the address of ASBR4 adjacent to the second AS in the third AS according to the first forwarding equivalence class TLV, the first source IP address, and a second correspondence, and the second correspondence including the correspondence between the first forwarding equivalence class TLV, the first source IP address, and the address of the ASBR4;

所述ASBR2向所述ASBR3发送第一报文,被所述ASBR2发送给所述ASBR3的第一报文的第一路径信息TLV中包括所述第一源IP地址和所述ASBR4的地址。The ASBR2 sends a first packet to the ASBR3, and the first path information TLV of the first packet sent by the ASBR2 to the ASBR3 includes the first source IP address and the address of the ASBR4.

在根据第一方面的第一种可能的实现方式中,具体实现为:所述第一对应关系和所述第二对应关系被配置到所述ASBR2中,或,所述ASBR2通过学习的方式获取所述第一对应关系和所述第二对应关系。In the first possible implementation manner according to the first aspect, the specific implementation is as follows: the first correspondence and the second correspondence are configured in the ASBR2, or the ASBR2 acquires the The first corresponding relationship and the second corresponding relationship.

在根据第一方面的第二种可能的实现方式中,具体实现为:所述ASBR2通过学习的方式获取所述第一对应关系和所述第二对应关系包括:In a second possible implementation manner according to the first aspect, the specific implementation is: the ASBR2 acquiring the first correspondence and the second correspondence through learning includes:

所述ASBR2接收所述第二PE发送的用于建立所述第一PW的第二报文,所述第二报文包括第二转发等价类TLV和第二路径信息TLV,所述第二路径信息TLV包括第二源IP地址、第二目的IP地址、所述ASBR1的地址、所述ASBR2的地址、所述ASBR3的地址和所述ASBR4的地址,所述第二源IP地址为所述第二PE的地址,所述第二目的IP地址为所述第一PE的地址;The ASBR2 receives a second packet sent by the second PE for establishing the first PW, the second packet includes a second forwarding equivalence class TLV and a second path information TLV, and the second The path information TLV includes a second source IP address, a second destination IP address, the address of the ASBR1, the address of the ASBR2, the address of the ASBR3, and the address of the ASBR4, and the second source IP address is the The address of the second PE, the second destination IP address is the address of the first PE;

所述ASBR2在确定所述第一报文和所述第二报文均为用于建立所述第一PW的报文并且确定所述ASBR3为所述第二AS中与所述第三AS相邻的ASBR后,生成所述第一对应关系;When the ASBR2 determines that the first packet and the second packet are both packets used to establish the first PW and determines that the ASBR3 is the second AS, it is related to the third AS After the adjacent ASBR, generate the first corresponding relationship;

所述ASBR2在确定所述第一报文和所述第二报文均为用于建立所述第一PW的报文并且确定所述ASBR4为所述第三AS中与所述第二AS相连的ASBR后,生成所述第二对应关系。The ASBR2 is connected to the second AS after determining that the first message and the second message are both messages used to establish the first PW and determining that the ASBR4 is the third AS After the ASBR, generate the second corresponding relationship.

本发明第二方面提供一种发送报文的方法,所述方法应用于至少包括第一AS、第二AS和第三AS的网络中,所述第一AS与所述第二AS相邻,所述第二AS和所述第三AS相邻,所述第二AS中包括采用静态方式配置的多段伪线,所述方法包括:The second aspect of the present invention provides a method for sending packets, the method is applied in a network including at least a first AS, a second AS and a third AS, the first AS is adjacent to the second AS, The second AS is adjacent to the third AS, the second AS includes multiple pseudowires configured in a static manner, and the method includes:

所述第二AS中与所述第一AS相邻的ASBR2接收所述第一AS中与所述第二AS相邻的ASBR1发送的用于建立第一PW的第一报文,所述第一报文包括第一转发等价类类型长度值(TLV)和第一路径信息TLV,所述第一路径信息TLV中包括第一源IP地址和第一目的IP地址,所述第一源IP地址包括第一PE的地址,所述第一目的IP地址包括第二PE的地址,所述第一PE为所述第一PW的第一端点,所述第二PE为所述第一PW的第二端点,所述第一路径信息TLV中的U比特和F比特的取值均为1,所述ASBR2为所述采用静态方式配置的多段伪线的一个端点;The ASBR2 adjacent to the first AS in the second AS receives the first packet for establishing the first PW sent by the ASBR1 adjacent to the second AS in the first AS, and the second AS A message includes a first forwarding equivalence class type length value (TLV) and a first path information TLV, the first path information TLV includes a first source IP address and a first destination IP address, and the first source IP The address includes the address of the first PE, the first destination IP address includes the address of the second PE, the first PE is the first endpoint of the first PW, and the second PE is the first PW The second endpoint of the first path information TLV, the value of the U bit and the F bit in the first path information TLV are both 1, and the ASBR2 is an endpoint of the statically configured multi-segment pseudowire;

所述ASBR2在确定U比特和F比特的取值均为1后,按照所述采用静态方式配置的多段伪线的转发规则转发包括所述第一路径信息TLV的第一报文。The ASBR2 forwards the first packet including the first path information TLV according to the forwarding rule of the statically configured multi-segment pseudowire after determining that the values of the U bit and the F bit are both 1.

本发明第三方面提供一种发送报文的方法,所述方法应用于包括第一AS、第二AS和第三AS的网络中,所述第一AS与所述第二AS相邻,所述第二AS和所述第三AS相邻,所述第一AS包括采用静态方式配置的多段伪线,所述方法包括:A third aspect of the present invention provides a method for sending packets, the method is applied to a network including a first AS, a second AS, and a third AS, the first AS is adjacent to the second AS, and the The second AS is adjacent to the third AS, the first AS includes a statically configured multi-segment pseudowire, and the method includes:

所述第二AS中与所述第一AS相邻的ASBR2从所述第二AS中与所述第三AS相邻的ASBR3接收用于建立第一PW的第一报文,所述第一报文包括第一转发等价类类型长度值(TLV)和第一路径信息TLV,所述第一路径信息TLV包括所述ASBR3的地址和所述第三AS中与所述第二AS相邻的ASBR4的地址;ASBR2 adjacent to the first AS in the second AS receives a first packet for establishing a first PW from ASBR3 adjacent to the third AS in the second AS, and the first The message includes a first forwarding equivalence class type length value (TLV) and a first path information TLV, and the first path information TLV includes the address of the ASBR3 and the address of the third AS adjacent to the second AS The address of the ASBR4;

所述ASBR2从所述第一AS中与所述第二AS相邻的ASBR1接收用于建立第一PW的第二报文,所述第二报文包括第二转发等价类TLV,所述ASBR1为所述采用静态方式配置的多段伪线的一个端点;The ASBR2 receives a second message for establishing the first PW from the ASBR1 adjacent to the second AS in the first AS, the second message includes a second forwarding equivalence class TLV, and the ASBR1 is an endpoint of the statically configured multi-segment pseudowire;

所述ASBR2在确定所述第一报文和所述第二报文均用于建立所述第一PW后,在所述第二报文中增加第二路径信息TLV,所述第二路径信息TLV包括所述ASBR4的地址;After the ASBR2 determines that both the first message and the second message are used to establish the first PW, it adds a second path information TLV to the second message, and the second path information TLV includes the address of said ASBR4;

所述ASBR2将携带有所述第二路径信息TLV的所述第二报文发送至所述ASBR3,其中所述ASBR4的地址用于指示所述ASBR3将携带有所述第二路径信息TLV的所述第二报文发送至所述ASBR4。The ASBR2 sends the second packet carrying the second path information TLV to the ASBR3, wherein the address of the ASBR4 is used to indicate that the ASBR3 will carry all the packets carrying the second path information TLV Send the second packet to the ASBR4.

在根据第三方面的第一种可能的实现方式中,具体实现为:所述方法还包括:In a first possible implementation manner according to the third aspect, the specific implementation is: the method further includes:

如果所述第一转发等价类TLV和所述第二转发等价类TLV相匹配,则确定所述第一报文和所述第二报文均用于建立第一PW;If the first forwarding equivalence class TLV matches the second forwarding equivalence class TLV, determine that both the first packet and the second packet are used to establish a first PW;

或,or,

如果所述第一转发等价类TLV和所述第二转发等价类TLV相匹配并且所述第一路径信息TLV中的兼容标志位被置位,则确定所述第一报文和所述第二报文均用于建立所述第一PW。If the first forwarding equivalence class TLV matches the second forwarding equivalence class TLV and the compatible flag bit in the first path information TLV is set, determine that the first packet and the The second packets are all used to establish the first PW.

在根据第三方面的第二种可能的实现方式中,具体实现为:所述第一路径信息TLV还包括第一源IP地址和第一目的IP地址,所述第一源IP地址为第一PE的地址,所述第一目的IP地址为第二PE的地址,所述第一PE为所述第一PW的第一端点,所述第二PE为所述第一PW的第二端点;In a second possible implementation manner according to the third aspect, it is specifically implemented as follows: the first path information TLV further includes a first source IP address and a first destination IP address, and the first source IP address is the first The address of the PE, the first destination IP address is the address of the second PE, the first PE is the first end point of the first PW, and the second PE is the second end point of the first PW ;

所述第二路径信息TLV还包括第二源IP地址和第二目的IP地址,所述第二源IP地址为第二PE的地址,所述第二目的IP地址为第一PE的地址。The second path information TLV further includes a second source IP address and a second destination IP address, the second source IP address is the address of the second PE, and the second destination IP address is the address of the first PE.

本发明第四方面提供一种边界路由器,应用于至少包括第一自治域(AS)、第二AS和第三AS的网络中,且所述第一AS与所述第二AS相邻,所述第三AS与所述第二AS相邻,所述边界路由器位于所述第二AS中,且与第一AS相邻,所述边界路由器包括:A fourth aspect of the present invention provides a border router, which is applied to a network including at least a first autonomous domain (AS), a second AS, and a third AS, and the first AS is adjacent to the second AS, so The third AS is adjacent to the second AS, the border router is located in the second AS, and is adjacent to the first AS, and the border router includes:

接收单元,用于接收所述第一AS中与所述第二AS相邻的ASBR1发送的用于建立第一伪线路(PW)的第一报文,所述第一报文包括第一转发等价类类型长度值转发等价类(TLV)和第一路径信息TLV,所述第一路径信息TLV中包括第一源IP地址和第一目的IP地址,所述第一源IP地址包括第一PE的地址,所述第一目的IP地址包括第二PE的地址,所述第一PE为所述第一PW的第一端点,所述第二PE为所述第一PW的第二端点;a receiving unit, configured to receive a first message for establishing a first pseudowire (PW) sent by an ASBR1 adjacent to the second AS in the first AS, where the first message includes a first forwarding The equivalence class type length value forwards the equivalence class (TLV) and the first path information TLV, the first path information TLV includes the first source IP address and the first destination IP address, and the first source IP address includes the first The address of a PE, the first destination IP address includes the address of a second PE, the first PE is the first end point of the first PW, and the second PE is the second end point of the first PW endpoint;

地址获取单元,用于当所述第二PE在所述第二AS之外时,根据所述第一转发等价类TLV、所述第一源IP地址和第一对应关系确定所述第二AS中与所述第三AS相邻的ASBR3的地址,所述第一对应关系包括所述第一转发等价类TLV、所述第一源IP地址和所述ASBR3的地址的对应关系;以及,根据所述第一转发等价类TLV、所述第一源IP地址和第二对应关系确定所述第三AS中与所述第二AS相邻的ASBR4的地址,所述第二对应关系包括所述第一转发等价类TLV、所述第一源IP地址和所述ASBR4的地址的对应关系;An address obtaining unit, configured to determine the second PE according to the first forwarding equivalence class TLV, the first source IP address, and the first correspondence when the second PE is outside the second AS. an address of ASBR3 adjacent to the third AS in the AS, the first correspondence includes a correspondence between the first forwarding equivalence class TLV, the first source IP address, and the address of ASBR3; and , determining the address of the ASBR4 adjacent to the second AS in the third AS according to the first forwarding equivalence class TLV, the first source IP address, and a second correspondence, the second correspondence including the correspondence between the first forwarding equivalence class TLV, the first source IP address, and the address of the ASBR4;

发送单元,用于向所述ASBR3发送第一报文,被所述ASBR2发送给所述ASBR3的第一报文的第一路径信息TLV中包括所述第一源IP地址和所述ASBR4的地址。A sending unit, configured to send a first message to the ASBR3, the first path information TLV of the first message sent to the ASBR3 by the ASBR2 includes the first source IP address and the address of the ASBR4 .

在根据第四方面的第一种可能的实现方式中,具体实现为:所述边界路由器还包括:In a first possible implementation manner according to the fourth aspect, the specific implementation is as follows: the border router further includes:

存储单元,用于存储被配置的所述第一对应关系和所述第二对应关系;或,a storage unit, configured to store the configured first correspondence and the second correspondence; or,

学习单元,用于通过学习的方式获取所述第一对应关系和所述第二对应关系。A learning unit, configured to acquire the first corresponding relationship and the second corresponding relationship through learning.

在根据第四方面的第二种可能的实现方式中,具体实现为:所述第一接收单元还用于接收所述第二PE发送的用于建立所述第一PW的第二报文,所述第二报文包括第二转发等价类TLV和第二路径信息TLV,所述第二路径信息TLV包括第二源IP地址、第二目的IP地址、所述ASBR1的地址、所述ASBR2的地址、所述ASBR3的地址和所述ASBR4的地址,所述第二源IP地址为所述第二PE的地址,所述第二目的IP地址为所述第一PE的地址;In a second possible implementation manner according to the fourth aspect, the specific implementation is: the first receiving unit is further configured to receive a second message sent by the second PE for establishing the first PW, The second message includes a second forwarding equivalence class TLV and a second path information TLV, and the second path information TLV includes a second source IP address, a second destination IP address, the address of the ASBR1, the address of the ASBR2 address, the address of the ASBR3 and the address of the ASBR4, the second source IP address is the address of the second PE, and the second destination IP address is the address of the first PE;

所述学习单元具体用于在确定所述第一报文和所述第二报文均为用于建立所述第一PW的报文并且确定所述ASBR3为所述第二AS中与所述第三AS相邻的ASBR后,生成所述第一对应关系;以及,在确定所述第一报文和所述第二报文均为用于建立所述第一PW的报文并且确定所述ASBR4为所述第三AS中与所述第二AS相连的ASBR后,生成所述第二对应关系。The learning unit is specifically configured to determine that both the first message and the second message are messages used to establish the first PW and determine that the ASBR3 is the second AS and that the After the third AS is adjacent to the ASBR, generate the first correspondence; and, after determining that both the first packet and the second packet are packets used to establish the first PW and determining the After the ASBR4 is the ASBR connected to the second AS in the third AS, the second corresponding relationship is generated.

本发明第五方面提供一种边界路由器,应用于至少包括第一AS、第二AS和第三AS的网络中,所述第一AS与所述第二AS相邻,所述第二AS和所述第三AS相邻,所述第二AS中包括采用静态方式配置的多段伪线,所述边界路由器位于所述第二AS中,且与所述第一AS相邻,所述边界路由器包括:A fifth aspect of the present invention provides a border router, which is applied to a network including at least a first AS, a second AS, and a third AS, the first AS is adjacent to the second AS, and the second AS and the The third AS is adjacent, the second AS includes statically configured multi-segment pseudowires, the border router is located in the second AS and is adjacent to the first AS, and the border router include:

接收单元,用于接收所述第一AS中与所述第二AS相邻的ASBR1发送的用于建立第一PW的第一报文,所述第一报文包括第一转发等价类类型长度值(TLV)和第一路径信息TLV,所述第一路径信息TLV中包括第一源IP地址和第一目的IP地址,所述第一源IP地址包括第一PE的地址,所述第一目的IP地址包括第二PE的地址,所述第一PE为所述第一PW的第一端点,所述第二PE为所述第一PW的第二端点,所述第一路径信息TLV中的U比特和F比特的取值均为1,所述ASBR2为所述采用静态方式配置的多段伪线的一个端点;A receiving unit, configured to receive a first message for establishing a first PW sent by an ASBR1 adjacent to the second AS in the first AS, where the first message includes a first forwarding equivalence class type length value (TLV) and first path information TLV, the first path information TLV includes a first source IP address and a first destination IP address, the first source IP address includes the address of the first PE, and the first A destination IP address includes an address of a second PE, the first PE is the first end point of the first PW, the second PE is the second end point of the first PW, and the first path information The values of the U bit and the F bit in the TLV are both 1, and the ASBR2 is an endpoint of the statically configured multi-segment pseudowire;

发送单元,用于在确定U比特和F比特的取值均为1后,按照所述采用静态方式配置的多段伪线的转发规则转发包括所述第一路径信息TLV的第一报文。The sending unit is configured to forward the first message including the first path information TLV according to the statically configured multi-segment pseudowire forwarding rules after determining that both the U bit and the F bit have values of 1.

本发明第六方面提供一种边界路由器,应用于包括第一AS、第二AS和第三AS的网络中,所述第一AS与所述第二AS相邻,所述第二AS和所述第三AS相邻,所述第一AS包括采用静态方式配置的多段伪线,所述边界路由器位于所述第二AS中,且与所述第一AS相邻,所述边界路由器包括:A sixth aspect of the present invention provides a border router, which is applied to a network including a first AS, a second AS, and a third AS, the first AS is adjacent to the second AS, and the second AS and the second AS are The third AS is adjacent to the third AS, the first AS includes a statically configured multi-segment pseudowire, the border router is located in the second AS, and is adjacent to the first AS, and the border router includes:

获取单元,用于从所述第二AS中与所述第三AS相邻的ASBR3接收用于建立第一PW的第一报文,所述第一报文包括第一转发等价类类型长度值TLV和第一路径信息TLV,所述第一路径信息TLV包括所述ASBR3的地址和所述第三AS中与所述第二AS相邻的ASBR4的地址;An acquiring unit, configured to receive a first message for establishing a first PW from an ASBR3 adjacent to the third AS in the second AS, where the first message includes a length of a first forwarding equivalence class type a value TLV and a first path information TLV, the first path information TLV including the address of the ASBR3 and the address of the ASBR4 adjacent to the second AS in the third AS;

接收单元,用于从所述第一AS中与所述第二AS相邻的ASBR1接收用于建立第一PW的第二报文,所述第二报文包括第二转发等价类TLV,所述ASBR1为所述采用静态方式配置的多段伪线的一个端点;a receiving unit, configured to receive a second message for establishing a first PW from an ASBR1 adjacent to the second AS in the first AS, where the second message includes a second forwarding equivalence class TLV, The ASBR1 is an endpoint of the statically configured multi-segment pseudowire;

报文转换单元,用于在确定所述第一报文和所述第二报文均用于建立所述第一PW后,在所述第二报文中增加第二路径信息TLV,所述第二路径信息TLV包括所述ASBR4的地址;A message converting unit, configured to add a second path information TLV to the second message after determining that both the first message and the second message are used to establish the first PW, the The second path information TLV includes the address of the ASBR4;

发送单元,用于将携带有所述第二路径信息TLV的所述第二报文发送至所述ASBR3,其中所述ASBR4的地址用于指示所述ASBR3将携带有所述第二路径信息TLV的所述第二报文发送至所述ASBR4。a sending unit, configured to send the second packet carrying the second path information TLV to the ASBR3, wherein the address of the ASBR4 is used to indicate that the ASBR3 will carry the second path information TLV Send the second packet to the ASBR4.

在根据第六方面的第一种可能的实现方式中,具体实现为:所述边界路由器还包括:In a first possible implementation manner according to the sixth aspect, it is specifically implemented as follows: the border router further includes:

确定单元,用于在所述第一转发等价类TLV和所述第二转发等价类TLV相匹配的情况下,则确定所述第一报文和所述第二报文均用于建立第一PW;或,在所述第一转发等价类TLV和所述第二转发等价类TLV相匹配并且所述第一路径信息TLV中的兼容标志位被置位的情况下,则确定所述第一报文和所述第二报文均用于建立所述第一PW。A determining unit, configured to determine that both the first packet and the second packet are used to establish the first PW; or, if the first forwarding equivalence class TLV matches the second forwarding equivalence class TLV and the compatible flag bit in the first path information TLV is set, then determine Both the first packet and the second packet are used to establish the first PW.

在根据第六方面的第二种可能的实现方式中,具体实现为:所述第一路径信息TLV还包括第一源IP地址和第一目的IP地址,所述第一源IP地址为第一PE的地址,所述第一目的IP地址为第二PE的地址,所述第一PE为所述第一PW的第一端点,所述第二PE为所述第一PW的第二端点;In a second possible implementation manner according to the sixth aspect, it is specifically implemented as follows: the first path information TLV further includes a first source IP address and a first destination IP address, and the first source IP address is the first The address of the PE, the first destination IP address is the address of the second PE, the first PE is the first end point of the first PW, and the second PE is the second end point of the first PW ;

所述第二路径信息TLV还包括第二源IP地址和第二目的IP地址,所述第二源IP地址为第二PE的地址,所述第二目的IP地址为第一PE的地址。The second path information TLV further includes a second source IP address and a second destination IP address, the second source IP address is the address of the second PE, and the second destination IP address is the address of the first PE.

本发明实施例提供的发送报文的方法以及边界路由器,ASBR2根据第一转发等价类TLV、第一源IP地址和第一对应关系确定第二AS中与第三AS相邻的ASBR3的地址,以及根据第一转发等价类TLV、第一源IP地址和第二对应关系确定第三AS中与第二AS相邻的ASBR4的地址。实现了向下一个AS的边界路由器发送用于建立第一PW的第一报文,建立PW的头节点无需获取整个网络的边界路由器信息,从而克服了当非相邻AS的边界路由器信息不可获知的情况下,难以实现多段伪线路的缺点。In the method for sending packets and the border router provided by the embodiment of the present invention, ASBR2 determines the address of ASBR3 adjacent to the third AS in the second AS according to the first forwarding equivalence class TLV, the first source IP address and the first correspondence , and determine the address of ASBR4 adjacent to the second AS in the third AS according to the first forwarding equivalence class TLV, the first source IP address, and the second correspondence. Realized sending the first message for establishing the first PW to the border router of the next AS, and the head node of establishing the PW does not need to obtain the border router information of the entire network, thus overcoming the fact that the border router information of non-adjacent ASs cannot be known In the case of , it is difficult to realize the disadvantage of multi-segment pseudowire.

附图说明 Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained according to these drawings without any creative effort.

图1为现有技术实现动态MS-PW的示意图;FIG. 1 is a schematic diagram of implementing dynamic MS-PW in the prior art;

图2为本发明发送报文的方法实施例一的网络结构图;FIG. 2 is a network structure diagram of Embodiment 1 of the method for sending messages according to the present invention;

图3为本发明发送报文的方法实施例一的流程示意图;FIG. 3 is a schematic flowchart of Embodiment 1 of the method for sending a message in the present invention;

图4为本发明发送报文的方法实施例二的流程示意图;FIG. 4 is a schematic flow diagram of Embodiment 2 of the method for sending a message in the present invention;

图5为本发明发送报文的方法实施例三的流程示意图;FIG. 5 is a schematic flowchart of Embodiment 3 of the method for sending a message according to the present invention;

图6为本发明发送报文方法实施例四的报文结构示意图;FIG. 6 is a schematic diagram of a message structure in Embodiment 4 of the method for sending a message according to the present invention;

图7为本发明发送报文的方法实施例四的流程示意图;FIG. 7 is a schematic flowchart of Embodiment 4 of the method for sending a message according to the present invention;

图8为本发明边界路由器实施例一的结构示意图;FIG. 8 is a schematic structural diagram of Embodiment 1 of the border router of the present invention;

图9为本发明边界路由器实施例二的结构示意图;FIG. 9 is a schematic structural diagram of Embodiment 2 of the border router of the present invention;

图10为本发明边界路由器实施例三的结构示意图;FIG. 10 is a schematic structural diagram of Embodiment 3 of the border router of the present invention;

图11为本发明边界路由器实施例四的结构示意图;FIG. 11 is a schematic structural diagram of Embodiment 4 of the border router of the present invention;

图12为本发明边界路由器实施例四的结构示意图。FIG. 12 is a schematic structural diagram of Embodiment 4 of the border router of the present invention.

具体实施方式 Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

图2为本发明发送报文的方法实施例一的网络结构图,本实施例的网络至少包括第一自治域(AS)、第二AS和第三AS,为了更清楚表达本发明实施例的方法,本实施例以包括三个自治域的网络为例,其中,第一AS与第二AS相邻,第三AS与第二AS相邻。第一AS包括第一PE和与第二AS相邻的ASBR1,第二AS包括ASBR2和ASBR3,其中ASBR2与第一AS相邻,ASBR3与第三AS相邻,第三AS包括ASBR4和第二PE,其中ASBR4与第二AS相邻。Figure 2 is a network structure diagram of Embodiment 1 of the method for sending messages according to the present invention. The network of this embodiment includes at least a first autonomous domain (AS), a second AS, and a third AS. In order to express the embodiment of the present invention more clearly method, this embodiment takes a network including three autonomous domains as an example, where the first AS is adjacent to the second AS, and the third AS is adjacent to the second AS. The first AS includes the first PE and ASBR1 adjacent to the second AS. The second AS includes ASBR2 and ASBR3. ASBR2 is adjacent to the first AS, ASBR3 is adjacent to the third AS, and the third AS includes ASBR4 and the second AS. PE, where ASBR4 is adjacent to the second AS.

图3为本发明发送报文的方法实施例一的流程示意图,本实施例的方法应用于图2所示网络中,本实施例的方法包括:Fig. 3 is a schematic flow chart of Embodiment 1 of the method for sending a message according to the present invention. The method of this embodiment is applied to the network shown in Fig. 2, and the method of this embodiment includes:

步骤301:第二AS中与第一AS相邻的边界路由器(ASBR2)接收第一AS中与第二AS相邻的ASBR1发送的用于建立第一伪线路(PW)的第一报文。Step 301: A border router (ASBR2) adjacent to the first AS in the second AS receives a first message for establishing a first pseudowire (PW) sent by an ASBR1 adjacent to the second AS in the first AS.

具体地,第一报文包括第一FEC类型长度值(Type Length Value,以下简称:TLV)和第一路径信息TLV,第一路径信息TLV中包括第一源IP地址和第一目的IP地址,第一源IP地址包括第一PE的地址,第一目的IP地址包括第二PE的地址,第一PE为第一PW的第一端点,第二PE为第一PW的第二端点。Specifically, the first message includes a first FEC type length value (Type Length Value, hereinafter referred to as: TLV) and a first path information TLV, and the first path information TLV includes a first source IP address and a first destination IP address, The first source IP address includes the address of the first PE, the first destination IP address includes the address of the second PE, the first PE is the first end point of the first PW, and the second PE is the second end point of the first PW.

步骤302:ASBR2根据第一FEC TLV、第一源IP地址和第一对应关系确定第二AS中与第三AS相邻的ASBR3的地址。Step 302: ASBR2 determines the address of ASBR3 adjacent to the third AS in the second AS according to the first FEC TLV, the first source IP address and the first correspondence.

当第二PE在第二AS之外时,本步骤是获取本AS域内与下一个AS域相邻的ASBR的方式,即本网络中ASBR2获取本AS域内与下一个AS域相邻的ASBR3地址的方式,具体地,第一对应关系包括第一FEC TLV、第一源IP地址和ASBR3的地址的对应关系。When the second PE is outside the second AS, this step is to obtain the ASBR adjacent to the next AS domain in this AS domain, that is, ASBR2 in this network obtains the address of ASBR3 adjacent to the next AS domain in this AS domain Specifically, the first correspondence includes a correspondence between the first FEC TLV, the first source IP address, and the address of ASBR3.

步骤303:ASBR2根据第一FEC TLV、第一源IP地址和第二对应关系确定第三AS中与第二AS相邻的ASBR4的地址。Step 303: ASBR2 determines the address of ASBR4 adjacent to the second AS in the third AS according to the first FEC TLV, the first source IP address and the second corresponding relationship.

与步骤302不同的是本步骤是获取与本AS域相邻的下一个AS的ASBR的方式,即本网络中ASBR2获取第三AS域内ASBR4地址的方式,具体地,第二对应关系包括第一FEC TLV、第一源IP地址和ASBR4的地址的对应关系。The difference from step 302 is that this step is to obtain the ASBR of the next AS adjacent to the current AS domain, that is, the manner in which ASBR2 in the current network obtains the address of ASBR4 in the third AS domain. Specifically, the second correspondence includes the first Correspondence between the FEC TLV, the first source IP address, and the address of ASBR4.

步骤304:ASBR2向ASBR3发送第一报文,被ASBR2发送给ASBR3的第一报文的第一路径信息TLV中包括第一源IP地址和ASBR4的地址。Step 304: ASBR2 sends a first packet to ASBR3, and the first path information TLV of the first packet sent by ASBR2 to ASBR3 includes the first source IP address and the address of ASBR4.

值得说明的是,本实施例的方法不限制于三个AS的网络中,针对多个AS的网络,与包含三个AS网络的方法相似,本领域技术人员可以根据上述实施例所示的方法获知,在此不再赘述。It is worth noting that the method in this embodiment is not limited to the network of three ASs. For a network of multiple ASs, it is similar to the method including three AS networks. Those skilled in the art can follow the method shown in the above embodiment Informed, no more details here.

本实施例中,ASBR2根据第一FEC TLV、第一源IP地址和第一对应关系确定第二AS中与第三AS相邻的ASBR3的地址,以及根据第一FECTLV、第一源IP地址和第二对应关系确定第三AS中与第二AS相邻的ASBR4的地址。实现了向下一个AS的边界路由器发送用于建立第一PW的第一报文,建立PW的头节点无需获取整个网络的边界路由器信息,从而克服了当非相邻AS的边界路由器信息不可获知的情况下,难以实现多段伪线路的缺点。In this embodiment, ASBR2 determines the address of ASBR3 adjacent to the third AS in the second AS according to the first FECTLV, the first source IP address, and the first correspondence, and determines the address of ASBR3 adjacent to the third AS in the second AS according to the first FECTLV, the first source IP address, and The second correspondence determines the address of ASBR4 adjacent to the second AS in the third AS. Realized sending the first message for establishing the first PW to the border router of the next AS, and the head node of establishing the PW does not need to obtain the border router information of the entire network, thus overcoming the fact that the border router information of non-adjacent ASs cannot be known In the case of , it is difficult to realize the disadvantage of multi-segment pseudowire.

在上述实施例中,ASBR2获取第一对应关系和第二对应关系有以下两种可能的实现方式:In the above embodiment, there are two possible ways for ASBR2 to obtain the first correspondence and the second correspondence:

可选的,作为第一种可能的实现方式:通过用户配置的方式,将第一对应关系和第二对应关系被配置到ASBR2中。Optionally, as a first possible implementation manner: the first correspondence and the second correspondence are configured in ASBR2 through user configuration.

可选的,作为第二种可能的实现方式,ASBR2通过学习的方式获取第一对应关系和第二对应关系。Optionally, as a second possible implementation manner, the ASBR2 obtains the first corresponding relationship and the second corresponding relationship through learning.

ASBR2通过学习的方式获取第一对应关系和第二对应关系,包括以下几个步骤:ASBR2 obtains the first corresponding relationship and the second corresponding relationship through learning, including the following steps:

第一步:ASBR2接收ASBR1发送的第一报文。Step 1: ASBR2 receives the first packet sent by ASBR1.

当第一报文中没有第一对应关系和第二对应关系时,ASBR2等待第二步操作。When the first message does not contain the first corresponding relationship and the second corresponding relationship, ASBR2 waits for the second step of operation.

第二步:ASBR2接收第二PE发送的用于建立第一PW的第二报文。Step 2: ASBR2 receives the second message sent by the second PE for establishing the first PW.

具体地,第二报文是逆向传输的报文,第二报文包括第二FEC TLV和第二路径信息TLV,第二路径信息TLV包括第二源IP地址、第二目的IP地址、ASBR1的地址、ASBR2的地址、ASBR3的地址和ASBR4的地址,第二源IP地址为第二PE的地址,第二目的IP地址为第一PE的地址。Specifically, the second message is a message for reverse transmission, the second message includes the second FEC TLV and the second path information TLV, and the second path information TLV includes the second source IP address, the second destination IP address, the ASBR1 address, the address of ASBR2, the address of ASBR3 and the address of ASBR4, the second source IP address is the address of the second PE, and the second destination IP address is the address of the first PE.

第三步:ASBR2在确定第一报文和第二报文均为用于建立第一PW的报文并且确定ASBR3为第二AS中与第三AS相邻的ASBR后,生成第一对应关系。Step 3: After ASBR2 determines that both the first message and the second message are used to establish the first PW and determines that ASBR3 is the ASBR adjacent to the third AS in the second AS, generate the first correspondence .

上述第一对应关系中包括第一FEC TLV、第一源IP地址和ASBR3的地址的对应关系。The first correspondence includes the correspondence between the first FEC TLV, the first source IP address, and the address of ASBR3.

第四步:ASBR2在确定第一报文和第二报文均为用于建立第一PW的报文并且确定ASBR4为第三AS中与第二AS相连的ASBR后,生成第二对应关系。Step 4: After ASBR2 determines that both the first message and the second message are used to establish the first PW and determines that ASBR4 is the ASBR connected to the second AS in the third AS, it generates the second corresponding relationship.

上述第二对应关系包括第一FEC TLV、第一源IP地址和ASBR4的地址的对应关系。The foregoing second correspondence includes a correspondence between the first FEC TLV, the first source IP address, and the address of ASBR4.

本实施例中的ASBR2的第一对应关系和第二对应关系,通过用户配置的方式或者ASBR2学习的方式获得,实现了向下一个AS的边界路由器发送用于建立第一PW的第一报文,建立PW的头节点无需获取整个网络的边界路由器信息,从而克服了当非相邻AS的边界路由器信息不可获知的情况下,难以实现多段伪线路的缺点。The first corresponding relationship and the second corresponding relationship of ASBR2 in this embodiment are obtained through user configuration or ASBR2 learning, which realizes sending the first message for establishing the first PW to the border router of the next AS , the head node to establish a PW does not need to obtain the border router information of the entire network, thus overcoming the disadvantage that it is difficult to implement multi-segment pseudo-wires when the border router information of non-adjacent ASs is not known.

图4为本发明发送报文的方法实施例二的流程示意图,本实施例的方法应用于图2所示的网络结构中,其中,第二AS采用静态方式配置多段伪线,本实施例是应用于兼容静态配置方式的方法,如图4所示,本实施例的方法包括:FIG. 4 is a schematic flow diagram of Embodiment 2 of the method for sending messages according to the present invention. The method of this embodiment is applied to the network structure shown in FIG. Applied to the method of compatible static configuration mode, as shown in Figure 4, the method of this embodiment includes:

步骤401:第二AS中与第一AS相邻的ASBR2接收第一AS中与第二AS相邻的ASBR1发送的用于建立第一PW的第一报文。Step 401: ASBR2 in the second AS adjacent to the first AS receives the first message for establishing the first PW sent by ASBR1 in the first AS adjacent to the second AS.

具体地,第一报文包括第一转发等价类类型长度值(FEC TLV)和第一路径信息TLV,第一路径信息TLV中包括第一源IP地址和第一目的IP地址,第一源IP地址包括第一PE的地址,第一目的IP地址包括第二PE的地址,第一PE为第一PW的第一端点,第二PE为第一PW的第二端点,第一路径信息TLV中的U比特和F比特的取值均为1,第一路径信息TLV中的U比特和F比特的取值均为1表示接收此TLV的设备可转发此TLV,ASBR2为采用静态方式配置的多段伪线的一个端点。Specifically, the first message includes a first forwarding equivalence class type length value (FEC TLV) and a first path information TLV, the first path information TLV includes a first source IP address and a first destination IP address, and the first source The IP address includes the address of the first PE, the first destination IP address includes the address of the second PE, the first PE is the first endpoint of the first PW, the second PE is the second endpoint of the first PW, and the first path information Both the U bit and the F bit in the TLV have a value of 1, and both the U bit and the F bit in the first path information TLV have a value of 1, indicating that the device receiving this TLV can forward this TLV, and ASBR2 is statically configured An endpoint of a multisegment pseudowire.

步骤402:ASBR2在确定U比特和F比特的取值均为1后,按照采用静态方式配置的多段伪线的转发规则转发包括第一路径信息TLV的第一报文。Step 402: After determining that the values of the U bit and the F bit are both 1, the ASBR2 forwards the first message including the first path information TLV according to the statically configured multi-segment pseudowire forwarding rules.

具体的转发规则,本发明对此不作限制。The specific forwarding rules are not limited in the present invention.

本实施例中,通过在第一路径信息TLV中表示U比特和F比特,采用了兼容静态配置的方式,实现了向下一个AS的边界路由器发送用于建立第一PW的第一报文,建立PW的头节点无需获取整个网络的边界路由器信息,从而克服了当非相邻AS的边界路由器信息不可获知的情况下,难以实现多段伪线路的缺点。并且,无需对已有的老设备进行更换,达到节约成本,合理利用现有资源的目的。In this embodiment, by indicating the U bit and the F bit in the first path information TLV, a compatible static configuration method is adopted to realize sending the first message for establishing the first PW to the border router of the next AS, The head node to establish a PW does not need to obtain the border router information of the entire network, thus overcoming the disadvantage that it is difficult to implement multi-segment pseudo-wires when the border router information of non-adjacent ASs is not known. In addition, there is no need to replace existing old equipment, so as to save costs and rationally utilize existing resources.

图5为本发明发送报文的方法实施例三的流程示意图,图5所示实施例的方法应用于图2所示的网络结构,其中,第一AS采用静态方式配置多段伪线。本实施例的步骤包括:FIG. 5 is a schematic flowchart of Embodiment 3 of the method for sending a message according to the present invention. The method of the embodiment shown in FIG. 5 is applied to the network structure shown in FIG. 2 , wherein the first AS configures multi-segment pseudowires in a static manner. The steps of this embodiment include:

步骤501:第二AS中与第一AS相邻的ASBR2从第二AS中与第三AS相邻的ASBR3接收用于建立第一PW的第一报文。Step 501: ASBR2 adjacent to the first AS in the second AS receives a first message for establishing the first PW from ASBR3 adjacent to the third AS in the second AS.

具体地,第一报文包括第一转发等价类类型长度值(FEC TLV)和第一路径信息TLV,第一路径信息TLV包括ASBR3的地址和第三AS中与第二AS相邻的ASBR4的地址。Specifically, the first message includes the first forwarding equivalence class type length value (FEC TLV) and the first path information TLV, and the first path information TLV includes the address of ASBR3 and the ASBR4 adjacent to the second AS in the third AS the address of.

步骤502:ASBR2从第一AS中与第二AS相邻的ASBR1接收用于建立第一PW的第二报文。Step 502: ASBR2 receives the second message for establishing the first PW from the ASBR1 adjacent to the second AS in the first AS.

具体地,第二报文包括第二FEC TLV,ASBR1为采用静态方式配置的多段伪线的一个端点。Specifically, the second packet includes the second FEC TLV, and ASBR1 is an endpoint of a statically configured multi-segment pseudowire.

步骤503:ASBR2在确定第一报文和第二报文均用于建立第一PW后,在第二报文中增加第二路径信息TLV。Step 503: After determining that both the first packet and the second packet are used to establish the first PW, the ASBR2 adds the second path information TLV to the second packet.

具体地,第二路径信息TLV包括ASBR4的地址。Specifically, the second path information TLV includes the address of ASBR4.

步骤504:ASBR2将携带有第二路径信息TLV的第二报文发送至ASBR3,其中ASBR4的地址用于指示ASBR3将携带有第二路径信息TLV的第二报文发送至ASBR4。Step 504: ASBR2 sends the second packet carrying the second path information TLV to ASBR3, wherein the address of ASBR4 is used to instruct ASBR3 to send the second packet carrying the second path information TLV to ASBR4.

本实施例中,通过ASBR2接收ASBR3发送的用于建立第一PW的第一报文和ASBR1发送的用于建立第一PW的第二报文,在第二报文中增加第二路径信息TLV,并将携带有第二路径信息TLV的第二报文发送至ASBR3,第二路径信息TLV中的ASBR4地址指示ASBR3将携带有第二路径信息TLV的第二报文发送至ASBR4,实现了向下一个AS的边界路由器发送用于建立第一PW的第二报文,建立PW的头节点无需获取整个网络的边界路由器信息,从而克服了当非相邻AS的边界路由器信息不可获知的情况下,难以实现多段伪线路的缺点。并且兼容了第一AS域采用静态方式配置多段伪线。In this embodiment, ASBR2 receives the first packet sent by ASBR3 for establishing the first PW and the second packet sent by ASBR1 for establishing the first PW, and adds the second path information TLV to the second packet , and send the second message carrying the second path information TLV to ASBR3, the address of ASBR4 in the second path information TLV instructs ASBR3 to send the second message carrying the second path information TLV to ASBR4, realizing the The border router of the next AS sends the second message for establishing the first PW. The head node of establishing the PW does not need to obtain the border router information of the entire network, thereby overcoming the situation that the border router information of non-adjacent ASs cannot be known. , it is difficult to realize the shortcoming of multi-segment pseudowire. And it is compatible with the static configuration of multiple pseudowires in the first AS domain.

在上述实施例中,确定第一报文和第二报文均用于建立第一PW有以下两种可能的实现方式。In the foregoing embodiment, there are the following two possible implementation manners for determining that both the first packet and the second packet are used to establish the first PW.

可选地,作为第一种可能的实现方式,如果第一FEC TLV和第二FECTLV相匹配,则确定第一报文和第二报文均用于建立第一PW。Optionally, as a first possible implementation manner, if the first FEC TLV matches the second FECTLV, it is determined that both the first packet and the second packet are used to establish the first PW.

其中,FEC TLV信息可以包括伪线路类型,伪线路ID,链路接口参数等信息,将第一FEC TLV的上述信息与第二FEC TLV的上述信息进行匹配,若匹配成功,则确定第一报文和第二报文均用于建立第一PW。Wherein, the FEC TLV information may include information such as pseudo-wire type, pseudo-wire ID, and link interface parameters, and the above-mentioned information of the first FEC TLV is matched with the above-mentioned information of the second FEC TLV. If the matching is successful, the first report is determined. Both the message and the second message are used to establish the first PW.

可选地,作为另一种可能的实现方式,如果第一FEC TLV和第二FECTLV相匹配并且第一路径信息TLV中的兼容标志位被置位,则确定第一报文和第二报文均用于建立第一PW。Optionally, as another possible implementation, if the first FEC TLV matches the second FECTLV and the compatibility flag in the first path information TLV is set, then determine the first packet and the second packet Both are used to establish the first PW.

在上述实施例中,第一路径信息TLV还包括第一源IP地址和第一目的IP地址,第一源IP地址为第一PE的地址,第一目的IP地址为第二PE的地址,第一PE为第一PW的第一端点,第二PE为第一PW的第二端点。In the above embodiment, the first path information TLV also includes a first source IP address and a first destination IP address, the first source IP address is the address of the first PE, the first destination IP address is the address of the second PE, and the first destination IP address is the address of the second PE. One PE is the first end point of the first PW, and the second PE is the second end point of the first PW.

第二路径信息TLV还包括第二源IP地址和第二目的IP地址,第二源IP地址为第二PE的地址,第二目的IP地址为第一PE的地址。The second path information TLV also includes a second source IP address and a second destination IP address, the second source IP address is the address of the second PE, and the second destination IP address is the address of the first PE.

本实施例中,通过第一FEC TLV和第二FEC TLV相匹配的方式或者第一FEC TLV和第二FEC TLV相匹配并且第一路径信息TLV中的兼容标志位被置位的方式,确定第一报文和第二报文均用于建立第一PW。在第二报文中增加第二路径信息TLV,并将携带有第二路径信息TLV的第二报文发送至ASBR3,第二路径信息TLV中的ASBR4地址指示ASBR3将携带有第二路径信息TLV的第二报文发送至ASBR4,实现了向下一个AS的边界路由器发送用于建立第一PW的第二报文,建立PW的头节点无需获取整个网络的边界路由器信息,从而克服了当非相邻AS的边界路由器信息不可获知的情况下,难以实现多段伪线路的缺点。并且兼容了第一AS采用静态方式配置多段伪线。In this embodiment, the first FEC TLV is matched with the second FEC TLV or the first FEC TLV is matched with the second FEC TLV and the compatibility flag in the first path information TLV is set to determine the second FEC TLV. Both the first message and the second message are used to establish the first PW. Add the second path information TLV in the second message, and send the second message carrying the second path information TLV to ASBR3, and the address of ASBR4 in the second path information TLV indicates that ASBR3 will carry the second path information TLV The second packet sent to ASBR4 realizes sending the second packet for establishing the first PW to the border router of the next AS, and the head node for establishing the PW does not need to obtain the border router information of the entire network, thereby overcoming the When the border router information of the adjacent AS is not known, it is difficult to realize the disadvantage of multi-segment pseudowire. And it is compatible with the static configuration of multiple pseudowires by the first AS.

图6为本发明发送报文方法实施例四的报文结构示意图,该示意图显示了由第一PE向第二PE发送的用于建立第一PW的第一报文在被不同的节点发送时携带的FEC TLV和路径信息TLV的具体情况。图6中虚线框中除FECTLV以外的内容就是路径信息TLV的数值(VALUE)部分包括的内容。Fig. 6 is a schematic diagram of the message structure of Embodiment 4 of the method for sending a message according to the present invention, which shows that the first message for establishing the first PW sent by the first PE to the second PE is sent by different nodes The details of the carried FEC TLV and path information TLV. The content in the dotted box in Fig. 6 except FECTLV is the content included in the value (VALUE) part of the path information TLV.

图7为本发明发送报文的方法实施例四的流程示意图;图7所示实施例的方法应用于图6所示的网络结构中;如图7所示,本实施例的步骤包括:Fig. 7 is a schematic flow diagram of Embodiment 4 of the method for sending messages according to the present invention; the method of the embodiment shown in Fig. 7 is applied to the network structure shown in Fig. 6; as shown in Fig. 7, the steps of this embodiment include:

步骤701:第一PE向第一AS的ASBR1发送用于建立第一PW的第一报文,第一报文包括第一FEC TLV和第一路径信息TLV。Step 701: The first PE sends a first message for establishing the first PW to ASBR1 of the first AS, and the first message includes the first FEC TLV and the first path information TLV.

具体地,第一TLV中包括第一路径信息TLV中包括第一源IP地址和第一目的IP地址,第一源IP地址包括第一PE的地址,第一目的IP地址包括第二PE的地址,第一PE为第一PW的第一端点,第二PE为第一PW的第二端点。第一路径信息TLV中还包括第一FEC TLV、第一源IP地址和ASBR1的地址的第一对应关系和第一路径信息TLV中还包括第一FEC TLV、第一源IP地址和ASBR2的地址的第二对应关系。第一报文如图6中的报文61所示。Specifically, the first TLV includes the first path information TLV includes the first source IP address and the first destination IP address, the first source IP address includes the address of the first PE, and the first destination IP address includes the address of the second PE , the first PE is the first end point of the first PW, and the second PE is the second end point of the first PW. The first path information TLV also includes the first corresponding relationship between the first FEC TLV, the first source IP address and the address of ASBR1, and the first path information TLV also includes the first FEC TLV, the first source IP address and the address of ASBR2 the second corresponding relationship. The first message is shown as message 61 in FIG. 6 .

上述第一对应关系和第二对应关系可配置于第一PE中,也可通过其他的方式学习获得。The above-mentioned first correspondence and second correspondence may be configured in the first PE, or may be acquired through learning in other ways.

步骤702:ASBR1接收第一PE发送的用于建立第一PW的第一FEC TLV和第一路径信息TLV,根据第一FEC TLV中的第二对应关系向ASBR2发送用于建立第一PW的第一报文,第一报文中的第一对应关系和第二对应关系为空。Step 702: ASBR1 receives the first FEC TLV and the first path information TLV for establishing the first PW sent by the first PE, and sends the first FEC TLV for establishing the first PW to ASBR2 according to the second correspondence in the first FEC TLV. A message, the first correspondence and the second correspondence in the first message are empty.

第一报文如图6中的报文62所示。The first message is shown as message 62 in FIG. 6 .

步骤703:ASBR2接收ASBR1发送的用于建立第一伪线路PW的第一报文。Step 703: ASBR2 receives the first packet sent by ASBR1 for establishing the first pseudowire PW.

步骤704:ASBR2通过手工配置的方式获取第一路径信息TLV中的第一对应关系和第二对应关系,或者通过动态选择的方式获取第一对应关系和第二对应关系,或者从反向报文中获取第一对应关系和第二对应关系。Step 704: ASBR2 obtains the first corresponding relationship and the second corresponding relationship in the first path information TLV through manual configuration, or obtains the first corresponding relationship and the second corresponding relationship through dynamic selection, or obtains the first corresponding relationship and the second corresponding relationship from the reverse message Obtain the first corresponding relationship and the second corresponding relationship.

通过步骤704获取到包括第一对应关系和第二对应关系的第一报文。Through step 704, the first message including the first correspondence and the second correspondence is obtained.

第一报文如图6中的报文63所示。The first message is shown as message 63 in FIG. 6 .

步骤705:ASBR2向ASBR3发送用于建立第一伪线路PW的第一报文。Step 705: ASBR2 sends to ASBR3 a first message for establishing a first pseudowire PW.

步骤706:ASBR3接收ASBR2发送的用于建立第一伪线路PW的第一报文。Step 706: ASBR3 receives the first packet sent by ASBR2 for establishing the first pseudowire PW.

步骤707:ASBR3根据ASBR2发送的用于建立第一伪线路PW的第一报文中的第二对应关系,将第一报文发送给ASBR4,其中,第一报文中的第一对应关系和第二对应关系为空。Step 707: ASBR3 sends the first packet to ASBR4 according to the second correspondence in the first packet sent by ASBR2 for establishing the first pseudowire PW, wherein the first correspondence in the first packet and The second correspondence is empty.

第一报文如图6中的报文64所示。The first message is shown as message 64 in FIG. 6 .

步骤708:ASBR4接收到ASBR3发送的用于建立第一伪线路PW的第一报文,发现第一目的IP地址为与自己相邻的第二PE的IP地址,则将第一报文发送给第二PE。Step 708: ASBR4 receives the first message sent by ASBR3 for establishing the first pseudo-wire PW, and finds that the first destination IP address is the IP address of the second PE adjacent to itself, then sends the first message to Second PE.

第一报文如图6中的报文64所示。The first message is shown as message 64 in FIG. 6 .

本实施例,通过手工配置的方式获取第一路径信息TLV中的第一对应关系和第二对应关系,或者通过动态选择的方式获取第一对应关系和第二对应关系,或者从反向报文中获取第一对应关系和第二对应关系,实现向下一个AS发送用于建立第一PW的第一报文,建立PW的头节点无需获取整个网络的边界路由器信息,从而克服了当非相邻AS的边界路由器信息不可获知的情况下,难以实现多段伪线路的缺点。并且兼容了第一AS采用静态方式配置多段伪线。In this embodiment, the first corresponding relationship and the second corresponding relationship in the first path information TLV are obtained through manual configuration, or the first corresponding relationship and the second corresponding relationship are obtained through dynamic selection, or from the reverse message Obtain the first corresponding relationship and the second corresponding relationship, so as to send the first message for establishing the first PW to the next AS, and the head node for establishing the PW does not need to obtain the border router information of the entire network, thereby overcoming the inconsistency When the border router information of the neighboring AS is not known, it is difficult to realize the disadvantage of multi-segment pseudowire. And it is compatible with the static configuration of multiple pseudowires by the first AS.

图8为本发明边界路由器实施例一的结构示意图,本实施例的边界路由器应用于至少包括第一自治域AS、第二AS和第三AS的网络中,且第一AS与第二AS相邻,第三AS与第二AS相邻,边界路由器位于第二AS中,且与第一AS相邻。如图8所示,本实施例的边界路由器包括接收单元81、地址获取单元82和发送单元83,其中,接收单元81用于接收第一AS中与第二AS相邻的ASBR1发送的用于建立第一伪线路PW的第一报文,第一报文包括第一转发等价类类型长度值(FEC TLV)和第一路径信息TLV,第一路径信息TLV中包括第一源IP地址和第一目的IP地址,第一源IP地址包括第一PE的地址,第一目的IP地址包括第二PE的地址,第一PE为第一PW的第一端点,第二PE为第一PW的第二端点。Fig. 8 is a schematic structural diagram of Embodiment 1 of the border router of the present invention. The border router of this embodiment is applied to a network including at least the first autonomous domain AS, the second AS, and the third AS, and the first AS and the second AS are connected to each other. The third AS is adjacent to the second AS, and the border router is located in the second AS and adjacent to the first AS. As shown in FIG. 8 , the border router in this embodiment includes a receiving unit 81, an address obtaining unit 82, and a sending unit 83, wherein the receiving unit 81 is used to receive the information sent by the ASBR1 adjacent to the second AS in the first AS. Establish the first packet of the first pseudowire PW, the first packet includes the first forwarding equivalence class type length value (FEC TLV) and the first path information TLV, and the first path information TLV includes the first source IP address and The first destination IP address, the first source IP address includes the address of the first PE, the first destination IP address includes the address of the second PE, the first PE is the first endpoint of the first PW, and the second PE is the first PW the second endpoint of .

地址获取单元82用于当第二PE在第二AS之外时,根据第一FEC TLV、第一源IP地址和第一对应关系确定第二AS中与第三AS相邻的ASBR3的地址,第一对应关系包括第一FEC TLV、第一源IP地址和ASBR3的地址的对应关系;以及,根据第一FEC TLV、第一源IP地址和第二对应关系确定第三AS中与第二AS相邻的ASBR4的地址,第二对应关系包括第一FEC TLV、第一源IP地址和ASBR4的地址的对应关系。The address acquisition unit 82 is configured to determine the address of the ASBR3 adjacent to the third AS in the second AS according to the first FEC TLV, the first source IP address, and the first correspondence when the second PE is outside the second AS, The first correspondence includes the correspondence between the first FEC TLV, the first source IP address, and the address of ASBR3; For the address of the adjacent ASBR4, the second correspondence includes the correspondence between the first FEC TLV, the first source IP address, and the address of ASBR4.

发送单元83用于向ASBR3发送第一报文,被ASBR2发送给ASBR3的第一报文的第一路径信息TLV中包括第一源IP地址和ASBR4的地址。The sending unit 83 is configured to send the first packet to ASBR3, and the first path information TLV of the first packet sent by ASBR2 to ASBR3 includes the first source IP address and the address of ASBR4.

本实施例中,接收单元和发送单元可以为物理接口,地址获取单元可以为至少一个处理器。In this embodiment, the receiving unit and the sending unit may be physical interfaces, and the address obtaining unit may be at least one processor.

本实施例中边界路由器的各单元可用于执行图3所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。Each unit of the border router in this embodiment can be used to implement the technical solution of the method embodiment shown in FIG. 3 , and its implementation principle and technical effect are similar, and will not be repeated here.

图9为本发明边界路由器实施例二的结构示意图,图9是在图8所示实施例的基础上,边界路由器进一步地还包括:存储单元84或学习单元85;其中,存储单元84用于存储被配置的第一对应关系和第二对应关系;学习单元85用于通过学习的方式获取第一对应关系和第二对应关系。Fig. 9 is a schematic structural diagram of the second embodiment of the border router of the present invention. Fig. 9 is based on the embodiment shown in Fig. 8, the border router further includes: a storage unit 84 or a learning unit 85; The configured first correspondence relationship and second correspondence relationship are stored; the learning unit 85 is configured to obtain the first correspondence relationship and the second correspondence relationship through learning.

在上述实施例中,接收单元81还用于接收第二PE发送的用于建立第一PW的第二报文,第二报文包括第二FEC TLV和第二路径信息TLV,第二路径信息TLV包括第二源IP地址、第二目的IP地址、ASBR1的地址、ASBR2的地址、ASBR3的地址和ASBR4的地址,第二源IP地址为第二PE的地址,第二目的IP地址为第一PE的地址。In the above embodiment, the receiving unit 81 is further configured to receive the second message sent by the second PE for establishing the first PW, the second message includes the second FEC TLV and the second path information TLV, the second path information The TLV includes the second source IP address, the second destination IP address, the address of ASBR1, the address of ASBR2, the address of ASBR3, and the address of ASBR4. The second source IP address is the address of the second PE, and the second destination IP address is the address of the first PE. The address of the PE.

在上述实施例中,学习单元85具体用于在确定第一报文和第二报文均为用于建立第一PW的报文并且确定ASBR3为第二AS中与第三AS相邻的ASBR后,生成第一对应关系;以及,在确定第一报文和第二报文均为用于建立第一PW的报文并且确定ASBR4为第三AS中与第二AS相连的ASBR后,生成第二对应关系。In the above embodiment, the learning unit 85 is specifically configured to determine that both the first packet and the second packet are packets used to establish the first PW and determine that ASBR3 is the ASBR adjacent to the third AS in the second AS. After that, generate the first corresponding relationship; and, after determining that the first message and the second message are both messages used to establish the first PW and determining that ASBR4 is the ASBR connected to the second AS in the third AS, generate Second Correspondence.

本实施例中,接收单元和发送单元可以为物理接口。In this embodiment, the receiving unit and the sending unit may be physical interfaces.

本实施例中边界路由器的各单元可用于执行图3所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。Each unit of the border router in this embodiment can be used to implement the technical solution of the method embodiment shown in FIG. 3 , and its implementation principle and technical effect are similar, and will not be repeated here.

图10为本发明边界路由器实施例三的结构示意图;本实施例的边界路由器应用于至少包括第一AS、第二AS和第三AS的网络中,第一AS与第二AS相邻,第二AS和第三AS相邻,第二AS中包括采用静态方式配置的多段伪线,边界路由器位于第二AS中,且与第一AS相邻。如图10所示,本实施例的边界路由器包括:接收单元101和发送单元102;其中,接收单元101用于接收第一AS中与第二AS相邻的ASBR1发送的用于建立第一PW的第一报文,第一报文包括第一转发等价类类型长度值(FEC TLV)和第一路径信息TLV,第一路径信息TLV中包括第一源IP地址和第一目的IP地址,第一源IP地址包括第一PE的地址,第一目的IP地址包括第二PE的地址,第一PE为第一PW的第一端点,第二PE为第一PW的第二端点,第一路径信息TLV中的U比特和F比特的取值均为1,ASBR2为采用静态方式配置的多段伪线的一个端点。Fig. 10 is a schematic structural diagram of the third embodiment of the border router of the present invention; the border router of this embodiment is applied to a network including at least the first AS, the second AS and the third AS, the first AS is adjacent to the second AS, and the second AS is adjacent to the second AS. The second AS is adjacent to the third AS, the second AS includes multiple pseudowires configured in a static manner, and the border router is located in the second AS and is adjacent to the first AS. As shown in FIG. 10 , the border router in this embodiment includes: a receiving unit 101 and a sending unit 102; wherein, the receiving unit 101 is used to receive the information for establishing the first PW sent by the ASBR1 adjacent to the second AS in the first AS. The first message, the first message includes the first forwarding equivalence class type length value (FEC TLV) and the first path information TLV, the first path information TLV includes the first source IP address and the first destination IP address, The first source IP address includes the address of the first PE, the first destination IP address includes the address of the second PE, the first PE is the first end point of the first PW, the second PE is the second end point of the first PW, and the first PE is the second end point of the first PW. Both the U bit and the F bit in the path information TLV are 1, and ASBR2 is an endpoint of a statically configured multi-segment pseudowire.

发送单元102用于在确定U比特和F比特的取值均为1后,按照采用静态方式配置的多段伪线的转发规则转发包括第一路径信息TLV的第一报文。The sending unit 102 is configured to forward the first message including the first path information TLV according to the statically configured multi-segment pseudowire forwarding rules after determining that the values of the U bit and the F bit are both 1.

本实施例中,上述实施例中,接收单元和发送单元可以为物理接口。In this embodiment, in the foregoing embodiments, the receiving unit and the sending unit may be physical interfaces.

本实施例的边界路由器中的各单元,可用于执行图4所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。Each unit in the border router of this embodiment can be used to execute the technical solution of the method embodiment shown in FIG. 4 , and its implementation principle and technical effect are similar, and will not be repeated here.

图11为本发明边界路由器实施例四的结构示意图;本实施例中的边界路由器应用于包括第一AS、第二AS和第三AS的网络中,第一AS与第二AS相邻,第二AS和第三AS相邻,第一AS包括采用静态方式配置的多段伪线,边界路由器位于第二AS中,且与第一AS相邻;如图11所示,本实施例的边界路由器包括:获取单元111、接收单元112、报文转换单元113和发送单元114。Figure 11 is a schematic structural diagram of the fourth embodiment of the border router of the present invention; the border router in this embodiment is applied to a network including the first AS, the second AS and the third AS, the first AS is adjacent to the second AS, and the second AS is adjacent to the second AS. The second AS is adjacent to the third AS, the first AS includes a statically configured multi-segment pseudowire, the border router is located in the second AS, and is adjacent to the first AS; as shown in Figure 11, the border router of this embodiment It includes: an acquiring unit 111 , a receiving unit 112 , a message converting unit 113 and a sending unit 114 .

其中,获取单元111用于从第二AS中与第三AS相邻的ASBR3接收用于建立第一PW的第一报文,第一报文包括第一转发等价类类型长度值(FECTLV)和第一路径信息TLV,第一路径信息TLV包括ASBR3的地址和第三AS中与第二AS相邻的ASBR4的地址。Wherein, the obtaining unit 111 is configured to receive the first message for establishing the first PW from the ASBR3 adjacent to the third AS in the second AS, the first message includes the first forwarding equivalence class type length value (FECTLV) and the first path information TLV, the first path information TLV includes the address of ASBR3 and the address of ASBR4 adjacent to the second AS in the third AS.

接收单元112用于从第一AS中与第二AS相邻的ASBR1接收用于建立第一PW的第二报文,第二报文包括第二FEC TLV,ASBR1为采用静态方式配置的多段伪线的一个端点。The receiving unit 112 is configured to receive a second message for establishing the first PW from ASBR1 adjacent to the second AS in the first AS, the second message includes the second FEC TLV, and ASBR1 is a statically configured multi-segment FEC TLV. An endpoint of the line.

报文转换单元113用于在确定第一报文和第二报文均用于建立第一PW后,在第二报文中增加第二路径信息TLV,第二路径信息TLV包括ASBR4的地址。The packet conversion unit 113 is configured to add second path information TLV to the second packet after determining that both the first packet and the second packet are used to establish the first PW, and the second path information TLV includes the address of ASBR4.

发送单元114用于将携带有第二路径信息TLV的第二报文发送至ASBR3,其中ASBR4的地址用于指示ASBR3将携带有第二路径信息TLV的第二报文发送至ASBR4。The sending unit 114 is configured to send the second packet carrying the second path information TLV to ASBR3, wherein the address of ASBR4 is used to instruct ASBR3 to send the second packet carrying the second path information TLV to ASBR4.

本实施例中,接收单元和发送单元可以为物理接口。In this embodiment, the receiving unit and the sending unit may be physical interfaces.

本实施例的边界路由器中的各单元,可用于执行图5所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。Each unit in the border router of this embodiment can be used to implement the technical solution of the method embodiment shown in FIG. 5 , and its implementation principle and technical effect are similar, and will not be repeated here.

图12为本发明边界路由器实施例四的结构示意图;图10是在图9所示实施例的基础上,进一步地,本实施例的边界路由器还包括:确定单元115。FIG. 12 is a schematic structural diagram of the fourth embodiment of the border router of the present invention; FIG. 10 is based on the embodiment shown in FIG. 9 , further, the border router of this embodiment further includes: a determination unit 115 .

确定单元115用于如果第一FEC TLV和第二FEC TLV相匹配,则确定第一报文和第二报文均用于建立第一PW;或,如果第一FEC TLV和第二FECTLV相匹配并且第一路径信息TLV中的兼容标志位被置位,则确定第一报文和第二报文均用于建立第一PW。The determining unit 115 is configured to determine that both the first message and the second message are used to establish the first PW if the first FEC TLV matches the second FEC TLV; or, if the first FEC TLV matches the second FECTLV And if the compatibility flag in the first path information TLV is set, it is determined that both the first packet and the second packet are used to establish the first PW.

在上述实施例中,第一路径信息TLV还包括第一源IP地址和第一目的IP地址,第一源IP地址为第一PE的地址,第一目的IP地址为第二PE的地址,第一PE为第一PW的第一端点,第二PE为第一PW的第二端点。In the above embodiment, the first path information TLV also includes a first source IP address and a first destination IP address, the first source IP address is the address of the first PE, the first destination IP address is the address of the second PE, and the first destination IP address is the address of the second PE. One PE is the first end point of the first PW, and the second PE is the second end point of the first PW.

第二路径信息TLV还包括第二源IP地址和第二目的IP地址,第二源IP地址为第二PE的地址,第二目的IP地址为第一PE的地址。The second path information TLV also includes a second source IP address and a second destination IP address, the second source IP address is the address of the second PE, and the second destination IP address is the address of the first PE.

本实施例的边界路由器中的各单元,可用于执行图5所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。Each unit in the border router of this embodiment can be used to implement the technical solution of the method embodiment shown in FIG. 5 , and its implementation principle and technical effect are similar, and will not be repeated here.

本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件,例如处理器,来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those skilled in the art can understand that all or part of the steps for implementing the above method embodiments can be completed by program instructions related hardware, such as a processor. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above-mentioned method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes.

最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present invention. scope.

Claims (14)

1.一种发送报文的方法,其特征在于,所述方法应用于至少包括第一自治域AS、第二AS和第三AS的网络中,且所述第一AS与所述第二AS相邻,所述第三AS与所述第二AS相邻,所述方法包括:1. A method for sending messages, characterized in that the method is applied to a network including at least a first AS, a second AS, and a third AS, and the first AS and the second AS Adjacent, the third AS is adjacent to the second AS, the method includes: 所述第二AS中与所述第一AS相邻的边界路由器ASBR2接收所述第一AS中与所述第二AS相邻的ASBR1发送的用于建立第一伪线路PW的第一报文,所述第一报文包括第一转发等价类类型长度值TLV和第一路径信息TLV,所述第一路径信息TLV中包括第一源IP地址和第一目的IP地址,所述第一源IP地址包括第一PE的地址,所述第一目的IP地址包括第二PE的地址,所述第一PE为所述第一PW的第一端点,所述第二PE为所述第一PW的第二端点;The border router ASBR2 adjacent to the first AS in the second AS receives the first message for establishing the first pseudowire PW sent by the ASBR1 adjacent to the second AS in the first AS , the first message includes a first forwarding equivalence class type length value TLV and a first path information TLV, the first path information TLV includes a first source IP address and a first destination IP address, and the first The source IP address includes the address of the first PE, the first destination IP address includes the address of the second PE, the first PE is the first end point of the first PW, and the second PE is the address of the second PE. a second endpoint of the PW; 当所述第二PE在所述第二AS之外时,所述ASBR2根据所述第一转发等价类TLV、所述第一源IP地址和第一对应关系确定所述第二AS中与所述第三AS相邻的ASBR3的地址,所述第一对应关系包括所述第一转发等价类TLV、所述第一源IP地址和所述ASBR3的地址的对应关系,以及,所述ASBR2根据所述第一转发等价类TLV、所述第一源IP地址和第二对应关系确定所述第三AS中与所述第二AS相邻的ASBR4的地址,所述第二对应关系包括所述第一转发等价类TLV、所述第一源IP地址和所述ASBR4的地址的对应关系;When the second PE is outside the second AS, the ASBR2 determines according to the first forwarding equivalence class TLV, the first source IP address, and the first corresponding relationship The address of the ASBR3 adjacent to the third AS, the first correspondence includes the first forwarding equivalence class TLV, the correspondence between the first source IP address and the address of the ASBR3, and the ASBR2 determines the address of ASBR4 adjacent to the second AS in the third AS according to the first forwarding equivalence class TLV, the first source IP address, and a second correspondence, and the second correspondence including the correspondence between the first forwarding equivalence class TLV, the first source IP address, and the address of the ASBR4; 所述ASBR2向所述ASBR3发送第一报文,被所述ASBR2发送给所述ASBR3的第一报文的第一路径信息TLV中包括所述第一源IP地址和所述ASBR4的地址。The ASBR2 sends a first packet to the ASBR3, and the first path information TLV of the first packet sent by the ASBR2 to the ASBR3 includes the first source IP address and the address of the ASBR4. 2.根据权利要求1所述的方法,其特征在于,所述第一对应关系和所述第二对应关系被配置到所述ASBR2中,或,所述ASBR2通过学习的方式获取所述第一对应关系和所述第二对应关系。2. The method according to claim 1, wherein the first correspondence and the second correspondence are configured in the ASBR2, or the ASBR2 obtains the first correspondence through learning. Correspondence and the second correspondence. 3.根据权利要求2所述的方法,其特征在于,所述ASBR2通过学习的方式获取所述第一对应关系和所述第二对应关系包括:3. The method according to claim 2, wherein the acquisition of the first correspondence and the second correspondence by the ASBR2 through learning comprises: 所述ASBR2接收所述第二PE发送的用于建立所述第一PW的第二报文,所述第二报文包括第二转发等价类TLV和第二路径信息TLV,所述第二路径信息TLV包括第二源IP地址、第二目的IP地址、所述ASBR1的地址、所述ASBR2的地址、所述ASBR3的地址和所述ASBR4的地址,所述第二源IP地址为所述第二PE的地址,所述第二目的IP地址为所述第一PE的地址;The ASBR2 receives a second packet sent by the second PE for establishing the first PW, the second packet includes a second forwarding equivalence class TLV and a second path information TLV, and the second The path information TLV includes a second source IP address, a second destination IP address, the address of the ASBR1, the address of the ASBR2, the address of the ASBR3, and the address of the ASBR4, and the second source IP address is the The address of the second PE, the second destination IP address is the address of the first PE; 所述ASBR2在确定所述第一报文和所述第二报文均为用于建立所述第一PW的报文并且确定所述ASBR3为所述第二AS中与所述第三AS相邻的ASBR后,生成所述第一对应关系;When the ASBR2 determines that the first packet and the second packet are both packets used to establish the first PW and determines that the ASBR3 is the second AS, it is related to the third AS After the adjacent ASBR, generate the first corresponding relationship; 所述ASBR2在确定所述第一报文和所述第二报文均为用于建立所述第一PW的报文并且确定所述ASBR4为所述第三AS中与所述第二AS相连的ASBR后,生成所述第二对应关系。The ASBR2 is connected to the second AS after determining that the first message and the second message are both messages used to establish the first PW and determining that the ASBR4 is the third AS After the ASBR, generate the second corresponding relationship. 4.一种发送报文的方法,其特征在于,所述方法应用于至少包括第一自治域AS、第二AS和第三AS的网络中,所述第一AS与所述第二AS相邻,所述第二AS和所述第三AS相邻,所述第二AS中包括采用静态方式配置的多段伪线,所述方法包括:4. A method for sending messages, characterized in that the method is applied to a network including at least a first AS, a second AS, and a third AS, and the first AS is connected to the second AS Adjacent, the second AS is adjacent to the third AS, the second AS includes multiple pseudowires configured in a static manner, and the method includes: 所述第二AS中与所述第一AS相邻的ASBR2接收所述第一AS中与所述第二AS相邻的ASBR1发送的用于建立第一伪线路PW的第一报文,所述第一报文包括第一转发等价类类型长度值TLV和第一路径信息TLV,所述第一路径信息TLV中包括第一源IP地址和第一目的IP地址,所述第一源IP地址包括第一PE的地址,所述第一目的IP地址包括第二PE的地址,所述第一PE为所述第一PW的第一端点,所述第二PE为所述第一PW的第二端点,所述第一路径信息TLV中的U比特和F比特的取值均为1,所述ASBR2为所述采用静态方式配置的多段伪线的一个端点;The ASBR2 adjacent to the first AS in the second AS receives the first message for establishing the first pseudowire PW sent by the ASBR1 adjacent to the second AS in the first AS, and the The first message includes a first forwarding equivalence class type length value TLV and a first path information TLV, and the first path information TLV includes a first source IP address and a first destination IP address, and the first source IP The address includes the address of the first PE, the first destination IP address includes the address of the second PE, the first PE is the first endpoint of the first PW, and the second PE is the first PW The second endpoint of the first path information TLV, the value of the U bit and the F bit in the first path information TLV are both 1, and the ASBR2 is an endpoint of the statically configured multi-segment pseudowire; 所述ASBR2在确定U比特和F比特的取值均为1后,按照所述采用静态方式配置的多段伪线的转发规则转发包括所述第一路径信息TLV的第一报文。The ASBR2 forwards the first packet including the first path information TLV according to the forwarding rule of the statically configured multi-segment pseudowire after determining that the values of the U bit and the F bit are both 1. 5.一种发送报文的方法,其特征在于,所述方法应用于包括第一自治域AS、第二AS和第三AS的网络中,所述第一AS与所述第二AS相邻,所述第二AS和所述第三AS相邻,所述第一AS包括采用静态方式配置的多段伪线,所述方法包括:5. A method for sending a message, characterized in that the method is applied to a network comprising a first autonomous domain AS, a second AS and a third AS, and the first AS is adjacent to the second AS , the second AS is adjacent to the third AS, the first AS includes a statically configured multi-segment pseudowire, and the method includes: 所述第二AS中与所述第一AS相邻的ASBR2从所述第二AS中与所述第三AS相邻的ASBR3接收用于建立第一伪线路PW的第一报文,所述第一报文包括第一转发等价类类型长度值TLV和第一路径信息TLV,所述第一路径信息TLV包括所述ASBR3的地址和所述第三AS中与所述第二AS相邻的ASBR4的地址;The ASBR2 adjacent to the first AS in the second AS receives a first packet for establishing a first pseudowire PW from the ASBR3 adjacent to the third AS in the second AS, the The first message includes the first forwarding equivalence class type length value TLV and the first path information TLV, and the first path information TLV includes the address of the ASBR3 and the address of the third AS adjacent to the second AS The address of the ASBR4; 所述ASBR2从所述第一AS中与所述第二AS相邻的ASBR1接收用于建立第一PW的第二报文,所述第二报文包括第二转发等价类TLV,所述ASBR1为所述采用静态方式配置的多段伪线的一个端点;The ASBR2 receives a second message for establishing the first PW from the ASBR1 adjacent to the second AS in the first AS, the second message includes a second forwarding equivalence class TLV, and the ASBR1 is an endpoint of the statically configured multi-segment pseudowire; 所述ASBR2在确定所述第一报文和所述第二报文均用于建立所述第一PW后,在所述第二报文中增加第二路径信息TLV,所述第二路径信息TLV包括所述ASBR4的地址;After the ASBR2 determines that both the first message and the second message are used to establish the first PW, it adds a second path information TLV to the second message, and the second path information TLV includes the address of said ASBR4; 所述ASBR2将携带有所述第二路径信息TLV的所述第二报文发送至所述ASBR3,其中所述ASBR4的地址用于指示所述ASBR3将携带有所述第二路径信息TLV的所述第二报文发送至所述ASBR4。The ASBR2 sends the second packet carrying the second path information TLV to the ASBR3, wherein the address of the ASBR4 is used to indicate that the ASBR3 will carry all the packets carrying the second path information TLV Send the second packet to the ASBR4. 6.根据权利要求5所述的方法,其特征在于,所述方法还包括:6. The method according to claim 5, further comprising: 如果所述第一转发等价类TLV和所述第二转发等价类TLV相匹配,则确定所述第一报文和所述第二报文均用于建立第一PW;If the first forwarding equivalence class TLV matches the second forwarding equivalence class TLV, determine that both the first packet and the second packet are used to establish a first PW; 或,or, 如果所述第一转发等价类TLV和所述第二转发等价类TLV相匹配并且所述第一路径信息TLV中的兼容标志位被置位,则确定所述第一报文和所述第二报文均用于建立所述第一PW。If the first forwarding equivalence class TLV matches the second forwarding equivalence class TLV and the compatible flag bit in the first path information TLV is set, determine that the first packet and the The second packets are all used to establish the first PW. 7.根据权利要求5或6所述的方法,其特征在于,所述第一路径信息TLV还包括第一源IP地址和第一目的IP地址,所述第一源IP地址为第一PE的地址,所述第一目的IP地址为第二PE的地址,所述第一PE为所述第一PW的第一端点,所述第二PE为所述第一PW的第二端点;7. The method according to claim 5 or 6, wherein the first path information TLV further includes a first source IP address and a first destination IP address, and the first source IP address is the IP address of the first PE address, the first destination IP address is the address of the second PE, the first PE is the first endpoint of the first PW, and the second PE is the second endpoint of the first PW; 所述第二路径信息TLV还包括第二源IP地址和第二目的IP地址,所述第二源IP地址为第二PE的地址,所述第二目的IP地址为第一PE的地址。The second path information TLV further includes a second source IP address and a second destination IP address, the second source IP address is the address of the second PE, and the second destination IP address is the address of the first PE. 8.一种边界路由器,其特征在于,应用于至少包括第一自治域AS、第二AS和第三AS的网络中,且所述第一AS与所述第二AS相邻,所述第三AS与所述第二AS相邻,所述边界路由器位于所述第二AS中,且与第一AS相邻,所述边界路由器包括:8. A border router, characterized in that it is applied in a network including at least a first AS, a second AS, and a third AS, and the first AS is adjacent to the second AS, and the first AS is adjacent to the second AS. The three ASs are adjacent to the second AS, the border router is located in the second AS, and is adjacent to the first AS, and the border router includes: 接收单元,用于接收所述第一AS中与所述第二AS相邻的ASBR1发送的用于建立第一伪线路PW的第一报文,所述第一报文包括第一转发等价类类型长度值TLV和第一路径信息TLV,所述第一路径信息TLV中包括第一源IP地址和第一目的IP地址,所述第一源IP地址包括第一PE的地址,所述第一目的IP地址包括第二PE的地址,所述第一PE为所述第一PW的第一端点,所述第二PE为所述第一PW的第二端点;A receiving unit, configured to receive a first message for establishing a first pseudowire PW sent by an ASBR1 adjacent to the second AS in the first AS, where the first message includes a first forwarding equivalent class type length value TLV and first path information TLV, the first path information TLV includes a first source IP address and a first destination IP address, the first source IP address includes the address of the first PE, and the first A destination IP address includes an address of a second PE, the first PE is a first endpoint of the first PW, and the second PE is a second endpoint of the first PW; 地址获取单元,用于当所述第二PE在所述第二AS之外时,根据所述第一转发等价类TLV、所述第一源IP地址和第一对应关系确定所述第二AS中与所述第三AS相邻的ASBR3的地址,所述第一对应关系包括所述第一转发等价类TLV、所述第一源IP地址和所述ASBR3的地址的对应关系;以及,根据所述第一转发等价类TLV、所述第一源IP地址和第二对应关系确定所述第三AS中与所述第二AS相邻的ASBR4的地址,所述第二对应关系包括所述第一转发等价类TLV、所述第一源IP地址和所述ASBR4的地址的对应关系;An address obtaining unit, configured to determine the second PE according to the first forwarding equivalence class TLV, the first source IP address, and the first correspondence when the second PE is outside the second AS. an address of ASBR3 adjacent to the third AS in the AS, the first correspondence includes a correspondence between the first forwarding equivalence class TLV, the first source IP address, and the address of ASBR3; and , determining the address of the ASBR4 adjacent to the second AS in the third AS according to the first forwarding equivalence class TLV, the first source IP address, and a second correspondence, the second correspondence including the correspondence between the first forwarding equivalence class TLV, the first source IP address, and the address of the ASBR4; 发送单元,用于向所述ASBR3发送第一报文,被所述ASBR2发送给所述ASBR3的第一报文的第一路径信息TLV中包括所述第一源IP地址和所述ASBR4的地址。A sending unit, configured to send a first message to the ASBR3, the first path information TLV of the first message sent to the ASBR3 by the ASBR2 includes the first source IP address and the address of the ASBR4 . 9.根据权利要求8所述的边界路由器,其特征在于,所述边界路由器还包括:9. The border router according to claim 8, wherein the border router further comprises: 存储单元,用于存储被配置的所述第一对应关系和所述第二对应关系;或,a storage unit, configured to store the configured first correspondence and the second correspondence; or, 学习单元,用于通过学习的方式获取所述第一对应关系和所述第二对应关系。A learning unit, configured to acquire the first corresponding relationship and the second corresponding relationship through learning. 10.根据权利要求9所述的边界路由器,其特征在于,所述接收单元还用于接收所述第二PE发送的用于建立所述第一PW的第二报文,所述第二报文包括第二转发等价类TLV和第二路径信息TLV,所述第二路径信息TLV包括第二源IP地址、第二目的IP地址、所述ASBR1的地址、所述ASBR2的地址、所述ASBR3的地址和所述ASBR4的地址,所述第二源IP地址为所述第二PE的地址,所述第二目的IP地址为所述第一PE的地址;10. The border router according to claim 9, wherein the receiving unit is further configured to receive a second packet sent by the second PE for establishing the first PW, the second packet The text includes the second forwarding equivalence class TLV and the second path information TLV, and the second path information TLV includes the second source IP address, the second destination IP address, the address of ASBR1, the address of ASBR2, the The address of ASBR3 and the address of ASBR4, the second source IP address is the address of the second PE, and the second destination IP address is the address of the first PE; 所述学习单元具体用于在确定所述第一报文和所述第二报文均为用于建立所述第一PW的报文并且确定所述ASBR3为所述第二AS中与所述第三AS相邻的ASBR后,生成所述第一对应关系;以及,在确定所述第一报文和所述第二报文均为用于建立所述第一PW的报文并且确定所述ASBR4为所述第三AS中与所述第二AS相连的ASBR后,生成所述第二对应关系。The learning unit is specifically configured to determine that both the first message and the second message are messages used to establish the first PW and determine that the ASBR3 is the second AS and that the After the third AS is adjacent to the ASBR, generate the first correspondence; and, after determining that both the first packet and the second packet are packets used to establish the first PW and determining the After the ASBR4 is the ASBR connected to the second AS in the third AS, the second corresponding relationship is generated. 11.一种边界路由器,应用于至少包括第一自治域AS、第二AS和第三AS的网络中,所述第一AS与所述第二AS相邻,所述第二AS和所述第三AS相邻,所述第二AS中包括采用静态方式配置的多段伪线,所述边界路由器位于所述第二AS中,且与所述第一AS相邻,其特征在于,所述边界路由器包括:11. A border router, applied in a network comprising at least a first autonomous domain AS, a second AS and a third AS, the first AS is adjacent to the second AS, the second AS and the The third AS is adjacent, the second AS includes statically configured multi-segment pseudowires, the border router is located in the second AS, and is adjacent to the first AS, wherein the Border routers include: 接收单元,用于接收所述第一AS中与所述第二AS相邻的ASBR1发送的用于建立第一伪线路PW的第一报文,所述第一报文包括第一转发等价类类型长度值TLV和第一路径信息TLV,所述第一路径信息TLV中包括第一源IP地址和第一目的IP地址,所述第一源IP地址包括第一PE的地址,所述第一目的IP地址包括第二PE的地址,所述第一PE为所述第一PW的第一端点,所述第二PE为所述第一PW的第二端点,所述第一路径信息TLV中的U比特和F比特的取值均为1,所述ASBR2为所述采用静态方式配置的多段伪线的一个端点;A receiving unit, configured to receive a first message for establishing a first pseudowire PW sent by an ASBR1 adjacent to the second AS in the first AS, where the first message includes a first forwarding equivalent class type length value TLV and first path information TLV, the first path information TLV includes a first source IP address and a first destination IP address, the first source IP address includes the address of the first PE, and the first A destination IP address includes an address of a second PE, the first PE is the first end point of the first PW, the second PE is the second end point of the first PW, and the first path information The values of the U bit and the F bit in the TLV are both 1, and the ASBR2 is an endpoint of the statically configured multi-segment pseudowire; 发送单元,用于在确定U比特和F比特的取值均为1后,按照所述采用静态方式配置的多段伪线的转发规则转发包括所述第一路径信息TLV的第一报文。The sending unit is configured to forward the first message including the first path information TLV according to the statically configured multi-segment pseudowire forwarding rules after determining that both the U bit and the F bit have values of 1. 12.一种边界路由器,应用于包括第一自治域AS、第二AS和第三AS的网络中,所述第一AS与所述第二AS相邻,所述第二AS和所述第三AS相邻,所述第一AS包括采用静态方式配置的多段伪线,所述边界路由器位于所述第二AS中,且与所述第一AS相邻,其特征在于,所述边界路由器包括:12. A border router, applied to a network including a first autonomous domain AS, a second AS and a third AS, the first AS is adjacent to the second AS, the second AS and the first AS Three ASs are adjacent, the first AS includes a statically configured multi-segment pseudowire, the border router is located in the second AS and is adjacent to the first AS, and the border router is characterized in that include: 获取单元,用于从所述第二AS中与所述第三AS相邻的ASBR3接收用于建立第一伪线路PW的第一报文,所述第一报文包括第一转发等价类类型长度值TLV和第一路径信息TLV,所述第一路径信息TLV包括所述ASBR3的地址和所述第三AS中与所述第二AS相邻的ASBR4的地址;An acquiring unit, configured to receive a first message for establishing a first pseudowire PW from an ASBR3 adjacent to the third AS in the second AS, where the first message includes a first forwarding equivalence class type length value TLV and first path information TLV, where the first path information TLV includes the address of ASBR3 and the address of ASBR4 adjacent to the second AS in the third AS; 接收单元,用于从所述第一AS中与所述第二AS相邻的ASBR1接收用于建立第一PW的第二报文,所述第二报文包括第二转发等价类TLV,所述ASBR1为所述采用静态方式配置的多段伪线的一个端点;a receiving unit, configured to receive a second packet for establishing a first PW from an ASBR1 adjacent to the second AS in the first AS, where the second packet includes a second forwarding equivalence class TLV, The ASBR1 is an endpoint of the statically configured multi-segment pseudowire; 报文转换单元,用于在确定所述第一报文和所述第二报文均用于建立所述第一PW后,在所述第二报文中增加第二路径信息TLV,所述第二路径信息TLV包括所述ASBR4的地址;A message converting unit, configured to add a second path information TLV to the second message after determining that both the first message and the second message are used to establish the first PW, the The second path information TLV includes the address of the ASBR4; 发送单元,用于将携带有所述第二路径信息TLV的所述第二报文发送至所述ASBR3,其中所述ASBR4的地址用于指示所述ASBR3将携带有所述第二路径信息TLV的所述第二报文发送至所述ASBR4。a sending unit, configured to send the second packet carrying the second path information TLV to the ASBR3, wherein the address of the ASBR4 is used to indicate that the ASBR3 will carry the second path information TLV Send the second packet to the ASBR4. 13.根据权利要求12所述的边界路由器,其特征在于,还包括:13. The border router according to claim 12, further comprising: 确定单元,用于在所述第一转发等价类TLV和所述第二转发等价类TLV相匹配的情况下,确定所述第一报文和所述第二报文均用于建立第一PW;或,在所述第一转发等价类TLV和所述第二转发等价类TLV相匹配并且所述第一路径信息TLV中的兼容标志位被置位的情况下,确定所述第一报文和所述第二报文均用于建立所述第一PW。a determining unit, configured to determine that both the first packet and the second packet are used to establish the first forwarding equivalence class TLV and the second forwarding equivalence class TLV A PW; or, in the case that the first forwarding equivalence class TLV matches the second forwarding equivalence class TLV and the compatible flag bit in the first path information TLV is set, determine the Both the first packet and the second packet are used to establish the first PW. 14.根据权利要求12或13所述的边界路由器,其特征在于,所述第一路径信息TLV还包括第一源IP地址和第一目的IP地址,所述第一源IP地址为第一PE的地址,所述第一目的IP地址为第二PE的地址,所述第一PE为所述第一PW的第一端点,所述第二PE为所述第一PW的第二端点;14. The border router according to claim 12 or 13, wherein the first path information TLV further includes a first source IP address and a first destination IP address, and the first source IP address is the first PE address, the first destination IP address is the address of the second PE, the first PE is the first endpoint of the first PW, and the second PE is the second endpoint of the first PW; 所述第二路径信息TLV还包括第二源IP地址和第二目的IP地址,所述第二源IP地址为第二PE的地址,所述第二目的IP地址为第一PE的地址。The second path information TLV further includes a second source IP address and a second destination IP address, the second source IP address is the address of the second PE, and the second destination IP address is the address of the first PE.
CN201210456882.3A 2012-11-14 2012-11-14 Send method and the border router of message Active CN102916878B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210456882.3A CN102916878B (en) 2012-11-14 2012-11-14 Send method and the border router of message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210456882.3A CN102916878B (en) 2012-11-14 2012-11-14 Send method and the border router of message

Publications (2)

Publication Number Publication Date
CN102916878A CN102916878A (en) 2013-02-06
CN102916878B true CN102916878B (en) 2015-07-29

Family

ID=47615114

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210456882.3A Active CN102916878B (en) 2012-11-14 2012-11-14 Send method and the border router of message

Country Status (1)

Country Link
CN (1) CN102916878B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101277245A (en) * 2008-05-06 2008-10-01 华为技术有限公司 A method, system and device for implementing L2VPN cross-domain
CN101877892A (en) * 2009-04-29 2010-11-03 华为技术有限公司 Negotiation method of node associated channel capability and node equipment
CN102004199A (en) * 2010-10-26 2011-04-06 深圳市科陆电子科技股份有限公司 Alternating current charging post in-situ test device and method
CN102244615A (en) * 2011-08-15 2011-11-16 福建星网锐捷网络有限公司 Forwarding entry sending method, device and system as well as autonomous system border router

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1917779B1 (en) * 2005-08-26 2012-02-22 Nortel Networks Limited Method for establishing multi segment pseudowire across domains having different pseudowire signaling protocol

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101277245A (en) * 2008-05-06 2008-10-01 华为技术有限公司 A method, system and device for implementing L2VPN cross-domain
CN101877892A (en) * 2009-04-29 2010-11-03 华为技术有限公司 Negotiation method of node associated channel capability and node equipment
CN102004199A (en) * 2010-10-26 2011-04-06 深圳市科陆电子科技股份有限公司 Alternating current charging post in-situ test device and method
CN102244615A (en) * 2011-08-15 2011-11-16 福建星网锐捷网络有限公司 Forwarding entry sending method, device and system as well as autonomous system border router

Also Published As

Publication number Publication date
CN102916878A (en) 2013-02-06

Similar Documents

Publication Publication Date Title
Gredler et al. North-bound distribution of link-state and traffic engineering (TE) information using BGP
CN109417508B (en) A method and device for constructing a PCE network topology of a hierarchical path calculation unit
CN103004147B (en) Message forwarding path determining method, network device and control device
CN104486236B (en) The method and routing device of load balancing
US9900242B2 (en) Performance-based routing method and device
CN102130813B (en) Pseudo line establishing method, system and equipment
CN103580894B (en) Method, equipment and the system of Operations, Administration and Maintenance OAM configurations
CN103475557B (en) Tunnel setup method and router
US9166903B2 (en) System, method and apparatus to resolve RPF-vector attribute conflicts
WO2017141076A1 (en) Stateless multicast protocol for low-power and lossy networks
CN106603412B (en) Flow rule sending method, path calculation unit and path calculation client
US20150131672A1 (en) Method, device and system for establishing a pseudo wire
CN101989947A (en) Associated channel capability negotiation method and network device
CN103384220B (en) A kind of method for building up of Traffic Engineering Label switching path, equipment and system
WO2013120418A1 (en) Policy-based customized routing method and device
JP5138832B2 (en) Method and apparatus for point-to-multipoint traffic path coding
CN103098423A (en) Method of communicating across different domains and network apparatus
CN100574247C (en) Ethernet tunnel processing method and communication system and relevant device
CN102916878B (en) Send method and the border router of message
CN102904809A (en) Bandwidth resource management method, device and system for label forwarding path
CN104753705B (en) Generation method, equipment and the system in the domains DS
CN102957611A (en) System, equipment and method for setup of P2MP MS-PW (point-to-multipoint multi-segment pseudo wire)
WO2018205887A1 (en) Delay collection method and apparatus
Talaulikar Distribution of Link-State and Traffic Engineering Information Using BGP
US20230179515A1 (en) Routing protocol broadcast link extensions

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