Method and apparatus for establishing multicast tunnel
Abstract
The present application provides a method for establishing a multicast tunnel, capable of reducing the costs of a forwarding plane and improving the forwarding efficiency. The method comprises: a first forwarding device sends a request message to a second forwarding device, the request message comprising label block information and a path identifier, the label block information being used for representing the size of a label block, the path identifier being used for identifying a tunnel, between the first forwarding device and the second forwarding device, corresponding to a virtual private network (VPN), the first forwarding device being an upstream device of the second forwarding device; the first forwarding device receives a response message sent by the second forwarding device, the response message comprising a first label and the path identifier, the first label being an initial label of the label block determined according to the label block information; the first forwarding device obtains a forwarding entry corresponding to the tunnel according to the first label and the path identifier.

Term
No projected expiry on record.
- Priority
- Filed
- Published
- Today
16 claims: 4 independent, 12 dependent
- 1A method for establishing a multicast tunnel, characterized in that, the method comprises:一种建立组播隧道的方法,其特征在于,所述方法包括: The first forwarding device sends a request message to the second forwarding device, where the request message includes information of a label block and an identifier of a path, where the information of the label block is used to indicate a size of a label block, and the identifier of the path is used to identify A tunnel corresponding to a virtual private network VPN between a first forwarding device and the second forwarding device, where the first forwarding device is an upstream device of the second forwarding device;第一转发设备向第二转发设备发送请求消息,所述请求消息包括标签块的信息和路径的标识,所述标签块的信息用于表示标签块的大小,所述路径的标识用于标识所述第一转发设备与所述第二转发设备间与虚拟专用网VPN对应的隧道,所述第一转发设备是所述第二转发设备的上游设备;Receiving, by the first forwarding device, a response message sent by the second forwarding device, where the response message includes a first label and an identifier of the path, where the first label is determined according to the information about the label block The initial tag of the block 所述第一转发设备接收所述第二转发设备发送的响应消息,所述响应消息包括第一标签和所述路径的标识,所述第一标签是根据所述标签块的信息确定的所述标签块的起始标签;By the first forwarding device, a forwarding entry corresponding to the tunnel according to the first label and the identifier of the path. 所述第一转发设备根据所述第一标签和所述路径的标识,获得与所述隧道对应的转发表项。
- 6A method for establishing a multicast tunnel, characterized in that, the method comprises:一种建立组播隧道的方法,其特征在于,所述方法包括: The second forwarding device receives the request message sent by the first forwarding device, and the second forwarding device is the first forwarding Device, where the request message includes information of a label block and an identifier of a path, where the information of the label block is used to indicate a size of a label block, and an identifier of the path is used to identify a tunnel corresponding to a virtual private network VPN;第二转发设备接收第一转发设备发送的请求消息,所述第二转发设备是所述第一转发 设备的下游设备,所述请求消息包括标签块的信息和路径的标识,所述标签块的信息用于表示标签块的大小,所述路径的标识用于标识与虚拟专用网VPN对应的隧道;By the second forwarding device, a first label according to the information of the label block, where the first label is a starting label of the label block that is determined according to the information of the label block;所述第二转发设备根据所述标签块的信息,获得第一标签,所述第一标签是根据所述标签块的信息确定的所述标签块的起始标签;Sending, by the second forwarding device, a response message to the first forwarding device, where the response message includes an identifier of the first label and the path. 所述第二转发设备向所述第一转发设备发送响应消息,所述响应消息包括所述第一标签和所述路径的标识。
- 9A first forwarding device, wherein the first forwarding device comprises:一种第一转发设备,其特征在于,所述第一转发设备包括: The first sending unit is configured to send a request message to the second forwarding device, where the request message includes information about a label block and an identifier of a path, where the information about the label block is used to indicate a size of a label block, In a tunnel corresponding to a virtual private network VPN between the first forwarding device and the second forwarding device, where the first forwarding device is an upstream device of the second forwarding device;第一发送单元,用于向第二转发设备发送请求消息,所述请求消息包括标签块的信息和路径的标识,所述标签块的信息用于表示标签块的大小,所述路径的标识用于标识所述第一转发设备与所述第二转发设备间与虚拟专用网VPN对应的隧道,所述第一转发设备是所述第二转发设备的上游设备;A first receiving unit, configured to receive a response message sent by the second forwarding device, where the response message includes a first label and an identifier of the path, where the first label is determined according to the information about the label block The first label of the label 第一接收单元,用于接收所述第二转发设备发送的响应消息,所述响应消息包括第一标签和所述路径的标识,所述第一标签是根据所述标签块的信息确定的所述标签块的起始标签;The first obtaining unit is configured to obtain a forwarding entry corresponding to the tunnel according to the first label and the identifier of the path. 第一获得单元,用于根据所述第一标签和所述路径的标识,获得与所述隧道对应的转发表项。
- 14A second forwarding device, characterized in that, the second forwarding device comprises:一种第二转发设备,其特征在于,所述第二转发设备包括: A receiving unit, configured to receive a request message sent by a first forwarding device, where the second forwarding device is a downstream device of the first forwarding device, where the request message includes information of a label block and an identifier of a path, and the label block Is used to indicate the size of a label block, and the identifier of the path is used to identify a tunnel corresponding to a virtual private network VPN;接收单元,用于接收第一转发设备发送的请求消息,所述第二转发设备是所述第一转发设备的下游设备,所述请求消息包括标签块的信息和路径的标识,所述标签块的信息用于表示标签块的大小,所述路径的标识用于标识与虚拟专用网VPN对应的隧道;A first obtaining unit, configured to obtain a first label according to the information of the label block, where the first label is a starting label of the label block determined according to the information of the label block;第一获得单元,用于根据所述标签块的信息,获得第一标签,所述第一标签是根据所述标签块的信息确定的所述标签块的起始标签;A sending unit, configured to send a response message to the first forwarding device, where the response message includes an identifier of the first label and the path. 发送单元,用于向所述第一转发设备发送响应消息,所述响应消息包括所述第一标签和所述路径的标识。
Independent claims4
320 paragraphs in 1 section, as filed
A method and device for establishing a multicast tunnel
This application claims the priority of Chinese Patent Application No. CN 201610546280.5 filed on July 12, 2016 by the Chinese Patent Office with the title of "A Method and Apparatus for Establishing a Multicast Tunnel", the entire content of which is hereby incorporated by reference In this application.
Technical field
The present application relates to the field of communications, and in particular, to a method and an apparatus for establishing a multicast tunnel.
Background technique
Multicast virtual private network (MVPN) multicast forwarding can be implemented using an aggregate tunnel. Multiple MVPNs can use the same aggregation tunnel for multicast forwarding. Therefore, corresponding labels need to be configured for different VPNs on the forwarding devices included in the aggregation tunnel so that multiple VPNs share one aggregation tunnel.
Currently, when labels are configured for different VPNs, if labels are configured in an upstream-assigned manner, the label space on the forwarding device included in the aggregation tunnel needs to store N context labels in addition to the global label space (label context) label space, the total label space label into a 20bit * (1 + N), that is, one million labels. If the forwarding device uses linear forwarding, the label contained in the label needs to generate billions of forwarding entries, which makes it impossible for the forwarding device to use linear tables for saving and searching for labels. In other words, in the process of forwarding a packet by using the label in the packet and the generated forwarding entry, finding the forwarding entry that matches the label in the packet is heavy, and the forwarding plane is more expensive .
<u>Content of the invention</u>
In view of this, the embodiments of the present application provide a method and apparatus for establishing a multicast tunnel, which helps to reduce the cost of the forwarding plane and improve the forwarding efficiency.
The technical solutions provided by the embodiments of the present application are as follows.
According to a first aspect, a method for establishing a multicast tunnel is provided, where the method includes:
The first forwarding device sends a request message to the second forwarding device, where the request message includes information of a label block and an identifier of a path, where the information of the label block is used to indicate a size of a label block, and the identifier of the path is used to identify A tunnel corresponding to a virtual private network VPN between a first forwarding device and the second forwarding device, where the first forwarding device is an upstream device of the second forwarding device;
Receiving, by the first forwarding device, a response message sent by the second forwarding device, where the response message includes a first label and an identifier of the path, where the first label is determined according to the information about the label block The initial tag of the block
By the first forwarding device, a forwarding entry corresponding to the tunnel according to the first label and the identifier of the path.
In the method provided by the embodiment of the present application, the first forwarding device may obtain, according to a starting label of a label block sent by a second forwarding device, such as a first label, and an identifier of the path, a forwarding entry capable of linear search, Compared with the conventional upstream-assigned mode, it helps to reduce the forwarding cost required by the forwarding plane to support the upstream-assigned mode, and also helps to reduce storage space and improve forwarding efficiency.
Optionally, the method provided in this embodiment of the present application may be applied in an MVPN scenario. The tunnel is a P2MP tunnel, or the tunnel is a P2P tunnel. If the tunnel is a P2MP tunnel, the first forwarding device is a PE device, the second forwarding device is a P device, or both the first forwarding device and the second forwarding device are PE devices. If the tunnel is a P2P tunnel, both the first forwarding device and the second forwarding device are PE devices.
Optionally, the request message may be a path path message, and a session field of the path message may carry the information of the tag block. The response message may be a resource reservation protocol RSVP message, and a session field of the RSVP message may carry the first label and the identifier of the path.
Optionally, the method further includes: determining, by the first forwarding device, a tunnel corresponding to the VPN; acquiring, by the first forwarding device, the information about the tag block according to the tunnel corresponding to the VPN, The information of the label block is determined by the number of VPNs corresponding to the tunnel.
Optionally, that obtaining, by the first forwarding device according to the identifier of the first label and the path, a forwarding entry corresponding to the tunnel includes: obtaining, by the first forwarding device, a group according to the identifier of the path And the identifier of the multicast is used to identify multicast forwarding information corresponding to the path; obtaining, by the first forwarding device according to the identifier of the path, an identifier of an outbound interface, where the outbound interface is the An interface on the first forwarding device that communicates with the second forwarding device; obtaining, by the first forwarding device, the forwarding entry according to the identifier of the first label, the multicast, and the identifier of the egress interface, Where the forwarding entry includes a second label, an identifier of the multicast, and an identifier of the egress interface, and the second label is a label obtained according to the first label and an offset, where the offset The value corresponds to VPN.
In the method provided by the embodiment of the present application, when the value of the first label is determined, the value of the second label is determined by the value of the offset, and the value of the offset is determined by a VPN OK, for example, you can establish the correspondence between VPN and offset values. In this way, when the value of the first label is determined, the value of the second label corresponds to the VPN.
Optionally, the method further includes: receiving, by the first forwarding device, a first packet from the VPN and obtaining an identifier of the VPN; and the first forwarding device obtains, according to the forwarding entry, the first Obtain a second packet and send the second packet to the second forwarding device, where the second packet is a multicast packet that is sent to the second forwarding device through the tunnel.
Optionally, the first forwarding device may obtain the identifier of the VPN according to the interface that receives the first packet. Alternatively, the first packet may carry the information related to the VPN, and the first forwarding device may obtain the identifier of the VPN according to the information related to the VPN in the first packet.
Optionally, that the first forwarding device obtains the second packet according to the forwarding entry, the first packet, and the identifier of the VPN and sends the second packet to the second forwarding device includes that: the first The forwarding device obtains the value of the offset corresponding to the VPN according to the correspondence and the identifier of the VPN, where the correspondence includes the identifier of the VPN and the value of the offset; and the first forwarding device determines, according to The forwarding entry, and the value of the offset, to obtain the identifiers of the third label and the egress interface, and the third label is a label obtained according to the value of the first label and the offset, and the An egress interface for communicating with the second forwarding device; sending, by the first forwarding device, the second packet to the second forwarding device according to the identifier of the egress interface, where the second packet includes The first message and the third tag.
In the method provided by the embodiment of the present application, the third label is a label corresponding to the VPN obtained according to the value of the offset. In a case where the values of the first label and the offset are determined, the third label may be the same as the second label.
According to a second aspect, a method for establishing a multicast tunnel is provided, where the method includes:
Receiving, by a second forwarding device, a request message sent by a first forwarding device, where the second forwarding device is a downstream device of the first forwarding device, where the request message includes information of a label block and an identifier of a path, The information is used to indicate the size of the tag block, and the identifier of the path is used to identify the tunnel corresponding to the virtual private network VPN;
By the second forwarding device, a first label according to the information of the label block, where the first label is a starting label of the label block that is determined according to the information of the label block;
Sending, by the second forwarding device, a response message to the first forwarding device, where the response message includes an identifier of the first label and the path.
Optionally, the method further includes: obtaining, by the second forwarding device, an entry corresponding to the tunnel according to the identifier of the first label and the path, where the entry includes a second label, and the The second label is a label obtained according to the first label and an offset, and a value of the offset corresponds to a VPN.
Optionally, that obtaining, by the second forwarding device according to the identifier of the first label and the path, an entry corresponding to the tunnel includes: obtaining, by the second forwarding device, a multicast according to the identifier of the path , Where the identifier of the multicast is used to identify the multicast forwarding information corresponding to the path; and the second forwarding device obtains the entry according to the identifier of the first label and the multicast The entry includes the second label and the identifier of the multicast.
Optionally, the entry further includes the information of the tag block.
In the method provided by the embodiment of the present application, the forwarding entry obtained by the first forwarding device is an entry for guiding forwarding, and the entry obtained by the second forwarding device is an entry used for locating a forwarding entry.
According to a third aspect, a first forwarding device is provided, where the first forwarding device includes:
The first sending unit is configured to send a request message to the second forwarding device, where the request message includes information about a label block and an identifier of a path, where the information about the label block is used to indicate a size of a label block, In a tunnel corresponding to a virtual private network VPN between the first forwarding device and the second forwarding device, where the first forwarding device is an upstream device of the second forwarding device;
A first receiving unit, configured to receive a response message sent by the second forwarding device, where the response message includes a first label and an identifier of the path, where the first label is determined according to the information about the label block The first label of the label
The first obtaining unit is configured to obtain a forwarding entry corresponding to the tunnel according to the first label and the identifier of the path.
Optionally, the first forwarding device further includes:
A determining unit, configured to determine a tunnel corresponding to the VPN;
A second obtaining unit, configured to obtain the information about the label block according to the tunnel corresponding to the VPN, where the information about the label block is determined by the number of the VPNs corresponding to the tunnel.
Optionally, the first obtaining unit is specifically configured to:
Obtain an identifier of the multicast according to the identifier of the path, where the identifier of the multicast is used to identify the multicast forwarding information corresponding to the path;
Obtaining an identifier of an interface according to the identifier of the path, where the egress interface is an interface on the first forwarding device that communicates with the second forwarding device;
Obtain the forwarding entry according to the first label, the identifier of the multicast, and the identifier of the egress interface, where the forwarding entry includes a second label, an identifier of the multicast, and an identifier of the egress interface The second label is a label obtained according to the first label and an offset, and a value of the offset corresponds to a VPN.
Optionally, the first forwarding device further includes:
A second receiving unit, configured to receive a first packet from the VPN and obtain an identifier of a VPN;
A third obtaining unit, configured to obtain a second packet according to the forwarding entry, the first packet, and the identifier of the VPN, where the second packet is a packet that is sent to the second Forward the multicast packet of the device
A second sending unit, configured to send the second packet to the second forwarding device.
Optionally, the third obtaining unit is specifically configured to:
Obtain a numerical value of an offset corresponding to the VPN according to a correspondence and an identifier of the VPN, where the correspondence includes an identifier of the VPN and a value of the offset;
According to the forwarding entry and the value of the offset, an identifier of a third label and an egress interface, where the third label is a label obtained according to the value of the first label and the offset Out interface for communicating with the second forwarding device;
The second sending unit is specifically configured to send the second packet to the second forwarding device according to the identifier of the egress interface, where the second packet includes the first packet and the third packet label.
According to a fourth aspect, a second forwarding device is provided, where the second forwarding device includes:
A receiving unit, configured to receive a request message sent by a first forwarding device, where the second forwarding device is a downstream device of the first forwarding device, where the request message includes information of a label block and an identifier of a path, and the label block Is used to indicate the size of a label block, and the identifier of the path is used to identify a tunnel corresponding to a virtual private network VPN;
An obtaining unit, configured to obtain a first label according to the information of the label block, where the first label is a starting label of the label block determined according to the information of the label block;
A sending unit, configured to send a response message to the first forwarding device, where the response message includes an identifier of the first label and the path.
Optionally, the second forwarding device further includes:
A second obtaining unit, configured to obtain, according to the first label and the identifier of the path, an entry corresponding to the tunnel, where the entry includes a second label, where the second label is a label that is obtained according to the first Label and offset The obtained label, the value of the offset corresponds to the VPN.
Optionally, the second obtaining unit is specifically configured to:
Obtain an identifier of the multicast according to the identifier of the path, where the identifier of the multicast is used to identify the multicast forwarding information corresponding to the path;
Obtain the entry according to the identifier of the first label and the multicast, where the entry includes the identifier of the first label and the multicast.
Optionally, the entry further includes the information of the tag block.
Optionally, the second forwarding device provided in the fourth aspect may also use the method provided in any one of the first aspect or any one of the possible implementation manners of the first aspect to obtain a forwarding entry, that is, the second forwarding device may forward the packet to another Device, a tag that matches the information requested by the tag block. In other words, the second forwarding device may be the same device as the first forwarding device provided in the third aspect, or may be a different device from the first forwarding device provided in the third aspect.
According to a fifth aspect, a first forwarding device is provided, where the first forwarding device includes: a processor, a memory, a communications interface, and a communications bus, where the processor, the memory, and the communications interface are connected through the communications bus The processor is configured to read executable instructions included in the program from the memory, and execute the method provided in the first aspect or any one of the implementation manners of the first aspect.
According to a sixth aspect, a second forwarding device is provided, where the second forwarding device includes: a processor, a memory, a communications interface, and a communications bus, where the processor, the memory, and the communications interface are connected through the communications bus Connect The memory is configured to store a program. The processor reads executable instructions included in the program from the memory, and executes the method provided in the second aspect or any one of the implementation manners of the second aspect.
BRIEF DESCRIPTION OF THE DRAWINGS FIG
Figure 1 is a network scenario diagram.
FIG. 2 (a) is a schematic diagram of a network scenario provided by an embodiment of the present application.
FIG. 2 (b) is a flowchart of a method for establishing a multicast tunnel according to an embodiment of the present application.
FIG. 3 (a) is a schematic diagram of another network scenario provided in this embodiment of the present application.
FIG. 3 (b) is a flowchart of a method for establishing a multicast tunnel according to an embodiment of the present application.
FIG. 4 is a schematic structural diagram of a first forwarding device according to an embodiment of the present application.
FIG. 5 is a schematic structural diagram of a second forwarding device according to an embodiment of the present application.
FIG. 6 is a schematic structural diagram of a first forwarding device according to an embodiment of the present application.
FIG. 7 is a schematic structural diagram of a second forwarding device according to an embodiment of the present application.
detailed description
The technical solutions in the embodiments of the present application are clearly described below with reference to the accompanying drawings in the embodiments of the present application.
In the network shown in FIG. 1, sites 1, site 3, and site 5 belong to a virtual private network (VPN) 1, and site 2, site 4, and site 6 belong to VPN 2. site1 and site2 communicate with PE1. PE1 can communicate with PE2 and PE3 through P. PE2 communicates with site3 and site4. PE4 communicates with site5 and site6. PE1, PE2 and PE3 form a point-to-multipoint (P2MP) forwarding path. VPN1 and VPN2 share the forwarding path of P2MP between PE1, PE2 and PE3.
PE1, P, PE2, and PE3 are respectively configured with two interrelated label configuration tables. One label configuration table in the two inter-related label configuration tables includes a correspondence between a tunnel label and a VPN label, and another label configuration table includes a correspondence between a VPN label and an egress interface. PE1 may send a P2MP label to P according to a preconfigured P2MP forwarding path, where the P2MP label is a tunnel label corresponding to the P2MP forwarding path. P forwards the P2MP label from PE1 to PE2 and PE3 according to the pre-configured forwarding path of P2MP.
After receiving the first packet of the site1 from the VPN1, the PE1 determines a P2MP label. PE1 obtains the VPN1 label and the outgoing interface on PE1 according to the two interrelated label configuration tables of P2MP and configured. PE1 performs tunnel encapsulation on the first packet to obtain a second packet. Where the second packet includes the first packet, a P2MP label, and a VPN1 label. PE1 sends the second packet to P through the outgoing interface on PE1. After receiving the second packet, P obtains a VPNn label and an out interface on P according to the configured two inter-related label configuration tables and the P2MP label included in the second packet. P obtains a third packet according to the VPNn label and the second packet. Where the third packet includes the VPNn tag, the P2MP tag, and the first packet. P obtains the number of outgoing interfaces on P on N, then P copies the third packet to obtain N third packets. P sends the N third messages through N outbound interfaces, and an out interface on each P may be configured to send one third message. After receiving the third packet, PE2 determines an outbound interface for communicating with site3 of VPN1 according to the P2MP label and the VPNn label. PE2 may send the first packet included in the third packet to site4 through the outbound interface. The method for the PE3 to send the first packet to the site5 of the VPN1 is the same as that for the PE2 to send the first packet to the site3 of the VPN1, and details are not described herein again.
In the above label distribution method, the devices on the P2MP forwarding path in the network need to save two inter-related The number of forwarding entries generated by linear lookup during message forwarding increases the burden on the forwarding device and the operation of finding the forwarding entry matching the label in the packet is rather heavy. The forwarding plane On the larger price.
In view of the above problems, a method of establishing multicast tunnel is proposed. In this method, a first forwarding device sends a request message to a second forwarding device, where the request message includes information of a label block and an identifier of a path, where the information of the label block is used to indicate a size of a label block, an identifier of the path Configured to identify a tunnel corresponding to a virtual private network VPN between the first forwarding device and the second forwarding device, where the first forwarding device is an upstream device of the second forwarding device; and the first forwarding device receives A response message sent by the second forwarding device, where the response message includes a first label and an identifier of the path, where the first label is a starting label of the label block that is determined according to the information of the label block; By the first forwarding device, a forwarding entry corresponding to the tunnel according to the first label and the identifier of the path. The method provided in this embodiment of the present application does not need to store N + 1 tag spaces on each forwarding device, and linear search can be implemented on the premise of not increasing the cost on the forwarding plane. The method can be implemented by the following embodiments.
Example one
FIG. 2 (a) is a schematic diagram of a network scenario provided by an embodiment of the present application. In the network shown in FIG. 2 (a), PE1 establishes a P2MP tunnel with PE2 and PE3 through P. site1, site3, and site5 belong to VPN1, and site2, site4, and site6 belong to VPN2. site1 and site2 communicate with PE1. PE2 communicates with site3 and site4. PE3 communicates with site5 and site6. VPN1 and VPN2 share a P2MP tunnel between PE1, PE2, and PE3.
FIG. 2 (b) is a flowchart of a method for establishing a multicast tunnel according to an embodiment of the present application. The method for establishing a multicast tunnel according to the embodiment of the present application is described below with reference to FIG. 2 (a) and FIG. 2 (b).
201, PE1 sends the first request message to P.
The first request message includes information of a label block and an identifier of a path. The information of the tag block is used to indicate the size of the tag block. The identifier of the path is used to identify a P2MP tunnel. The P2MP tunnel is a tunnel between PE1, PE2 and PE3. The P2MP tunnel is a tunnel shared by VPN1 and VPN2. PE1 is the upstream device of P, and P is the downstream device of PE1.
For example, PE1 may obtain the information about the label block according to the number of VPNs that the site with which it communicates belongs. As shown in Figure 2 (a), site1 and site2 belong to VPN1 and VPN2 respectively. PE1 obtains the size of the label block as 2 according to VPN1 and VPN2. PE1 may also obtain the identifier of the path according to VPN1 and VPN2, that is, VPN1 and VPN2 share the P2MP tunnel corresponding to the identifier of the path.
For example, PE1 may obtain the first request message according to the information of the label block and the identifier of the path. Where the first request message is used for requesting P to allocate a label corresponding to the P2MP tunnel. The first request message may be an extended path message. The extended path message may extend a session_attribute field in a label_request included in a path message in RFC3209, where the session_attribute field carries the information of the tag block.
For example, PE1 obtains the outgoing interface for communication with P on PE1, that is, the identifier of the first outbound interface, according to Constraint Shortest Path First (CSPF) or traffic engineering database (TEDB). PE1 may send the first request message to P through the first out interface.
202, P Assign first label.
For example, the first label is a start label of the label block that is determined by P according to the information of the label block. P may select a label block corresponding to the information of the label block from the global label space configured therein and obtain a starting label of the label block as shown in LB1 in FIG. 2 (a), where LB1 is P The tag corresponding to the information of the tag block The starting label for the block.
203, P sends a first response message to PE1.
For example, P may obtain the first response message according to the identifier of the first label and the path. The first response message includes an identifier of the first label and the path. The first response message may be a resource reservation protocol message (RSVP message), where the RSVP message may carry the first label and the identifier of the path.
204, P obtains the first entry.
The P may obtain the first entry according to the identifier of the first label and the path. P may obtain, according to the first entry, one or more forwarding entries used to guide forwarding.
For example, P obtaining the first entry according to the identifier of the first label and the path includes: obtaining, according to the identifier of the path, an identifier of a multicast, where the identifier of the multicast is used to identify The multicast forwarding information corresponding to the path; P obtaining a second label according to the first label, the second label being a label obtained according to the first label and a sum offset of And a value corresponding to a VPN; P obtaining the first entry according to the second label and the identifier of the multicast, where the first entry includes the identifier of the second label and the multicast. Where P obtains the multicast identifier according to the identifier of the path is optional, and correspondingly, the identifier of the multicast in the first entry is replaced by the identifier of the path.
Optionally, P may generate a second entry on the control plane, and then generate the first entry on the forwarding plane according to the second entry.
For example, P may generate, according to the identifier of the first label and the path, a second entry on a control plane, where the second entry includes an identifier of the first label and the path. Optionally, the second entry further includes information of the tag block, such as blocksize in FIG. 2 (a). The second entry may be expressed as:
(InLabelBase <assigned by P>, Session)
InLabelBase <assigned by P> represents the first label allocated by P, that is, LB1 in FIG. 2 (a). Session indicates the identifier of the path. The foregoing is only one form of representation of the second entry, and the specific implementation manners of the embodiments of the present application are not limited thereto.
For example, P may generate a first entry on the forwarding plane according to the second entry. The first entry may be expressed as:
(InLabelBase <assigned by P> + offset, MID)
InLabelBase <assigned by P> represents the first label allocated by P, that is, LB1 in FIG. 2 (a). offset indicates the offset. InLabelBase <assigned by P> + offset represents the second label. MID indicates the identifier of the multicast, and the MID corresponds to the session. The above is only one form of representation of the first entry, and the specific forms of the embodiment of the present application are not limited thereto.
Step 205: The PE1 obtains the first forwarding entry according to the first response message.
For example, the obtaining, by the PE1 according to the first response message, the first forwarding entry includes: acquiring, by the PE1 according to the identifier of the path, an identifier of the multicast, where the identifier of the multicast is used to identify the corresponding to the path PE1 obtains the identifier of the first outbound interface according to the identifier of the path, and the first outbound interface is an interface on PE1 that communicates with P; according to the first label, the multicast And the identifier of the first outbound interface to obtain the first forwarding entry, where the first forwarding entry includes the second label, the identifier of the multicast, and the identifier of the first outbound interface. The identifier of the multicast obtained by the PE1 according to the identifier of the path belongs to optional content. Correspondingly, the identifier of the multicast in the first forwarding entry is replaced by the identifier of the path.
Optionally, the PE1 may generate a second forwarding entry on the control plane, and then generate the first forwarding entry on the forwarding plane according to the second forwarding entry.
For example, the PE1 may generate, according to the identifier of the first label and the path that is included in the first response message, a second forwarding entry on a control plane, where the second forwarding entry includes the first label, An identifier of the first out interface, and an identifier of the path. PE1 may obtain the identifier of the first outbound interface through 201. The second forwarding entry may be represented as follows:
(Session, OutLabelBase <assigned by P>, OutInterface <to P>)
Session represents the identifier of the path. OutLabelBase <assigned by P> indicates the first label assigned by P, that is, LB1 in FIG. 2 (a). OutInterface <to P> indicates the identifier of the first outbound interface. The above is only one form of representation of the second forwarding entry, and the specific forms of presentation of the embodiments of the present application are not limited thereto.
For example, PE1 may generate a first forwarding entry on the forwarding plane according to the second forwarding entry. The first forwarding entry may be expressed as:
(MID, OutLabelBase <assigned by P> + offset, OutInterface <to P>)
The MID indicates the identifier of the multicast, and the MID corresponds to the session. OutLabelBase <assigned by P> indicates the first label assigned by P, that is, LB1 in FIG. 2 (a). offset indicates the offset. OutLabelBase <assigned by P> + offset represents the second label. OutInterface <to P> indicates the identifier of the first outbound interface. The above is only one form of representation of the first forwarding entry, which is not limited in the embodiment of the present application.
206, P sends a second request message to PE2.
For example, the second request message includes the information of the tag block and the identifier of the path. The information of the tag block included in the second request message is the same as the information of the tag block included in the first request message, as shown in blocksize in FIG. 2 (a). The identifier of the path included in the second request message is the same as the identifier of the path included in the first request message.
For example, P may obtain the second request message according to the information of the tag block and the identifier of the path. Where the second request message is used to request PE2 to allocate a label corresponding to the P2MP tunnel. The second request message may be an extended path message. The extended path message may extend the session_attribute field in the label_request included in the path message in RFC3209, where the session_attribute field carries the information of the tag block.
For example, P may obtain the outbound interface on P that can communicate with PE2, that is, the second outbound interface according to CSPF or TEDB. P may send the second request message to PE2 through the second out interface.
207, PE2 allocates the third label.
For example, the third label is a start label of the label block determined by the PE2 according to the information of the label block. PE2 may select a label block corresponding to the information of the label block from the global label space configured by the PE2 and obtain the initial label of the label block, as shown in FIG. 2 (a) LB2, The label of the label block corresponding to the starting label of the label block. The global label space configured on PE2 is not the same as the global label space configured on P.
208, PE2 sends a second response message to P.
For example, the PE2 may obtain the second response message according to the identifier of the third label and the path. The second response message includes the third label and the identifier of the path. The second response message may be an RSVP message, where the RSVP message is further used for carrying the identifier of the third label and the path.
209, PE2 obtains the third entry.
The PE2 may obtain the third entry according to the third label and the identifier of the path. Where the third entry includes a fourth label and an identifier of the multicast. The fourth label is a label obtained according to the third label and the offset, and the offset corresponds to a VPN.
For example, obtaining, by the PE2 according to the third label and the identifier of the path, the third entry includes: obtaining, by the PE2, an identifier of the multicast according to the identifier of the path, where the identifier of the multicast is used to identify PE2 obtains the fourth label according to the third label and the offset; and the PE2 obtains the fourth label according to the label of the fourth label and the multicast Where the third entry includes the fourth label and the identifier of the multicast. The identifier of the multicast obtained by the PE2 according to the identifier of the path belongs to optional content. Correspondingly, the identifier of the multicast in the third entry is replaced by the identifier of the path.
Optionally, the PE2 may generate a fourth entry on the control plane, and then generate the third entry on the forwarding plane according to the fourth entry.
For example, the PE2 may generate a fourth entry on the control plane according to the identifier of the third label and the path, where the fourth entry includes the identifier of the third label and the path. The fourth entry may be expressed as:
(InLabelBase <assigned by PE2>, Session)
InLabelBase <assigned by PE2> indicates the third label allocated by PE2, that is, LB2 in FIG. 2 (a). Session indicates the identifier of the path. The foregoing is only one form of representation of the fourth entry, and the specific implementation manners of the embodiments of the present application are not limited thereto.
For example, PE2 may generate a third entry on the forwarding plane according to the fourth entry. The third entry may be expressed as:
(InLabelBase <assigned by PE2> + offset, MID)
InLabelBase <assigned by PE2> indicates the third label allocated by PE2, that is, LB2 in FIG. 2 (a). offset indicates the offset. InLabelBase <assigned by PE2> + offset represents the fourth label. MID indicates the identifier of the multicast, and the MID corresponds to the session. The foregoing is only one form of representation of the third entry, and the specific implementation manners of the embodiment of the present application are not limited thereto.
210. P obtains a third forwarding entry according to the second response message.
For example, P obtaining a third forwarding entry according to the second response message includes: obtaining an identifier of the multicast according to the identifier of the path; obtaining, according to the identifier of the path, the identifier of the second outbound interface P; obtaining the third forwarding entry according to the third label, an identifier of the multicast, and an identifier of the second egress interface, where the third forwarding entry includes a fourth label, and the group The identifier of the broadcast and the identifier of the second outgoing interface. Wherein P obtains the identifier of the multicast according to the identifier of the path belongs to optional content. Correspondingly, the identifier of the multicast in the third forwarding entry is replaced by the identifier of the path.
Optionally, P may generate a fourth forwarding entry on the control plane, and then generate the third forwarding entry on the forwarding plane according to the fourth forwarding entry.
For example, P may generate, according to the third label comprised in the second response message and the identifier of the path, a fourth forwarding entry on a control plane, where the fourth forwarding entry includes the third label, An identifier of the second outbound interface, and an identifier of the path. Wherein, P may obtain the identifier of the second outbound interface through 206. The fourth forwarding entry may be represented as follows:
(Session, OutLabelBase <assigned by PE2>, OutInterface <to PE2>)
Session represents the identifier of the path. OutLabelBase <assigned by PE2> indicates the third label allocated by PE2, that is, LB2 in FIG. 2 (a). OutInterface <to PE2> indicates the identifier of the second outbound interface. The foregoing is only one form of representation of the fourth forwarding entry, and the embodiments of the present application do not limit the specific forms of the fourth forwarding entry.
For example, P may generate a third forwarding entry on the forwarding plane according to the fourth forwarding entry. The third forwarding The entries can be expressed as:
(MID, OutLabelBase <assigned by PE2> + offset, OutInterface <to PE2>)
The MID indicates the identifier of the multicast, and the MID corresponds to the session. OutLabelBase <assigned by PE2> indicates the third label allocated by PE2, that is, LB2 in FIG. 2 (a). offset indicates the offset. OutLabelBase <assigned by PE2> + offset represents the fourth label. OutInterface <to PE2> indicates the identifier of the second outbound interface. The foregoing is only one form of representation of the third forwarding entry, and the embodiments of the present application do not limit the specific forms of the third forwarding entry.
211, P sends a third request message to PE3.
For example, P obtains the third request message in the same manner that P obtains the second request message in 206. The third request message includes the information of the tag block and the identifier of the path. Where the third request message is used to request PE3 to allocate a label corresponding to the P2MP tunnel.
For example, P may obtain an outgoing interface on P that communicates with PE3, that is, an identifier of a third interface, according to CSPF or TEDB. P may send the third request message to the PE3 through the third interface.
212, PE3 assigned the fifth label.
For example, the method for allocating the fifth label by the PE3 is the same as that of 207, and details are not described herein again. The fifth label may be LB3 in FIG. 2 (a). The global label space configured on PE3 is different from the global label space configured on P, and the global label space configured on PE3 is different from the global label space configured on PE2.
213, PE3 sends a third response message to P.
For example, the method for obtaining the third response message by the PE3 is the same as the method for obtaining the second response message by the PE2 in step 208, and details are not described herein again. The third response message includes the fifth label and the identifier of the path.
214, PE3 gets the fifth entry.
For example, the fifth entry includes a sixth label and an identifier of the multicast. The sixth label is a label obtained based on the fifth label and the offset. The method for obtaining the fifth entry by PE3 is the same as the method for obtaining the third entry by PE2 in 209. Optionally, the identifier of the multicast in the fifth entry may be replaced by the identifier of the path.
Optionally, the PE3 may generate a sixth entry on the control plane, and then generate the fifth entry on the forwarding plane according to the sixth entry.
For example, the PE3 may generate, according to the identifier of the fifth label and the path, a sixth entry on the control plane, where the sixth entry includes the identifier of the fifth label and the path. The sixth entry may be expressed as:
(InLabelBase <assigned by PE3>, Session)
InLabelBase <assigned by PE3> indicates the fifth label allocated by PE3, that is, LB3 in FIG. 2 (a). Session indicates the identifier of the path. The foregoing is only one form of representation of the sixth entry, and the specific implementation manners of the embodiments of the present application are not limited thereto.
For example, PE3 may generate a fifth entry on the forwarding plane according to the sixth entry. The fifth entry may be expressed as:
(InLabelBase <assigned by PE3> + offset, MID)
InLabelBase <assigned by PE3> indicates the fifth label allocated by PE3, that is, LB3 in FIG. 2 (a). offset indicates the offset. InLabelBase <assigned by PE3> + offset represents the sixth label. MID indicates the identifier of the multicast, and the MID corresponds to the session. The foregoing is only one form of representation of the fifth entry, and the specific implementation manner of the embodiment of the present application is not limited thereto.
215, P obtains a fifth forwarding entry according to the third response message.
Where the fifth forward entry includes the sixth label, the identifier of the multicast, and the identifier of the third outbound interface. P obtains the fifth forwarding entry in the same manner that P obtains the third forwarding entry in 210. Optionally, the identifier of the multicast in the fifth forwarding entry may be replaced by the identifier of the path.
Optionally, P may generate a sixth forwarding entry on the control plane, and then generate the fifth forwarding entry on the forwarding plane according to the sixth forwarding entry.
For example, P may generate the sixth forwarding entry on the control plane according to the fifth label that is included in the third response message and the identifier of the path, where the sixth forwarding entry includes the fifth A label, an identifier of the third outbound interface, and an identifier of the path. P may obtain the identifier of the third outbound interface through 211. The sixth forwarding entry may be represented as follows:
(Session, OutLabelBase <assigned by PE3>, OutInterface <to PE3>)
Session represents the identifier of the path. OutLabelBase <assigned by PE3> indicates the fifth label allocated by PE3, that is, LB3 in FIG. 2 (a). OutInterface <to PE3> indicates the identifier of the third outbound interface. The foregoing is only one form of representation of the sixth forwarding table item, and specific embodiments of the application in the present application are not limited thereto.
For example, P may generate the fifth forwarding entry on the forwarding plane according to the sixth forwarding entry. The fifth forwarding entry may be represented as follows:
(MID, OutLabelBase <assigned by PE3> + offset, OutInterface <to PE3>)
The MID indicates the identifier of the multicast, and the MID corresponds to the session. OutLabelBase <assigned by PE3> indicates the fifth label allocated by PE3, that is, LB3 in FIG. 2 (a). offset indicates the offset. OutLabelBase <assigned by PE3> + offset represents the sixth label. OutInterface <to PE3> indicates the identifier of the third outbound interface. The foregoing is only one form of representation of the fifth forwarding entry, and the embodiments of the present application do not limit the specific forms of the fifth forwarding entry.
204 in the first embodiment can be executed after 202, for example, 204 is executed between 202 and 203, or 204 is executed after 203. 205 may be performed after 203, such as 205 may be performed between 203 and 204, or 205 and 204 simultaneously, or 205 may be performed after 204. 206 may be performed after 201, such as 206 may be performed between 201 and 202, or 206 between 202 and 203, or 206 between 203 and 204, or 206 may be performed after 204. 209 may be performed after 207, such as 209 may be performed between 207 and 208, or 209 may be performed after 208. 210 may be performed after 208, such as 210 may be performed between 208 and 209, or 210 may be executed concurrently with 209. 211 may be executed after 201, such as 211 may be performed concurrently with 206, or 211 may be performed prior to 206. 214 may be executed after 212, such as 214 may be performed between 212 and 213, or 214 may be performed after 213. 215 may be performed after 213, such as 215 may be performed between 213 and 214, or 215 may be concurrently executed with 214. The foregoing is merely an example of a possible implementation manner, which is not limited in this embodiment of the present application.
In the method provided in this embodiment of the present application, a device included in a P2MP tunnel, for example, PE1, P, PE2, or PE3 in FIG. 2 (a), may implement packet forwarding by using a corresponding entry in FIG. 2 (b). The following describes a packet forwarding process according to FIG. 2 (a) and FIG. 2 (b).
PE1 receives the first packet from site1. PE1 may determine, according to the port that receives the first packet, that the first packet is from VPN1, that is, site1 belongs to VPN1. PE1 stores the correspondence between the VPN and the offset, and the PE1 may obtain, according to the correspondence, a value of the offset corresponding to the VPN1, for example, the number of the offset corresponding to the VPN1 Value is 1. According to the offset value, PE1 determines that the multicast identifier is MID. PE1 obtains the first forwarding entry according to the MID. The value of the second label in the first forwarding entry is the sum of the values of LB1 and offset, that is, LB1 + 1, where LB1 is the first label allocated by P and 1 is the value of offset. The PE1 obtains the second packet according to the values of the first packet and the second label. The second packet includes a value of the first packet and the second tag. PE1 sends the second packet to P through the identifier of the first out interface.
P receives the second message from PE1. P determines that the first label is LB1 according to the value of the second label included in the second packet, for example LB1 + 1, P, and further determines that the value of offset is 1. P can find the first entry that matches LB1 according to LB1, and obtain the identifier of the multicast as MID. P obtains two forwarding entries according to the MID, which are the third forwarding entry and the fifth forwarding entry respectively. After determining that there are two forwarding entry entries, P needs to duplicate the received first packet included in the second packet, that is, obtain two first packets.
And the value of the fourth label in the third forwarding entry obtained by P is the sum of the values of the third label and offset, that is, LB2 + 1, where LB2 is the third label allocated by PE2. P obtains a third packet according to the values of the second packet and the fourth label. The third packet includes the values of the first packet and the fourth tag. P sends the third packet to PE2 by using the identifier of the second outbound interface that is included in the third forwarding entry.
And the value of the sixth label in the fifth forwarding entry obtained by P is the sum of the values of the fifth label and offset, that is, LB3 + 1, where LB3 is the fifth label allocated to PE3. P obtains a fourth packet according to the values of the second packet and the sixth label. The fourth packet includes the values of the first packet and the sixth tag. P sends the fourth packet to the PE3 by using the identifier of the third outbound interface that is included in the fifth forwarding entry.
PE2 receives the third message from P. PE2 determines that the offset value is 1 according to the value of the fourth label in the third packet. PE2 obtains the first packet from the third packet. PE2 determines, according to the value of offset, that the first packet corresponds to VPN1. PE2 sends the first packet to site3 belonging to VPN1 through an interface that communicates with site3.
PE3 receives the fourth message from P. PE3 determines that the offset value is 1 according to the value of the sixth label in the fourth packet. PE3 obtains the first packet from the fourth packet. PE3 determines, according to the value of offset, that the first packet corresponds to VPN1. PE3 sends the first packet to site5 that belongs to VPN1 through an interface that communicates with site5.
Site2 of VPN2 sends the fifth packet to PE1. The method that the PE1 sends the fifth packet to the site 4 connected to the PE2 through P is the same as that of the PE1 sending the first packet to the site3 connected to the PE2 through the P, PE1 sends the fifth packet to site6 connected to PE3 through P, and the method for sending the first packet to site5 connected to PE3 through P is the same as the method for sending the first packet to PE5 connected to PE3 by PE1. This is no longer the VPN2 traffic forwarding method will be described.
In this embodiment of the present application, each offset corresponds to one VPN, and each VPN corresponds to one P2MP tunnel, and each P2MP tunnel corresponds to one MID. Among them, the P2MP tunnel can be a logical tunnel. PE1, which is the first forwarding device, may send the blocksize to P, which is the second forwarding device, and LB1 from P, which is the second forwarding device. As a first forwarding device, PE1 does not need to store N + 1 tag spaces. Only the LB1 and the offset corresponding to the VPN need to be implemented to implement packet forwarding. This helps to reduce the cost on the forwarding plane and implement the linear look-up table. Similarly, P, which is the first forwarding device, may send blocksize to PE2, which is the second forwarding device, and obtain LB2 from PE2, which is the second forwarding device. As the first forwarding device, P does not need to store N + 1 tag spaces. Only the LB2 and the offset corresponding to the VPN are needed to forward the packet, which helps to reduce the cost on the forwarding plane and implement the linear look-up table.
Example two
FIG. 3 (a) is a schematic diagram of another network scenario provided in this embodiment of the present application. Figure 3 (a) shows the network, PE1 Establish P2P tunnels with PE2, PE3 and PE4. site1, site6 and site8 belong to VPN1. site5 belongs to VPN2. site7 and site9 belong to VPN3. site1, site2 and site3 communicate with PE1. PE2 communicates with site4 and site5. PE3 communicates with site6 and site7. PE4 communicates with site8 and site9. VPN1 and VPN2 share the P2P tunnel between PE1 and PE2. VPN1 and VPN3 share a P2P tunnel between PE1 and PE3, and share a P2P tunnel between PE1 and PE4.
FIG. 3 (b) is a flowchart of a method for establishing a multicast tunnel according to an embodiment of the present application. The method for establishing a multicast tunnel provided by the embodiment of the present application is described below with reference to FIG. 3 (a) and FIG. 3 (b).
301: PE1 sends a first request message to PE2.
Wherein, the first request message includes the information of the tag block and the identifier of the first path. The information of the tag block is used to indicate the size of the tag block. The identifier of the first path is used to identify a first P2P tunnel, where the first P2P tunnel is a P2P tunnel between PE1 and PE2. PE1 is the upstream device of PE2, and PE2 is the downstream device of PE1. PE1 may obtain the information of the label block according to the number of VPNs to which the site with which it communicates belongs. As shown in Figure 3 (a), PE1 determines the size of the label block as 3 based on the number of VPNs.
For example, PE1 may obtain the first request message according to the information of the label block and the identifier of the first path. Where the first request message is used to request PE2 to allocate a label corresponding to the first P2MP tunnel. The first request message may be an extended path message. The extended path message may extend the session_attribute field in the label_request included in the path message in RFC3209, where the session_attribute field carries the information of the tag block.
As an example, PE1 can obtain an outgoing interface on PE1 that communicates with PE2, that is, an identifier of the outgoing interface according to CSPF or TEDB. PE1 may send the first request message to PE2 through the first out interface.
302, PE2 allocates a first label.
For example, the first label is a start label of the label block that is determined by the PE2 according to the information of the label block. PE2 may select a label block corresponding to the information of the label block from the global label space configured therein and obtain the initial label of the label block as shown in LB1 in FIG. 3 (a) The label of the label block corresponding to the starting label of the label block.
303: PE2 sends a first response message to PE1.
For example, the PE2 may obtain the first response message according to the identifier of the first label and the first path. The first response message includes an identifier of the first label and the first path. The first response message may be an RSVP message, and the RSVP message may carry the identifier of the first label and the first path.
304, PE2 obtains the first entry.
The PE2 may obtain the first entry according to the identifier of the first label and the first path. By the PE2 according to the identifier of the first label and the first path, the first entry includes: obtaining, by the PE2 according to the identifier of the first path, a first identifier, where the first identifier is used to identify the first identifier And the first path; PE2 obtains a second label according to the first label, where the second label is a label obtained according to the first label and a sum offset, where the offset And PE2 obtains the first entry according to the second label and the first identifier, where the first entry includes the second label and the first identifier. The PE2 obtains, according to the identifier of the first path, that the first identifier belongs to optional content, and the first identifier in the first entry may be replaced with the identifier of the first path.
Optionally, the PE2 may generate a second entry on the control plane, and then generate the first entry on the forwarding plane according to the second entry.
For example, the PE2 may generate a second entry on the control plane according to the identifier of the first label and the first path, The second entry includes the first label and the identifier of the first path. The second entry may be expressed as:
(InLabelBase <assigned by PE2>, Session1)
InLabelBase <assigned by PE2> indicates the first label allocated by PE2, that is, LB1 in FIG. 3 (a). Session1 indicates the identifier of the first path. The foregoing is only one form of representation of the second entry, and the specific implementation manners of the embodiments of the present application are not limited thereto.
For example, PE2 may generate a first entry on the forwarding plane according to the second entry. The first entry may be expressed as:
(InLabelBase <assigned by PE2> + offset, ID1)
InLabelBase <assigned by PE2> indicates the first label allocated by PE2, that is, LB1 in FIG. 3 (a). offset indicates the offset. InLabelBase <assigned by PE2> + offset represents the second label. ID1 indicates the first identifier, and ID1 corresponds to Session1. The above is only one form of representation of the first entry, and the specific forms of the embodiment of the present application are not limited thereto.
Step 305: The PE1 obtains the first forwarding entry according to the first response message.
For example, obtaining, by the PE1 according to the first response message, a first forwarding entry includes: acquiring, by the PE1 according to the identifier of the first path, the first identifier; obtaining, by the PE1 according to the identifier of the first path, the identifier of the first path PE1 obtains the first forwarding entry according to the first label, the first identifier, and the identifier of the first egress interface, where the first forwarding entry includes the identifier of the first outbound interface Two labels, the first identification, and the identifier of the first out interface. The PE1 obtains, according to the identifier of the first path, that the first identifier belongs to optional content, and the first identifier in the first forwarding entry may be replaced with the identifier of the first path.
Optionally, the PE1 may generate a second forwarding entry on the control plane, and then generate the first forwarding entry on the forwarding plane according to the second forwarding entry.
For example, PE1 may generate, according to the identifier of the first label and the identifier of the first path included in the first response message, a second forwarding entry on a control plane, where the second forwarding entry includes the first A label, an identifier of the first egress interface, and an identifier of the first path. PE1 may obtain, by 301, the identifier of the first outbound interface. The second forwarding entry may be represented as follows:
(Session1, OutLabelBase <assigned by PE2>, OutInterface <to PE2>)
Session1 indicates the identifier of the first path. OutLabelBase <assigned by PE2> indicates the first label allocated by PE2, that is, LB1 in FIG. 3 (a). OutInterface <to PE2> indicates the identifier of the first outbound interface. The above is only one form of representation of the second forwarding entry, and the specific forms of presentation of the embodiments of the present application are not limited thereto.
For example, PE1 may generate a first forwarding entry on the forwarding plane according to the second forwarding entry. The first forwarding entry may be expressed as:
(ID1, OutLabelBase <assigned by PE2> + offset, OutInterface <to PE2>)
Wherein, ID1 indicates the first identifier, and ID1 corresponds to Session1. OutLabelBase <assigned by PE2> indicates the first label allocated by PE2, that is, LB1 in FIG. 3 (a). offset indicates the offset. OutLabelBase <assigned by PE2> + offset represents the second label. OutInterface <to PE2> indicates the identifier of the first outbound interface. The above is only one form of representation of the first forwarding entry, which is not limited in the embodiment of the present application.
306, PE1 sends a second request message to PE3.
For example, the second request message includes the information of the tag block and the identifier of the second path. The second place The information about the tag block can be blocksize in Figure 3 (a). The identifier of the second path is used to identify a second P2P tunnel, where the second P2P tunnel is a P2P tunnel between PE1 and PE3.
For example, PE1 may obtain the second request message according to the information of the label block and the identifier of the second path. Where the second request message is used to request PE3 to allocate a label corresponding to the second P2P tunnel. The second request message may be an extended path message. The extended path message may extend the session_attribute field in the label_request included in the path message in RFC3209, where the session_attribute field carries the information of the tag block.
As an example, PE1 obtains an outgoing interface on PE1 that communicates with PE3 according to CSPF or TEDB, that is, the identifier of the second interface. PE1 may send the second request message to PE3 through the second interface.
307, PE3 allocates the third label.
For example, the third label is a start label of the label block that is determined by the PE3 according to the information of the label block. PE3 may select a label block corresponding to the information of the label block from the global label space configured by the PE3 and obtain the initial label of the label block, as shown in FIG. 3 (a), LB2, The label of the label block corresponding to the starting label of the label block. The global label space configured on PE3 is not the same as the global label space configured on PE2.
308. PE3 sends a second response message to PE1.
For example, the PE3 may obtain the second response message according to the identifier of the third label and the second path. The second response message includes an identifier of the third tag and the second path. The second response message may be an RSVP message, and the RSVP message may carry the identifier of the third label and the second path.
309, PE3 obtains the third entry.
The PE3 may obtain the third entry according to the identifier of the third label and the second path. The third entry includes a fourth tag and a second identifier. The fourth label is a label obtained according to the third label and the offset, and the offset corresponds to a VPN. Where the second identifier is used to identify multicast forwarding information corresponding to the identifier of the second path.
For example, obtaining, by the PE3 according to the identifier of the third label and the identifier of the second path, the third entry includes: obtaining, by the PE3 according to the identifier of the second path, the second identifier; and according to the identifier of the The third label and the offset to obtain the fourth label; and the PE3 obtains the third item according to the fourth label and the second label, where the third item includes the fourth label And the second identification. The PE3 obtains, according to the identifier of the second path, that the second identifier belongs to optional content, and the second identifier in the third entry may be replaced with the identifier of the second path.
Optionally, the PE3 may generate a fourth entry on the control plane, and then generate the third entry on the forwarding plane according to the fourth entry.
For example, the PE3 may generate a fourth entry on the control plane according to the identifier of the third label and the second path, where the fourth entry includes the identifier of the third label and the second path. The fourth entry may be expressed as:
(InLabelBase <assigned by PE3>, Session2)
InLabelBase <assigned by PE3> indicates the third label allocated by PE3, that is, LB2 in FIG. 3 (a). Session2 indicates the identifier of the second path. The foregoing is only one form of representation of the fourth entry, and the specific implementation manners of the embodiments of the present application are not limited thereto.
For example, the PE3 may generate a third entry on the forwarding plane according to the fourth entry. The third entry may be expressed as:
(InLabelBase <assigned by PE3> + offset, ID2)
InLabelBase <assigned by PE3> indicates the third label allocated by PE3, that is, LB2 in FIG. 3 (a). offset indicates the offset. InLabelBase <assigned by PE3> + offset represents the fourth label. ID2 indicates the second identifier, and ID2 corresponds to Session2. The foregoing is only one form of representation of the third entry, and the specific implementation manners of the embodiment of the present application are not limited thereto.
310. The PE1 obtains a third forwarding entry according to the second response message.
For example, the obtaining, by the PE1 according to the second response message, the third forwarding entry includes: obtaining, by the PE1 according to the identifier of the second path, the second identifier; obtaining, by the PE1 according to the identifier of the second path, the identifier of the second path PE1 obtains the third forwarding entry according to the identifier of the third label, the second identifier, and the second egress interface, where the third forwarding entry includes the identifier of the second outbound interface Four tags, the second identifier and the identifier of the second outbound interface. The PE1 obtains, according to the identifier of the second path, that the second identifier belongs to optional content, and the second identifier in the third forwarding entry may be replaced with the identifier of the second path.
Optionally, the PE1 may generate a fourth forwarding entry on the control plane, and then generate the third forwarding entry on the forwarding plane according to the fourth forwarding entry.
For example, the PE1 may generate, according to the identifier of the third label and the identifier of the second path included in the second response message, a fourth forwarding entry on the control plane, where the fourth forwarding entry includes the third Label, an identifier of the second egress interface, and an identifier of the second path. PE1 may obtain the identifier of the second egress interface through 306. The fourth forwarding entry may be represented as follows:
(Session2, OutLabelBase <assigned by PE3>, OutInterface <to PE3>)
Session2 indicates the identifier of the second path. OutLabelBase <assigned by PE3> indicates the third label allocated by PE3, that is, LB2 in FIG. 3 (a). OutInterface <to PE3> indicates the identifier of the second outbound interface. The foregoing is only one form of representation of the fourth forwarding entry, and the embodiments of the present application do not limit the specific forms of the fourth forwarding entry.
For example, PE1 may generate a third forwarding entry on the forwarding plane according to the fourth forwarding entry. The third forwarding entry may be represented as follows:
(ID2, OutLabelBase <assigned by PE3> + offset, OutInterface <to PE3>)
Wherein, ID2 indicates the second identifier, and ID2 corresponds to Session2. OutLabelBase <assigned by PE3> indicates the third label allocated by PE3, that is, LB2 in FIG. 3 (a). offset indicates the offset. OutLabelBase <assigned by PE3> + offset represents the fourth label. OutInterface <to PE3> indicates the identifier of the second outbound interface. The foregoing is only one form of representation of the third forwarding entry, and the embodiments of the present application do not limit the specific forms of the third forwarding entry.
311: PE1 sends a third request message to PE4.
For example, the method for obtaining the third request message by PE1 is the same as the method for obtaining the second request message by PE1 in step 306. Where the third request message includes the information of the tag block and the identifier of the third path. The identifier of the third path is used to identify a third P2P tunnel. The third P2P tunnel is a P2P tunnel between PE1 and PE3. The third request message is used for requesting PE4 to allocate a label corresponding to a third P2P tunnel.
As an example, PE1 obtains an outgoing interface for communicating with PE4 on PE1, that is, an identifier of a third interface, according to CSPF or TEDB. PE1 may send the third request message to PE4 through the third interface.
312, PE4 allocates the fifth label.
For example, the method for the PE4 to allocate the fifth label is the same as that of 307, and details are not described herein again. The fifth The label can be LB3 in Figure 3 (a). The global label space configured on PE4 is not the same as the global label space configured on PE2. The global label space configured on PE4 is different from the global label space configured on PE3.
313: PE4 sends a third response message to PE1.
For example, the method for obtaining the third response message by the PE4 is the same as the method for obtaining the second response message by the PE3 in 308, and details are not described herein again. The third response message includes the identifiers of the fifth label and the third path.
314, PE4 obtains the fifth entry.
For example, the fifth entry includes a sixth tag and a third identifier. The sixth label is a label obtained based on the fifth label and the offset. The method for obtaining the fifth entry by PE4 is the same as the method for obtaining the third entry by PE3 in 309. Where the third identifier is used to identify multicast forwarding information corresponding to the third path. Optionally, the third identifier in the fifth entry may be replaced by the identifier of the third path.
Optionally, the PE4 may generate a sixth entry on the control plane, and then generate the fifth entry on the forwarding plane according to the sixth entry.
For example, the PE4 may generate a sixth entry on the control plane according to the identifiers of the fifth label and the third path, where the sixth entry includes the identifiers of the fifth label and the third path. The sixth entry may be expressed as:
(InLabelBase <assigned by PE4>, Session3)
InLabelBase <assigned by PE4> indicates the fifth label allocated by PE4, that is, LB3 in FIG. 3 (a). Session3 indicates the identifier of the third path. The foregoing is only one form of representation of the sixth entry, and the specific implementation manners of the embodiments of the present application are not limited thereto.
For example, the PE4 may generate a fifth entry on the forwarding plane according to the sixth entry. The fifth entry may be expressed as:
(InLabelBase <assigned by PE4> + offset, ID3)
InLabelBase <assigned by PE4> indicates the fifth label allocated by PE4, that is, LB3 in FIG. 3 (a). offset indicates the offset. InLabelBase <assigned by PE4> + offset represents the sixth label. ID3 indicates the third identifier, and ID3 corresponds to Session3. The foregoing is only one form of representation of the fifth entry, and the specific implementation manner of the embodiment of the present application is not limited thereto.
315: The PE1 obtains a fifth forward entry according to the third response message.
Wherein the fifth forwarding entry comprises an identifier of a sixth label, the third identifier, and a third egress interface, and the sixth label is a label obtained according to the fifth label and the offset, where The identifier of the third outbound interface is used to identify an interface on PE1 that communicates with PE4. The method for obtaining the fifth forwarding entry by PE1 is the same as the method for acquiring the third forwarding entry by PE1 in 310. Optionally, the third identifier in the fifth forwarding entry may be replaced by the identifier of the third path.
Optionally, the PE1 may generate a sixth forwarding entry on the control plane, and then generate the fifth forwarding entry on the forwarding plane according to the sixth forwarding entry.
For example, the PE1 may generate, according to the identifier of the fifth label and the identifier of the third path included in the third response message, the sixth forwarding entry on the control plane, where the sixth forwarding entry includes the A fifth label, an identifier of the third egress interface, and an identifier of the third path. PE1 may obtain, by 311, the identifier of the third outbound interface. The sixth forwarding entry may be represented as follows:
(Session3, OutLabelBase <assigned by PE4>, OutInterface <to PE4>)
Session3 indicates the identifier of the path. OutLabelBase <assigned by PE4> represents the fifth label allocated by PE4, that is, LB3 in FIG. 3 (a). OutInterface <to PE4> represents the identifier of the third outbound interface. The foregoing is only one form of representation of the sixth forwarding table item, and specific embodiments of the application in the present application are not limited thereto.
For example, PE1 may generate the fifth forwarding entry on the forwarding plane according to the sixth forwarding entry. The fifth forwarding entry may be represented as follows:
(ID3, OutLabelBase <assigned by PE4> + offset, OutInterface <to PE4>)
ID3 indicates the third identifier, and ID3 corresponds to Session3. OutLabelBase <assigned by PE4> represents the fifth label allocated by PE4, that is, LB3 in FIG. 3 (a). offset indicates the offset. OutLabelBase <assigned by PE4> + offset represents the sixth label. OutInterface <to PE4> represents the identifier of the third outbound interface. The foregoing is only one form of representation of the fifth forwarding entry, and the embodiments of the present application do not limit the specific forms of the fifth forwarding entry.
301, 306 and 311 in Embodiment 2 may be performed simultaneously or 301, 306 and 311 may be executed in any order, which is not limited in this embodiment. 304 may be performed after 302, 305 may be performed after 303, 304 and 305 may be performed simultaneously, or 304 may be performed later than 305. [ 309 may be performed after 307, 310 may be performed after 308, 309 and 310 may be performed simultaneously, or 309 may be performed later than 310. 314 may be performed after 312, 315 may be performed after 313, 314 and 315 may be performed simultaneously, or 314 may be performed later than 315. [ The foregoing is merely an example of a possible implementation manner, which is not limited in this embodiment of the present application.
In the embodiments of the present application, each node forms a corresponding entry or forwarding entry on the forwarding plane according to the method provided in the second embodiment.
The forwarding entries formed on the forwarding plane of PE1 are as follows:
(ID11 <offset = 1>, OutLabelBase <assigned by PE2> + offset, OutInterface <to PE2>);
(ID12 <offset = 2>, OutLabelBase <assigned by PE2> + offset, OutInterface <to PE2>);
(ID21 <offset = 1>, OutLabelBase <assigned by PE3> + offset, OutInterface <to PE3>);
(ID23 <offset = 3>, OutLabelBase <assigned by PE3> + offset, OutInterface <to PE3>);
(ID31 <offset = 1>, OutLabelBase <assigned by PE4> + offset, OutInterface <to PE4>);
(ID33 <offset = 3>, OutLabelBase <assigned by PE4> + offset, OutInterface <to PE4>);
In the forwarding entry obtained by PE1, ID11 represents the value of ID1 in the case of offset 1, and ID12 represents the value of ID1 in the case of offset 2. In the forwarding entry obtained by PE1, ID21 represents the value of ID2 in the case of offset 1, and ID23 represents the value of ID2 in the case of offset 3. ID31 represents the value of ID3 in the case of offset 1, and ID33 represents the value of ID3 in the case of offset 3.
The forwarding entries formed on PE2 are as follows:
(InLabelBase <assigned by PE2> + offset, ID11 <offset = 1>)
(InLabelBase <assigned by PE2> + offset, ID12 <offset = 2>)
In the entry obtained by the above PE2, ID11 represents the value of ID1 in the case of offset 1, and ID12 represents the value of ID1 in the case of offset 2.
The following entries are formed on the forwarding plane of PE3:
(InLabelBase <assigned by PE3> + offset, ID21 <offset = 1>)
(InLabelBase <assigned by PE3> + offset, ID23 <offset = 3>)
In the entry obtained by PE3, ID21 indicates the value of ID2 in the case of offset 1, and ID23 indicates the value of ID2 in the case of offset 3. In this case,
The forwarding entries formed on PE4 are as follows:
(InLabelBase <assigned by PE4> + offset, ID31 <offset = 1>)
(InLabelBase <assigned by PE4> + offset, ID33 <offset = 3>)
In the entry obtained by the above PE4, ID31 represents the value of ID3 in the case of offset 1, and ID33 represents the value of ID3 in the case of offset 3. In this case,
In the method provided in this embodiment of the present application, PE1, PE2, PE3, or PE4 in FIG. 3 (a) may use the corresponding entries in FIG. 3 (b) to implement the packet forwarding. The following describes a packet forwarding process according to FIG. 3 (a).
PE1 receives the first packet from site1. PE1 may determine, according to the port that receives the first packet, that the first packet is from VPN1, that is, site1 belongs to VPN1. The PE1 stores the correspondence between the VPN and the offset. The PE1 obtains a value of the offset corresponding to the VPN1 according to the correspondence, for example, the value of the offset corresponding to the VPN1 is 1. PE1 determines the site of VPN1 on PE2, PE3, and PE4 according to the offset value. PE1 obtains ID11, ID21, and ID31. The PE1 obtains the first forwarding entry, the third forwarding entry, and the fifth forwarding entry according to the ID11, the ID21, and the ID31, that is, the forwarding entry with the offset of 1 formed on the PE1. The value of the second label in the first forwarding entry is LB1 + 1, where LB1 is a first label allocated by PE2, and 1 is a value of offset. The value of the fourth label in the third forwarding entry is LB2 + 1, where LB2 is the third label allocated by PE3. The value of the sixth label in the fifth forwarding entry is LB3 + 1, where LB3 is the fifth label allocated to PE3.
The PE1 obtains the second packet according to the values of the first packet and the second label. The second packet includes a value of the first packet and the second tag. PE1 sends the second packet to PE2 through the identifier of the first out interface. PE1 obtains the third packet according to the values of the first packet and the fourth tag. The third packet includes the values of the first packet and the fourth tag. PE1 sends the third packet to PE3 through the identifier of the second outbound interface. PE1 obtains a fourth packet according to the values of the first packet and the sixth tag. The fourth packet includes the values of the first packet and the sixth tag. PE1 sends the fourth packet to PE4 by using the identifier of the third out interface.
PE2 receives the second packet from PE1. PE2 determines that the value of offset is 1 according to the value of the second label in the second packet. PE2 obtains the first packet from the second packet. PE2 determines, according to the value of offset, that the first packet corresponds to VPN1. PE2 sends the first packet to site4 belonging to VPN1 through an interface that communicates with site4.
The method for the PE3 to send the first packet to the site6 is the same as the method for the PE2 to send the first packet to the site4. The method for the PE4 to send the first packet to the site 8 is the same as the method for the PE2 to send the first packet to the site4.
In this embodiment of the present application, the PE1, serving as a first forwarding device, may send blocksize to PE2, PE3, and PE4 that are second forwarding devices, and obtain, from one or more PE devices that serve as second forwarding devices, the start of a label block Label, such as LB1, LB2 and LB3. As the first forwarding device, PE1 does not need to store N + 1 label spaces. Therefore, only the LB1, LB2, LB3 and the offset corresponding to the VPN need to be forwarded to the corresponding VPN, which helps to reduce the number of Cost and realization of linear look-up table.
FIG. 4 is a schematic structural diagram of a first forwarding device according to an embodiment of the present application. The first forwarding device provided in this embodiment of the present application may be PE1 or P in FIG. 2 (a), or PE1 in FIG. 3 (a). The first forwarding device provided in this embodiment of the present application is described below with reference to FIG. 4.
The first forwarding device includes a first sending unit 401, a first receiving unit 402, and a first obtaining unit 403.
The first sending unit 401 is configured to send a request message to the second forwarding device, where the request message includes information about a label block and an identifier of a path, where the information about the label block is used to indicate a size of a label block, Identify a tunnel corresponding to a virtual private network VPN between the first forwarding device and the second forwarding device, where the first transition The sending device is an upstream device of the second forwarding device.
The first receiving unit 402 is configured to receive a response message sent by the second forwarding device, where the response message includes a first label and an identifier of the path, where the first label is determined according to the information about the label block Of the initial tag of the tag block.
The first obtaining unit 403 is configured to obtain, according to the first label and the identifier of the path, a forwarding entry corresponding to the tunnel.
Optionally, the first forwarding device further includes: a determining unit 404 and a second obtaining unit 405. The determining unit 404 is configured to determine a tunnel corresponding to the VPN. The second obtaining unit 405 is configured to obtain the information about the label block according to the tunnel corresponding to the VPN, where the information about the label block is determined by the number of the VPNs corresponding to the tunnel.
For example, the first obtaining unit 403 is specifically configured to: obtain a multicast identifier according to the identifier of the path, where the identifier of the multicast is used to identify the multicast forwarding information corresponding to the path; and according to the Where the outbound interface is an interface on the first forwarding device that communicates with the second forwarding device; and according to the first label, an identifier of the multicast and an outbound interface of the outbound interface Interface, and obtain the forwarding entry, where the forwarding entry includes a second label, an identifier of the multicast, and an identifier of the egress interface, and the second label is a label that is based on the first label and the offset The value of the offset corresponds to the VPN.
Optionally, the first forwarding device further includes: a second receiving unit 406, a third obtaining unit 407, and a second sending unit 408. The second receiving unit 406 is configured to receive a first packet from the VPN and obtain an identifier of the VPN. The third obtaining unit 407 is configured to obtain a second packet according to the forwarding entry, the first packet, and the identifier of the VPN, where the second packet is a packet that is sent to the Multicast packet of the second forwarding device. The second sending unit 408 is configured to send the second packet to the second forwarding device.
For example, the third obtaining unit 407 is specifically configured to: obtain a numerical value of the offset corresponding to the VPN according to the correspondence and the identifier of the VPN, where the correspondence includes the identifier of the VPN and the value of the partial According to the forwarding entry and the value of the offset, an identifier of a third label and an egress interface, where the third label is a value obtained according to a value of the first label and the offset The outgoing interface is configured to communicate with the second forwarding device; and the second sending unit is specifically configured to send the second packet to the second forwarding device according to the identifier of the egress interface And the second packet includes the first packet and the third tag.
According to the first forwarding device provided by this embodiment of the present application, the first forwarding device may obtain, according to an initial label of a label block that is sent by a second forwarding device, such as a first label, and an identifier of the path, Compared with the conventional upstream-assigned mode, the forwarding entry helps to reduce the forwarding cost required for the forwarding plane to support the upstream-assigned mode. It also helps reduce storage space and improve forwarding efficiency. The number of forwarding entries obtained by the first forwarding device is less than the usual forwarding entries formed according to 1 + N label spaces, and the first forwarding device does not need to store 1 + N label spaces, which helps to reduce Occupancy of storage space.
FIG. 5 is a schematic structural diagram of a second forwarding device according to an embodiment of the present application. The second forwarding device provided by this embodiment of the present application may be P, PE2, or PE3 in FIG. 2 (a), and may also be PE2, PE3, or PE4 in FIG. 3 (a). If the first forwarding device is PE1 in FIG. 2 (a), the second forwarding device may be P in FIG. 2 (a). If the first forwarding device is P in FIG. 2 (a), the second forwarding device may be PE2 or PE3 in FIG. 2 (a). The second forwarding device provided in this embodiment of the present application is described below with reference to FIG. 5.
The second forwarding device includes: a receiving unit 501, a first obtaining unit 502, and a sending unit 503.
The receiving unit 501 is configured to receive a request message sent by a first forwarding device, where the second forwarding device is the A downstream device of a first forwarding device, where the request message includes information of a label block and an identifier of a path, where the information of the label block is used to indicate a size of a label block, the identifier of the path is used to identify a virtual private network VPN corresponding Tunnel.
The first obtaining unit 502 is configured to obtain a first label according to the information of the label block, where the first label is a starting label of the label block determined according to the information of the label block.
The sending unit 503 is configured to send a response message to the first forwarding device, where the response message includes the identifier of the first label and the path.
Optionally, the second forwarding device further includes a second obtaining unit 504. The second obtaining unit 504 is configured to obtain, according to the identifiers of the first label and the path, an entry corresponding to the tunnel, where the entry includes a second label, where the second label is a label that is obtained according to the description The first label and the label obtained by the offset, the value of the offset corresponding to the VPN.
For example, the second obtaining unit 504 is specifically configured to: obtain a multicast identifier according to the identifier of the path, where the identifier of the multicast is used to identify the multicast forwarding information corresponding to the path; and according to the A first label, and an identifier of the multicast to obtain the entry, where the entry includes the identifier of the second label and the multicast.
According to the second forwarding device provided by this embodiment of the present application, the second forwarding device may allocate a first label to the first forwarding device according to the information of the label block that is sent by the first forwarding device. By the second forwarding device, a label block that matches the information of the label block according to the information of the label block. By the second forwarding device according to the offset carried in the packet from the first forwarding device and the first label, an entry that matches the two parameters, so as to obtain, according to the group in the entry Broadcast, obtain a label required for sending a packet to other forwarding devices, so that the second forwarding device does not need to store 1 + N tag spaces, which helps to reduce the storage space occupation.
FIG. 6 is a schematic structural diagram of a first forwarding device according to an embodiment of the present application. The first forwarding device provided in this embodiment may be the same as the first forwarding device in FIG. 4. The first forwarding device includes a processor 601, a memory 602, and a communications interface 603. The processor 601, the memory 602 and the communication interface 603 are connected through a communication bus 604. If the first forwarding device shown in FIG. 6 is a switch in a network, the processor 601 may be an NP. If the first forwarding device shown in FIG. 6 is a router, the processor 601 may be a central processing unit (CPU). The memory 602 is used for storing programs.
The processor 601 executes the following operation based on the executable instructions included in the program read from the memory 602.
The processor 601 sends a request message to the second forwarding device through the communication interface 603, where the request message includes information of a label block and an identifier of a path, where the information of the label block is used to indicate a size of a label block, The identifier of the path is used to identify a tunnel corresponding to a virtual private network VPN between the first forwarding device and the second forwarding device, and the first forwarding device is an upstream device of the second forwarding device.
The processor 601 receives, through the communication interface 603, a response message sent by the second forwarding device, where the response message includes a first label and an identifier of the path, and the first label is obtained according to the label block The start tag of the tag block as determined by the information of the tag.
The processor 601 obtains the forwarding entry corresponding to the tunnel according to the first label and the identifier of the path.
Optionally, the processor 601 further determines a tunnel corresponding to the VPN; and the processor 601 further obtains the information about the tag block according to the tunnel corresponding to the VPN, and the information about the tag block Which is determined by the number of VPNs corresponding to the tunnel.
For example, the processor 601 may obtain the identifier of the multicast according to the identifier of the path, where the identifier of the multicast is used to identify the multicast forwarding information corresponding to the path. The processor 601 may determine, according to The identifier of the path, and obtain an identifier of an interface, where the egress interface is an interface on the first forwarder that communicates with the second forwarder; The processor 601 may obtain the forwarding entry according to the first label, the identifier of the multicast, and the identifier of the egress interface, where the forwarding entry includes a second label, an identifier of the multicast and The identifier of the egress interface, and the second label is a label obtained according to the first label and an offset, and a value of the offset corresponds to a VPN.
Optionally, the processor 601 further receives a first packet from the VPN through the communication interface 603 and obtains an identifier of the VPN; and the processor 601 further determines, according to the forwarding entry, the value of the A packet, and an identifier of the VPN to obtain a second packet, where the second packet is a multicast packet that is sent to the second forwarding device through the tunnel; and the processor 601 further determines, by using the The communication interface 603 sends the second packet to the second forwarding device.
For example, the processor 601 may obtain the value of the offset corresponding to the VPN according to the correspondence and the identifier of the VPN, where the correspondence includes the identifier of the VPN and the value of the offset; The processor 601 may obtain the identifiers of the third label and the egress interface according to the forwarding entry and the numerical value of the offset, where the third label is an identifier of the third label and the egress interface according to the first label and the offset And the outgoing interface is configured to communicate with the second forwarding device; and the processor 601 sends the second forwarding device, through the communications interface 603, to the second forwarding device according to the identifier of the outgoing interface Where the second packet includes the first packet and the third tag.
For example, the forwarding table generated by the first forwarding device in the embodiment of the present invention on the control plane may be stored in the memory of the processor 601. If the first forwarding device further includes a forwarding chip, the forwarding entry generated by the first forwarding device on the forwarding plane may be stored in the forwarding chip. If the first forwarding device does not include a forwarding chip, the forwarding entry generated by the first forwarding device on the forwarding plane may be stored in the memory of the processor 601 or in the memory 602.
FIG. 7 is a schematic structural diagram of a second forwarding device according to an embodiment of the present application. The second forwarding device shown in FIG. 7 may be the same as the second forwarding device shown in FIG. 5. The first forwarding device includes a processor 701, a memory 702, and a communications interface 703. The processor 701, the memory 702 and the communication interface 703 are connected through a communication bus 704. If the second forwarding device shown in FIG. 7 is a switch in a network, the processor 701 may be an NP. If the second forwarding device shown in FIG. 7 is a router, the processor 701 may be a CPU. The memory 702 is used for storing programs.
The processor 701 performs the following operation according to the executable instructions included in the program read from the memory 702.
The processor 701 receives, through the communications interface 703, a request message sent by a first forwarding device, where the second forwarding device is a downstream device of the first forwarding device, where the request message includes information and a path of a label block The information of the tag block is used to indicate the size of a tag block, and the identifier of the path is used to identify a tunnel corresponding to a virtual private network VPN.
The processor 701 obtains a first label according to the information about the label block, where the first label is a starting label of the label block determined according to the information of the label block.
The processor 701 sends a response message to the first forwarding device through the communications interface 703, where the response message includes the identifier of the first label and the path.
Optionally, the processor 701 further obtains, according to the identifiers of the first label and the path, an entry corresponding to the tunnel, where the entry includes a second label, where the second label is a label corresponding to the tunnel The first label and the label obtained by the offset, the value of the offset corresponding to the VPN.
For example, the processor 701 obtains an identifier of a multicast according to the identifier of the path, where the identifier of the multicast is used to identify multicast forwarding information corresponding to the path. The processor 701 determines, according to the A label, and an identifier of the multicast to obtain the entry, where the entry includes the identifier of the second label and the multicast.
For example, the forwarding entry or entry generated by the first forwarding device in the control plane on the control plane may be stored in the memory of the processor 701. If the first forwarding device further includes a forwarding chip, the first forwarding device sends, on a forwarding plane The generated forwarding entry or entry can be saved in the forwarding chip. If the first forwarding device does not include a forwarding chip, the forwarding entry or entry that is generated by the first forwarding device on the forwarding plane may be stored in the memory 701 or the memory 702 of the processor 701.
A person of ordinary skill in the art may understand that all or part of steps for implementing the foregoing method embodiments may be implemented by a hardware associated with a program instruction. The foregoing program may be stored in a computer-readable storage medium, and when executed, the program may include The steps of the foregoing method embodiments may be performed. The foregoing storage medium may be at least one of the following media: a medium capable of storing program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
Finally, it should be noted that the foregoing embodiments are merely intended for describing the technical solutions of the present application rather than limiting the present application. Although the present application and the beneficial effects brought by the present application are described in detail with reference to the foregoing embodiments, It should be understood by those skilled in the art that the technical solutions described in the foregoing embodiments may still be modified or equivalent replacements may be made to part of the technical features without departing from the essence of the corresponding technical solutions The scope of the claims.
10 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4 Sheet 5 Sheet 6 Sheet 7 Sheet 8 Sheet 9 Sheet 10
Every citation, both ways
| Document | Relation | Office | Category | Cited during | Relevant claims |
|---|---|---|---|---|---|
| CN102938734A | Cites | China | A | International search | 1-16 |
| CN105515992A | Cites | China | A | International search | 1-16 |
| WO2006002598A1 | Cites | World Intellectual Property Organization (WIPO) | A | International search | 1-16 |
| WO2013154813A1 | Cites | World Intellectual Property Organization (WIPO) | A | International search | 1-16 |
| US7848335B1 | Cites | United States of America | A | International search | 1-16 |
| US9100213B1 | Cites | United States of America | A | International search | 1-16 |
3 members in 2 offices
Priority claims4
| Document | Office | Kind | Date |
|---|---|---|---|
| 201610546280 | China | A | |
| 2016105462805 | China | – | |
| 2016105462805 | – | – | – |
| CN20161546280 | – | – | – |
Members3
| Document | Office | Kind | |
|---|---|---|---|
| CN106209559A | China | A | |
| WO2018010519A1This record | World Intellectual Property Organization (WIPO) | A1 | |
| CN106209559B | China | B |
3 legal events, as the office reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | |
|---|---|---|
| Ep: pct application non-entry in european phase122 | 122 | |
| Non-entry into the national phase in:NENP | NENP | |
| Ep: the epo has been informed by wipo that ep was designated in this application121 | 121 |
Numbers
- Publication
- 2018/010519
- Publication, DOCDB
- 2018010519
- Publication, EPODOC
- WO2018010519
- Application
- 88633
- Application, DOCDB
- 2017088633
- Application, EPODOC
- WO2017CN88633
Titles3
- English
- METHOD AND APPARATUS FOR ESTABLISHING MULTICAST TUNNEL
- French
- PROCÉDÉ ET APPAREIL POUR ÉTABLIR UN TUNNEL DE DIFFUSION GROUPÉE
- Chinese
- ??????????????
Classification
- IPC, 2
- H04L12 723
- H04L12 913
Designated states165
- Regional, 86
- European Patent Office (EPO)
- Albania
- PATENT
- Austria
- Belgium
- Bulgaria
- Switzerland
- Cyprus
- Czechia
- Germany
- Denmark
- Estonia
- Spain
- Finland
- France
- United Kingdom
- Greece
- Croatia
- Hungary
- Ireland
- Iceland
- Italy
- Lithuania
- Luxembourg
and 62 moreShow fewer
- Latvia
- Monaco
- North Macedonia
- Malta
- Netherlands (Kingdom of the)
- Norway
- Poland
- Portugal
- Romania
- Serbia
- Sweden
- Slovenia
- Slovakia
- San Marino
- Türkiye
- African Intellectual Property Organization (OAPI)
- Burkina Faso
- UTILITY-MODEL
- Benin
- Central African Republic
- Congo
- Côte d’Ivoire
- Cameroon
- Gabon
- Guinea
- Equatorial Guinea
- Guinea-Bissau
- Comoros
- Mali
- Mauritania
- Niger
- Senegal
- Chad
- Togo
- African Regional Intellectual Property Organization (ARIPO)
- Botswana
- Ghana
- Gambia
- Kenya
- Liberia
- Lesotho
- Malawi
- Mozambique
- Namibia
- Rwanda
- Sudan
- Sierra Leone
- Sao Tome and Principe
- Eswatini
- United Republic of Tanzania
- Uganda
- Zambia
- Zimbabwe
- Eurasian Patent Organization (EAPO)
- Armenia
- Azerbaijan
- Belarus
- Kyrgyzstan
- Kazakhstan
- Russian Federation
- Tajikistan
- Turkmenistan
- National, 79
- United Arab Emirates
- Antigua and Barbuda
- Angola
- Australia
- Bosnia and Herzegovina
- CONSENSUAL-PATENT
- Barbados
- Bahrain
- Brunei Darussalam
- Brazil
- UTILITY-MODEL-CERTIFICATE
- Belize
- Canada
- Chile
- China
- Colombia
- Costa Rica
- Cuba
- Djibouti
- Dominica
- Dominican Republic
- Algeria
- Ecuador
- Egypt
and 55 moreShow fewer
- Grenada
- Georgia
- UTILITY-CERTIFICATE
- Guatemala
- Honduras
- Indonesia
- Israel
- India
- Iran (Islamic Republic of)
- Jordan
- Japan
- Cambodia
- Saint Kitts and Nevis
- Democratic People’s Republic of Korea
- INVENTOR-CERTIFICATE
- Republic of Korea
- Kuwait
- Lao People’s Democratic Republic
- Saint Lucia
- Sri Lanka
- Libya
- Morocco
- Republic of Moldova
- Montenegro
- Madagascar
- Mongolia
- Mexico
- Malaysia
- UTILITY-INNOVATION
- Nigeria
- Nicaragua
- New Zealand
- Oman
- Panama
- Peru
- Papua New Guinea
- Philippines
- Qatar
- PETTY-PATENT
- Saudi Arabia
- Seychelles
- Singapore
- El Salvador
- Syrian Arab Republic
- Thailand
- PROVISIONAL-PATENT
- Tunisia
- Trinidad and Tobago
- Ukraine
- United States of America
- Uzbekistan
- Saint Vincent and the Grenadines
- Viet Nam
- PATENT-FOR-UTILITY-SOLUTION
- South Africa