CN107566272B - Forwarding table establishing method and data forwarding method - Google Patents

Forwarding table establishing method and data forwarding method Download PDF

Info

Publication number
CN107566272B
CN107566272B CN201710967852.1A CN201710967852A CN107566272B CN 107566272 B CN107566272 B CN 107566272B CN 201710967852 A CN201710967852 A CN 201710967852A CN 107566272 B CN107566272 B CN 107566272B
Authority
CN
China
Prior art keywords
srpd
local
sid
node equipment
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710967852.1A
Other languages
Chinese (zh)
Other versions
CN107566272A (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 Technologies Co Ltd
Original Assignee
New H3C 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 Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201710967852.1A priority Critical patent/CN107566272B/en
Publication of CN107566272A publication Critical patent/CN107566272A/en
Application granted granted Critical
Publication of CN107566272B publication Critical patent/CN107566272B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The application provides a forwarding table establishing method and a data forwarding method, which relate to the technical field of data transmission, and the data forwarding method comprises the steps that a first node device encapsulates a received Internet protocol IP message according to a header containing a Segment Routing Path Descriptor (SRPD) to obtain an SRPD data message; and the SRPD data message is forwarded to the corresponding next hop node equipment according to the path information table. The intermediate node equipment receives a Segment Routing Path Descriptor (SRPD) data message sent by the previous hop node equipment; and forwarding the SRPD data message to the corresponding next hop node equipment according to the local forwarding table. When the embodiment provided by the application is applied to data forwarding, SIDs of intermediate node equipment on all transmission paths do not need to be packaged in a message, the length of message packaging is reduced, and the cost of network bandwidth is reduced, so that the utilization rate of the network bandwidth is improved.

Description

Forwarding table establishing method and data forwarding method
Technical Field
The present application relates to the field of data transmission technologies, and in particular, to a forwarding table establishing method and a data forwarding method.
Background
SR (Segment Routing) adopts a source path selection mechanism, encapsulates in advance all Segment Identifiers (SID) of the passing node devices in the path in the head node device, and when a packet passes through SR node devices, the node device processes the packet according to the SID of the packet. Due to the adoption of a source path selection mechanism, the head node equipment can select any reachable path or tail node equipment as required.
The SR may be applied to an MPLS (Multiprotocol Label Switching) network or an IP (Internet Protocol, interconnected Protocol) network, where the MPLS-based SR forwards a packet by using a Label as a SID and an IP prefix as a SID, where the MPLS-SR (MPLS-based SR) is mature in application and supported by multiple vendors, and fig. 1 shows an MPLS-based SR forwarding packet encapsulation diagram.
The operation principle of the SR is described below with reference to fig. 2, taking MPLS-SR as an example:
data packet forwarding procedure
(1) And encapsulating the MPLS label stack for the received IP message at the first node equipment A to generate the MPLS message. The MPLS label stack may be a label of a node device sequentially passed through when the MPLS packet is forwarded from the top to the bottom of the stack, for example, the MPLS label stack may be exposed in the form of Out _ label (100, 101, 102, 103).
(2) The In _ label In the label forwarding table of the intermediate node apparatus B is 100, which indicates that the label of the intermediate node apparatus B itself is 100. And deleting the outermost label (100) of the label stack after receiving the MPLS message sent by the first node equipment A, and then sending the MPLS message to the next intermediate node equipment C for continuous forwarding.
(3) After the message reaches the tail node device F, the device F receives the IP message and forwards the IP message according to the IP address carried in the IP message.
In summary, all SIDs need to be encapsulated on the header during the forwarding process, i.e. each packet needs to increase (nxsid length) Bytes, where n is the number of hops of the intermediate node device passing through, especially like SR with IPv6 prefix as SID, and the SID length is 16 Bytes. Therefore, SIDs on all SR transmission paths are packaged at the head node equipment of the message to be forwarded, and the network bandwidth overhead is high, so that the problem of low network bandwidth utilization rate is caused.
Disclosure of Invention
In view of this, an object of the present application is to provide a forwarding table establishing method and a data forwarding method, so as to reduce the length of a packet in a data forwarding process, and reduce the overhead of a network bandwidth, thereby improving the utilization rate of the network bandwidth.
In order to achieve the purpose, the technical scheme adopted by the application is as follows:
in a first aspect, an embodiment of the present application provides a method for establishing a path information table, where the method is applied to a head node device in a network to which a segment routing SR is applicable, and the method includes:
the first node equipment distributes a segment routing path descriptor distribution protocol SRPD-DP message to next hop node equipment of the first node equipment in a preset transmission path; the SRPD-DP message comprises a Segment Routing Path Descriptor (SRPD) and a local Segment Identifier (SID) group associated with local equipment, wherein the SRPD is used for identifying a preset transmission path, the local SID group comprises at least one SID, and the at least one SID is used for identifying node equipment which needs to pass through in sequence when the SRPD-DP message is forwarded by the local equipment;
and the head node equipment establishes a path information table for representing the association of a preset transmission path and the next hop node equipment according to the SRPD and the local SID group.
In a second aspect, an embodiment of the present application further provides a forwarding table establishing method, which is applied to an intermediate node device in a network to which a segment routing SR is applicable, where the method includes:
the intermediate node equipment receives an upstream segment routing path descriptor distribution protocol (SRPD-DP) message sent by the previous hop node equipment; the upstream SRPD-DP message comprises a Segment Routing Path Descriptor (SRPD) and an upstream Segment Identifier (SID) group corresponding to the previous hop of node equipment, wherein the SRPD is used for identifying a preset transmission path, the upstream SID group comprises at least one SID, and the at least one SID is used for identifying the node equipment which the upstream SRPD-DP message needs to pass through in sequence when the upstream SRPD-DP message is forwarded by the previous hop of node equipment;
and the intermediate node equipment establishes a forwarding table for characterizing the association of the local equipment and the next hop node equipment according to the SRPD and the upstream SID.
In a third aspect, an embodiment of the present application further provides a method for establishing a forwarding table, where the method is applied to a network to which a segment routing SR is applicable, and the method includes:
the method comprises the steps that first node equipment distributes a segment routing path descriptor distribution protocol SRPD-DP message to next hop node equipment of the first node equipment in a preset transmission path, wherein the SRPD-DP message comprises a segment routing path descriptor SRPD and a local segment identifier SID group associated with local equipment; and establishing a path information table for representing association between a preset transmission path and next hop node equipment according to the SRPD and a local SID group, wherein the SRPD is used for identifying the preset transmission path, the local SID group comprises at least one SID, and the at least one SID is used for identifying the node equipment which is required to pass through in sequence when the SRPD-DP message is forwarded by the local equipment;
the intermediate node equipment receives an upstream SRPD-DP message sent by the previous-hop node equipment; establishing a forwarding table for representing the association of the local equipment and the next hop node equipment according to the SRPD and the upstream SID; generating a downstream SRPD-DP message and distributing the message to next hop node equipment; the SRPD-DP packet includes an SRPD and an upstream SID group corresponding to the previous hop node device, where the SRPD is configured to identify a preset transmission path, the upstream SID group includes at least one SID, and the at least one SID is configured to identify node devices that the SRPD-DP packet needs to pass through in sequence when being forwarded by the previous hop node device.
In a fourth aspect, an embodiment of the present application further provides a data forwarding method, which is applied to a head node device of a network to which a segment routing SR is applicable, where the method includes:
the first node equipment encapsulates the received Internet protocol IP message according to a header containing a Segment Routing Path Descriptor (SRPD) to obtain an SRPD data message;
the first node equipment forwards the SRPD data message to corresponding next hop node equipment according to a path information table;
the SRPD is used for identifying a preset transmission path, the path information table is established according to the SRPD and a local segment identification SID group and used for representing the association between the preset transmission path and the next hop node equipment, the local SID group is associated with the local equipment and comprises at least one SID, and the at least one SID is used for identifying the node equipment which is required to pass through in sequence when the SRPD data message is forwarded by the local equipment.
In a fifth aspect, an embodiment of the present application further provides a data forwarding method, which is applied to an intermediate node device of a network to which a segment routing SR is applicable, where the method includes:
the intermediate node equipment receives a Segment Routing Path Descriptor (SRPD) data message sent by the previous hop node equipment;
the intermediate node equipment forwards the SRPD data message to corresponding next hop node equipment according to a local forwarding table;
the SRPD data message is obtained by encapsulating a received Internet protocol IP message according to a header containing the SRPD by a first node device in a preset transmission path, the SRPD is used for identifying the preset transmission path, the local forwarding table is established according to the SRPD and an upstream segment identification SID and used for representing the association between the local device and a next hop device, the upstream SID group contains at least one SID, and the at least one SID is used for identifying intermediate node devices which are required to pass through in sequence when the SRPD data message is forwarded by the previous hop node device.
The embodiment of the application brings the following beneficial effects:
in the data forwarding process, the segment routing path descriptor SRPD is preset as the number for identifying the transmission path, segment routing message forwarding is converted from SID-based forwarding to SRPD-based forwarding, SIDs on all transmission paths do not need to be packaged in the message, and only the SRPD needs to be packaged, so that the message packaging length is reduced, the network bandwidth expense is reduced, and the network bandwidth utilization rate is improved.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the detailed description of the present application or the technical solutions in the prior art, the drawings needed to be used in the detailed description of the present application or the prior art description will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic diagram illustrating conventional SR forwarding packet encapsulation based on MPLS;
fig. 2 is a flowchart illustrating conventional MPLS-based SR forwarding;
fig. 3 is a structural diagram of an SRPD provided in an embodiment of the present application;
fig. 4 is a schematic flowchart of a method for establishing a path information table according to an embodiment of the present application;
fig. 5 is a flowchart illustrating an SRPD-DP packet distribution process according to an embodiment of the present application;
fig. 6-1 is a flowchart illustrating a method for establishing a forwarding table according to an embodiment of the present application;
fig. 6-2 is a schematic flowchart of another forwarding table establishment method according to an embodiment of the present application;
fig. 7 is a flowchart illustrating a further forwarding table establishing method according to an embodiment of the present application;
fig. 8 is a schematic diagram of a format of an SRPD-DP packet provided in the embodiment of the present application;
fig. 9 is a schematic flowchart of a data forwarding method according to an embodiment of the present application;
fig. 10 is a schematic flowchart of an SRPD data forwarding process according to an embodiment of the present application;
fig. 11 is a schematic flowchart of another data forwarding method according to an embodiment of the present application;
fig. 12 is a schematic flowchart of another SRPD data forwarding process according to an embodiment of the present application;
fig. 13 is a schematic flowchart of another data forwarding method according to an embodiment of the present application;
fig. 14 is a schematic format diagram of an SRPD data packet provided in the embodiment of the present application;
fig. 15 is a schematic structural diagram of a network device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, when a message is forwarded in a network suitable for the existing segment routing SR, there is a problem that SID on all transmission paths needs to be encapsulated at a first node device of the message to be forwarded, and network bandwidth overhead is large, thereby resulting in low network bandwidth utilization rate. Based on this, the forwarding table establishing method and the data forwarding method provided in the embodiments of the present application can reduce the length of packet encapsulation in the data forwarding process, and reduce the overhead of network bandwidth, thereby improving the network bandwidth utilization rate.
The embodiment of the disclosure provides a forwarding table establishing method and a data forwarding method. The technology is applied to a server on the network side, can also be applied to other network equipment, and can be realized by adopting related software or hardware.
The present application first defines a Segment Routing Path Descriptor (SRPD) and a Segment Routing Path descriptor Distribution Protocol (SRPD Distribution Protocol, SRPD-DP), which are described as follows:
(1)SRPD
the SRPD is generated when the transmission path is configured by the head node device, and is unique in the entire network as a number for identifying the transmission path. Referring to fig. 3, the SRPD may include an entire network Id (identification) having a length of 4Bytes and a local Id having a length of 2Bytes in one embodiment. The full-network Id may be a Label Switching Router (MPLS LSR) Id or a Router Id (Router identification) unique to the full network, and the local Id is a locally unique number assigned. SRPD example: 1.1.1.1/1.
(2)SRPD-DP
The SRPD-DP is responsible for distributing the SRPD to all node devices through which the transmission path passes, and establishes association between the SRPD and the next-hop node device on each node device (in this application, the association may be shown in the form of an SRPD forwarding table entry). The SRPD-DP message can be a unidirectional protocol message, does not need connection orientation, is simple to realize and has small network bandwidth overhead.
The SRPD and SRPD-DP defined below are applied to the examples described below. Fig. 4 is a flowchart illustrating a method for establishing a path information table according to an embodiment of the present application. The path information table establishing method is applied to the head node device in the network suitable for the segment routing SR, as shown in fig. 4, and includes the following steps:
step S102, the first node device distributes the segment routing path descriptor distribution protocol SRPD-DP message to the next hop node device of the first node device in the preset transmission path.
The SRPD-DP message comprises a Segment Routing Path Descriptor (SRPD) and a local Segment Identifier (SID) group associated with the local equipment, the SRPD is used for identifying a preset transmission path, the local SID group comprises at least one SID, and the at least one SID is used for identifying node equipment which needs to pass through in sequence when the SRPD-DP message is forwarded by the local equipment.
Optionally, the local SID group includes SIDs of all intermediate node devices that sequentially pass through in the preset transmission path. And the head node equipment encapsulates the SRPD-DP message according to the SRPD and the local SID group. In some optional embodiments, as shown in fig. 5, the SRPD-DP packet may include an SRPD protocol header and a label stack formed by local SID groups, where the SRPD protocol header includes SRPD, and the local SID groups sequentially store the labels of passing node devices in the label stack according to the forwarding order. Optionally, the label stack may be labels sequentially passing through the node device when the SRPD-DP packet is forwarded from the top to the bottom of the stack.
Specifically, taking the forwarding process (MPLS-SR mode) in fig. 5 as an example, the device a is a first node device, each intermediate node device in the preset transmission path is a device B, a device C, a device D, and a device E, and the tail node device is a device F. The SIDs corresponding to the 4 intermediate node devices are 100, 101, 102, and 103, respectively, and the local SID groups are 100, 101, 102, and 103. The device a distributes the SRPD-DP packet encapsulated according to the SRPD and the local SID group to the next hop node device B, specifically, the device a encapsulates the SRPD-DP packet according to the SRPD protocol header containing the SRPD and the local SID group.
It should be understood that step S102 sends the SRPD-DP message to the next-hop node device, so that the next-hop node device may establish a corresponding SRPD forwarding table according to the SRPD-DP message, where the SRPD forwarding table may include an SRPD and a corresponding next-hop node device, and is used to characterize an association between the preset transmission path and the next hop of the next-hop node device.
Step S104, the first node device establishes a path information table for representing the association between the preset transmission path and the next hop node device according to the SRPD and the local SID group.
In some alternative embodiments, the path information table may be generated from a local SID path information table. In an alternative embodiment, step S104 can be divided into the following two sub-steps:
(a1) the first node equipment determines the next hop node equipment of the local equipment according to the local SID path information table; the local SID path information table includes local SID groups and next hop node devices of the local devices.
(a2) And generating a path information table according to the SRPD and the next hop node equipment of the local equipment.
In the above embodiment, the local SID path information table is generated by the first node device, and optionally, the first node device may generate the local SID path information table after configuring the SR preset transmission path. For example: and configuring an SR transmission path at the head node equipment, and designating labels of all intermediate node equipment to be passed through and corresponding next-hop node equipment. Taking the configuration of device a in fig. 5 as an example: SR _ LSP out _ label 100101102103 nexthop device B.
In an optional embodiment, after configuring the tags of all the intermediate node devices specified to pass through and the corresponding next-hop node device, the first node device generates a local SID path information table.
The local SID path information table may be presented in the following table 1, wherein the local SID group is presented in the form of a label stack Out _ label (100, 101, 102, 103).
Out_label Next node
100 101 102 103 Device B
TABLE 1
The head node device replaces the Out _ label in table 1 with the SRPD that is also used for identifying the preset transmission path, and generates a path information table including the SRPD. Assuming that the SRPD is 1.1.1.1/1, the path information table may be presented in the form of Table 2 below.
SRPD Next node
1.1.1.1/1 Device B
TABLE 2
In the other embodiments, the first node device first establishes association between the local device and a next hop node device of the local device according to the local SID group, and establishes association between the local device and the next hop node device of the local device according to the SRPD; and then generating a path information table of the next hop node equipment comprising the SRPD and the local equipment according to the two established associations.
Still taking fig. 5 as an example, the local SID path information table (shown in table 1) includes 100, 101, 102, and 103, and a next hop node device B of the local device, and device a establishes association between the local device and device B according to the local SID groups 100, 101, 102, and 103, establishes association between the local device and device B according to the SRPD, and then generates the path information table shown in table 2 according to the SRPD and device B.
In this embodiment of the present application, a first node device distributes a segment routing path descriptor distribution protocol SRPD-DP packet to a next hop node device of the first node device in a preset transmission path, and establishes a path information table for representing the association between the preset transmission path and the next hop node device according to an SRPD and a local SID group. By establishing the path information table, the first node device, the preset transmission path and the next hop node device are associated, and a forwarding basis is provided for the forwarding of subsequent data messages.
In other embodiments, the order of S102 and S104 is not limited, that is, S102 may be executed after S104 or simultaneously with S104.
Fig. 6-1 shows a flowchart of a forwarding table establishment method according to an embodiment of the present application. The forwarding table establishing method is applied to an intermediate node device in a network suitable for a Segment Routing (SR), and as shown in fig. 6-1, the method comprises the following steps:
step S202, the intermediate node equipment receives the upstream segment routing path descriptor distribution protocol SRPD-DP message sent by the previous hop node equipment.
The upstream SRPD-DP packet includes a segment routing path descriptor SRPD and an upstream segment identifier SID group corresponding to the previous hop node device, where the SRPD is used to identify a preset transmission path, the upstream SID group includes at least one SID, and the at least one SID is used to identify the node devices that the upstream SRPD-DP packet needs to pass through in sequence when being forwarded by the previous hop node device.
In an optional embodiment, the upstream segment identifier SID group sequentially stores the labels of the passing node devices in a label stack according to a forwarding order, and optionally, the label stack may be, from the top of the stack to the bottom of the stack, the labels of the passing node devices sequentially when the SRPD-DP packet is forwarded.
In an optional embodiment, the upstream SRPD-DP packet comprises an SRPD header and an upstream segment identification SID group, wherein the SRPD header comprises an SRPD.
Step S204, the intermediate node device establishes a forwarding table for characterizing the association of the local device and the next hop node device according to the SRPD and the upstream SID.
To distinguish from the local SID forwarding table, the forwarding table generated by the intermediate node device is referred to as an SRPD forwarding table. The SID forwarding table, which may include a SID and a next hop device, can be used to characterize the association of the local device with the next hop node device by the SID.
Here, taking the intermediate node apparatus B in fig. 5 as an example, the previous-hop node apparatus of the intermediate node apparatus B is apparatus a. The upstream SRPD-DP packet includes an upstream segment id SID group corresponding to the SRPD and the device a: 100. 101, 102, 103. After receiving the upstream SRPD-DP message sent by the device a, the device B determines a next-hop node device C according to the outermost SID in the label stack and the local SID forwarding table, and then establishes an SRPD forwarding table used for characterizing that the local device is associated with the next-hop node device C according to the SRPD and the next-hop node device C, and for the intermediate node device B, the SRPD forwarding table includes an SRPD and the next-hop node device C.
In some optional embodiments, the forwarding table of the intermediate node device may also be generated according to a local SID forwarding table. In some optional embodiments, the local SID forwarding table is pre-generated by the local device, and optionally, the intermediate node device may generate the local SID forwarding table after configuring the association between the local SID and the next node device.
For example, if the association of SID and next hop node device is configured at all intermediate node devices, device B in fig. 5 may be configured to: SR _ ADJ in _ able 100nexthop device C.
In connection with fig. 5, the presentation form of the local SID forwarding table of intermediate node device B may be as shown in table 3 below.
In_label Next node
100 Device C
TABLE 3
The intermediate node device replaces the In _ label In table 3 with the SRPD used for identifying the preset transmission path, and generates an SRPD forwarding table including the SRPD, for example, assuming that the SRPD is 1.1.1.1/1, and with reference to fig. 5, the presentation form of the SRPD forwarding table of the intermediate node device B may be as In table 4 below.
SRPD Next node
1.1.1.1/1 Device C
TABLE 4
In some optional embodiments described above, as shown in fig. 6-2, the forwarding table establishing method provided in the embodiment of the present application further includes step S206, where the intermediate node device generates a downstream SRPD-DP packet and distributes the packet to the next-hop node device. Step S206 may enable the next hop node device to establish a corresponding SRPD forwarding table according to the downstream SRPD-DP packet.
The downstream SRPD-DP packet includes an SRPD and a downstream SID group corresponding to the next-hop node device, where the downstream SID group includes node devices that are used to identify that the downstream SRPD-DP packet needs to pass through in sequence when being forwarded by the local device.
Specifically, the upstream SID group contains local SIDs that identify the local devices. In a specific implementation process of the step S206, the following sub-steps are included:
(b1) the intermediate node equipment deletes the local SID in the upstream SID group to obtain a downstream SID group corresponding to the next hop node equipment; wherein, the downstream SID group contains downstream SIDs for identifying the next hop node device.
(b2) And generating a downstream SRPD-DP message according to the SRPD and the downstream SID group, and forwarding the downstream SRPD-DP message to the next hop node equipment.
Taking the intermediate node device B in fig. 5 as an example, the upstream SID group includes 100, 101, 102, and 103, when the upstream SID group is stored in the label stack, the outermost layer in the label stack is the SID 100 of the local device B, and after the device B deletes the outermost SID 100, the downstream SID group corresponding to the next-hop node device C is obtained: 101. 102 and 103, the downstream SID group includes a downstream SID 101 corresponding to the next hop node device C. And after the downstream SID group is obtained, generating a downstream SRPD-DP message according to the SRPD and the downstream SID group, and sending the downstream SRPD-DP message to the next hop node equipment C.
It should be understood that, after receiving the SRPD-DP message, the next-hop node device and the subsequent node device in the preset transmission path repeatedly perform operations of establishing the forwarding table and generating the downstream SRPD-DP message.
In a certain optional embodiment, after receiving the downstream SRPD-DP packet, the next-hop node device performs establishing a forwarding table for characterizing that the local device is associated with the next-hop node device, deletes the first downstream SID of the first downstream SID group to obtain a second downstream SID group, obtains the second downstream SRPD-DP packet according to the SRPD and the second downstream SID group, and forwards the second downstream SRPD-DP packet to the next-hop node device of the next-hop node device, until the next-hop node device of the node device that finally forwards the nth downstream SRPD-DP packet is the tail node device of the preset transmission path. And N is a positive integer and is less than the number of nodes of the preset transmission path.
Taking fig. 5 as an example, the next-hop node device C deletes the first downstream SID group: 101. 102, 103, obtaining a second downstream SID group: 102. 103, then according to SRPD and the second downstream SID group: 102. 103, obtaining the second downstream SRPD-DP packet, and forwarding the second downstream SRPD-DP packet to the next hop node device D of the device C until the next hop node device of the node device E that forwards the fourth downstream SRPD-DP packet is the tail node device F of the preset transmission path.
Considering that, in the subsequent data forwarding process, the length of the encapsulated byte may be longer than the length of the encapsulated byte when the SRPD is used to forward the data, in the embodiment of the present application, in step S204: after the intermediate node device establishes a forwarding table for characterizing association between the local device and the next-hop node device according to the SRPD and the upstream SID group, the method further includes: and determining a forwarding table selected when the data is forwarded. Optionally, the step of determining the forwarding table selected when forwarding the data may include the step (c1) and the step (c 2).
(c1) The intermediate node device compares the length of the SRPD with the sum of the lengths of the SIDs of all intermediate node devices behind the local device, and obtains a comparison result.
(c2) And when the comparison result is larger than the preset threshold, the preset local SID forwarding table is used as the basis for forwarding data. And when the comparison result is less than the preset threshold value, the generated SRPD forwarding table is used as the basis for forwarding data. It should be understood that the scheme herein applies not only to intermediate node devices, but also to head node devices.
It is explained with the intermediate node device D in fig. 5 as a local device, the intermediate node device behind the intermediate node device D only has a device E, and if the SID of the intermediate node device is 4bytes and the SRPD is 6bytes in length, the length of the SRPD at this time is greater than the sum of the lengths of the SIDs of all the intermediate node devices behind the local device, and at this time, a preset local SID forwarding table needs to be used as a basis for forwarding data.
In this embodiment, the intermediate node device establishes a forwarding table used for characterizing that the local device is associated with the next hop node device according to the SRPD and the upstream SID, and then generates a downstream SRPD-DP packet and distributes the packet to the next hop node device. Through the method, each intermediate node device is associated according to the preset transmission path, and a forwarding basis is provided for the forwarding of the subsequent data message.
In other embodiments, the sequence of S202 to S204 is not limited, and the execution sequence of S202 to S204 may be changed or set to be executed simultaneously according to actual situations.
Fig. 7 is a flowchart illustrating another forwarding table establishment method according to an embodiment of the present application. The forwarding table establishing method is applied to a network suitable for a Segment Routing (SR), and as shown in fig. 7, the method comprises the following steps:
step S302, the first node device distributes a segment routing path descriptor distribution protocol SRPD-DP message to the next hop node device of the first node device in a preset transmission path, wherein the SRPD-DP message comprises a segment routing path descriptor SRPD and a local segment identifier SID group associated with the local device; and establishing a path information table for representing the association of the preset transmission path and the next hop node equipment according to the SRPD and the local SID group.
The SRPD is used for identifying a preset transmission path, the local SID group comprises at least one SID, and the at least one SID is used for identifying node equipment which needs to pass through in sequence when the SRPD-DP message is forwarded by the local equipment. Specifically, at least one SID included in the local SID group is arranged in a predetermined order.
Step S304, the intermediate node equipment receives an upstream SRPD-DP message sent by the previous hop node equipment; establishing a forwarding table for representing the association of the local equipment and the next hop node equipment according to the SRPD and the upstream SID; and generating a downstream SRPD-DP message and distributing the message to the next hop of node equipment.
The upstream SRPD-DP message comprises an SRPD and an upstream SID group corresponding to the previous hop of node equipment, the SRPD is used for identifying a preset transmission path, the upstream SID group comprises at least one SID, and the at least one SID is used for identifying the node equipment which the upstream SRPD-DP message needs to pass through in sequence when being forwarded by the previous hop of node equipment.
Specifically, the specific working process of the first node device and the intermediate node device is similar to that in the foregoing embodiment, and is not described here again.
In some optional embodiments described above, referring to fig. 8, the SRPD-DP packet includes an SRPD protocol header and a local SID group, and the SRPD protocol header includes an ethernet header field, a flag bit field, a SID number field, and an SRPD.
The local SID group comprises at least one SID arranged in a preset sequence, an Ethernet header field is used for identifying an SRPD-DP message by an Ethernet type, and a flag bit field is used for indicating the node equipment to establish or delete a forwarding table used for representing the association of the local equipment and the next hop node equipment, wherein the forwarding table can be an SRPD forwarding table comprising the SRPD and the next hop node equipment.
Wherein, the length of the SRPD is 6 Bytes; the SID number field is 12 bits; the flag bit field is 4bits, and it should be noted that the above values are merely exemplary and not limiting. Optionally, when the flag position is 1, the SRPD-DP packet is used to instruct the node device to establish a forwarding table representing that the local device is associated with the next-hop node device; and when the flag bit is 0, the SRPD-DP message is used for indicating the node equipment to delete the forwarding table which is established before and is used for representing the correlation between the local equipment and the next hop node equipment.
In order to facilitate understanding of the forwarding table establishment method applied to the network to which the segment route SR applies, still referring to fig. 5, the following description will be made by taking fig. 5 as an example:
in a network suitable for the segment routing SR, a first node device is device a, intermediate node devices that need to pass through in a preset transmission path are device B, device C, device D, and device E in sequence, and a last node device is device F. At this time, each node device in the preset transmission path is configured, which may be as follows.
One, configure SID tag
(1) The association of the SID and the next hop node device is configured at all intermediate node devices. For example, the fig. 5 device B configuration: SR _ ADJ in _ able 100nexthop device C.
(2) And configuring an SR transmission path at the head node equipment, and designating labels of all intermediate node equipment to be passed through and corresponding next-hop node equipment. For example, the fig. 5 device a configuration: SR _ LSP out _ label 100101102103 nexthop device B.
After the configuration is completed, the first node device generates a local SID path information table, and each intermediate node device may generate a corresponding local SID forwarding table.
Two, starting SRPD-DP protocol
And starting the SRPD-DP protocol on each node device in the preset transmission path. For example: configure commands on device a: router SRPD-DP.
After the SRPD-DP protocol is enabled, the head node device is prompted to generate a path information table containing SRPDs, and each intermediate node device may generate a corresponding local forwarding table (e.g., an SRPD forwarding table). The first node device encapsulates the SRPD-DP message according to the SRPD and the local SID group, wherein, the local SID group stores the labels of the passing node devices in turn into a label stack according to the forwarding sequence, and the label stack can be the labels of the passing node devices in turn when the SRPD-DP message is forwarded from the top to the bottom of the stack. And then the SRPD-DP message is distributed to the next hop node equipment B. In addition, device a establishes association between local device and device B according to local SID groups 100, 101, 102, and 103, establishes association between local device and device B according to SRPD, and then generates the path information table shown in table 2 above according to SRPD and device B.
After receiving the upstream SRPD-DP packet sent by the device a, the device B determines the next-hop node device C according to the outmost SID 100 in the label stack and the local SID forwarding table, and then establishes a forwarding table for characterizing that the device B is associated with the next-hop node device C according to the SRPD and the next-hop node device C, and for the intermediate node device B, the forwarding table includes the SRPD and the next-hop node device C. Then, the SID 100 at the outermost layer in the label stack is deleted, and the first downstream SID group corresponding to the device C is obtained. And subtracting 1 from the number of SIDs in the SRPD protocol header to obtain a first downstream SRPD-DP message corresponding to the equipment C, and sending the first downstream SRPD-DP message to the next hop node equipment C.
Next hop node device C, according to the first downstream SID group: 101. 102, 103, a first downstream SID 101 determines a next-hop node device D of the node device C, then establishes a forwarding table for characterizing that the device C is associated with the next-hop node device D according to the SRPD and the node device D, and deletes the first downstream SID 101, that is, an outermost layer in a label stack, so as to obtain a second downstream SID group corresponding to the device D: 102. 103. Then, based on the SRPD and the second downstream SID group: 102. 103, subtracting 1 from the number of SIDs in the SRPD protocol header, obtaining a second downstream SRPD-DP packet, and forwarding the second downstream SRPD-DP packet to the next hop node device D of the node device C until the next hop node device of the node device E, which finally forwards the fourth downstream SRPD-DP packet, is the tail node device F of the preset transmission path.
After the node device E establishes a forwarding table for characterizing association between the local device and the next-hop node device F, the outermost layer 103 in the label stack is deleted; and after the number of SIDs in the SRPD protocol header is reduced by 1, the number of SIDs is changed into 0, and the fourth downstream SRPD-DP message is discarded at the moment.
In this embodiment, the first node device distributes the SRPD-DP packet to the next-hop node device of the first node device in the preset transmission path, and establishes a path information table for representing the association between the preset transmission path and the next-hop node device according to the SRPD and the local SID. The intermediate node equipment receives an upstream SRPD-DP message sent by the previous-hop node equipment; establishing a forwarding table for representing the association of the local equipment and the next hop node equipment according to the SRPD and the upstream SID; and generating a downstream SRPD-DP message and distributing the message to the next hop of node equipment. In this way, the SRPD-DP packet is issued to each intermediate node device, and the association between the first node device and the intermediate node device, between each intermediate node device, and between the intermediate node device and the tail node device is established, thereby providing a forwarding basis for the forwarding of subsequent data packets.
Fig. 9 shows a flowchart of a data forwarding method provided in an embodiment of the present application. The data forwarding method is applied to a head node device in a network suitable for a segment routing SR, as shown in fig. 9, and includes the following steps:
step S402, the head node equipment encapsulates the received Internet protocol IP message according to the header containing the segment routing path descriptor SRPD, and obtains the SRPD data message.
Step S404, the first node device forwards the SRPD data message to the corresponding next hop node device according to the path information table.
The SRPD is used for identifying a preset transmission path, the path information table is established according to the SRPD and a local segment identification SID group and used for representing the association between the preset transmission path and the next hop node equipment, the local SID group is associated with the local equipment and contains at least one SID, and the at least one SID is used for identifying the node equipment which is required to pass through in sequence when the SRPD data message is forwarded by the local equipment. Specifically, the process of establishing the path information table may refer to the description in the foregoing embodiments, and is not described herein again.
Referring to fig. 10, the head node device a encapsulates the header containing SRPD1.1.1.1/1 and the internet protocol IP packet to obtain an SRPD data packet. And then, according to a path information table established in advance, the SRPD data message is forwarded to the corresponding next hop node equipment B.
In summary, in this embodiment, the first node device does not need to encapsulate the SID on all transmission paths in the packet, which reduces the length of packet encapsulation and reduces the overhead of network bandwidth, thereby improving the utilization rate of network bandwidth.
Fig. 11 shows a flowchart of another data forwarding method provided in an embodiment of the present application. The data forwarding method is applied to an intermediate node device of a network to which a segment routing SR is applicable, as shown in fig. 11, and includes the following steps:
step S502, the intermediate node device receives the segment routing path descriptor SRPD data packet sent by the previous-hop node device.
Step S504, the intermediate node device forwards the SRPD data message to the corresponding next hop node device according to the local forwarding table.
The SRPD data message is obtained by packaging a received Internet protocol IP message according to a header containing the SRPD by a first node device in a preset transmission path, the SRPD is used for identifying the preset transmission path, a local forwarding table is established according to the SRPD and an upstream segment identification SID and used for representing the association between the local device and a next hop device, the upstream SID group contains at least one SID, and the at least one SID is used for identifying intermediate node devices which are required to pass through in sequence when the SRPD data message is forwarded by the previous hop node device. Specifically, the process of establishing the local forwarding table refers to the foregoing embodiment, and is not described herein again.
In an optional embodiment, when the next hop node device of the intermediate node device is the tail node device, the SRPD data packet is analyzed to obtain an IP packet, and the obtained IP packet is forwarded to the tail node device according to the local forwarding table.
Taking the intermediate node device B in fig. 10 as an example for explanation, after receiving the SRPD data packet sent by the first node device a, the node device B analyzes the SRPD data packet to obtain SRPD1.1.1.1/1, searches a local forwarding table established in the SRPD-DP packet distribution process according to the SRPD, determines the next-hop node device C according to the local forwarding table, and forwards the SRPD data packet to the node device C.
The processing procedure of the intermediate node device C and the intermediate node device D in the transmission path after receiving the SRPD data packet is similar to the processing procedure of the intermediate node device B, and is not described herein again.
When the SRPD data message is forwarded to the intermediate node equipment E and the intermediate node equipment E finds that the next hop node equipment is the tail node equipment F, the SRPD data message is analyzed to obtain an IP message, and the obtained IP message is forwarded to the tail node equipment F according to a local forwarding table. Therefore, the data packet received by the tail node device F is an IP packet, and the tail node device F only needs to forward the IP packet according to its own routing forwarding table.
By the embodiment of the application, the intermediate node equipment can directly forward the data message according to the local forwarding table without deleting the label layer by layer and then forwarding the data message in the prior art. The length of message encapsulation is reduced, the cost of network bandwidth is reduced, and the forwarding efficiency and the network bandwidth utilization rate are improved.
In consideration of the fact that the length of the encapsulated byte is longer than the length of the encapsulated byte when the data is forwarded by the SID in the data forwarding process, the overhead of the network bandwidth may be increased. Based on this, in some alternative embodiments, step S504: and the intermediate node equipment forwards the forwarding table to the corresponding next hop node equipment according to the determined local forwarding table.
In an alternative embodiment, step S504 may forward the data according to the forwarding table selected in the previous embodiments in step (c1) and step (c 2).
In another alternative embodiment, step S504 includes: and determining a forwarding table selected when the data is forwarded, and forwarding the data according to the determined forwarding table. Optionally, the steps include (d1) to (d 3).
(d1) The intermediate device compares the length of the SRPD with the sum of the lengths of the SIDs of all intermediate node devices behind the local device, and obtains a comparison result.
(d2) And when the comparison result is less than or equal to the comparison result, the intermediate node equipment forwards the SRPD data message to the corresponding next-hop node equipment according to the local forwarding table. The local forwarding table may now be an SRPD forwarding table characterizing SRPDs associated with the next hop node device.
(d3) And when the comparison result is larger than the comparison result, the intermediate node equipment de-encapsulates the SRPD data message, encapsulates the IP message by taking the SID of all the intermediate node equipment behind the local equipment as a header, and forwards the encapsulated data message to the corresponding next-hop node equipment according to the local forwarding table. At this time, the local forwarding table may be a SID forwarding table representing that the SID is associated with the next-hop node device; or a comprehensive forwarding table characterizing SRPD, next hop node devices, and SID associations.
Specifically, referring to fig. 12, it is assumed that the SRPD is 6bytes, and the SID of the intermediate node device is the label of the MPLS-based SR, i.e., the SID is 4 bytes. When the intermediate node device is device C, all intermediate node devices behind the local device include device D and device E, the sum of the two intermediate node devices is 8 bytes, that is, the comparison result at this time is that the byte length of the SRPD is smaller than the sum of SID byte lengths of the devices D, E, and the intermediate node device C forwards the SRPD data packet to the corresponding next-hop node device D according to the local SRPD forwarding table.
When the intermediate node device is device D, the intermediate node device behind device D only has device E, and the SID byte length is 4, that is, the comparison result at this time is that the byte length of SRPD is greater than the SID byte length of device E, then the intermediate node device D decapsulates the SRPD data packet, encapsulates the IP packet according to the header containing the SID of all the intermediate node devices behind the local device, that is, device E, obtains the MPLS data packet, and forwards the encapsulated MPLS data packet to the corresponding next-hop node device E according to the local SID or the comprehensive forwarding table.
When receiving the MPLS data packet, the intermediate node device E deletes the SID 103 of the device E encapsulated in the MPLS data packet to obtain an IP packet, and sends the IP packet to the tail node device F according to a local forwarding table (shown in table 5 below), where the local forwarding table is a SID forwarding table representing the association between the SID and the next hop node device.
In_label Next node
103 Apparatus F
TABLE 5
In other optional embodiments, assuming that the SID of the intermediate node device is a label of the SR based on IPV6, the SID is 16bytes, and at this time, the determination method is the same as the above label of the SR based on MPLS, and details are not described here. It should be noted that, since the SRPD in this embodiment may be 6bytes, the byte length of the SRPD is smaller than the sum of the byte lengths of the SIDs of all the intermediate node devices after most of the node devices for the MPLS network and the IP network. Therefore, the SRPD data message based on the SRPD is forwarded, the length of the message encapsulation in the data forwarding process is greatly reduced, the expense of the network bandwidth is reduced, and the utilization rate of the network bandwidth is improved.
In addition, in the prior art, the first node device encapsulates all SIDs, so that each manufacturer is limited by a forwarding chip or an implementation process, and the maximum hop count supported by the SR path is greatly limited. The embodiment of the application encapsulates the IP message based on the SRPD, can reduce the limitation of a forwarding chip or a realization process, and greatly increases the maximum hop count supported by a segment routing forwarding path.
Fig. 13 is a flowchart illustrating another data forwarding method according to an embodiment of the present application. The data forwarding method is applied to a network suitable for segment routing SR, as shown in fig. 13, and includes the following steps:
step S602, the first node device encapsulates the received Internet protocol IP message according to the header containing the segment routing path descriptor SRPD, and obtains an SRPD data message; and the SRPD data message is forwarded to the corresponding next hop node equipment according to the path information table.
Step S604, the intermediate node equipment receives the segment routing path descriptor SRPD data message sent by the previous hop node equipment; and forwarding the SRPD data message to the corresponding next hop node equipment according to the local forwarding table.
The SRPD is used for identifying a preset transmission path, the path information table is established according to the SRPD and a local segment identification SID group and used for representing the association between the preset transmission path and the next hop node equipment, the local SID group is associated with the local equipment and contains at least one SID, and the at least one SID is used for identifying the node equipment which is required to pass through in sequence when the SRPD data message is forwarded by the local equipment. The SRPD data message is obtained by encapsulating a received Internet protocol IP message by a first node device in a preset transmission path according to a header containing the SRPD, a local forwarding table is established according to the SRPD and an upstream segment identification SID group and used for representing the association between the local device and a next hop device, the upstream SID group comprises at least one SID, and the at least one SID is used for identifying intermediate node devices which are required to pass through in sequence when the SRPD data message is forwarded by the previous hop node device.
Specifically, the specific working process of the first node device and the intermediate node device is similar to that in the foregoing embodiment, and is not described here again.
In one embodiment, as shown in fig. 14, the SRPD data packet includes an SRPD data header and an IP packet, where the SRPD data header includes an ethernet header field in addition to the SRPD. In the process of data forwarding, the SRPD data message is identified through the Ethernet type of the Ethernet header field. It should be noted that the specific method for identifying the SRPD data packet is not limited to the above ethertype identification, and other methods such as specifying a code, a sequence number, or a type identification bit may be used to achieve the purpose of identifying the SRPD data packet, which is not limited herein.
To facilitate understanding of the data forwarding method applied to the network to which the segment route SR is applicable, reference is made to fig. 10, which is taken as an example to explain:
the head node device A encapsulates the header containing SRPD1.1.1.1/1 (wherein, the Ethernet header field used for SRPD data message identification is not marked) and the Internet protocol IP message to obtain the SRPD data message. And then, according to a path information table established in advance, the SRPD data message is forwarded to the corresponding next hop node equipment B.
After receiving the SRPD data packet sent by the first node device a, the node device B parses the SRPD data packet to obtain SRPD1.1.1.1/1, searches a local forwarding table established in the SRPD-DP packet distribution process according to the SRPD, determines the next-hop node device C according to the local forwarding table, and forwards the SRPD data packet to the node device C.
The processing procedure of the intermediate node device C and the intermediate node device D in the transmission path after receiving the SRPD data packet is similar to the processing procedure of the intermediate node device B, and is not described herein again.
Specifically, when finding that the next hop node device is the tail node device F, the intermediate node device E analyzes the SRPD data packet to obtain an IP packet, and forwards the obtained IP packet to the tail node device F according to the local forwarding table.
Therefore, the data packet received by the tail node device F is an IP packet, and the tail node device F only needs to forward the IP packet according to its own routing forwarding table.
In the data forwarding process, Segment Routing Path Descriptors (SRPDs) are preset as numbers for identifying transmission paths, segment routing message forwarding is converted from SID-based forwarding to SRPD-based forwarding, SIDs on all transmission paths do not need to be packaged in a message, and only the SRPDs need to be packaged, so that the length of message packaging is reduced, the network bandwidth overhead is reduced, and the network bandwidth utilization rate is improved.
In addition, since SIDs on all transmission paths do not need to be encapsulated in the first node device of the message, the maximum hop count supported by the transmission paths is greatly increased, and manufacturers are not limited by forwarding chips or implementation flows.
In some optional embodiments, when the first node device configures the transmission path first and then configures the SID of each intermediate node device, the SRPD-DP packet sent out when configuring the transmission path of the first node device is abnormally forwarded, so that the local forwarding tables of each intermediate node device cannot be established. Based on this, in an embodiment, after configuring a transmission path, the first node device periodically distributes the SRPD-DP message of the transmission path to play a role of keeping the path alive. The protocol message is a unidirectional message, and the sending interval can be set to be longer (for example, 10s), so that the cost on the network bandwidth is small.
In some optional embodiments, after the intermediate node device deletes the SID configuration, when the first node device deletes the transmission path again, the SRPD cancellation protocol packet is abnormally forwarded, which may cause the intermediate node device to have a local forwarding table residue based on the SRPD. Based on this, in an embodiment, the intermediate node device adds an aging function to the SRPD-based local forwarding table, and deletes the SRPD-based local forwarding table when there is no message hit in an aging period. That is, when the SRPD-based local forwarding table starts to count after being established, and the same SRPD data packet does not appear in the preset aging period, the SRPD-based local forwarding table is deleted.
The path information table establishing apparatus provided in an embodiment of the present application is applied to a head node device in a network to which a segment routing SR is applicable, and the apparatus includes:
the protocol distribution module is used for distributing a segment routing path descriptor distribution protocol SRPD-DP message to next hop node equipment of first node equipment in a preset transmission path; the SRPD-DP message comprises a Segment Routing Path Descriptor (SRPD) and a local Segment Identifier (SID) group associated with the local equipment, wherein the SRPD is used for identifying a preset transmission path, the local SID group comprises at least one SID, and the at least one SID is used for identifying node equipment which needs to pass through in sequence when the SRPD-DP message is forwarded by the local equipment;
and the information table establishing module is used for establishing a path information table for representing the association of the preset transmission path and the next hop node equipment according to the SRPD and the local SID group.
The forwarding table establishing apparatus provided in the embodiment of the present application is applied to an intermediate node device in a network to which a segment routing SR is applicable, and the apparatus includes:
an SRPD-DP receiving module, configured to receive, by an intermediate node device, an SRPD-DP packet of an upstream segment routing path descriptor distribution protocol sent by a previous-hop node device; the SRPD-DP message comprises a Segment Routing Path Descriptor (SRPD) and an upstream Segment Identification (SID) group corresponding to the previous hop of node equipment, wherein the SRPD is used for identifying a preset transmission path, the upstream SID group comprises at least one SID, and the at least one SID is used for identifying the node equipment which is required to pass through in sequence when the SRPD-DP message is forwarded by the previous hop of node equipment;
and the forwarding table establishing module is used for establishing a forwarding table for representing the association of the local equipment and the next hop node equipment according to the SRPD and the upstream SID.
The device for establishing the forwarding table provided by the embodiment of the application is applied to a network suitable for a Segment Routing (SR), and comprises the protocol distribution module, an information table establishment module, an SRPD-DP receiving module and a forwarding table establishment module.
The embodiment of the present application further provides a data forwarding apparatus, which is applied to a first node device of a network to which the segment routing SR is applicable, and the apparatus includes:
the data acquisition module is used for encapsulating the received Internet protocol IP message according to a header containing a Segment Routing Path Descriptor (SRPD) to obtain an SRPD data message;
the first data forwarding module is used for forwarding the SRPD data message to the corresponding next hop node equipment according to the path information table;
the SRPD is used for identifying a preset transmission path, the path information table is established according to the SRPD and a local segment identification SID group and used for representing the association between the preset transmission path and the next hop node equipment, the local SID group is associated with the local equipment and contains at least one SID, and the at least one SID is used for identifying the node equipment which is required to pass through in sequence when the SRPD data message is forwarded by the local equipment.
The embodiment of the present application further provides another data forwarding apparatus, which is applied to an intermediate node device of a network to which a segment routing SR is applicable, and the apparatus includes:
the data receiving module is used for receiving a Segment Routing Path Descriptor (SRPD) data message sent by the previous hop of node equipment;
the second data forwarding module is used for forwarding the SRPD data message to corresponding next hop node equipment according to the local forwarding table;
the SRPD data message is obtained by packaging a received Internet protocol IP message according to a header containing the SRPD by a first node device in a preset transmission path, the SRPD is used for identifying the preset transmission path, a local forwarding table is established according to the SRPD and an upstream segment identification SID and used for representing the association between the local device and a next hop device, the upstream SID group contains at least one SID, and the at least one SID is used for identifying intermediate node devices which are required to pass through in sequence when the SRPD data message is forwarded by the previous hop node device.
In the data forwarding process, Segment Routing Path Descriptors (SRPDs) are preset as numbers for identifying transmission paths, segment routing message forwarding is converted from SID-based forwarding to SRPD-based forwarding, SIDs on all transmission paths do not need to be packaged in a message, and only the SRPDs need to be packaged, so that the length of message packaging is reduced, the network bandwidth overhead is reduced, and the network bandwidth utilization rate is improved.
In addition, since SIDs on all transmission paths do not need to be encapsulated in the first node device of the message, the maximum hop count supported by the transmission paths is greatly increased, and manufacturers are not limited by forwarding chips or implementation flows.
Referring to fig. 15, an embodiment of the present application further provides a network device 100, including: a processor 40, a memory 41, a bus 42 and a communication interface 43, wherein the processor 40, the communication interface 43 and the memory 41 are connected through the bus 42; the processor 40 is arranged to execute executable modules, such as computer programs, stored in the memory 41.
The Memory 41 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 43 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, etc. may be used.
The bus 42 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 15, but that does not indicate only one bus or one type of bus.
The memory 41 is used for storing a program, and the processor 40 executes the program after receiving an execution instruction, and the method executed by the apparatus defined by the flow process disclosed in any of the foregoing embodiments of the present application may be applied to the processor 40, or implemented by the processor 40.
The processor 40 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 40. The Processor 40 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can 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, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory 41, and the processor 40 reads the information in the memory 41 and completes the steps of the method in combination with the hardware thereof.
The computer program product for performing the forwarding table establishing method and the data forwarding method provided in the embodiment of the present application includes a computer readable storage medium storing a nonvolatile program code executable by a processor, where instructions included in the program code may be used to execute the method described in the foregoing method embodiment, and specific implementation may refer to the method embodiment, and is not described herein again.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application, and are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (14)

1. A path information table establishment method is applied to a head node device in a network suitable for a Segment Routing (SR), and the method comprises the following steps:
the first node equipment distributes a segment routing path descriptor distribution protocol SRPD-DP message to next hop node equipment of the first node equipment in a preset transmission path, so that the next hop node equipment establishes a forwarding table according to the SRPD-DP message; the SRPD-DP message comprises a Segment Routing Path Descriptor (SRPD) and a local Segment Identifier (SID) group associated with local equipment, wherein the SRPD is used for identifying a preset transmission path, the local SID group comprises at least one SID, and the at least one SID is used for identifying node equipment which needs to pass through in sequence when the SRPD-DP message is forwarded by the local equipment; the SRPD comprises a whole network Id and a local Id; the forwarding table is an SRPD forwarding table or a local SID forwarding table, the local SID forwarding table comprises the SRPD and corresponding next hop node equipment, and the SRPD forwarding table comprises the local SID and corresponding next hop node equipment;
the first node equipment establishes a path information table for representing the association of a preset transmission path and the next hop node equipment according to the SRPD and the local SID; the path information table is generated according to a local SID path information table, and the local SID path information table includes a local SID group and a next hop node device of the local device.
2. The method according to claim 1, wherein before the head node device distributes a segment routing path descriptor distribution protocol SRPD-DP packet to a next hop node device of the head node device in a preset transmission path, the method further comprises:
and the head node equipment encapsulates the SRPD-DP message according to the SRPD and the local SID group.
3. The method of claim 1, wherein the head node device establishes a path information table for characterizing association of a preset transmission path with a next hop node device according to the SRPD and a local SID group, and the method includes:
the first node equipment determines the next hop node equipment of the local equipment according to the local SID path information table;
and generating a path information table according to the SRPD and the next hop node equipment of the local equipment.
4. A forwarding table establishment method is applied to an intermediate node device in a network suitable for a Segment Routing (SR), and the method comprises the following steps:
the intermediate node equipment receives an upstream segment routing path descriptor distribution protocol (SRPD-DP) message sent by the previous hop node equipment; the SRPD is used for identifying a preset transmission path, the upstream SID group comprises at least one SID, and the at least one SID is used for identifying the node equipment which needs to pass through in sequence when the upstream SRPD-DP message is forwarded by the node equipment of the previous hop; the SRPD comprises a whole network Id and a local Id;
the intermediate node equipment establishes a forwarding table for representing the association of local equipment and next hop node equipment according to the SRPD and the upstream SID; the forwarding table is an SRPD forwarding table or a local SID forwarding table, the local SID forwarding table includes the SRPD and a corresponding next hop node device, and the SRPD forwarding table includes the local SID and a corresponding next hop node device.
5. The method of claim 4, further comprising: and the intermediate node equipment generates a downstream SRPD-DP message and distributes the downstream SRPD-DP message to the next hop node equipment, wherein the downstream SRPD-DP message comprises an SRPD and a downstream SID group corresponding to the next hop node equipment, and the downstream SID group comprises node equipment which is used for identifying that the downstream SRPD-DP message needs to pass through in sequence when being forwarded by the local equipment.
6. The method of claim 5, wherein if the upstream SID group includes a local SID for identifying a local device, the intermediate node device generates a downstream SRPD-DP packet and distributes the packet to a next-hop node device, including:
the intermediate node equipment deletes the local SID in the upstream SID group to obtain a downstream SID group corresponding to the next hop node equipment; wherein, the downstream SID group contains downstream SID for identifying next hop node equipment;
and generating a downstream SRPD-DP message according to the SRPD and the downstream SID group, and forwarding the downstream SRPD-DP message to next hop node equipment.
7. The method of claim 4, wherein after the intermediate node device constructs a forwarding table characterizing local devices associated with next hop node devices according to the SRPD and upstream SIDs, the method further comprises:
the intermediate node equipment compares the length of the SRPD with the sum of the lengths of the SIDs of all the intermediate node equipment behind the local equipment and obtains a comparison result;
and when the comparison result is greater than the preset threshold, taking a preset local SID forwarding table as a basis for forwarding data.
8. A forwarding table establishment method is applied to a network suitable for a Segment Routing (SR), and the method comprises the following steps:
the method comprises the steps that first node equipment distributes a segment routing path descriptor distribution protocol SRPD-DP message to next hop node equipment of the first node equipment in a preset transmission path, wherein the SRPD-DP message comprises a segment routing path descriptor SRPD and a local segment identifier SID group associated with local equipment; and establishing a path information table for representing association between a preset transmission path and next hop node equipment according to the SRPD and a local SID group, wherein the SRPD is used for identifying the preset transmission path, the local SID group comprises at least one SID, and the at least one SID is used for identifying the node equipment which is required to pass through in sequence when the SRPD-DP message is forwarded by the local equipment; the SRPD comprises a whole network Id and a local Id; the path information table is generated according to a local SID path information table, and the local SID path information table comprises a local SID group and a next hop node device of the local device;
the intermediate node equipment receives an upstream SRPD-DP message sent by the previous-hop node equipment; establishing a forwarding table for representing the association of the local equipment and the next hop node equipment according to the SRPD and the upstream SID; generating a downstream SRPD-DP message and distributing the message to next hop node equipment; the SRPD-DP message comprises an SRPD and an upstream SID group corresponding to the previous hop of node equipment, wherein the SRPD is used for identifying a preset transmission path, the upstream SID group comprises at least one SID, and the at least one SID is used for identifying the node equipment which the SRPD-DP message needs to pass through in sequence when being forwarded by the previous hop of node equipment; the forwarding table is an SRPD forwarding table or a local SID forwarding table, the local SID forwarding table includes the SRPD and a corresponding next hop node device, and the SRPD forwarding table includes the local SID and a corresponding next hop node device.
9. The method of any of claims 1 to 8, wherein the SRPD-DP packet further comprises a flag bit field, and wherein the flag bit field is used to instruct a node device to create or delete a forwarding table for characterizing association between a local device and a next hop node device.
10. The method of any of claims 1 to 8, wherein the local SID groups comprise at least one SID arranged in a predetermined order.
11. A data forwarding method applied to a head node device of a network to which a segment routing SR is applicable, the method comprising:
the first node equipment encapsulates the received Internet protocol IP message according to a header containing a Segment Routing Path Descriptor (SRPD) to obtain an SRPD data message;
the first node equipment forwards the SRPD data message to corresponding next hop node equipment according to a path information table so that the next hop node equipment forwards the SRPD data message to the corresponding next hop node equipment according to a local forwarding table;
the SRPD is used for identifying a preset transmission path, the path information table is established according to the SRPD and a local segment identification SID group and is used for representing the association between the preset transmission path and the next hop node equipment, the local SID group is associated with the local equipment and comprises at least one SID, and the at least one SID is used for identifying the node equipment which is required to pass through in sequence when the SRPD data message is forwarded by the local equipment; the SRPD comprises a whole network Id and a local Id; the path information table is generated according to a local SID path information table, and the local SID path information table comprises a local SID group and a next hop node device of the local device; the forwarding table is an SRPD forwarding table or a local SID forwarding table, the local SID forwarding table includes the SRPD and a corresponding next hop node device, and the SRPD forwarding table includes the local SID and a corresponding next hop node device.
12. A data forwarding method applied to an intermediate node device of a network to which a segment routing SR is applicable, the method comprising:
the intermediate node equipment receives a Segment Routing Path Descriptor (SRPD) data message sent by the previous hop node equipment;
the intermediate node equipment forwards the SRPD data message to corresponding next hop node equipment according to a local forwarding table;
the SRPD data message is obtained by encapsulating a received Internet protocol IP message according to a header containing the SRPD by a first node device in a preset transmission path, wherein the SRPD is used for identifying the preset transmission path, the local forwarding table is established according to the SRPD and an upstream segment identification SID and is used for representing the association between the local device and a next hop device, the upstream SID group contains at least one SID, and the at least one SID is used for identifying intermediate node devices which need to pass through in sequence when the SRPD data message is forwarded by a previous hop node device; the SRPD comprises a whole network Id and a local Id; the forwarding table is an SRPD forwarding table or a local SID forwarding table, the local SID forwarding table includes the SRPD and a corresponding next hop node device, and the SRPD forwarding table includes the local SID and a corresponding next hop node device.
13. The method of claim 12, wherein the intermediate node device forwards the data to the corresponding next-hop node device according to a local forwarding table, comprising:
the intermediate node equipment compares the length of the SRPD with the sum of the lengths of the SIDs of all the intermediate node equipment behind the local equipment and obtains a comparison result;
when the comparison result is less than or equal to the comparison result, the intermediate node equipment forwards the SRPD data message to corresponding next-hop node equipment according to a local forwarding table;
and when the comparison result is greater than the comparison result, the intermediate node equipment decapsulates the SRPD data message, encapsulates the IP message according to the headers of the SIDs of all the intermediate node equipment behind the local equipment, and forwards the encapsulated data message to the corresponding next-hop node equipment according to the local forwarding table.
14. The data forwarding method of claim 12, wherein when a next hop node device of the intermediate node device is a tail node device, the SRPD data packet is parsed to obtain an IP packet, and the obtained IP packet is forwarded to the tail node device according to a local forwarding table.
CN201710967852.1A 2017-10-17 2017-10-17 Forwarding table establishing method and data forwarding method Active CN107566272B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710967852.1A CN107566272B (en) 2017-10-17 2017-10-17 Forwarding table establishing method and data forwarding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710967852.1A CN107566272B (en) 2017-10-17 2017-10-17 Forwarding table establishing method and data forwarding method

Publications (2)

Publication Number Publication Date
CN107566272A CN107566272A (en) 2018-01-09
CN107566272B true CN107566272B (en) 2021-10-12

Family

ID=60986299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710967852.1A Active CN107566272B (en) 2017-10-17 2017-10-17 Forwarding table establishing method and data forwarding method

Country Status (1)

Country Link
CN (1) CN107566272B (en)

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110300061A (en) * 2018-03-23 2019-10-01 中兴通讯股份有限公司 A kind of method, equipment and storage medium for noticing binding information
CN110535766B (en) * 2018-05-25 2021-10-22 华为技术有限公司 Method and equipment for generating route
CN116208525A (en) * 2018-06-06 2023-06-02 华为技术有限公司 Method, equipment and system for detecting data message
CN112702266A (en) * 2018-06-29 2021-04-23 华为技术有限公司 Method for generating label forwarding table, message sending method, device and equipment
CN109246011B (en) * 2018-10-25 2021-05-25 新华三技术有限公司 Message forwarding method and device
CN111327537B (en) * 2018-12-14 2022-08-02 中国电信股份有限公司 Flow forwarding method and system, SDN controller and computer readable storage medium
CN111327527B (en) * 2018-12-14 2022-03-18 中国电信股份有限公司 Flow forwarding method and system, SDN controller and computer readable storage medium
US11245617B1 (en) 2018-12-28 2022-02-08 Juniper Networks, Inc. Compressed routing header
CN111510386B (en) 2019-01-30 2023-06-20 华为技术有限公司 Method and device for processing message
CN111510387B (en) * 2019-01-30 2021-12-14 华为技术有限公司 Data forwarding method and related device
CN111917640B (en) * 2019-05-09 2023-06-06 华为技术有限公司 SRv6 network segment list generation method, message forwarding method, device and system
US11412071B2 (en) 2019-05-13 2022-08-09 Juniper Networks, Inc. Compressed routing header information for networks
CN112714063B (en) * 2019-10-25 2022-08-09 华为技术有限公司 Message transmission method, device and digital processing chip
WO2021143279A1 (en) * 2020-01-14 2021-07-22 中兴通讯股份有限公司 Method and device for segment routing service processing, routing equipment, and storage medium
CN113141339A (en) * 2020-01-20 2021-07-20 华为技术有限公司 SR (scheduling request) message transmission method, device and system
CN113438161B (en) * 2020-03-23 2022-10-04 华为技术有限公司 Method and network device for generating segment identification SID
US11611506B2 (en) * 2020-10-09 2023-03-21 Juniper Networks, Inc. Processing a flow at the egress node in segment routing
CN112822123A (en) * 2020-12-29 2021-05-18 迈普通信技术股份有限公司 Data acquisition method and device
CN113709031B (en) * 2021-08-30 2022-10-21 烽火通信科技股份有限公司 Method and device for restricting transmission and distribution of route
CN115037690A (en) * 2022-06-21 2022-09-09 阿里巴巴(中国)有限公司 Traffic scheduling method and device, electronic equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9369371B2 (en) * 2012-10-05 2016-06-14 Cisco Technologies, Inc. Method and system for path monitoring using segment routing

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9049233B2 (en) * 2012-10-05 2015-06-02 Cisco Technology, Inc. MPLS segment-routing
US9559954B2 (en) * 2013-03-11 2017-01-31 Cisco Technology, Inc. Indexed segment ID
CN105210336B (en) * 2013-05-17 2018-10-26 思科技术公司 Method, equipment and computer-readable medium for LDP/SR interoperabilities
CN104243302B (en) * 2013-06-20 2018-03-16 华为技术有限公司 Business route message processing method, device and network system
US9237078B1 (en) * 2014-06-26 2016-01-12 Cisco Technology, Inc. Path validation in segment routing networks
CN105871722B (en) * 2015-01-19 2020-02-14 中兴通讯股份有限公司 Label structure and label message forwarding method and device
CN106656781B (en) * 2015-11-02 2020-12-11 中兴通讯股份有限公司 Method, device and system for transmitting message

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9369371B2 (en) * 2012-10-05 2016-06-14 Cisco Technologies, Inc. Method and system for path monitoring using segment routing

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Scalable segment routing-a new paradigm for efficient service provider networking using carrier ethernet advances;Sarvesh Bidkar;Ashwin Gumaste;Puneet Ghodasara;Annirudha Kushwah;《IEEE/OSA Journal of Optical Communications and Networking》;20151230;全文 *
基于分段路由的SDN流量工程技术研究;黄建洋;《CNKI》;20170420;全文 *

Also Published As

Publication number Publication date
CN107566272A (en) 2018-01-09

Similar Documents

Publication Publication Date Title
CN107566272B (en) Forwarding table establishing method and data forwarding method
US10581732B2 (en) Target FEC (forwarding equivalence class) stack based FEC query in segment routing environments
CN108737128B (en) Method and device for realizing in-band operation management maintenance IOAM
US9444677B2 (en) Scalable edge node protection using IPv6 segment routing extension header
US11805010B2 (en) Signaling IP path tunnels for traffic engineering
CN108964943B (en) Method and device for realizing IOAM packaging
CN112087386B (en) Message processing method, device and system
CN108111417B (en) Method and device for forwarding MPLS data packet
CN110401599B (en) Data packet processing method and device, storage medium and electronic device
US20230127464A1 (en) Packet forwarding method, apparatus and system, network device and storage medium
US20200153728A1 (en) Multicast Forwarding Method and Related Device
WO2018082652A1 (en) Information transmission method, apparatus and system and apparatus
WO2016131225A1 (en) Message forward processing method, apparatus, controller and routing forward device
EP3364613A2 (en) Method and device for transmitting traffic via specified path
US10110487B1 (en) Signaling priority information for encapsulated packets
WO2018188663A1 (en) Method and device for information notification
WO2020156090A1 (en) Method, device, and system for establishing cross-domain forwarding path
CN112491718A (en) Message header processing method and device, storage medium and electronic device
US20240106751A1 (en) Method and apparatus for processing detnet data packet
US20190394055A1 (en) Bit index explicit replication (bier) penultimate hop popping
CN109561023B (en) Method, device and system for transmitting multicast message
CN108075991B (en) Message forwarding method and device
US11489768B2 (en) Method for creating inter-domain bidirectional tunnel, communication method and device, and storage medium
CN112558504B (en) Method, device and system for forwarding critical path information based on OSPF protocol
CN111901239A (en) Communication method, system, device and storage medium based on virtual network

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