Background
Existing multi-protocol Label Switching (MPLS) three-layer (L3) Virtual Private Network (VPN) networking is a PE-based three-layer technology in a service provider VPN solution, which uses a Border Gateway Protocol (BGP) to publish a VPN route on a service provider backbone Network and uses MPLS to forward a VPN packet on the service provider backbone Network.
In MPLS L3VPN networking, especially nested VPN, VPN information is exchanged between a PE and customer side equipment (CE) and between PEs by routing VPNv 4. Wherein, the VPNv4 Route comprises 8 bytes of Route identifier (RD) and 4 bytes of IPv4 address prefix, wherein RD is added before IPv4 address prefix, in order to make IPv4 address prefix after adding RD be called as globally unique VPN IPv4 address prefix, in order to distinguish different routes of VPN. Referring to fig. 1, fig. 1 is a schematic diagram of a conventional routing distribution. FIG. 1 applies to nested VPN networking, where CE-B1 and CE-B3 are nested sub-PEs of PE-A1. In fig. 1, VPNB is used between PE-a1 and CE-B1, and VPNB or VPNA is used between PE-a1 and CE-B3, based on which fig. 1 shows the route distribution process by arrows, specifically:
first, CE-C1 and CE-C3 issued IPv4 routes with address prefixes of 1.1.1.1/24 and reach CE-B1 and CE-B3, respectively.
CE-B3 as a nested sub-PE, after receiving the ordinary IPv4 route from CE-C3, adds RD of VPN B2 used between CE-B3 and CE-C3 as a user VPN to form VPNv4 route on the address prefix of 1.1.1.1/24, and distributes the route to PE-A1 through MP-BGP. Similarly, CE-B1 as a nested sub-PE receives the ordinary IPv4 route from CE-C1, adds the RD of VPN B1 used between CE-B1 and CE-C1 as a user VPN to form a VPnv4 route on the address prefix of 1.1.1.1/24, and distributes the VPnv4 route to PE-A1 through MP-BGP.
To this end, PE-a1 receives the following two VPNv4 routes:
route 1, address prefix 1.1.1.1/24, additional RD is RD of VPN B1;
route 2, address prefix 1.1.1.1/24, additional RD is that of VPN B2.
When PE-a1 receives route 1 and route 2, the RD for route 1 needs to be replaced with: the RD of the VPNB used between PE-A1 and CE-B1 (route 1 after RD replacement is referred to as route 3), and similarly, the RD of route 2 is replaced by: VPNB or VPNA RD is used between PE-A1 and CE-B3 (route 2 after RD replacement is denoted as route 4 at this time).
Because VPNB or VPNA is used between PE-a1 and CE-B3, when VPNA is used between PE-a1 and CE-B3 (denoted as case 1), RD of route 4 is RD of VPN a, which is different from RD of VPNB in route 3, and thus PE-a1 considers route 3 and route 4 as two completely different private network routes, applies for different private network labels for the two completely different private network routes, and issues it to opposite end PE-a 2; when VPNB is used between PE-a1 and CE-B3 (case 2), the RD of route 4 is the RD of VPN B, which is the same as route 3, so PE-a1 considers route 3 and route 4 to be the same private network route, and prefers one of the routes, such as route 3, to be distributed to peer PE-a 2.
After receiving two completely different routes 3 and 4 issued by PE-a1 under the condition 1, the PE-a2 determines that the routes 3 and 4 both come from PE-a1 and have the same address prefix, and therefore, the PE-a2 selects one route from the received routes 3 and 4 according to a series of preferred methods and issues the selected route to the local forwarding table entry. And when receiving a route issued by PE-a1 under the condition 2, PE-a2 directly issues the received route to the local forwarding table entry.
So far, the existing route distribution description is completed.
However, in the conventional route distribution process, after receiving two completely different routes 3 and 4 distributed by PE-a1 under case 1, PE-a2 prefers one of the routes 3 and 4 to use and distribute to the local forwarding table entry, which may limit the CE under PE-a2, such as CE-B2, to only interwork with a specific CE under PE-a1, but not with other CEs that are under PE-a1 and distribute the same address prefix with the specific CE. Taking PE-A2 as an example of selecting route 3, RD in this route 3 belongs to VPN B, thus limiting CEs such as CE-B2 under PE-A2 to only interwork with CE-B1 under PE-A1, but not with CE-B3 belonging to VPN A but issuing the same address prefix as CE-B1. Similarly, when PE-a2 receives a route, such as route 3, which PE-a1 issues in case 2, it may also cause that a CE, such as CE-B2, connected under PE-a2 cannot communicate with CE-B3 and CE-B1 that issue the same address prefix at the same time because only one route is selected.
Disclosure of Invention
The invention provides a route issuing method and Provider Edge (PE) to ensure that a CE which is connected downstream of an opposite-end PE is communicated with all CEs which are connected downstream of a home-end PE and issue the same address prefix.
The technical scheme provided by the invention comprises the following steps:
a route publishing method comprises the following steps:
a, provider edge equipment PE receives N private network routes with the same address prefix, wherein N is more than or equal to 2;
b, if the PE determines that the N private network routes come from different devices, distributing different private network labels for the N private network routes and distributing the private network labels to upstream neighbor devices;
if the PE determines that the N private network routes are all from the same equipment, when the N private network routes have different private network labels, the N private network routes which have the same address prefix but different private network labels and are from the same equipment are determined as equivalent private network routes, and different private network labels are distributed to the N equivalent private network routes and issued to upstream neighbor equipment.
Preferably, before step B is executed, the method further comprises: the PE and the upstream neighbor equipment negotiate and enable private network label equivalence capacity; the private network label capability comprises a function for executing the operation in the step B;
based on this, the issuing operation in step B includes: and determining whether the PE negotiates the private network label equivalence capacity with upstream neighbor equipment, and if so, continuing to execute the issuing operation.
Preferably, in the present invention, the negotiating capability of the PE and the upstream neighbor device for the private network tag includes:
the PE and the upstream neighbor device negotiate the private network label capability through an OPEN message in an interactive Border Gateway Protocol (BGP), wherein the OPEN message is expanded to increase a field for negotiating the private network label equivalent capability.
Preferably, in the present invention, the private network label capability further includes a function for releasing a private network route;
based on this, the method further comprises:
and the PE executes private network route release based on the function for releasing the private network route.
In the present invention, the PE executing the private network route release based on the function for releasing the private network route specifically includes:
c, when the route needs to be released, the PE informs the upstream neighbor equipment of the private network label distributed by the route, so that the upstream neighbor equipment releases the corresponding route according to the received private network label;
d, when the PE receives the private network label distributed to the route needing to be released and informed by the downstream neighbor equipment, the PE releases the route corresponding to the received private network label.
The private network Label distributed to the route to be released is carried by MP Unreach NLRI Label Stack field of UPDATE message in BGP protocol.
The invention also provides a message transmission method, which comprises the following steps:
the PE receives a message sent by upstream neighbor equipment;
the PE determines the incoming label of the message, if the incoming label is a private network label distributed by the PE for one private network route in the equivalent private network routes determined by the method, the incoming label is exchanged into a private network label carried by the private network route when the PE receives the private network route, and the message is forwarded; or,
PE receives the message sent by the UE connected with the PE;
the PE determines that the route for sending the message is the equivalent private network route determined by the method, selects a private network route from the equivalent private network routes, adds a private network label carried by the private network route when the PE receives the private network route in the message as the forwarding label of the message, and forwards the message.
The present invention also provides a PE, which is characterized in that the PE is used for route distribution, and includes:
the route receiving unit is used for receiving N private network routes with the same address prefix, wherein N is more than or equal to 2;
the issuing unit is used for distributing different private network labels to the N private network routes and issuing the labels to upstream neighbor equipment when the N private network routes come from different equipment; and the private network router is used for determining the N private network routers from the same equipment, which have the same address prefix but different private network labels, as equivalent private network routers if the N private network routers have different private network labels when the N private network routers all come from the same equipment, distributing different private network labels to the N equivalent private network routers, and issuing the private network routers to upstream neighbor equipment.
Preferably, in the present invention, the PE further comprises:
a negotiation and enabling unit, configured to negotiate with the upstream neighbor device and enable a private network tag capability, where the private network tag capability includes an operation executed by the publishing unit;
the issuing operation performed by the issuing unit is performed after determining that the PE has negotiated the private network label equivalence capability with the upstream neighbor device.
The negotiation and enabling unit negotiates private network label equivalence capacity by sending an OPEN message in a Border Gateway Protocol (BGP) to the upstream neighbor device, wherein the OPEN message negotiates the private network label equivalence capacity by expanding a field added for negotiating the private network label equivalence capacity.
Preferably, in the present invention, the private network label capability further includes a function for releasing a private network route;
based on this, the PE further comprises:
a release unit, configured to execute private network route release based on a function for releasing a private network route further included in the private network tag capability, specifically: when the route needs to be released, the private network label distributed to the route needing to be released is informed to the upstream neighbor equipment, so that the upstream neighbor PE releases the corresponding route according to the received private network label; and releasing the route corresponding to the received private network label when receiving the private network label distributed to the route required to be released and informed by the downstream neighbor equipment.
The private network Label distributed to the route to be released is carried by MP Unreach NLRI Label Stack field of UPDATE message in BGP protocol.
The invention also provides another PE, which is used for message transmission and comprises the following steps: each unit, the message receiving unit and the message forwarding unit included in the PE are described above;
the message receiving unit is used for receiving a message sent by upstream neighbor equipment and receiving a message sent by user side equipment (CE) connected downstream by the PE;
the message forwarding unit is used for switching an incoming label of a message from the upstream neighbor equipment into a private network label carried by a private network route when the PE receives the private network route and forwarding the message when the incoming label is determined to be the private network label distributed by the publishing unit for the private network route in the equivalent private network routes; and the number of the first and second groups,
when the route used for sending the message from the CE is determined to be the equivalent private network route determined by the issuing unit, selecting a private network route from the equivalent private network routes, adding a private network label carried by the private network route when the PE receives the private network route to the message as a forwarding label of the message, and forwarding the message.
Preferably, the message forwarding unit selects one route from the equivalent private network routes according to a load sharing policy, and forwards the message by using the selected route.
According to the technical scheme, when N private network routes with the same address prefix are locally received by the PE, whether the N private network routes carry the same RD or not is judged, if the N private network routes are received from different devices, different private network labels are distributed to the N private network routes and are distributed to upstream neighbor devices, and the N private network routes are not distributed by only selecting one route from the same route; or, even if the private network routes are received from the same device, if the private network routes have different private network labels, the N private network routes are maintained as equivalent private network routes, and one private network route is not preferred from the received N private network routes, which ensures the interworking between the CE under the upstream neighbor device and the CE under the PE that publishes the same address prefix.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
The PE involved in the route publishing method provided by the present invention may be a basic PE connected to the MPLS backbone, such as PE-a1 or PE-a2 in fig. 1; or may be nested sub-PEs in a nested VPN network, such as CE-B1 or CE-B3 in fig. 1, which are the basic PEs in an MPLS backbone. Hereinafter, for convenience of description, they are collectively referred to as PE.
The route issuing method provided by the embodiment of the invention mainly comprises the following steps: the PE receives N private network routes with the same address prefix; if the N private network routes come from different devices, distributing different private network labels for the N private network routes and distributing the labels to upstream neighbor devices; if the N private network routes are all from the same equipment, when the N private network routes have different private network labels, the N private network routes which have the same address prefix but different private network labels and are from the same equipment are taken as equivalent private network routes, and different private network labels are distributed to the N equivalent private network routes and are issued to upstream neighbor equipment. Preferably, in the present invention, for convenience of description, the upstream neighbor device of the PE is simply referred to as an upstream neighbor PE hereinafter.
Thus, when the PE receives a message sent by an upstream neighbor PE, if the entering label of the message is determined to be a private network label distributed by the PE for one private network route in equivalent private network routes, the entering label is exchanged into the private network label carried by the private network route when the PE receives the private network route, and the message is forwarded. Wherein forwarding the packet specifically includes: forwarding the message by using the port of the PE receiving the private network route;
and when the PE receives a message sent by a CE connected downstream of the PE, if the PE determines that the route used for sending the message is the equivalent private network route determined as above, selecting (the selection can be executed according to a load sharing policy or a random mode) a private network route from the equivalent private network routes, adding a private network label carried by the private network route when the PE receives the private network route in the message as an entrance label of the message, and forwarding the message.
The following describes the route distribution method provided by the present invention in detail:
first, in order to implement the route distribution method provided by the present invention, the PE and its upstream neighbor PE need to negotiate a private network label equivalence capability (label-echo-capability) with each other. The PE and the upstream neighbor PE thereof can realize the negotiation of the private network label capability through mutually interacting the OPEN message in the BGP protocol. In the invention, in order to realize the negotiation of private network label capability by interacting the OPEN message between the PE and the upstream PE thereof, the OPEN message needs to be expanded, so that the expanded OPEN message is added with a field for negotiating the private network label equivalent capability. Fig. 2 shows fields added in the OPEN message for negotiating the private network label equivalence capability, which obey the rules of the BGP protocol, including: a capability code field (capability code) and a capability length field (capability length), wherein the capability code occupies 1 byte for indicating the private network tag equivalent capability, and the capability length occupies 1 byte for indicating a field length of the attribute available for the private network tag equivalent capability, such as value, etc., whereas since the present invention mainly relates to negotiation of the private network tag equivalent capability and does not relate to the attribute available for the private network tag equivalent capability, it may be suggested that the capability length is empty or takes a value of 0, where the capability length is set for the purpose of complying with the BGP protocol for the added field. Thus, based on the OPEN message shown in fig. 2, the PE and its upstream neighbor PE can complete the negotiation of the private network label equivalent capability by interacting with the OPEN message shown in fig. 2 within a set time.
The private network tag equivalence capability in the invention can specifically comprise the following functions:
function 1, when a PE issues N locally received private network routes having the same address prefix, adds a judgment, specifically: judging whether the N private network routes come from different equipment, namely receiving the N private network routes from different equipment;
if the N private network routes are received from different devices, the N private network routes are considered to be different routes, different private network labels are distributed to the N private network routes, and the N private network labels are issued to upstream neighbor PEs which negotiate the equivalent capability of the private network labels with the PE. It can be seen that, regardless of whether the same RD is added to the N private network routes during publication, as long as the N private network routes are received from different devices, the N private network routes are considered to be N different routes, and the N private network routes are continuously published to the upstream neighbor PE that has negotiated the private network label equivalence capability.
If the N private network routes are received from the same device, a judgment is added, specifically: and judging whether the N private network routes are distributed with different private network labels or not, if the N private network routes are distributed with different private network labels, considering that the N private network routes are different routes, distributing different private network labels to the N private network routes, and issuing the private network labels to upstream neighbor PEs which negotiate the equivalent capability of the private network labels. It can be seen that even if the PE determines that the N private network routes are received from the same device, since the N private network routes have different private network labels, the N private network routes are considered to be N different routes, and the N private network routes are continuously issued to the upstream neighbor PE that has negotiated the private network label equivalence ability.
It should be noted that, in the present function 1, there are various ways to specifically implement the manner of determining whether N private network routes having the same address prefix are received from different devices or the same device, and the following description is given by taking only three examples:
example 1, the device identity (Route id) of the next hop device depending on the N private network routes. The Route id of the next-hop device can be an identifier of the device in the BGP, each device in the MPLS L3VPN network has a unique Route id, different devices have different Route ids, each device carries the Route id in an OPEN message of the BGP to inform the neighbor when establishing neighbor connection with other devices through the BGP, and records the Route id informed by the neighbor. When the PE locally receives N private network routes, aiming at any one of the N private network routes, the Route can be associated with the recorded Route id of the next hop device which issues the Route by using a code preset by a developer, based on the judgment, whether the N private network routes with the same address prefix are received from different devices or the same device can be obtained by comparing the Route ids of the next hop devices associated with the N private network routes, if the N private network routes are different, the N private network routes are all received from different devices, otherwise, if the N private network routes are the same, the N private network routes are all received from the same device.
In summary, based on the description of Route ID, the present invention may refer to function 1 as a Route ID-based VPNv4 forward (Route ID-VPNv 4-Export) function.
Example 2, TCP port based on issued route. The technical personnel in the field know that a device usually sends a route through a TCP port, based on which, when a PE locally receives N private network routes, a TCP port (the TCP port is generally carried in the route) issuing the route is determined for any one of the N private network routes, and based on this, it is determined whether the N private network routes having the same address prefix are received from different devices or received from the same device, and it can be known by comparing whether the TCP ports sending the N private network routes are the same or not, if they are different, it means that the N private network routes are all received from different devices, otherwise, it means that the N private network routes are all received from the same device.
Example 3, route-based next hop address. When a PE (provider edge) locally receives N private network routes, determining a next hop address of the route (the next hop address is generally carried in the route) aiming at any one of the N private network routes, judging whether the N private network routes with the same address prefix are received from different equipment or the same equipment based on the next hop address, and comparing whether the N private network routes are received from the same equipment or not to obtain the next hop address, wherein if the N private network routes are different, the N private network routes are received from different equipment, otherwise, the N private network routes are received from the same equipment.
Up to this point, it is easy to determine whether the N private network routes having the same address prefix are received from different devices or the same device by any of the above-described examples 1 to 3. As an extension of the embodiment of the present invention, the above-mentioned embodiments 1 to 3 are only examples, and are not intended to limit the present invention, and other manners of determining whether N private network routes having the same address prefix are received from different devices or the same device are also possible without changing the idea of the present invention, which are not examples herein.
And the function 2 is called VPNv4 multi-equal cost path forwarding (VPNv 4-ECMP) capability, and is used for forming the N private network routes into equal cost private network routes and sending the equal cost private network routes to the local forwarding table item when the function 1 judges that the N private network routes are received from the same equipment and are distributed with different private network labels.
Based on the function 2, the invention determines N private network routes from the same device (i.e. the next hop is the same) with the same address prefix but different private network labels as equivalent private network routes, which is different from the traditional method for determining equivalent private network routes, and the traditional method for determining equivalent private network routes is as follows: routes from different devices (i.e., different next hops) but with the same address prefix are determined to be equivalent private network routes.
Based on the description of the private network label equivalence ability, in the invention, after the PE negotiates the private network label equivalence ability with the upstream neighbor PE, the negotiated private network label equivalence ability is enabled, so that the function 1 and the function 2 contained in the private network label equivalence ability are utilized to process the received N private network routes with the same address prefix.
The method provided by the invention is described by way of example below:
example 1:
in this embodiment 1, the MPLS L3VPN network shown in fig. 3 is taken as an example, and in fig. 3, PE-a1 is the same as the user VPN used between CE-B1 and CE-B3 as their nested child PEs, and is also referred to as VPN B. Then, as shown in fig. 3, CE-B3 and CE-B1 respectively publish the following two private network routes to PE-a 1: route 1, the additional RD is the RD of VPN B2, and the address prefix is VPNv4 route of 1.1.1.1/24; route 2, the additional RD is the RD of VPN B1, VPNv4 route with address prefix of 1.1.1.1/24.
Since PE-A1 is the same as the user VPNs used between CE-B1 and CE-B3, respectively, and is VPNB, based on the RD replacement feature, PE-A1 will replace the received RD of both route 1 and route 2 with the RD of VPN B. After the RD replacement is completed, route 1 and route 2 have the same RD and address prefix, and it is determined that route 1 and route 2 are the same route according to the existing route distribution method, but in the present invention, after PE-a1 negotiates with its upstream neighbor PE, that is, PE-a2, and the private network label equivalence capability is enabled, based on the above function 1, because route 1 and route 2 are obtained by PE-a1 respectively receiving from two different devices, that is, CE-B1 and CE-B3, route 1 and route 2 are distributed to PE-a2 as two different routes, and two different private network labels are distributed to the two different routes, for example, route 1 is distributed with private network label 100, and route 2 is distributed with private network label 300.
After receiving the route 1 and the route 2 issued by the PE-a1, the PE-a2 finds that the route 1 and the route 2 are issued by the same device, i.e., PE-a1, and the RD and the address prefixes of the route 1 and the route 2 are the same, and the main difference is that the private network labels are different. Then route 1 and route 2 are determined to be equivalent private network routes based on function 2 above, after PE-a2 enables the private network label equivalence capability above. Taking PE-a1 as an example for allocating a private network label to route 1 as 100 and allocating a private network label to route 2 as 300, when PE-a2 receives a data packet sent by CE-B2 to PE-a1, one of the equivalent private network routes formed above, for example, a route with a private network label of 100, is selected based on a routing load sharing policy, and when PE-a1 receives a data packet with a private network label of 100, the private network label is switched to other labels and forwarded to CE-B3.
In addition, if PE-a2 still has an upstream neighbor PE and has negotiated the private network label equivalence capability with the upstream neighbor PE, based on the above function 1, it is considered that although both route 1 and route 2 come from PE-a1 and the address prefixes are the same, since the private network labels are different, such as the private network label of route 1 is 100 and the private network label of route 2 is 300, even if the present PE-a2 determines the route 1 and route 2 as equivalent private network routes, it is determined that the route 1 and route 2 are two different routes, and two different private network labels are assigned to the two different routes and sent to the upstream neighbor PE that has negotiated the private network label equivalence capability with the present PE-a 2.
The description of embodiment 1 is completed so far. Embodiment 1 describes the method provided by the present invention by taking as an example that PE-a1 is respectively the same as the user VPN used between CE-B1 and CE-B3 as its nested child PEs, and if PE-a1 is different from the user VPN used between CE-B1 and CE-B3 as its nested child PEs, for example, the user VPN used between PE-a1 and CE-B1 is VPN B, and the user VPN used between PE-a1 and CE-B3 is VPN a, see embodiment 2 shown in fig. 4:
example 2:
in this embodiment 2, taking the MPLS L3VPN network shown in fig. 4 as an example, in fig. 4, a user VPN used between PE-a1 and CE-B1 and CE-B3 as its nested child PEs is different, for example, the user VPN used between PE-a1 and CE-B1 is VPN B, and the user VPN used between PE-a1 and CE-B3 is VPN a, as shown in fig. 4, CE-B3 and CE-B1 respectively issue the following two private network routes to PE-a 1: route 1, the additional RD is the RD of VPN B2, and the address prefix is VPNv4 route of 1.1.1.1/24; route 2, the additional RD is the RD of VPN B1, VPNv4 route with address prefix of 1.1.1.1/24.
Based on the RD replacement feature, PE-A1 will replace the RD of received route 1 with the RD of VPN A and replace the RD of route 2 with the RD of VPN B. After the RD replacement is completed, route 1 and route 2 have different RDs, and route 1 and route 2 are issued to PE-a2 according to the existing routing manner or according to the function 1 in the present invention, and two different private network labels are assigned to the two different routes.
After receiving the route 1 and the route 2 issued by the PE-a1, the PE-a2 finds that the route 1 and the route 2 are issued by the same device, i.e., PE-a1, and have the same address prefix, and if one of the route 1 and the route 2 is selected in the existing routing manner, records the selected route to the local forwarding table entry; in the present invention, although the route 1 and the route 2 are issued by the same device and have the same address prefix, but the private network labels are different, after the PE-a2 enables the private network label equivalence capability, based on the description of the function 2, the route 1 and the route 2 form an equivalent private network route with different private network outgoing labels but the same next hop and address prefix.
In addition, if PE-a2 still has an upstream neighbor PE and has negotiated the private network label equivalence capability with the upstream neighbor PE, based on function 1 above, it is considered that although route 1 and route 2 are from the same device and address prefixes are the same, since the private network labels are different, it should be confirmed that route 1 and route 2 are two different routes, and therefore, two different private network labels are allocated to the two different routes and issued to the upstream neighbor PE that has negotiated the private network label equivalence capability with PE-a 2.
The description of embodiment 2 is completed so far.
As can be seen from embodiments 1 and 2, in the present invention, when a PE locally receives N private network routes having the same address prefix, regardless of whether the N private network routes carry the same RD, after the private network label equivalence capability in the present invention is enabled, as long as the N private network routes are received from different devices, different private network labels are allocated to the N private network routes and distributed to an upstream neighbor PE; or, even if the private network labels are received from the same device, if the private network labels are different, the N private network routes are maintained as equivalent private network routes, and different private network labels are allocated to the N equivalent private network routes and issued to the upstream neighbor PE.
In addition, the private network label equivalence capability in the invention also comprises the following capabilities:
the route revocation capability (Withdraw-ECMP-Label) is used for releasing a private network route, and specifically includes: when the PE needs to release the route, the PE informs the upstream neighbor PE of the private network label distributed to the route needing to be released, so that the upstream neighbor PE releases the corresponding route according to the received private network label; or, when receiving the private network label distributed to the route to be released notified by the downstream neighbor PE, releasing the route corresponding to the received private network label.
The private network Label allocated to the route to be released is carried by the MP Unreach NLRI Label Stack field of the UPDATE message in the BGP protocol.
For example, if PE-a1 in fig. 4 wants to release route 1 and route 2, it sends an UPDATE message to PE-a2, where the MP unregeach NLRI Label Stack field in the UPDATE message carries a private network Label, such as 100, assigned by PE-a1 for route 1 and a private network Label, such as 300, assigned by PE-a1 for route 2. After the PE-A2 receives the UPDATE message from the PE-A1, the routes needing to be withdrawn are identified as two equivalent VPNV4 routes, namely route 1 and route 2, according to the private network Label carried by the MP Unreach NLRI Label Stack field in the UPDATE message, and the two equivalent VPNV4 routes are withdrawn.
So far, the description of the route distribution method provided by the present invention is completed, and the following describes the PE provided by the present invention.
Referring to fig. 5, fig. 5 is a diagram illustrating a PE structure according to the present invention. The PE is mainly used for route release and comprises the following components:
the route receiving unit is used for receiving N private network routes with the same address prefix, wherein N is more than or equal to 2;
the issuing unit is used for distributing different private network labels to the N private network routes and issuing the labels to upstream neighbor equipment when the N private network routes come from different equipment; and the private network router is used for determining the N private network routers from the same equipment, which have the same address prefix but different private network labels, as equivalent private network routers if the N private network routers have different private network labels when the N private network routers all come from the same equipment, distributing different private network labels to the N equivalent private network routers, and issuing the private network routers to upstream neighbor equipment.
Preferably, as shown in fig. 5, the PE further comprises:
a negotiation and enabling unit, configured to negotiate with the upstream neighbor device and enable a private network tag capability, where the private network tag capability includes an operation executed by the publishing unit;
the issuing operation performed by the issuing unit is performed after determining that the PE has negotiated the private network label equivalence capability with the upstream neighbor device.
In the present invention, the negotiation and enabling unit negotiates the private network label equivalence ability by sending an OPEN message in BGP to the upstream neighbor device, where the OPEN message negotiates the private network label equivalence ability by expanding a field added for negotiating the private network label equivalence ability.
In the invention, the private network label capability also comprises a function for releasing the private network route;
based on this, the PE further comprises:
a release unit, configured to execute private network route release based on a function for releasing a private network route further included in the private network tag capability, specifically: when the route needs to be released, the private network label distributed to the route needing to be released is informed to the upstream neighbor equipment, so that the upstream neighbor PE releases the corresponding route according to the received private network label; and releasing the route corresponding to the received private network label when receiving the private network label distributed to the route required to be released and informed by the downstream neighbor equipment.
In the invention, the private network Label distributed to the route to be released is carried by MP Unreach NLRI Label Stack field of UPDATE message in BGP protocol.
To this end, the PE structure description shown in fig. 5 is completed.
In addition, the present invention also provides a PE applied to packet transmission, which includes the units shown in fig. 5, and further includes: a message receiving unit, a route determining unit, and a message forwarding unit, as shown in fig. 6.
Here, the units shown in fig. 5 are not described in detail here.
The message receiving unit is used for receiving a message sent by upstream neighbor equipment and receiving a message sent by the user side equipment CE connected downstream by the PE;
the message forwarding unit is used for switching an incoming label of a message from the upstream neighbor equipment into a private network label carried by a private network route when the PE receives the private network route and forwarding the message when the incoming label is determined to be the private network label distributed by the publishing unit for the private network route in the equivalent private network routes; and
when the route used for sending the message from the CE is determined to be the equivalent private network route determined by the issuing unit, selecting a private network route from the equivalent private network routes, adding a private network label carried by the private network route when the PE receives the private network route to the message as a forwarding label of the message, and forwarding the message.
Thus, the description of the structure shown in fig. 6 is completed.
According to the technical scheme, when N private network routes with the same address prefix are locally received by the PE, whether the N private network routes carry the same RD or not is judged, if the N private network routes are received from different devices, different private network labels are distributed to the N private network routes and are distributed to the upstream PE, and the N private network routes are not distributed by only selecting one route from the same route; or, even if the private network routes are received from the same device, if the private network routes have different private network labels, the N private network routes are maintained as equivalent private network routes, and one of the N received private network routes is not preferred, which ensures the interworking between the CE under the upstream PE and the CE under the local PE that has issued the same address prefix.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.