Communication method and device
By introducing priority mapping and local SID tables into PE devices, IPv6 header packets carrying service SIDs are generated based on DSCP values, which solves the routing pressure and memory usage problems in SRv6 VPN, and realizes efficient differential service forwarding.
Patent Information
- Application Number
- CN202510582157.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-08-22
AI Technical Summary
When existing PE devices deploy SRv6 VPN, due to the large number of source routes and the creation of multiple VPN instances for routing regeneration, the huge BGP routing pressure and memory usage are affected, affecting the stability of service recovery.
By introducing priority mapping tables and local SID tables in the inlet PE and exit PE, service packets of the outer IPv6 header carrying the service SID are generated based on the DSCP value and destination address of the service message, and differential service forwarding is used to avoid routing regeneration.
It realizes that a variety of differential services are provided without increasing PE routing pressure, reducing BGP routing pressure and memory usage, and improving service recovery stability.
Smart Images

Figure CN120528864A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a communication method and device. Background Art
[0002] SRv6 VPN is a technology that uses SRv6 tunnels to carry VPN services over IPv6 networks. Each network device is equipped with a control plane and a data plane. The control plane uses MP-BGP to advertise VPN routing information, and the data plane uses SRv6 encapsulation to forward packets. When tenants have dispersed physical sites, SRv6 VPN can leverage existing service provider or enterprise IP networks to provide Layer 2 and Layer 3 connectivity for the same tenant's subnets.
[0003] When internet providers use SRv6 VPN technology to carry services, they create VPN instances within the network edge (Provider Edge, PE) and establish BGP private network neighbors with the customer edge (CE). Multiple VPN instances can be created simultaneously within the PE, each storing different types of routes (VPNv4 / v6). Furthermore, each VPN instance regenerates source routes learned from its neighbors, deriving gold, silver, and bronze routes. In practice, VPN instances prioritize services, enabling end-to-end access to VPN instances of varying priorities through SRv6 end-to-end convergence, providing differentiated services.
[0004] However, this deployment method also has the following drawbacks: When a large number of source routes are created and multiple VPN instances are created for route regeneration, the PEs carry a significant burden of BGP routes, occupying a large amount of PE memory. This is especially true when a link failure causes BGP neighbor flapping, significantly impacting service restoration time. Summary of the Invention
[0005] In view of this, the present application provides a communication method and device to solve the problem that the existing PE deployment method causes PE to bear huge BGP routing pressure and occupy a large amount of PE memory when the number of source routes is large and multiple VPN instances are created for route regeneration.
[0006] In a first aspect, the present application provides a communication method, applied to an ingress PE, the method comprising:
[0007] Receive a first service message sent by the CE, where the first service message includes a first destination address and a DSCP value;
[0008] According to the DSCP value, obtaining a first priority mapping table entry that matches the DSCP value from a priority mapping table, where the first priority mapping table entry includes a service SID;
[0009] When the first forwarding table entry matching the first destination address includes the first SID of the egress PE and the first forwarding table entry indicates to perform encapsulation and forwarding on the service packet, generating a second service packet, where the second service packet includes an outer IPv6 header and the first service packet, the outer IPv6 header includes a second destination address, the second destination address is a second SID, and the second SID includes the first SID and the service SID;
[0010] The second service packet is sent to the egress PE according to the path determined by the second SID.
[0011] In a second aspect, the present application provides a communication method, applied to an egress PE, the method comprising:
[0012] Receive a first service message sent by an ingress PE, where the first service message includes an outer IPv6 header and a second service message, where the outer IPv6 header includes a first destination address;
[0013] If the first destination address matches the first SID in the local SID table, processing the second service packet under the VPN instance corresponding to the first SID according to the action corresponding to the first SID;
[0014] The first destination address belongs to the first SID.
[0015] In a third aspect, the present application provides a communication device, applied to an ingress PE, comprising:
[0016] A receiving unit, configured to receive a first service message sent by the CE, where the first service message includes a first destination address and a DSCP value;
[0017] an acquiring unit, configured to acquire, from a priority mapping table, a first priority mapping entry matching the DSCP value according to the DSCP value, where the first priority mapping entry includes a service SID;
[0018] a first generating unit, configured to, when a first forwarding table entry matching the first destination address includes a first SID of an egress PE and the first forwarding table entry indicates to perform encapsulation and forwarding on the service packet, generate a second service packet, the second service packet including an outer IPv6 header and the first service packet, the outer IPv6 header including a second destination address, the second destination address being a second SID, and the second SID including the first SID and the service SID;
[0019] A sending unit is configured to send the second service message to the egress PE according to the path determined by the second SID.
[0020] In a fourth aspect, the present application provides a communication device, applied to an egress PE, comprising:
[0021] A receiving unit, configured to receive a first service message sent by an ingress PE, wherein the first service message includes an outer IPv6 header and a second service message, wherein the outer IPv6 header includes a first destination address;
[0022] a processing unit, configured to process the second service packet under the VPN instance corresponding to the first SID according to an action corresponding to the first SID if the first destination address matches the first SID in the local SID table;
[0023] The first destination address belongs to the first SID.
[0024] In a fifth aspect, the present application provides a network device comprising a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to execute the method provided in the first aspect of the present application.
[0025] In a sixth aspect, the present application provides a network device comprising a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to execute the method provided in the second aspect of the present application.
[0026] Therefore, by applying the communication method and apparatus provided in the present application, the ingress PE receives a first service message sent by the CE, where the first service message includes a first destination address and a DSCP value; based on the DSCP value, the ingress PE obtains a first priority mapping table entry that matches the DSCP value from the priority mapping table, where the first priority mapping table entry includes a service SID; when the first forwarding table entry that matches the first destination address includes the first SID of the egress PE and the first forwarding table entry indicates that encapsulation and forwarding are to be performed on the service message, the ingress PE generates a second service message, where the second service message includes an outer IPv6 header and the first service message, where the outer IPv6 header includes a second destination address, where the second destination address is a second SID, and where the second SID includes the first SID and the service SID; based on the path determined by the second SID, the ingress PE sends the second service message to the egress PE.
[0027] This approach provides a variety of differentiated services based on the different DSCP values carried in service packets. Based on the configured mapping between DSCP values and service SIDs, the ingress PE carries the service SID in the destination address and sends it to the egress PE. This destination address matches the egress PE's local SID. The egress PE forwards the packet based on the action corresponding to the local SID, using the VPN instance corresponding to the local SID. This approach eliminates routing pressure on the PE and addresses the existing PE deployment problem of significant BGP routing pressure and memory usage when a large number of source routes are created and multiple VPN instances are created for route regeneration. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A flow chart of a communication method provided in an embodiment of the present application;
[0029] Figure 2 A flowchart of another communication method provided in an embodiment of the present application;
[0030] Figure 3 A structural diagram of a communication device provided in an embodiment of the present application;
[0031] Figure 4 A structural diagram of another communication device provided in an embodiment of the present application;
[0032] Figure 5 The network device hardware structure provided in the embodiment of the present application. DETAILED DESCRIPTION
[0033] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0034] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the corresponding listed items.
[0035] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0036] The communication method provided in the embodiment of the present application is described in detail below. Figure 1 , Figure 1 This is a flow chart of a communication method provided in an embodiment of the present application. The method is applied to an ingress PE. The communication method provided in an embodiment of the present application may include the following steps.
[0037] Step 110: Receive a first service message sent by a CE, where the first service message includes a first destination address and a DSCP value;
[0038] Specifically, an ingress PE, as a network-side device, connects to a user-side device, CE, and receives a first service packet sent by the CE. The first service packet includes a first destination address and a Differentiated Services Code Point (DSCP) value. The CE can connect to the user device and receive the first service packet sent by the user device. The CE forwards the first service packet according to an existing forwarding method and sends the first service packet to the ingress PE.
[0039] After receiving the first service message, the ingress PE obtains a first destination address and a DSCP value from the message, wherein the first destination address may be an IPv4 address or an IPv6 address of another user equipment.
[0040] Step 120: Obtain, from a priority mapping table, a first priority mapping entry that matches the DSCP value according to the DSCP value, where the first priority mapping entry includes a service SID.
[0041] Specifically, as described in step 110, after obtaining the DSCP value, the ingress PE searches a locally stored priority mapping table for a priority mapping entry that matches the DSCP value. If a priority mapping entry matching the DSCP value exists in the priority mapping table, the ingress PE obtains a first priority mapping entry that matches the DSCP value. The first priority mapping entry includes a service segment identifier (SID).
[0042] The service SID can be any integer value between 0 and 15.
[0043] Optionally, before step 110 in the embodiment of the present application, the process of the ingress PE generating a first priority mapping table entry locally is also included.
[0044] Furthermore, the user inputs a configuration instruction to the ingress PE, which includes a mapping between DSCP values and service SIDs. After receiving the configuration instruction, the ingress PE obtains the mapping between DSCP values and service SIDs from the instruction. Based on the mapping, the ingress PE locally generates a first priority mapping entry.
[0045] It is understandable that the configuration instruction may include multiple mapping relationships. The ingress PE may generate a first priority mapping table entry for each mapping relationship, and store the multiple first priority mapping table entries in the priority mapping table.
[0046] Step 130: When the first forwarding table entry matching the first destination address includes the first SID of the egress PE and the first forwarding table entry indicates to perform encapsulation and forwarding on the service packet, generate a second service packet, where the second service packet includes an outer IPv6 header and the first service packet, the outer IPv6 header includes a second destination address, the second destination address is a second SID, and the second SID includes the first SID and the service SID;
[0047] Specifically, as described in steps 110 and 120, after obtaining the first destination address, the ingress PE searches its local forwarding table for a forwarding entry that matches the first destination address, according to existing forwarding methods. If a forwarding entry matching the first destination address exists in the forwarding table, the ingress PE obtains a first forwarding entry that matches the first destination address. This first forwarding entry includes a next hop. This next hop indicates the first SID of the egress PE, meaning that the next hop is the egress PE.
[0048] It is understandable that, from the first forwarding table entry, when sending a service message to the first destination address, the service message needs to be first transmitted to the egress PE, and then the egress PE forwards the service message to the first destination address.
[0049] Furthermore, multiple SRv6 paths to the egress PE have been configured in the ingress PE. These SRv6 paths can be SRv6BE or SRv6 TE Policy, etc.
[0050] In one implementation, based on the existing Color traffic diversion mechanism, the ingress PE can divert the second service packet to an SRv6 path suitable for carrying the service flow containing the second service packet. The following uses an SRv6 TE Policy as an example for illustration.
[0051] The ingress PE first generates a corresponding BGP routing table entry 1 locally based on the BGP route synchronized by the egress PE. This BGP routing table entry 1 includes the destination address (host address), outgoing interface, next hop (first SID), and Color attribute (the Color extended community attribute of the BGP route). At the same time, the controller also sends a configuration instruction to the ingress PE, which includes the routing information corresponding to each second SID. The ingress PE also generates a corresponding BGP routing table entry 2 locally. This BGP routing table entry 2 includes the destination address (second SID), outgoing interface, next hop (SRv6 TE Policy), and Color attribute (the Color extended community attribute of the routing information).
[0052] After the ingress PE finds an SRv6 TE Policy whose color and endpoint address match the color extended community attribute and next hop in the route information, it iterates BGP route entry 2 to the SRv6 TE Policy. This creates a mapping from endpoint to color to the SRv6 TE Policy, enabling packets carrying a specified DSCP value to be forwarded through the specified SRv6 TE Policy.
[0053] If the ingress PE determines, based on the SRv6 path, that encapsulation processing must be performed on the outer layer of the first service packet before forwarding the first service packet, the ingress PE generates a second service packet. The second service packet includes an outer IPv6 header and the first service packet. The outer IPv6 header includes a second destination address, which is a second SID. The second SID includes the first SID and the service SID.
[0054] In another implementation, based on the existing DSCP traffic diversion mechanism, the ingress PE can divert the second service packet to an SRv6 path suitable for carrying the service flow. The following uses an SRv6 TE Policy as an example for illustration.
[0055] After the ingress PE finds an SRv6 TE Policy group whose color and endpoint address match the color extended community attribute and next hop of the BGP route, it iterates BGP route entry 2 to the SRv6 TE Policy group.
[0056] The DSCP value is searched for its associated color attribute, and then the color attribute is used to match an SRv6 TE Policy in the SRv6 TE Policy group. This creates a mapping from DSCP to color to SRv6 TE Policy, allowing packets carrying a specific DSCP value to be forwarded through the specified SRv6 TE Policy.
[0057] If the ingress PE determines, based on the SRv6 path, that encapsulation processing must be performed on the outer layer of the first service packet before forwarding the first service packet, the ingress PE generates a second service packet. The second service packet includes an outer IPv6 header and the first service packet. The outer IPv6 header includes a second destination address, which is a second SID. The second SID includes the first SID and the service SID.
[0058] Optionally, in the embodiment of the present application, the specific process of the ingress PE generating the second service message is as follows:
[0059] According to the preset bit interval, the ingress PE updates the bit corresponding to the bit interval in the first SID to the service SID to obtain the second SID; the ingress PE encapsulates the outer IPv6 header on the outer layer of the first service message to obtain the second service message.
[0060] For example, the aforementioned bit range can specifically be bits 77 through 80. According to the existing SRv6 protocol, a SID is 128 bits long. In this embodiment of the present application, the ingress PE updates bits 77 through 80 of the first SID to the service SID, while leaving the other bits unchanged. Thus, the ingress PE generates a second SID and uses the second SID as the second destination address included in the outer IPv6 header.
[0061] In one example, service packet 1 includes a DSCP value of EF. The ingress PE determines that the service SID value that matches the DSCP value is 1. The egress PE's first SID is fd00:200:2222:fff0:bbb0. The ingress PE updates the first SID with the service SID value, resulting in a second SID of fd00:200:2222:fff0:bbb1.
[0062] In another example, service packet 2 includes a DSCP value of AF1. The ingress PE determines that the service SID value that matches the DSCP value is 2. The first SID of the egress PE is fd00:200:2222:fff0:bbb0. The ingress PE updates the value of the service SID to the first SID, resulting in a second SID of fd00:200:2222:fff0:bbb2.
[0063] In another example, service packet 3 includes a DSCP value of BE. The ingress PE determines that the service SID value that matches the DSCP value is 3. The egress PE's first SID is fd00:200:2222:fff0:bbb0. The ingress PE updates the service SID value in the first SID, resulting in a second SID of fd00:200:2222:fff0:bbb3.
[0064] Step 140: Send the second service message to the egress PE according to the path determined by the second SID.
[0065] Specifically, as described in step 130, after the ingress PE generates the second service packet, it can forward the second service packet to the egress PE using the existing forwarding method via different SRv6 paths corresponding to each DSCP value. In this way, the ingress PE provides 16 different differentiated services based on the different DSCP values carried in the service packets without increasing routing pressure on the ingress PE device.
[0066] For example, a DSCP value of EF corresponds to SRv6 path 1, a DSCP value of AF1 corresponds to SRv6 path 2, and a DSCP value of BE corresponds to SRv6 path 3.
[0067] After receiving the second service packet, the egress PE first obtains the second destination address from the outer IPv6 header. Based on the second destination address, the egress PE searches the local SID table. If a SID matching the second destination address exists in the local SID table (herein referred to as the third SID, to distinguish it from the first and second SIDs), the egress PE retrieves the action corresponding to the third SID from the local SID table.
[0068] In this embodiment of the present application, the action corresponding to the third SID is to decapsulate the service packet and forward the service packet by querying the corresponding VPN instance. Specifically, the egress PE strips the outer IPv6 header to obtain the first service packet. Based on the third SID, the egress PE determines the VPN instance corresponding to the third SID. Within this VPN instance, the egress PE searches for a routing table entry matching the first destination address and forwards the packet to the connected CE according to the found routing entry.
[0069] Optionally, before step 110 in the embodiment of the present application, the process further includes a process in which the ingress PE locally generates a first forwarding entry.
[0070] Furthermore, a BGP neighbor relationship has been established between the ingress PE and the egress PE. After the egress PE learns the host route, it synchronizes the host route with the ingress PE via BGP routing. The egress PE generates a BGP route that includes the first destination address and the first SID. The egress PE sends the BGP route to the ingress PE via EBGP.
[0071] After receiving the BGP route, the ingress PE obtains the first destination address and the first SID from the route and locally generates a first forwarding entry corresponding to the first destination address, the first forwarding entry including the first destination address and the first SID.
[0072] It is understandable that the forwarding table entry includes a destination address field, an outgoing interface field, and a next hop field, wherein the destination address field carries the first destination address, the outgoing interface field carries the interface identifier of the interface receiving the BGP route, and the next hop field carries the first SID.
[0073] In this embodiment of the present application, the ingress PE provides 16 different differentiated services based on the different DSCP values carried in the service packets, without increasing routing pressure on the ingress PE device. The ingress PE carries the service SID that matches the DSCP value in the destination address included in the outer IPv6 header and forwards it via different SRv6 paths to the egress PE. When the egress PE receives the packet, the destination address will match the local SID carrying the parameter policy. Subsequently, according to the action corresponding to the local SID, the packet is forwarded under the VPN instance corresponding to the local SID.
[0074] Therefore, by applying the communication method and apparatus provided in the present application, the ingress PE receives a first service message sent by the CE, where the first service message includes a first destination address and a DSCP value; based on the DSCP value, the ingress PE obtains a first priority mapping table entry that matches the DSCP value from the priority mapping table, where the first priority mapping table entry includes a service SID; when the first forwarding table entry that matches the first destination address includes the first SID of the egress PE and the first forwarding table entry indicates that encapsulation and forwarding are to be performed on the service message, the ingress PE generates a second service message, where the second service message includes an outer IPv6 header and the first service message, where the outer IPv6 header includes a second destination address, where the second destination address is a second SID, and where the second SID includes the first SID and the service SID; based on the path determined by the second SID, the ingress PE sends the second service message to the egress PE.
[0075] This approach provides a variety of differentiated services based on the different DSCP values carried in service packets. Based on the configured mapping between DSCP values and service SIDs, the ingress PE carries the service SID in the destination address and sends it to the egress PE. This destination address matches the egress PE's local SID. The egress PE forwards the packet based on the action corresponding to the local SID, using the VPN instance corresponding to the local SID. This approach eliminates routing pressure on the PE and addresses the existing PE deployment problem of significant BGP routing pressure and memory usage when a large number of source routes are created and multiple VPN instances are created for route regeneration.
[0076] The communication method provided in the embodiment of the present application is described in detail below. Figure 2 , Figure 2 This is a flow chart of another communication method provided in an embodiment of the present application. The method is applied to an egress PE. The communication method provided in an embodiment of the present application may include the following steps.
[0077] Step 210: Receive a first service message sent by an ingress PE, where the first service message includes an outer IPv6 header and a second service message, where the outer IPv6 header includes a first destination address.
[0078] Specifically, according to the above embodiment, after the ingress PE generates a service message, it searches the local forwarding table and sends the generated service message to the egress PE. In the embodiment of the present application, this service message is referred to as the first service message.
[0079] After receiving the first service message, the egress PE obtains the outer IPv6 header therefrom, and obtains the first destination address from the outer IPv6 header.
[0080] It can be understood that, according to the aforementioned embodiment, the service message generated by the ingress PE also includes a second service message, and the second service message is sent by the CE accessing the ingress PE.
[0081] Step 220: If the first destination address matches the first SID in the local SID table, process the second service packet under the VPN instance corresponding to the first SID according to the action corresponding to the first SID.
[0082] Specifically, as described in step 210, after the egress PE obtains the first destination address, it searches the local SID table based on the first destination address. If a first SID matching the first destination address exists in the local SID table, the egress PE retrieves the action corresponding to the first SID from the local SID table. The first destination address belongs to the first SID.
[0083] In this embodiment of the present application, the action corresponding to the first SID is to decapsulate the service packet and forward the service packet by querying the corresponding VPN instance. Specifically, the egress PE strips the outer IPv6 header to obtain the second service packet. Based on the first SID, the egress PE determines the VPN instance corresponding to the first SID. Within this VPN instance, the egress PE searches for a routing table entry that matches the second destination address included in the second service packet and forwards the packet to the connected CE according to the found routing table entry.
[0084] As can be seen from the examples in the preceding embodiments, when the ingress PE generates the destination address included in the outer IPv6 header, it includes the service SID in the egress PE's SID. This ensures that the destination address falls within the egress PE's SID range and matches the SID. The egress PE can then process and forward the service packet according to the action corresponding to the SID.
[0085] Optionally, before step 210 in the embodiment of the present application, a process of the egress PE generating a first SID locally is also included.
[0086] Furthermore, the user inputs a configuration instruction to the egress PE, which includes the second SID, an action corresponding to the second SID, and a parameter policy. Based on the parameter policy, the egress PE sets at least one bit included in the second SID to a first value (e.g., the first value is 0), thereby obtaining the first SID. The egress PE stores the first SID and the action in a local SID table.
[0087] In the embodiment of the present application, the parameter strategy specifically refers to setting the 76th to 127th bits of the SID to 0. According to the existing SRv6 protocol, the length of the SID is 128 bits, and the other unset bits remain unchanged.
[0088] Optionally, before step 210 in the embodiment of the present application, a process of the egress PE sending a BGP route to the ingress PE is also included.
[0089] Furthermore, a BGP neighbor relationship has been established between the ingress PE and the egress PE. After receiving the host route, the egress PE learns it. The egress PE locally generates a host route that includes a destination address field, an outgoing interface field, and a next hop field. The destination address field carries the host address, also known as the secondary destination address; the outgoing interface field carries the interface identifier of the interface that received the host route; and the next hop field carries the address of the CE connected to the egress PE.
[0090] After the egress PE learns the host route, it synchronizes the host route with the ingress PE via BGP routing. The egress PE generates a BGP route that includes the second destination address and the second SID. The egress PE sends the BGP route to the ingress PE via EBGP. It will be appreciated that after receiving the BGP route, the ingress PE locally learns the host route and generates a corresponding first forwarding table entry, as described in the preceding embodiment. The first forwarding table entry includes the second destination address and the second SID. The specific process will not be repeated here.
[0091] Optionally, in an embodiment of the present application, the above-mentioned second service message includes a DSCP value, and the first destination address includes a service SID. The service SID is obtained by the ingress PE from the ingress PE local priority mapping table according to the DSCP value, and according to a preset bit interval, the ingress PE updates the bit corresponding to the bit interval in the second SID to the service SID.
[0092] In this embodiment of the present application, the ingress PE provides 16 different differentiated services based on the different DSCP values carried in the service packets, without increasing routing pressure on the ingress PE device. The ingress PE carries the service SID that matches the DSCP value in the destination address included in the outer IPv6 header and forwards it via different SRv6 paths to the egress PE. When the egress PE receives the packet, the destination address will match the local SID carrying the parameter policy. Subsequently, according to the action corresponding to the local SID, the packet is forwarded under the VPN instance corresponding to the local SID.
[0093] Therefore, by applying the communication method provided in the present application, the egress PE receives a first service message sent by the ingress PE, where the first service message includes an outer IPv6 header and a second service message, where the outer IPv6 header includes a first destination address; if the first destination address matches the first SID in the local SID table, then according to the action corresponding to the first SID, the egress PE processes the second service message under the VPN instance corresponding to the first SID; wherein the first destination address belongs to the first SID.
[0094] This approach provides a variety of differentiated services based on the different DSCP values carried in service packets. Based on the configured mapping between DSCP values and service SIDs, the ingress PE carries the service SID in the destination address and sends it to the egress PE. This destination address matches the egress PE's local SID. The egress PE forwards the packet based on the action corresponding to the local SID, using the VPN instance corresponding to the local SID. This approach eliminates routing pressure on the PE and addresses the existing PE deployment problem of significant BGP routing pressure and memory usage when a large number of source routes are created and multiple VPN instances are created for route regeneration.
[0095] Based on the same inventive concept, the present application also provides a communication device corresponding to the communication method. Figure 3 , Figure 3 A communication device provided in an embodiment of the present application is applied to an ingress PE, and includes:
[0096] The receiving unit 310 is configured to receive a first service message sent by the CE, where the first service message includes a first destination address and a DSCP value;
[0097] an acquiring unit 320, configured to acquire, from a priority mapping table according to the DSCP value, a first priority mapping entry that matches the DSCP value, where the first priority mapping entry includes a service SID;
[0098] A first generating unit 330 is configured to, when a first forwarding table entry matching the first destination address includes a first SID of an egress PE and the first forwarding table entry indicates to perform encapsulation and forwarding on the service packet, generate a second service packet, the second service packet including an outer IPv6 header and the first service packet, the outer IPv6 header including a second destination address, the second destination address being a second SID, and the second SID including the first SID and the service SID;
[0099] The sending unit 340 is configured to send the second service message to the egress PE according to the path determined by the second SID.
[0100] Optionally, the receiving unit 310 is further configured to receive a configuration instruction input by a user, where the configuration instruction includes a mapping relationship between the DSCP value and the service SID;
[0101] The apparatus further includes: a second generating unit (not shown in the figure), configured to locally generate the first priority mapping table entry according to the mapping relationship.
[0102] Optionally, the receiving unit 310 is further configured to receive a BGP route sent by the egress PE, where the BGP route includes the first destination address and the first SID;
[0103] The apparatus further includes: a third generating unit (not shown in the figure), which locally generates the first forwarding entry corresponding to the first destination address, where the first forwarding entry includes the first destination address and the first SID.
[0104] Optionally, the first generating unit 330 is specifically configured to update, according to a preset bit interval, bits in the first SID corresponding to the bit interval to the service SID, to obtain the second SID;
[0105] The outer IPv6 header is encapsulated in the outer layer of the first service message to obtain the second service message.
[0106] Therefore, using the communication device provided by the present application, the ingress PE receives a first service message sent by the CE, where the first service message includes a first destination address and a DSCP value; based on the DSCP value, the ingress PE obtains a first priority mapping table entry that matches the DSCP value from the priority mapping table, where the first priority mapping table entry includes a service SID; when the first forwarding table entry that matches the first destination address includes the first SID of the egress PE and the first forwarding table entry indicates that encapsulation forwarding is to be performed on the service message, the ingress PE generates a second service message, where the second service message includes an outer IPv6 header and the first service message, where the outer IPv6 header includes a second destination address, where the second destination address is a second SID, and where the second SID includes the first SID and the service SID; based on the path determined by the second SID, the ingress PE sends the second service message to the egress PE.
[0107] This approach provides a variety of differentiated services based on the different DSCP values carried in service packets. Based on the configured mapping between DSCP values and service SIDs, the ingress PE carries the service SID in the destination address and sends it to the egress PE. This destination address matches the egress PE's local SID. The egress PE forwards the packet based on the action corresponding to the local SID, using the VPN instance corresponding to the local SID. This approach eliminates routing pressure on the PE and addresses the existing PE deployment problem of significant BGP routing pressure and memory usage when a large number of source routes are created and multiple VPN instances are created for route regeneration.
[0108] Based on the same inventive concept, the present application also provides a communication device corresponding to the communication method. Figure 4 , Figure 4Another communication device provided in an embodiment of the present application is applied to an egress PE, and the device includes:
[0109] The receiving unit 410 is configured to receive a first service packet sent by an ingress PE, where the first service packet includes an outer IPv6 header and a second service packet, where the outer IPv6 header includes a first destination address;
[0110] a processing unit 420 configured to process the second service packet under the VPN instance corresponding to the first SID according to an action corresponding to the first SID if the first destination address matches the first SID in the local SID table;
[0111] The first destination address belongs to the first SID.
[0112] Optionally, the receiving unit 410 is further configured to receive a configuration instruction input by a user, where the configuration instruction includes a second SID, an action corresponding to the second SID, and a parameter policy;
[0113] a generating unit (not shown in the figure), configured to set at least one bit included in the second SID to the first value according to the parameter policy, to obtain the first SID;
[0114] The storage unit (not shown in the figure) is configured to store the first SID and the action in a corresponding manner in a local SID table.
[0115] Optionally, the second service message includes a second destination address;
[0116] The device further comprises:
[0117] A sending unit (not shown in the figure) is used to send a BGP route to the ingress PE, where the BGP route includes the second destination address and the second SID, so that the ingress PE locally generates a first forwarding table entry corresponding to the second destination address, where the first forwarding table entry includes the second destination address and the second SID.
[0118] Optionally, the second service message includes a DSCP value, and the first destination address includes a service SID. The service SID is obtained by the ingress PE according to the DSCP value, and according to a preset bit interval, the bit corresponding to the bit interval in the second SID is updated to the service SID.
[0119] Therefore, by applying the communication method provided in the present application, the egress PE receives a first service message sent by the ingress PE, where the first service message includes an outer IPv6 header and a second service message, where the outer IPv6 header includes a first destination address; if the first destination address matches the first SID in the local SID table, then according to the action corresponding to the first SID, the egress PE processes the second service message under the VPN instance corresponding to the first SID; wherein the first destination address belongs to the first SID.
[0120] This approach provides a variety of differentiated services based on the different DSCP values carried in service packets. Based on the configured mapping between DSCP values and service SIDs, the ingress PE carries the service SID in the destination address and sends it to the egress PE. This destination address matches the egress PE's local SID. The egress PE forwards the packet based on the action corresponding to the local SID, using the VPN instance corresponding to the local SID. This approach eliminates routing pressure on the PE and addresses the existing PE deployment problem of significant BGP routing pressure and memory usage when a large number of source routes are created and multiple VPN instances are created for route regeneration.
[0121] Based on the same inventive concept, the embodiment of the present application further provides a network device, such as Figure 5 As shown, it includes a processor 510, a transceiver 520 and a machine-readable storage medium 530, the machine-readable storage medium 530 stores machine-executable instructions that can be executed by the processor 510, and the processor 510 is prompted by the machine-executable instructions to execute the communication method provided in the embodiment of the present application. Figure 3 、 Figure 4 The communication device shown can be used as Figure 5 The network device hardware structure shown is implemented.
[0122] The computer-readable storage medium 530 may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Alternatively, the computer-readable storage medium 530 may be at least one storage device located remotely from the processor 510.
[0123] The processor 4510 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0124] In the embodiment of the present application, the processor 510 reads the machine-executable instructions stored in the machine-readable storage medium 530, and the machine-executable instructions enable the processor 510 itself and call the transceiver 520 to execute the communication method described in the aforementioned embodiment of the present application.
[0125] In addition, an embodiment of the present application provides a machine-readable storage medium 530, which stores machine-executable instructions. When called and executed by the processor 510, the machine-executable instructions prompt the processor 510 itself and the calling transceiver 520 to execute the communication method described in the aforementioned embodiment of the present application.
[0126] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0127] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0128] As for the embodiments of the communication device and the machine-readable storage medium, since the method contents involved are basically similar to those of the aforementioned method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0129] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A communication method, characterized in that: Applied to the inlet PE, the method includes: Receive a first service message sent by the CE, where the first service message includes a first destination address and a DSCP value; According to the DSCP value, obtaining a first priority mapping table entry that matches the DSCP value from a priority mapping table, where the first priority mapping table entry includes a service SID; When the first forwarding table entry matching the first destination address includes the first SID of the egress PE and the first forwarding table entry indicates to perform encapsulation and forwarding on the service packet, generating a second service packet, where the second service packet includes an outer IPv6 header and the first service packet, the outer IPv6 header includes a second destination address, the second destination address is a second SID, and the second SID includes the first SID and the service SID; The second service packet is sent to the egress PE according to the path determined by the second SID.
2. The method according to claim 1, characterized in that Before receiving the first service message sent by the CE, the method further includes: receiving a configuration instruction input by a user, wherein the configuration instruction includes a mapping relationship between the DSCP value and the service SID; The first priority mapping table entry is generated locally according to the mapping relationship.
3. The method according to claim 1, characterized in that Before receiving the first service message sent by the CE, the method further includes: receiving a BGP route sent by the egress PE, where the BGP route includes the first destination address and the first SID; A first forwarding table entry corresponding to the first destination address is generated locally, where the first forwarding table entry includes the first destination address and the first SID.
4. The method according to claim 1, wherein The generating of the second service message specifically includes: According to a preset bit interval, the bits corresponding to the bit interval in the first SID are updated to the service SID to obtain the second SID; The outer IPv6 header is encapsulated in the outer layer of the first service message to obtain the second service message.
5. A communication method, characterized in that: Applied to the outlet PE, the method comprises: Receive a first service message sent by an ingress PE, where the first service message includes an outer IPv6 header and a second service message, where the outer IPv6 header includes a first destination address; If the first destination address matches the first SID in the local SID table, processing the second service packet under the VPN instance corresponding to the first SID according to the action corresponding to the first SID; The first destination address belongs to the first SID.
6. The method according to claim 5, characterized in that Before receiving the first service message sent by the ingress PE, the method further includes: Receive a configuration instruction input by a user, where the configuration instruction includes a second SID, an action corresponding to the second SID, and a parameter policy; According to the parameter policy, at least one bit included in the second SID is set to the first value to obtain the first SID; The first SID and the action are correspondingly stored in the local SID table.
7. The method according to claim 6, characterized in that The second service message includes a second destination address; Before receiving the first service message sent by the ingress PE, the method further includes: Sending a BGP route to the ingress PE, the BGP route including the second destination address and the second SID, so that the ingress PE locally generates a first forwarding entry corresponding to the second destination address, the first forwarding entry including the second destination address and the second SID.
8. The method according to claim 7, characterized in that The second service message includes a DSCP value, and the first destination address includes a service SID. The service SID is obtained by the ingress PE according to the DSCP value, and according to a preset bit interval, the bit corresponding to the bit interval in the second SID is updated to the service SID.
9. A communication device, characterized in that: Applied to the inlet PE, the device comprises: A receiving unit, configured to receive a first service message sent by the CE, where the first service message includes a first destination address and a DSCP value; an acquiring unit, configured to acquire, from a priority mapping table, a first priority mapping entry matching the DSCP value according to the DSCP value, where the first priority mapping entry includes a service SID; a first generating unit, configured to, when a first forwarding table entry matching the first destination address includes a first SID of an egress PE and the first forwarding table entry indicates to perform encapsulation and forwarding on the service packet, generate a second service packet, the second service packet including an outer IPv6 header and the first service packet, the outer IPv6 header including a second destination address, the second destination address being a second SID, and the second SID including the first SID and the service SID; A sending unit is configured to send the second service message to the egress PE according to the path determined by the second SID.
10. A communication device, characterized in that: Applied to outlet PE, the device includes: A receiving unit, configured to receive a first service message sent by an ingress PE, wherein the first service message includes an outer IPv6 header and a second service message, wherein the outer IPv6 header includes a first destination address; a processing unit, configured to process the second service packet under the VPN instance corresponding to the first SID according to an action corresponding to the first SID if the first destination address matches the first SID in the local SID table; The first destination address belongs to the first SID.