CN113207192A - Message forwarding method and device - Google Patents

Message forwarding method and device Download PDF

Info

Publication number
CN113207192A
CN113207192A CN202110336936.1A CN202110336936A CN113207192A CN 113207192 A CN113207192 A CN 113207192A CN 202110336936 A CN202110336936 A CN 202110336936A CN 113207192 A CN113207192 A CN 113207192A
Authority
CN
China
Prior art keywords
packet
message
srv6
forwarding
network device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110336936.1A
Other languages
Chinese (zh)
Other versions
CN113207192B (en
Inventor
梁学伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN202110336936.1A priority Critical patent/CN113207192B/en
Publication of CN113207192A publication Critical patent/CN113207192A/en
Application granted granted Critical
Publication of CN113207192B publication Critical patent/CN113207192B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/12Setup of transport tunnels
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing

Abstract

The present application relates to the field of network communication technologies, and in particular, to a method and an apparatus for forwarding a packet. The method is applied to network equipment, an SRV6 tunnel is established between the network equipment and an access point AP and an opposite terminal network equipment which are accessed to the local, and the method comprises the following steps: receiving a first message sent by a target AP, wherein after receiving an original message sent by a terminal, the target AP packages a first SRv6 header on the original message to obtain the first message, and sends the first message through a first SRv6 tunnel established between the target AP and the network equipment; decapsulating the first message to obtain a second message, and determining next hop equipment for forwarding the original message from a forwarding path for forwarding the original message; and encapsulating a second SRv6 header on the original message to obtain a third message, and sending the third message through a second SRv6 tunnel established between the original message and the next-hop equipment.

Description

Message forwarding method and device
Technical Field
The present application relates to the field of network communication technologies, and in particular, to a method and an apparatus for forwarding a packet.
Background
SR (Segment Routing) adopts a source node path selection mechanism, encapsulates in advance the SID (Segment Identifier) of the Segment that the path needs to pass through at the source node, and when the packet passes through the SR node, the node forwards the packet according to the SID of the packet. Other nodes than the source node need not maintain path state. IPv6 SR (SRv6) means that in an IPv6 network, a message is forwarded using SR and an IPv6 address as an SID.
SRv6 Segment is usually abbreviated as SRv6 SID (Segment identifier) or SID, which represents a 128-bit IPv6 address. The Segment List appears as an ordered set of IPv6 address lists inserted in the SRH. The SID includes related commands and loadable parameters, which are as follows: the SID consists of a Locator part and a Function part, and further, the Function part can also be divided into an optional parameter segment, and the format is Locator: function: alignment, wherein the Locator occupies the high bits of the IPv6 address, the Function portion occupies the rest of the IPv6 address, and the optional parameter alignment occupies the low bits of the IPv6 address.
Locator (position indication): the identity assigned to a network node in the network may be used to route and forward packets. The Locator has two important attributes, routable and aggregated. In the SRv6 SID Locator is a variable length section used to adapt to networks of different sizes.
Function: the device assigns an ID value to the local forwarding instruction that can be used to express the forwarding action that the device is required to perform, corresponding to the opcode of the computer instruction. In SRv6 network programming, different forwarding behaviors are expressed by different function IDs. To some extent the functional ID is similar to the MPLS label and is used to identify VPN forwarding instances, etc.
Args (variables): parameters required by the forwarding instructions when executed may include flow, service, or any other relevant variable information.
The forwarding process of the switch chip generally implements decapsulation of the tunnel and distribution of the broadcast domain in the ingress direction, and implements encapsulation of the tunnel in the egress direction. And a Tunnel-Termination and Interface (TTI) engine of a switching chip realizes the distribution of a Tunnel decapsulation function and a broadcast domain. The Ingress Policy engine realizes the support of MQC, PBR and other functions. The Bridge engine mainly realizes two-layer forwarding, and the Router engine realizes three-layer forwarding. The Header Modification engine adds a TS (Tunnel-Start) encapsulation Header.
Taking an example that an Adcampus three-layer networking model comprises three-layer equipment including Spine, Leaf and Access, in an Adcampus SRV6 environment, an SRV6 tunnel is established between LEAF and AP, and an SRV6 tunnel is also required to be established between LEAF and LEAF. When the AP walks the broadcast traffic with the LEAF, LEAF and LEAF, the broadcast domain VSI maps into the Function field in the SRV6 header DIP.
Taking the link between the AP and the LEAF as an example, if the Function (mapping VSI) included in the DIP is different, the tunnel is also different. Normally, the number of APs and VSI tunnels need to be established between the APs and the LEAF. In the outgoing direction, the packet is forwarded to different LEAF or AP, and different VSI information is brought to the destination device. When encapsulation is performed, VSI × leaf (ap) TS encapsulation resources are required. For example: AP and LEAF: 500 APs, 20 VSIs, need to consume 500 × 20 to 10K TS encapsulation resources in total. LEAF and LEAF: 200 leaves, 100 VSIs, need to consume 200 × 100 ═ 20K TS encapsulation resources in total. Then the entire network LEAF needs to consume 10K +20K ═ 30K TS encapsulation resources.
However, in a general convergence box device, TTI decapsulation resources are also about 3K, and TS encapsulation resources of IPV6 are only about 10K, which obviously fails to meet the networking requirements of 500 APs and 200 leaves. To achieve the above networking, only powerful frame devices and devices with abundant hardware resources are used. However, the above devices have the problems of high cost and low cost performance.
Disclosure of Invention
The application provides a message forwarding method and a message forwarding device, which are used for solving the problem of insufficient equipment encapsulation and decapsulation resources in the prior art.
In a first aspect, the present application provides a packet forwarding method, which is applied to a network device, where an SRV6 tunnel is established between the network device and an access point AP and an opposite-end network device that access a local network, and the method includes:
receiving a first message sent by a target AP, wherein after receiving an original message sent by a terminal, the target AP packages a first SRv6 header on the original message to obtain the first message, and sends the first message through a first SRv6 tunnel established between the target AP and the network equipment;
decapsulating the first message to obtain a second message, and determining next hop equipment for forwarding the original message from a forwarding path for forwarding the original message;
and encapsulating a second SRv6 header on the original message to obtain a third message, and sending the third message through a second SRv6 tunnel established between the original message and the next-hop equipment.
Optionally, the SRv6 head includes: an IPv6 header and a Segment Routing (SR) header; a destination address DA field in the IPv6 header comprises a destination IP address of the SRv6 tunnel, wherein the destination IP address consists of a location identifier and a Function; the SR header includes a segment identifier SID list, where the SID list includes SIDs corresponding to each network device on a forwarding path that forwards the original packet.
Optionally, the method further comprises:
receiving a fourth packet through a local SRv6 tunnel portal;
when the destination IP address in the DA field in the IPv6 header in which the fourth packet is encapsulated is the IP address of the device, if it is determined that the network device is used as an intermediate device on the forwarding path of the fourth packet, when the fourth packet is forwarded, determining a next-hop device according to the specified SID in the SID list encapsulated by the fourth packet, and modifying the Function value in the DA field according to local topology connection information and forwarding domain information to obtain a fifth packet, where the specified SID is the SID corresponding to the next-hop device on the forwarding path of the network device.
Alternatively,
if the network device is determined to be the tail device on the forwarding path of the fourth packet, removing SRv6 headers of the encapsulated fourth packet to obtain the original packet when forwarding the fourth packet, and forwarding the original packet according to the destination IP address of the original packet.
Optionally, based on the location identifier of each device, an SRV6 tunnel is established between the network device and the AP and the peer network device accessing the local area.
In a second aspect, the present application provides a packet forwarding apparatus, which is applied to a network device, where an SRV6 tunnel is established between the network device and an access point AP and an opposite-end network device that access to a local area, and the apparatus includes:
a receiving unit, configured to receive a first packet sent by a target AP, where after receiving an original packet sent by a terminal, the target AP encapsulates a first SRv6 header on the original packet to obtain the first packet, and sends the first packet through a first SRv6 tunnel established between the target AP and the network device;
a decapsulation unit, configured to decapsulate the first packet to obtain a second packet, and determine, from a forwarding path through which the original packet is forwarded, a next hop device for forwarding the original packet;
and the encapsulating unit is configured to encapsulate a second SRv6 header on the original packet to obtain a third packet, and send the third packet through a second SRv6 tunnel established with the next hop device.
Optionally, the SRv6 head includes: an IPv6 header and a Segment Routing (SR) header; a destination address DA field in the IPv6 header comprises a destination IP address of the SRv6 tunnel, wherein the destination IP address consists of a location identifier and a Function; the SR header includes a segment identifier SID list, where the SID list includes SIDs corresponding to each network device on a forwarding path that forwards the original packet.
Alternatively,
the receiving unit is further configured to receive a fourth packet through a local SRv6 tunnel portal;
when the destination IP address in the DA field in the IPv6 header where the fourth packet is encapsulated is the IP address of the device, if the decapsulating unit determines that the network device is an intermediate device on the forwarding path of the fourth packet, the encapsulating unit determines, when forwarding the fourth packet, a next-hop device according to the specified SID in the SID list encapsulated by the fourth packet, and modifies the Function value in the DA field according to local topology connection information and forwarding domain information, to obtain a fifth packet, where the specified SID is the SID corresponding to the next-hop device on the forwarding path of the network device.
Alternatively,
if the decapsulation unit determines that the network device is a tail device on a forwarding path of the fourth packet, the decapsulation unit removes SRv6 headers of the fourth packet when forwarding the fourth packet to obtain the original packet, and forwards the original packet according to a destination IP address of the original packet.
Optionally, based on the location identifier of each device, an SRV6 tunnel is established between the network device and the AP and the peer network device accessing the local area.
In a third aspect, an embodiment of the present application provides a network device, where the network device includes:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory and for executing the steps of the method according to any one of the above first aspects in accordance with the obtained program instructions.
In a fourth aspect, the present application further provides a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the steps of the method according to any one of the above first aspects.
To sum up, the packet forwarding method provided in the embodiment of the present application is applied to a network device, where an SRV6 tunnel is established between the network device and an access point AP and an opposite-end network device that access to a local area, and the method includes: receiving a first message sent by a target AP, wherein after receiving an original message sent by a terminal, the target AP packages a first SRv6 header on the original message to obtain the first message, and sends the first message through a first SRv6 tunnel established between the target AP and the network equipment; decapsulating the first message to obtain a second message, and determining next hop equipment for forwarding the original message from a forwarding path for forwarding the original message; and encapsulating a second SRv6 header on the original message to obtain a third message, and sending the third message through a second SRv6 tunnel established between the original message and the next-hop equipment.
By adopting the network equipment provided by the embodiment of the application, only one SRv6 tunnel is established between the Locator of each equipment and each local Access Point (AP) and opposite terminal network equipment without proposing a SRv6 tunnel for each service, so that tunnel encapsulation resources in the message outgoing direction and tunnel decapsulation resources in the message incoming direction are greatly reduced. The problem that tunnel encapsulation resources and tunnel decapsulation resources of network equipment are insufficient in large-scale networking is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
Fig. 1 is a detailed flowchart of a message forwarding method according to an embodiment of the present application;
fig. 2 is a schematic diagram of an SRv6 networking structure provided in an embodiment of the present application;
fig. 3 is a schematic diagram illustrating an SRv6 tunnel association according to an embodiment of the present application;
fig. 4 is a schematic diagram of another SRv6 tunnel association provided in the embodiment of the present application;
fig. 5 is a schematic diagram of a packet forwarding process provided in the embodiment of the present application;
fig. 6 is a schematic structural diagram of a message forwarding apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a network device according to an embodiment of the present application.
Detailed Description
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in the embodiments of the present application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
Exemplarily, referring to fig. 1, a detailed flowchart of a message forwarding method provided in this embodiment is applied to a network device, where an SRV6 tunnel is established between the network device and an access point AP and an opposite network device that are accessed locally, and the method includes the following steps:
step 100: receiving a first message sent by a target AP, wherein after receiving an original message sent by a terminal, the target AP packages a first SRv6 header on the original message to obtain the first message, and sends the first message through a first SRv6 tunnel established between the target AP and the network equipment.
In the embodiment of the present application, a three-tier SRv6 networking model is taken as an example to explain, for example, as shown in fig. 2, a SRv6 networking structure schematic diagram provided in the embodiment of the present application is shown, where the SRv6 networking includes three tiers of devices, namely, a Spine device, a Leaf device and an Access device, where the Access device may be connected to a wired user or an AP wireless user. Spine equipment in the three-layer networking model is mainly used as a route reflector RR and a route forwarding equipment, is used for forwarding routes between different Leaf equipment, and is used as Border equipment to realize intercommunication with a server. In the SRv6 networking provided by the embodiment of the application, a SRv6 virtual tunnel is designed to be established between the AP and the LEAF. A SRv6 tunnel is established between the LEAF1 and the LEAF 2. An SRv6 tunnel is also established between LEAF and Spine.
That is to say, in a multi-service scenario, different service packets of the same user are forwarded by using different forwarding domains, for example, in an SRv6 environment, if broadcast traffic flows between an AP device and a Leaf device, between the Leaf device and the Leaf device, between the AP device and the Leaf device, a broadcast domain VSI (Virtual Switching Instance) is mapped to a Function field in a header DIP of an SRV6, that is, different services are mapped to different VSIs.
In the embodiment of the present application, when SRv6 tunnels between an AP device and a Leaf device, and between a Leaf device and a Leaf device are established, an SRV6 tunnel is established between a Locator (location identifier) network device based on each device and an AP and an opposite network device accessing to the local area.
That is to say, in a multi-VSI scenario, in the embodiment of the present application, only one SRv6 tunnel is established between a network device and each local AP, and only one SRv6 tunnel is established based on a Locator of an AP, so that it is not necessary to establish a SRv6 tunnel corresponding to a corresponding VSI for each of multiple VSIs of an AP.
In this embodiment, when a target AP receives a service packet (original packet) sent by a terminal, an SRv6 header (a first SRv6 header) is encapsulated on the service packet according to topology connection information and broadcast domain information, where one SRv6 header at least includes: an IPv6 header and a Segment Routing (SR) header; a destination address DA field in the IPv6 header comprises a destination IP address of the SRv6 tunnel, wherein the destination IP address consists of a location identifier and a Function; the SR header includes a segment identifier SID list, where the SID list includes SIDs corresponding to each network device on a forwarding path that forwards the original packet.
When the target AP performs SRv6 header encapsulation on the original packet to obtain a first packet, that is, a forwarding path (including each device that forwards the original packet) for the user to forward the original packet is determined, then, after SRv6 header encapsulation is completed, a SRv6 tunnel (a SRv6 tunnel established between the target AP and a next hop network device) for forwarding the first packet is determined according to a destination IP address of a SRv6 tunnel included in a destination address DA field in a SRv6 header, and the first packet is sent to the next hop network device through the SRv6 tunnel (in this embodiment, the next hop network device corresponding to the target AP is an execution subject of the embodiment of the present method). The network device receives a first message sent by the target AP through an SRv6 tunnel interface established between the network device and the target AP.
In summary, in the embodiment of the present application, in order to save tunnel resources in a multi-VSI scenario, an AP device channel with the same Locator needs to be encapsulated into an SRv6 tunnel, that is, only one SRv6 tunnel needs to be established between the AP device and the LEAF device regardless of how many Function IDs (which can be mapped to VSIs). The chip TTI engine needs to mask off the Function part of the target IP and only needs to match the Locator part. Such a tunnel between the AP device and the LEAF device would only need to consume one TTI resource. As shown in fig. 3, an SRv6 tunnel association diagram provided in this embodiment of the present application has the same Locator, and messages with different functions (i.e., messages with different service types sent by the same AP device to a Leaf device) can be sent to the Leaf device through the same tunnel. Similarly, LEAF and LEAF save the same resources as AP and LEAF. By saving resources, the whole system only needs to consume the number of the APs plus the number of the LEAFs.
Step 110: and de-encapsulating the first message to obtain a second message, and determining the next hop equipment for forwarding the original message from the forwarding path for forwarding the original message.
In this embodiment of the application, after receiving a first packet sent by a target AP, a network device decapsulates the first packet to obtain a second packet, and determines a next hop device for forwarding an original packet corresponding to the first packet according to a SRv6 header of the first packet, in practical applications, a SRv6 tunnel portal of the network device may receive multiple service packets sent by the same AP device, where the multiple service packets are the same and different in Function (mapping VSI), that is, a SRv6 tunnel portal of the network device may receive multiple different types of service packets sent by the same AP device. If the service type of the service message sent by one AP is fixed, the Locator of the service message is not changed. Therefore, when de-encapsulation is performed, only one de-encapsulation resource TTI is needed to be consumed for a service message sent by one AP device.
Step 120: and encapsulating a second SRv6 header on the original message to obtain a third message, and sending the third message through a second SRv6 tunnel established between the original message and the next-hop equipment.
In this embodiment, a network device decapsulates a received first message to obtain a second message, determines, according to a SID list encapsulated in an SRv6 header of the first message, a next-hop device that forwards an original message corresponding to the first message, and encapsulates a SRv6 header on the second message, specifically, after determining the next-hop device that forwards the original message corresponding to the first message, the network device needs a local preset VSI broadcast domain forwarding table to determine a VSI of the original message corresponding to the first message, in practical application, the VSI corresponds to a service attribute, that is, a service message of service 1 is forwarded by VSI1, and a service message of service 2 is forwarded by VSI 2. In the embodiment of the present application, the Function value (mapping VSI) in the DA field may be modified and modified according to the local topology connection information and the forwarding domain information, so as to complete the encapsulation of the Function.
It should be noted that, in this embodiment of the present application, when SRv6 encapsulation is performed on an original packet for the first time, a Function value of each SID in a SID list is not preconfigured, and the encapsulation of the Function needs to be performed by a PHA engine of a chip of a network device according to a broadcast domain forwarding table of a local VSI.
Illustratively, referring to fig. 4, another SRv6 tunnel association diagram provided in this embodiment of the present application is shown. Assuming that one physical channel between LEAF1 and LEAF2 needs to carry 3 VSIs, 3 TS encapsulation resources are normally consumed. In order to save TS encapsulation resources, it is necessary that the PHA engine of the chip dynamically modifies the value of Function according to the information of vsi (evlan), so that different vsis (functions) can use the same TS encapsulation resources. I.e., the PHA engine needs to dynamically modify the value of Function according to the value of evlan (vsi).
For example: if evlan is 1, function is 1;
Else if evlan=2,function=2;
Else if evlan=3,function=3;
thus, the same destination Locator channel, different VSIs, only needs to consume one TS resource, and the value of the outgoing Function is dynamically modified by PHA. For example, the PHA engine of the LEAF1 plant needs to allocate Function 200 according to VSI-1 and Function 300 according to VSI-2. The destination IP is thus a LEAF2 device, but two VSIs only need to consume 1 TS resource. The more the VSI, the more obvious the optimization effect.
Further, receiving a fourth packet through a local SRv6 tunnel interface;
when the destination IP address in the DA field in the IPv6 header in which the fourth packet is encapsulated is the IP address of the device, if it is determined that the network device is used as an intermediate device on the forwarding path of the fourth packet, when the fourth packet is forwarded, determining a next-hop device according to the specified SID in the SID list encapsulated by the fourth packet, and modifying the Function value in the DA field according to local topology connection information and forwarding domain information to obtain a fifth packet, where the specified SID is the SID corresponding to the next-hop device on the forwarding path of the network device.
Further, if it is determined that the network device is a tail device on a forwarding path of the fourth packet, when the fourth packet is forwarded, removing SRv6 headers of the encapsulated fourth packet to obtain the original packet, and forwarding the original packet according to a destination IP address of the original packet.
The following describes the message forwarding process provided in the embodiment of the present application in detail with reference to specific application scenarios. For example, referring to fig. 5, in a schematic diagram of a message forwarding process provided in the embodiment of the present application, an AP receives service messages of different service types from a user, and adds and encapsulates different SRV6 headers according to topology connection information and broadcast domain information, for example, VSI1 in the diagram, 50 filled in Function fields. VSI2, 60 filled in the Function field, carries different identity and application information. The Args (identity and service information) is not described in the embodiment of the present application with emphasis, and is similar to the Function field, and the embodiment of the present application only focuses on the Function field. After different types of service messages of the AP are sent to the LEAF1, the LEAF1 removes the tunnel header first, and then forwards the messages according to the inner layer, and at the same time encapsulates the outgoing messages into different DIPs to the LEAF2, where the locators are the same, but the functions (VSI broadcast domains) are different. For example, the figure shows VSI1, Function field filled 200, VSI2, Function field filled 300.
It should be noted that, the forwarding domain rule of the VSI of each network device may be configured separately, that is, for the network device 1, the service packet of the service type 1 is forwarded by using the VSI1 broadcast domain, the service packet of the service type 2 may be forwarded by using the VSI2 broadcast domain, and for the network device 2, the service packet of the service type 1 may be forwarded by using the VSI1 broadcast domain, or may be forwarded by using the VSI2 broadcast domain. In the embodiments of the present application, no specific limitation is made herein.
Based on the same inventive concept as the above method embodiment, exemplarily referring to fig. 6, a schematic structural diagram of a message forwarding apparatus provided in the embodiment of the present application is shown, where the apparatus is applied to a network device, and an SRV6 tunnel is established between the network device and an access point AP and an opposite end network device which are accessed locally, and the apparatus includes:
a receiving unit 60, configured to receive a first packet sent by a target AP, where after receiving an original packet sent by a terminal, the target AP encapsulates a first SRv6 header on the original packet to obtain the first packet, and sends the first packet through a first SRv6 tunnel established with the network device;
a decapsulation unit 61, configured to decapsulate the first packet to obtain a second packet, and determine, from a forwarding path through which the original packet is forwarded, a next hop device for forwarding the original packet;
an encapsulating unit 62, configured to encapsulate a second SRv6 header on the original packet to obtain a third packet, and send the third packet through a second SRv6 tunnel established with the next hop device.
Optionally, the SRv6 head includes: an IPv6 header and a Segment Routing (SR) header; a destination address DA field in the IPv6 header comprises a destination IP address of the SRv6 tunnel, wherein the destination IP address consists of a location identifier and a Function; the SR header includes a segment identifier SID list, where the SID list includes SIDs corresponding to each network device on a forwarding path that forwards the original packet.
Alternatively,
the receiving unit 60 is further configured to receive a fourth packet through a local SRv6 tunnel portal;
when the destination IP address in the DA field in the IPv6 header encapsulated by the fourth packet is the IP address of the device, if the decapsulating unit 61 determines that the network device is used as an intermediate device on the forwarding path of the fourth packet, the encapsulating unit 62 determines, when forwarding the fourth packet, a next-hop device according to the specified SID in the SID list encapsulated by the fourth packet, and modifies the Function value in the DA field according to local topology connection information and forwarding domain information to obtain a fifth packet, where the specified SID is the SID corresponding to the next-hop device on the forwarding path of the network device.
Alternatively,
if the decapsulating unit 61 determines that the network device is a tail device on a forwarding path of the fourth packet, the encapsulating unit 62 removes SRv6 headers of the fourth packet when forwarding the fourth packet to obtain the original packet, and forwards the original packet according to a destination IP address of the original packet.
Optionally, based on the location identifier of each device, an SRV6 tunnel is established between the network device and the AP and the peer network device accessing the local area.
The above units may be one or more integrated circuits configured to implement the above methods, for example: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above units is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these units may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Further, in the packet forwarding device provided in the embodiment of the present application, from a hardware level, a schematic diagram of a hardware architecture of the packet forwarding device may be shown in fig. 7, where the packet forwarding device may include: a memory 70 and a processor 71, which,
the memory 70 is used to store program instructions; the processor 71 calls the program instructions stored in the memory 70 and executes the above-described method embodiments in accordance with the obtained program instructions. The specific implementation and technical effects are similar, and are not described herein again.
Optionally, the present application also provides a network device, comprising at least one processing element (or chip) for performing the above method embodiments.
Optionally, the present application also provides a program product, such as a computer-readable storage medium, having stored thereon computer-executable instructions for causing the computer to perform the above-described method embodiments.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A message forwarding method is applied to a network device, an SRV6 tunnel is established between the network device and an access point AP and an opposite terminal network device which are accessed to a local, and the method comprises the following steps:
receiving a first message sent by a target AP, wherein after receiving an original message sent by a terminal, the target AP packages a first SRv6 header on the original message to obtain the first message, and sends the first message through a first SRv6 tunnel established between the target AP and the network equipment;
decapsulating the first message to obtain a second message, and determining next hop equipment for forwarding the original message from a forwarding path for forwarding the original message;
and encapsulating a second SRv6 header on the original message to obtain a third message, and sending the third message through a second SRv6 tunnel established between the original message and the next-hop equipment.
2. The method of claim 1, wherein the SRv6 header includes: an IPv6 header and a Segment Routing (SR) header; a destination address DA field in the IPv6 header comprises a destination IP address of the SRv6 tunnel, wherein the destination IP address consists of a location identifier and a Function; the SR header includes a segment identifier SID list, where the SID list includes SIDs corresponding to each network device on a forwarding path that forwards the original packet.
3. The method of claim 2, wherein the method further comprises:
receiving a fourth packet through a local SRv6 tunnel portal;
when the destination IP address in the DA field in the IPv6 header in which the fourth packet is encapsulated is the IP address of the device, if it is determined that the network device is used as an intermediate device on the forwarding path of the fourth packet, when the fourth packet is forwarded, determining a next-hop device according to the specified SID in the SID list encapsulated by the fourth packet, and modifying the Function value in the DA field according to local topology connection information and forwarding domain information to obtain a fifth packet, where the specified SID is the SID corresponding to the next-hop device on the forwarding path of the network device.
4. The method of claim 3,
if the network device is determined to be the tail device on the forwarding path of the fourth packet, removing SRv6 headers of the encapsulated fourth packet to obtain the original packet when forwarding the fourth packet, and forwarding the original packet according to the destination IP address of the original packet.
5. The method of claim 1, wherein an SRV6 tunnel is established between the network device and the AP accessing the local and the peer network device based on the location identifier of each device.
6. A message forwarding device is applied to a network device, an SRV6 tunnel is established between the network device and an access point AP and an opposite terminal network device which are accessed to a local, and the device comprises:
a receiving unit, configured to receive a first packet sent by a target AP, where after receiving an original packet sent by a terminal, the target AP encapsulates a first SRv6 header on the original packet to obtain the first packet, and sends the first packet through a first SRv6 tunnel established between the target AP and the network device;
a decapsulation unit, configured to decapsulate the first packet to obtain a second packet, and determine, from a forwarding path through which the original packet is forwarded, a next hop device for forwarding the original packet;
and the encapsulating unit is configured to encapsulate a second SRv6 header on the original packet to obtain a third packet, and send the third packet through a second SRv6 tunnel established with the next hop device.
7. The apparatus of claim 6, wherein the SRv6 head comprises: an IPv6 header and a Segment Routing (SR) header; a destination address DA field in the IPv6 header comprises a destination IP address of the SRv6 tunnel, wherein the destination IP address consists of a location identifier and a Function; the SR header includes a segment identifier SID list, where the SID list includes SIDs corresponding to each network device on a forwarding path that forwards the original packet.
8. The apparatus of claim 7,
the receiving unit is further configured to receive a fourth packet through a local SRv6 tunnel portal;
when the destination IP address in the DA field in the IPv6 header where the fourth packet is encapsulated is the IP address of the device, if the decapsulating unit determines that the network device is an intermediate device on the forwarding path of the fourth packet, the encapsulating unit determines, when forwarding the fourth packet, a next-hop device according to the specified SID in the SID list encapsulated by the fourth packet, and modifies the Function value in the DA field according to local topology connection information and forwarding domain information, to obtain a fifth packet, where the specified SID is the SID corresponding to the next-hop device on the forwarding path of the network device.
9. The apparatus of claim 8,
if the decapsulation unit determines that the network device is a tail device on a forwarding path of the fourth packet, the decapsulation unit removes SRv6 headers of the fourth packet when forwarding the fourth packet to obtain the original packet, and forwards the original packet according to a destination IP address of the original packet.
10. The apparatus of claim 6, wherein an SRV6 tunnel is established between the network device and the AP accessing the local and the peer network device based on the location identifier of each device.
CN202110336936.1A 2021-03-29 2021-03-29 Message forwarding method and device Active CN113207192B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110336936.1A CN113207192B (en) 2021-03-29 2021-03-29 Message forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110336936.1A CN113207192B (en) 2021-03-29 2021-03-29 Message forwarding method and device

Publications (2)

Publication Number Publication Date
CN113207192A true CN113207192A (en) 2021-08-03
CN113207192B CN113207192B (en) 2022-07-12

Family

ID=77025930

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110336936.1A Active CN113207192B (en) 2021-03-29 2021-03-29 Message forwarding method and device

Country Status (1)

Country Link
CN (1) CN113207192B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113595897A (en) * 2021-08-13 2021-11-02 新华三信息安全技术有限公司 Path detection method and device
CN113992475A (en) * 2021-09-23 2022-01-28 新华三信息安全技术有限公司 Tunnel establishment method and device
CN114124788A (en) * 2021-10-18 2022-03-01 新华三大数据技术有限公司 Message processing method and device
CN114221904A (en) * 2021-12-15 2022-03-22 锐捷网络股份有限公司 Message forwarding method, device and system
CN114221898A (en) * 2021-12-29 2022-03-22 优刻得科技股份有限公司 Message processing method and network system
CN114615197A (en) * 2022-04-07 2022-06-10 中国电信股份有限公司 Message forwarding method and device, electronic equipment and storage medium
CN114900455A (en) * 2022-05-13 2022-08-12 北京字节跳动网络技术有限公司 Message transmission method, system, equipment and storage medium
CN116436729A (en) * 2023-06-08 2023-07-14 武汉绿色网络信息服务有限责任公司 Message transmission method, networking system and access cloud gateway
WO2023184220A1 (en) * 2022-03-30 2023-10-05 新华三技术有限公司 Packet forwarding method and apparatus

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111935014A (en) * 2020-10-19 2020-11-13 网络通信与安全紫金山实验室 Message forwarding method and device based on SRv6 network, storage medium and electronic equipment
WO2020233192A1 (en) * 2019-05-17 2020-11-26 华为技术有限公司 Method and apparatus for providing service for service flow
CN112422435A (en) * 2020-11-13 2021-02-26 新华三技术有限公司合肥分公司 Message forwarding control method and device and electronic equipment
WO2021036328A1 (en) * 2019-08-31 2021-03-04 华为技术有限公司 Message forwarding method, device, and system in sr network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020233192A1 (en) * 2019-05-17 2020-11-26 华为技术有限公司 Method and apparatus for providing service for service flow
WO2021036328A1 (en) * 2019-08-31 2021-03-04 华为技术有限公司 Message forwarding method, device, and system in sr network
CN111935014A (en) * 2020-10-19 2020-11-13 网络通信与安全紫金山实验室 Message forwarding method and device based on SRv6 network, storage medium and electronic equipment
CN112422435A (en) * 2020-11-13 2021-02-26 新华三技术有限公司合肥分公司 Message forwarding control method and device and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
3RD GENERATION PARTNERSHIP PROJECT: ""29892-050_rm"", 《3GPP TSG_CT\WG4_PROTOCOLLARS_EX-CN4》 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113595897B (en) * 2021-08-13 2022-09-20 新华三信息安全技术有限公司 Path detection method and device
CN113595897A (en) * 2021-08-13 2021-11-02 新华三信息安全技术有限公司 Path detection method and device
CN113992475A (en) * 2021-09-23 2022-01-28 新华三信息安全技术有限公司 Tunnel establishment method and device
CN113992475B (en) * 2021-09-23 2023-12-26 新华三信息安全技术有限公司 Tunnel establishment method and device
CN114124788A (en) * 2021-10-18 2022-03-01 新华三大数据技术有限公司 Message processing method and device
CN114221904B (en) * 2021-12-15 2023-08-18 锐捷网络股份有限公司 Message forwarding method, device and system
CN114221904A (en) * 2021-12-15 2022-03-22 锐捷网络股份有限公司 Message forwarding method, device and system
CN114221898A (en) * 2021-12-29 2022-03-22 优刻得科技股份有限公司 Message processing method and network system
CN114221898B (en) * 2021-12-29 2023-11-10 优刻得科技股份有限公司 Message processing method and network system
WO2023184220A1 (en) * 2022-03-30 2023-10-05 新华三技术有限公司 Packet forwarding method and apparatus
CN114615197A (en) * 2022-04-07 2022-06-10 中国电信股份有限公司 Message forwarding method and device, electronic equipment and storage medium
CN114900455A (en) * 2022-05-13 2022-08-12 北京字节跳动网络技术有限公司 Message transmission method, system, equipment and storage medium
CN116436729A (en) * 2023-06-08 2023-07-14 武汉绿色网络信息服务有限责任公司 Message transmission method, networking system and access cloud gateway
CN116436729B (en) * 2023-06-08 2023-09-08 武汉绿色网络信息服务有限责任公司 Message transmission method, networking system and access cloud gateway

Also Published As

Publication number Publication date
CN113207192B (en) 2022-07-12

Similar Documents

Publication Publication Date Title
CN113207192B (en) Message forwarding method and device
US10757231B2 (en) Providing network efficiencies in forwarding packets among provider networks and applying segment routing policies
CN111541613B (en) Data processing method based on SRv6 and related equipment
US11374848B2 (en) Explicit routing with network function encoding
CN105245452B (en) Multi-protocol label switching traffic engineering tunnel establishing method and equipment
CN112087386B (en) Message processing method, device and system
CN112953831A (en) Message forwarding method and device
CN112019433B (en) Message forwarding method and device
CN109104364B (en) Designated forwarder election method and device
US9871675B2 (en) Interconnecting virtual private networks
WO2022001835A1 (en) Method and apparatus for sending message, and network device, system and storage medium
CN113301667A (en) Message forwarding method and device
WO2022184169A1 (en) Packet forwarding method and system, storage medium, and electronic device
CN113194033B (en) Message forwarding method and device based on SDN (software defined network) segment routing networking and storage medium
US11909629B2 (en) Seamless segment routing for multiprotocol label switching (MPLS) interworking
CN116418729A (en) Message forwarding method and device
CN113542126B (en) Generalized SRv6 full-path compression method and device
CN111010344B (en) Message forwarding method and device, electronic equipment and machine-readable storage medium
JP2023531987A (en) IN-SITU FLOW DETECTION METHOD AND ELECTRONIC DEVICE
CN114915584A (en) Message forwarding method, device and system
CN115348202A (en) Data transmission method, device and equipment based on network slice and storage medium
CN107995084B (en) Tunnel selection method and device
CN113055268A (en) Method, device, equipment and medium for tunnel traffic load balancing
US8971289B2 (en) Maintaining point of presence for clients roaming within a layer 2 domain
WO2024001701A1 (en) Data processing method, apparatus and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant