Method for generating label forwarding table, message sending method, device and equipment
By generating a label forwarding table in the first network device and using the address and prefix segment identifier in the packets sent by the second network device, the problems of route oscillation and storage pressure in cross-region communication are solved, and the stability and stability of the network device are improved. Storage efficiency.
Patent Information
- Application Number
- CN202110077241.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-06-29
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2038-06-29
AI Technical Summary
The existing cross-region communication method causes route flapping on network equipment through route introduction, which amplifies the impact of flapping and increases the storage pressure on network equipment.
The first network device obtains the message sent by the second network device carrying the third network device address and prefix segment identifier, and generates a label forwarding table, avoiding the route introduction method and ensuring the independence of the first area and the second area. This reduces the routing information storage requirement of the first network device for the second area.
It improves the stability of network equipment, reduces the storage pressure of network equipment, avoids the impact of route flapping on the first network equipment, and reduces storage pressure.
Smart Images

Figure 00000000_0000
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to a method for generating a label forwarding table, a message sending method, a device and equipment. Background Art
[0002] Segment routing (SR) is a method of forwarding data packets on the network based on the concept of source routing. Segment routing divides the network path into several segments and assigns segment identification (SID) to these segments and forwarding nodes in the network. By arranging the segment identifications of the segments and network nodes in order, a forwarding path can be obtained. Optimal segment routing (SRBE) refers to the optimal forwarding path of segment routing calculated by the shortest path algorithm of the interior gateway protocol (IGP).
[0003] According to the internal gateway protocol, a domain can be divided into multiple areas, each area includes one or more network devices, and the network devices in the area can know the routing information of other network devices in the domain through flooding to achieve communication between network devices in the domain. Communication between areas can be carried out through cross-regional network devices. Currently, common cross-regional communication is achieved by introducing routes in cross-regional network devices.
[0004] However, this route introduction method will not only amplify the impact of route oscillation on network devices, but also increase the storage pressure on network devices in the area where routes are introduced. Summary of the invention
[0005] The embodiments of the present application provide a method, apparatus and device for generating a label forwarding table and a method, apparatus and device for sending a message, which improve the stability of network equipment and reduce the storage pressure of network equipment.
[0006] The embodiment of the present application provides a method for generating a label forwarding table, which is applied to a first network device, and the method includes: first, the first network device obtains a first message sent by a second network device, the first message carries an address of a third network device and a prefix segment identifier of the third network device, the first network device and the second network device belong to a first area, and the third network device belongs to a second area. Secondly, the first network device determines a routing table entry that matches the address of the third network device, and the routing table entry includes the address of the next-hop network device of the first network device. Finally, the first network device generates a label forwarding table based on the prefix segment identifier and the address of the next-hop network device.
[0007] In the embodiment of the present application, the address and prefix segment identifier of the destination network device (i.e., the third network device) of the first network device are sent through the second network device in the same area as the first network device, rather than introduced through routing, so the first area and the second area are relatively independent. When flooding the second area, the first network device will not receive the routing address of the third network device. Therefore, when routing oscillation occurs in the third network device, it will not affect the first network device.
[0008] At the same time, assuming that in addition to the third network device, there are other network devices that do not belong to the first area in the second area, the first network device will not obtain routing information of these devices, so its storage pressure is relatively small.
[0009] Optionally, generating a label forwarding table according to the prefix segment identifier and the address of the next-hop network device includes: first determining the segment routing global block of the next-hop network device according to the address of the next-hop network device, and then generating a label of the next-hop network device in the label forwarding table according to the segment routing global block of the next-hop network device and the prefix segment identifier. Specifically, the label of the next-hop network device can be obtained according to the sum of the initial value of the segment routing global block of the next-hop network device and the prefix segment identifier of the third network device. Of course, in addition to the label of the next-hop network device, the label forwarding table can also include the outbound interface, local label and destination address corresponding to the routing table entry.
[0010] Specifically, if the first network device is an initial network device, its label forwarding table includes the label of the outgoing interface and the next-hop network device, and optionally, may also include a local label and a destination address.
[0011] If the first network device is an intermediate network device, its label forwarding table includes a local label, an outbound interface, and a label of a next-hop network device, and optionally, may also include a destination address.
[0012] Optionally, the method further includes: receiving a second message, the second message being used to indicate that the fourth network device belongs to both the first area and the second area. Then, in response to receiving the second message, the routing table entry is generated, laying a foundation for generating the label forwarding table in the previous text. The routing table entry can be a default routing table entry, which can enable the first network device to automatically match the default routing table entry according to the longest mask matching principle based on the address of the third network device.
[0013] Optionally, the value in the area association bit in the second message is used to indicate that the fourth network device belongs to both the first area and the second area. The second message may be a link status message.
[0014] Depending on whether the destination address, ie, the address of the third network device, is stored in the label forwarding table, the first network device uses different methods to send the third message, and the destination address of the third message is the address of the third network device.
[0015] If the destination address is not stored in the label forwarding table, the method further includes: pre-establishing a correspondence between the routing table entry and the label forwarding table entry. After receiving the third message, the routing table entry is matched according to the address of the third network device, and the label of the next-hop network device in the label forwarding table entry is pushed into the third message according to the correspondence. The third message with the label of the next-hop network device pushed into it is sent to the next-hop network device of the first network device.
[0016] If the destination address is not stored in the label forwarding table, the method further includes: after receiving the third message, directly searching the label forwarding table according to the address of the third network device to obtain the label of the next-hop network device corresponding to the address of the third network device, and then pushing the label of the next-hop network device into the third message, and sending the third message with the label of the next-hop network device pushed into it to the next-hop network device of the first network device.
[0017] Of course, it can be understood that the above two methods do not constitute a limitation on the technical solution of the present application, and those skilled in the art can design them according to actual conditions.
[0018] In addition, optionally, the first message may be a link status message, in which the binding type length value field may carry the address of the third network device and the prefix segment identifier of the third network device.
[0019] Optionally, the first area is a non-backbone area of an operator, and the second area is a backbone area of an operator.
[0020] Correspondingly, an embodiment of the present application also provides a message sending method, which is applied to a second network device, and the method includes: the second network device sends a first message to the first network device, the first message carries an address of a third network device and a prefix segment identifier of the third network device, the first network device and the second network device belong to a first area, and the third network device belongs to a second area. The address of the third network device is used to determine the routing table entry corresponding to the third network device, and the routing table entry includes the address of the next-hop network device of the first network device, and the prefix segment identifier of the third network device and the address of the next-hop network device are used to generate a label forwarding table of the first network device.
[0021] In the embodiment of the present application, the address and prefix segment identifier of the destination network device (i.e., the third network device) of the first network device are sent through the second network device in the same area as the first network device, rather than introduced through routing, so the first area and the second area are relatively independent. When flooding the second area, the first network device will not receive the routing address of the third network device. Therefore, when routing oscillation occurs in the third network device, it will not affect the first network device.
[0022] At the same time, assuming that in addition to the third network device, there are other network devices that do not belong to the first area in the second area, the first network device will not obtain routing information of these devices, so its storage pressure is relatively small.
[0023] Optionally, the second network device also belongs to the second area, and the method further includes: sending a second message to the first network device, the second message is used to indicate that the fourth network device belongs to both the first area and the second area, and the second message is used to generate the routing table entry, laying a foundation for generating the label forwarding table in the previous text. The routing table entry is a default routing table entry, which can enable the first network device to automatically match the default routing table entry according to the longest mask matching principle based on the address of the third network device.
[0024] Optionally, the value of the area association bit in the second message is used to indicate that the fourth network device belongs to both the first area and the second area.
[0025] Optionally, the binding type length value field of the first message carries the address of the third network device and the prefix segment identifier of the third network device.
[0026] Optionally, the first area is a non-backbone area of an operator, and the second area is a backbone area of an operator.
[0027] An embodiment of the present application also provides an apparatus for generating a label forwarding table, which is applied to a first network device, and the apparatus includes: a first acquisition unit, used to acquire a first message sent by a second network device, the first message carries an address of a third network device and a prefix segment identifier of the third network device, the first network device and the second network device belong to a first area, and the third network device belongs to a second area; a routing table entry determination unit, used to determine a routing table entry that matches the address of the third network device, the routing table entry includes the address of a next-hop network device of the first network device; and a label forwarding table generation unit, used to generate a label forwarding table according to the prefix segment identifier and the address of the next-hop network device.
[0028] Optionally, the label forwarding table generating unit is specifically used to:
[0029] Determine the segment routing global block of the next-hop network device according to the address of the next-hop network device;
[0030] A label of the next-hop network device in the label forwarding table is generated according to the segment routing global block of the next-hop network device and the prefix segment identifier.
[0031] Optionally, the device further comprises:
[0032] The routing table entry generating unit is used to receive a second message, where the second message is used to indicate that the fourth network device belongs to both the first area and the second area; in response to receiving the second message, the routing table entry is generated, and the routing table entry is a default routing table entry.
[0033] Optionally, the device further comprises:
[0034] A corresponding relationship establishing unit, used to establish a corresponding relationship between the routing table entry and the label forwarding table entry;
[0035] A third message receiving unit, used to receive a third message, wherein the destination address of the third message is the address of the third network device;
[0036] A matching unit is used to match the routing table entry according to the address of the third network device, and push the label of the next-hop network device in the label forwarding table entry into the third message according to the corresponding relationship.
[0037] The first sending unit is configured to send the third message with the label of the next-hop network device pushed into it to the next-hop network device of the first network device.
[0038] Optionally, the label forwarding table includes the address of the third network device, and the apparatus further includes:
[0039] A third message receiving unit, used to receive a third message, wherein the destination address of the third message is the address of the third network device;
[0040] A search unit, configured to search the label forwarding table according to the address of the third network device, and obtain a label of a next-hop network device corresponding to the address of the third network device;
[0041] The second sending unit is configured to push the label of the next-hop network device into the third message, and send the third message with the label of the next-hop network device pushed into it to the next-hop network device of the first network device.
[0042] The embodiment of the present application further provides a message sending device, which is applied to a second network device, and the device includes:
[0043] A first message sending unit is used to send a first message to a first network device, wherein the first message carries an address of a third network device and a prefix segment identifier of the third network device, the first network device and the second network device belong to a first area, and the third network device belongs to a second area, the address of the third network device is used to determine a routing table entry corresponding to the third network device, the routing table entry includes an address of a next-hop network device of the first network device, and the prefix segment identifier of the third network device and the address of the next-hop network device are used to generate a label forwarding table of the first network device.
[0044] Optionally, the value of the area association bit in the second message is used to indicate that the fourth network device belongs to both the first area and the second area.
[0045] Optionally, the binding type length value field of the first message carries the address of the third network device and the prefix segment identifier of the third network device.
[0046] Optionally, the first area is a non-backbone area of an operator, and the second area is a backbone area of an operator.
[0047] An embodiment of the present application also provides a network device, which is a first network device. The network device includes a memory and a processor. The memory is used to store instructions; the processor is used to execute the instructions in the memory to execute a method for generating a label forwarding table.
[0048] An embodiment of the present application also provides a network device, which is a second network device. The network device includes a memory and a processor. The memory is used to store instructions; the processor is used to execute the instructions in the memory to execute the above message sending method.
[0049] The embodiment of the present application also provides a computer-readable storage medium, including instructions, which, when executed on a computer, enable the computer to execute the above method for generating a label forwarding table.
[0050] The embodiment of the present application also provides a computer-readable storage medium, including instructions, which, when executed on a computer, enables the computer to execute the above message sending method.
[0051] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the above method for generating a label forwarding table.
[0052] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the above message sending method. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 A schematic diagram of the structure of a message forwarding system provided in an embodiment of the present application;
[0054] Figure 2 A flowchart of a method for generating a label forwarding table provided in an embodiment of the present application;
[0055] Figure 3 A flowchart of a message sending method provided in an embodiment of the present application;
[0056] Figure 4 A topological diagram of the IS-IS protocol segment routing provided in an embodiment of the present application;
[0057] Figure 5 A structural block diagram of a device for generating a label forwarding table provided in an embodiment of the present application;
[0058] Figure 6 This is a hardware architecture diagram of a network device mentioned in an embodiment of the present application;
[0059] Figure 7 This is another hardware architecture diagram of the network device mentioned in the embodiment of this application. DETAILED DESCRIPTION
[0060] Before introducing the technical solution of the present application, the application scenarios of the present application, namely SRBE and IGP, are first introduced.
[0061] Regarding SRBE, as mentioned above, SRBE is the optimal forwarding path for segment routing obtained by using the shortest path algorithm of IGP, also called a label forwarding path or SRBE tunnel. The label forwarding path includes a starting network device, an intermediate network device, and a destination network device. The message from the starting network device reaches the destination network device via the forwarding of the intermediate network device. SRBE guides the forwarding of messages by a destination address, where the destination address refers to the address of the destination network device, and the destination address can also be called a prefix. In order to achieve this forwarding, the starting network device needs to know the routing information of the destination network device in advance, including the address of the destination network device and the prefix segment identifier (prefix SID). In the label forwarding path, the intermediate network device between the starting network device and the destination network device realizes the delivery of messages by performing label exchange.
[0062] Regarding IGP, as mentioned above, a domain can be divided into multiple areas, and multiple areas can include, for example, an operator backbone area and at least one operator non-backbone area. Each area includes one or more network devices, and the network devices in the area can know the routing information of other network devices in the domain through flooding to achieve communication between network devices in the domain. Communication between areas can be carried out through cross-regional network devices. Currently, common cross-regional communication is achieved by introducing routes in cross-regional network devices.
[0063] For example, area A includes network device 1 and network device 2, and area B includes network device 2 and network device 3, that is, network device 2 is a cross-regional network device, which can communicate with network device 1 in area A and network device 2 in area B. Through intra-domain flooding, network device 2 and network device 1 can know each other's routing information, and network device 2 and network device 3 can also know each other's routing information. However, network device 1 cannot communicate directly with network device 3 because network device 1 does not have the routing information of network device 3. By introducing routes on network device 2, the routes of area 2 are introduced into area 1, so that when area 2 is flooded, not only network device 2 can receive the routing information of network device 3, but network device 1 can also receive the routing information of network device 3. Therefore, network device 1 can access network device 3.
[0064] However, this method of introducing routes will not only cause the spread of route oscillation, but also cause a problem of greater storage pressure on the network devices to which the routes are introduced.
[0065] For example, if network device 3 experiences routing oscillation, network device 1 will also be affected by routing oscillation due to routing introduction. In addition, if area 2 includes other network devices besides network devices 2 and 3, even if network device 1 does not communicate with these network devices, it needs to store routing information of these network devices when area 2 is flooded, which will cause greater storage pressure on network device 1.
[0066] In order to overcome the above technical problems, the embodiments of the present application provide a method, device and equipment for generating a label forwarding table, and a method, device and equipment for sending a message.
[0067] The following first takes a message forwarding system as an example to introduce the application scenario and technical solution of this application.
[0068] See also Figure 1, which is a schematic diagram of the structure of a message forwarding system. In the figure, the message forwarding system includes a first network device 101, a second network device 102, a third network device 103 and a fourth network device 104.
[0069] The first network device 101, the second network device 102 and the fourth network device 104 belong to the first area, and the third network device 103 and the fourth network device 104 belong to the second area. That is, the fourth network device 104 is a cross-area network device.
[0070] In the embodiment of the present application, the types of the first network device 101, the second network device 102, the third network device 103 and the fourth network device 104 can be a router, a switch or a forwarding device under a software defined network (SDN) architecture, etc., and the present application does not make specific limitations.
[0071] In the embodiment of the present application, the first network device 101 needs to access the third network device 103, so the first network device 101 needs to obtain the routing information of the third network device 103, that is, the address and prefix segment identifier of the third network device 103. In the embodiment of the present application, the second network device 102 is configured with the address and prefix segment identifier of the third network device 103, and the second network device 102 sends a first message to the first network device 101, and the first message carries the address and prefix segment identifier of the third network device 103. After the first network device 101 receives the first message, it parses and obtains the address and prefix segment identifier of the third network device 103. Then, the first network device 101 can search the routing table according to the address of the third network device 103, and find the routing table item in the routing table that matches the address of the third network device 103. The routing table item is pre-generated, which includes the address of the next-hop network device. Finally, the first network device 101 can generate the label forwarding table of the first network device 101 according to the address of the next-hop network device and the prefix segment identifier of the third network device 103.
[0072] Specifically, the label forwarding table of the first network device 101 may include the following information: a local label (if the first network device 101 is an initial network device, there may be no local label in the label forwarding table), an outbound interface, and a label of the next-hop network device. In an embodiment of the present application, the local label is generated based on the segment routing global block (SRGB) of the first network device 101 and the prefix segment identifier of the third network device 103; the outbound interface is the outbound interface corresponding to the routing table entry; the label of the next-hop network device is generated based on the segment routing global block of the next-hop network device and the prefix segment identifier of the third network device 103. SRGB refers to a multi-protocol label switching (MPLS) range reserved for SR specified by the user.
[0073] When the first network device 101 receives a third message sent by other network devices, and the destination address of the third message is the address of the third network device 103 , it is necessary to send the third message to the third network device 103 .
[0074] Since the first network device 101 is the initial network device of the third message, there are two message sending methods depending on whether there is a destination address, ie, the address of the third network device 103 , in the label forwarding table.
[0075] Assuming that there is no destination address in the label forwarding table, the first network device 101 can establish a corresponding relationship between the routing table item and the label forwarding table after generating the label forwarding table. Then, after receiving the third message, the first network device 101 can match the routing table item according to the address of the third network device 103, and push the label of the next-hop network device in the label forwarding table item into the third message according to the corresponding relationship. Then, the third message with the label of the next-hop network device pushed into it is sent to the next-hop network device of the first network device 101.
[0076] Assuming that the address of the third network device 103 is stored in the label forwarding table, the first network device 101 can directly search the label of the next-hop network device corresponding to the address of the third network device 103 in the label forwarding table according to the address of the third network device 103, push the label of the next-hop network device into the third message, and send the third message with the label of the next-hop network device pushed into it to the next-hop network device of the first network device 101.
[0077] Of course, the above two methods do not constitute a limitation on the technical solution of the present application, and those skilled in the art can design them according to actual conditions.
[0078] Assume that the next-hop network device of the first network device 101 is the fourth network device 104. Since the fourth network device 104 and the third network device 103 belong to the same area, the fourth network device 104 can obtain the address and prefix segment identifier of the third network device 103 in advance through flooding in the second area. Therefore, the label forwarding table of the fourth network device 104 can be generated, which may include the destination address (i.e., the address of the third network device 103), the local label (generated according to the segment routing global block of the fourth network device 104 and the prefix segment identifier of the third network device 103), the outgoing interface (the outgoing interface corresponding to the routing table entry of the next-hop network device) and the outgoing label (generated according to the segment routing global block of the next-hop network device and the prefix segment identifier of the third network device 103).
[0079] After receiving the third message sent by the first network device 101, the fourth network device 104 searches the label forwarding table of the fourth network device 104 according to the label carried in the third message, that is, the local label of the fourth network device 104, obtains the label of the next-hop network device of the fourth network device 104, and then replaces the label carried in the third message with the label of the next-hop network device of the fourth network device 104, and sends the third message after the label replacement to the next-hop network device through the outbound interface corresponding to the routing table entry of the next-hop network device.
[0080] Assume that the next-hop network device of the fourth network device 104 is the third network device 103. Since the third network device 103 is the destination address, the destination address of its corresponding label forwarding table is its own address. The local label is obtained according to the segment routing global block of the third network device 103 and the prefix segment identifier of the third network device 103. The outgoing interface is the local interface and the outgoing label is none.
[0081] When the third network device 103 receives the third message forwarded by the fourth network device 104, the third network device 103 searches the label forwarding table of the third network device 103 according to the label carried in the third message, that is, the label of the third network device 103, and finds that the outgoing label is none, that is, it knows that the destination node of the third message is itself, so it stops forwarding the third message and performs corresponding processing.
[0082] During the entire third message forwarding process, the address and prefix segment identifier of the third network device 103 are forwarded to the first network device 101 by the second network device 102 through the first message, rather than introduced through routing, so the relative independence of the first area and the second area is not destroyed. When the second area is flooded, the first network device 101 in the first area cannot receive the routing information of the third network device 103 in the second area. Therefore, when the third network device 103 has routing oscillation, it will not affect the first network device 101. At the same time, when there are other network devices in the second area in addition to the third network device 103 and the fourth network device 104, the first network device 101 does not need to store the routing information of these network devices when flooding in the second area, which reduces the storage pressure of the first network device 101.
[0083] See also Figure 2 , which is a flow chart of a method for generating a label transfer table provided in an embodiment of the present application.
[0084] The method for generating a label forwarding table provided in the embodiment of the present application can be applied to a first network device, and specifically includes the following steps:
[0085] S101: Acquire a first message sent by a second network device, where the first message carries an address of a third network device and a prefix segment identifier of the third network device.
[0086] In the embodiment of the present application, the first network device, the second network device, the third network device and the fourth network device to be mentioned below may be routers or switches, etc., and the present application does not make specific limitations.
[0087] The first network device and the second network device belong to the first area, and the third network device belongs to the second area.
[0088] Optionally, the first area may be a non-backbone area of the operator, and the second area may be a backbone area of the operator. Different internal gateway protocols have different specific names for the backbone area of the operator and the non-backbone area of the operator. Taking the intermediate system to intermediate system (IS-IS) protocol as an example, the non-backbone area of the operator is called the L1 area, and the backbone area of the operator is called the L2 area. Taking the open shortest path first (OSPF) protocol as an example, the backbone area of the operator is called area 0, and the non-backbone area of the operator is called area N (N is a positive integer, depending on the number of non-backbone areas of the operator).
[0089] In an embodiment of the present application, the second network device is pre-configured with the address of the third network device and the prefix segment identifier of the third network device, and then sends the address of the third network device and the prefix segment identifier of the third network device to the first network device, wherein the third network device is the target network device of the first network device. After the first network device receives the first message sent by the second network device, it parses the message to obtain the address of the third network device and the prefix segment identifier of the third network device. The address of the third network device can be an Internet protocol (IP) address, a medium access control (MAC) address, etc.
[0090] Optionally, the second network device can be configured as a mapping server so that the first message can be sent. It should be noted that the second network device can be any device in the first area, and can not only be a device independent of the first network device and the fourth network device mentioned below, but also can be the first network device or the fourth network device mentioned below itself.
[0091] Optionally, the first message may be a link state message. A link state message refers to a message that can report node and link status. Link state messages of different IGP protocols are called differently. For the IS-IS protocol, the link state message is called an LSP (link-state pack); for the OSPF protocol, the link state message is called an LSA (link-state advertisement). Specifically, the address of the third network device and the prefix segment identifier of the third network device may be carried in a binding type length value (binding tlv) field in the link state message.
[0092] Specifically, the FEC Prefix field in the binding tlv may carry the address of the third network device, and the SubTLVs field in the binding tlv may carry the prefix segment identifier of the third network device. More specifically, the prefix segment identifier of the third network device may be carried in the SID / Index / Label field of the SubTLVs field.
[0093] Because in the embodiment of the present application, the address and prefix segment identifier of the destination network device (i.e., the third network device) of the first network device are sent by the second network device in the same area as the first network device, rather than introduced by routing, the first area and the second area are relatively independent. When flooding the second area, the first network device will not receive the routing address of the third network device. Therefore, when routing oscillation occurs in the third network device, it will not affect the first network device.
[0094] At the same time, assuming that in addition to the third network device, there are other network devices that do not belong to the first area in the second area, the first network device will not obtain routing information of these devices, so its storage pressure is relatively small.
[0095] S102: Determine a routing table entry that matches the address of the third network device.
[0096] After the first network device obtains the address of the third network device, it can search the routing table to determine the routing table entry corresponding to the third network device, where the routing table entry includes the address of the next-hop network device of the first network device.
[0097] Since the routing table entry corresponding to the third network device is not generated by flooding, it is necessary to generate the corresponding routing table entry in advance to match the address of the third network device. The routing table entry can be generated by configuration or triggered by an event, for example, when the second message sent by the fourth network device is received, and the second message is used to indicate that the fourth network device belongs to both the first area and the second area. In other words, the fourth network device is a cross-regional network device, which can communicate with both the first network device and the third network device.
[0098] The fourth network device can set a value in the area-associated bit (ATT bit) in the message flooded to the network devices in the first area. The value can be 1 or other values, which can be determined by the technicians in this field. In this way, the second message obtained by the first network device carries the area-associated bit. It should be noted that the second message and the message sent by the fourth network device may be the same message or different messages. When the fourth network device is a neighbor node of the first network device, the second message is the message sent by the fourth network device; when the fourth network device and the first network device are not neighbor nodes, the second message is sent by the neighbor node of the first network device, and is not the same message as the message sent by the fourth network device.
[0099] After receiving the second message, the first network device parses the message to obtain the value in the area-related bit, and then generates a routing table entry based on the value in the area-related bit.
[0100] The routing table entry may include a network device address corresponding to the third network device and an address of a next-hop network device.
[0101] When configuring or generating a routing table entry, the first network device may not yet know which device is the destination network device, so it is impossible to generate the address of the third network device. However, an address different from the network device address obtained by flooding, such as a default routing address, can be generated as the address corresponding to the routing table entry. Normally, the default routing address is 0.0.0.0. After obtaining the address of the third network device, the default routing address can be determined as the network device address that matches the third network device based on the longest mask match principle, and then the routing table entry corresponding to the network device is determined to be the routing table entry. The entry containing the default routing address is called the default routing table entry.
[0102] The next hop network device in the routing table entry is the network device that directly sends the second message to the first network device, that is, the neighbor node of the first network device. Because the second message also carries the address of the neighbor node, the address of the next hop network device is the address of the neighbor node.
[0103] For example, the fourth network device first sends a link state message with a region association bit of 1 to the fifth network device, and then the fifth network device sends a second message with a region association bit of 1 to the first network device. At this time, the second message carries the address of the fifth network device, and the address of the next hop network device in the routing table entry is the address of the fifth network device. Among them, the fifth network device also belongs to the first area.
[0104] S103: Generate a label forwarding table according to the prefix segment identifier and the address of the next-hop network device, wherein the label of the next-hop network device is generated according to the address of the next-hop network device in the routing table entry.
[0105] Optionally, the label forwarding table of the first network device includes the following information: destination address, local label, outgoing interface and label of the next-hop network device. In an embodiment of the present application, the destination address in the label forwarding table of the first network device is the address of the third network device. The local label is generated based on the segment routing global block of the first network device and the prefix segment identifier of the third network device. For example, the local label can be obtained based on the initial value of the segment routing global block and the sum of the prefix segment identifier of the third network device. The outgoing interface is the outgoing interface corresponding to the routing table entry. The label of the next-hop network device is generated based on the segment routing global block of the next-hop network device and the prefix segment identifier of the third network device. For example, the label of the next-hop network device can be obtained based on the initial value of the segment routing global block of the next-hop network device and the sum of the prefix segment identifier of the third network device.
[0106] After the first network device generates the label forwarding table, a third message may be sent, and the destination address of the third message is the address of the third network device. The specific sending method can refer to the description of the message sending system above, which will not be repeated here.
[0107] See also Figure 3 , which is a flow chart of a message sending method provided in an embodiment of the present application.
[0108] The message sending method provided in the embodiment of the present application can be applied to the second network device, and specifically includes the following steps:
[0109] S201: Send a first message to a first network device, where the first message carries an address of a third network device and a prefix segment identifier of the third network device.
[0110] In the embodiment of the present application, the first network device and the second network device belong to the first area, and the third network device belongs to the second area. Optionally, the first area is a non-backbone area of the operator, and the second area is a backbone area of the operator.
[0111] The address of the third network device is used to determine the routing table entry corresponding to the third network device, the routing table entry includes the address of the next-hop network device of the first network device, and the prefix segment identifier of the third network device and the address of the next-hop network device are used to generate a label forwarding table of the first network device.
[0112] Optionally, the binding tlv field in the first message carries the address of the third network device and the prefix segment identifier of the third network device.
[0113] Since the contents of the above steps are basically similar to those in the previous embodiment, they will not be described again here.
[0114] As mentioned above, the second network device may be the fourth network device itself, that is, a cross-regional network device, which belongs not only to the first region but also to the second region. In this case, optionally, the message sending method provided in the embodiment of the present application may also include the following steps:
[0115] S202: Send a second message to the first network device, where the second message is used to indicate that the second network device belongs to both the first area and the second area, and the second message is used to generate a routing table entry, where the routing table entry is a default routing table entry.
[0116] Optionally, the value of the area association bit in the second message is used to indicate that the second network device belongs to both the first area and the second area.
[0117] Regarding this step, please refer to the above description about the fourth network device, which will not be repeated here.
[0118] The following uses the IS-IS protocol as an example to introduce the technical solution of the present application.
[0119] See also Figure 4 , which is a topological diagram of the IS-IS protocol segment routing. In the figure, the L1 area includes network devices RTA, RTD, RTB and RTE, and the L2 area includes network devices RTC, RTF, RTB and RTE. That is to say, network devices RTB and RTE can communicate with network devices RTC and RTF in the L2 area, and can also communicate with network devices RTA and RTD in the L1 area, and are cross-regional network devices. The above-mentioned network devices RTA to RTF are all network devices with segment routing capabilities.
[0120] Based on the IS-IS protocol, flooding is performed in the L1 area, and each network device in the L1 area can know the routing information of other network devices in the area. Flooding is performed in the L2 area, and each network device in the L2 area can also know the routing information of other network devices in the area.
[0121] For example Figure 4 In the L1 area, any network device among network device RTA, network device RTB, network device RTD and network device RTE can know the routing information of other network devices in the area. In the L2 area, any network device among network device RTB, network device RTC, network device RTE and network device RTF can know the routing information of other network devices in the area.
[0122] However, the difference between the operator's non-backbone area and the operator's backbone area is that the operator's backbone area network equipment can obtain the routing information of the operator's backbone area network equipment through flooding of cross-regional network equipment, while the operator's non-backbone area network equipment cannot obtain the routing information of the operator's backbone area network equipment stored in the cross-regional network equipment through flooding.
[0123] For example, Figure 4 In the example, network devices RTB and RTE can obtain the routing information of network devices RTA and RTD through flooding in the L1 domain, and network devices RTC and RTF can obtain the routing information of network devices RTA and RTD stored in network devices RTB or RTE through flooding in the L2 domain, so network devices RTC and RTF can actively initiate access to network devices RTA or RTD. However, network devices RTA and RTD cannot obtain the routing information of network devices RTC and RTF through flooding.
[0124] Assume that the starting network device is network device RTA and the target network device is network device RTC. Then, any one of network device RTB, network device RTE and network device RTD can be configured as a mapping server, and the address 3.3.3.3 and prefix segment identifier 3 of network device RTC are configured therein, and then a first LSP message is generated, and the address 3.3.3.3 and prefix segment identifier 3 of network device RTC are carried in the binding tlv field of the first LSP message, and then flooded in the non-backbone area of the operator, so that network device RTA can receive the first LSP message.
[0125] After receiving the first LSP message, network device RTA searches for its own SRGB initial value. Since the SRGB range of network device RTA is 100-200, the SRGB initial value of network device RTA is 100. After finding the SRGB initial value, the SRGB initial value is added to the prefix segment identifier 3 of network device RTC to obtain the local label 103 corresponding to the address 3.3.3.3.
[0126] Since the cross-regional network devices are network device RTB and network device RTE, these two network devices can publish LSP messages carrying the ATT bit in L1 by flooding. Since network device RTA is connected to network device RTB and network device RTD respectively, and network device RTD is connected to network device RTE, when network device RTA receives the second LSP message carrying the ATT bit sent by network device RTB and the third LSP message carrying the ATT bit sent by network device RTD, it is calculated according to the shortest path algorithm that the closest cross-regional network device to network device RTA is RTB, so the next hop network device is determined to be network device RTB, and the default route address 0.0.0.0 of the default route table entry is generated according to the second LSP message, and the outbound interface points to network device RTB. Among them, the value of the ATT bit in the second LSP message can be the same as the value of the ATT bit in the third LSP message.
[0127] The routing table is searched according to the address of the network device RTC, and the default routing table entry is matched according to the longest mask matching principle. The default routing address and the next-hop network device RTB are found, and the SRGB range 200-300 of the network device RTB obtained in advance through intra-domain flooding is searched. The next-hop network device outgoing label 203 is generated according to the SRGB initial value of the network device RTB and the prefix segment identifier 3 of the network device RTC.
[0128] Therefore, the label forwarding table entry of the network device RTA includes the following information:
[0129] Destination address: 3.3.3.3; local label: 103; outbound interface: the outbound interface corresponding to the default routing address; next-hop network device outbound label: 203.
[0130] Since the network device RTB and the network device RTC are both located in the L2 area, the network device RTB can obtain the address and prefix segment identifier of the network device RTC and generate a label forwarding table entry.
[0131] The label forwarding table entries of the network device RTB include the following information:
[0132] Destination address: 3.3.3.3; local label: 203; outbound interface: points to the outbound interface of network device RTC; next-hop network device outbound label: 303 (SRGB initial value of network device RTC 300+3).
[0133] The label forwarding table entry of the network device RTC includes the following information:
[0134] Destination address: 3.3.3.3; local label: 303; outgoing interface: local interface; next-hop network device outgoing label: none.
[0135] When network device RTA needs to send the third message to network device RTC, it first searches the label forwarding table according to the destination address 3.3.3.3, finds the corresponding output interface and label 203 of the next-hop network device, pushes label 203 of the next-hop network device into the third message, and sends the third message to network device RTB according to the output interface corresponding to the default route 0.0.0.0.
[0136] After network device RTB receives the third message carrying outgoing label 203, it searches its own label forwarding table, obtains the outgoing interface corresponding to local label 203 and label 303 of the next-hop network device, performs label exchange, that is, the third message carries outgoing label 303, and sends the third message to network device RTC from the outgoing interface corresponding to the address of the next-hop network device.
[0137] After receiving the third message carrying the outgoing label 303, the network device RTC searches its own label forwarding table and obtains that the outgoing label is none, that is, confirms that the destination network device of the third message is itself, thereby completing the forwarding of the third message.
[0138] In general, the entire process does not change the relationship between the L1 area and the L2 area. When the network device RTC or the network device RTF in the L2 area oscillates, it will not affect the network device RTA and the network device RTD in the L1 area, thus ensuring the stability of the L1 area. At the same time, the network device RTA does not need to store the routing information of the network device RTF, and the network device RTD does not need to store the routing information of the network devices RTC and RTF, thus reducing the storage pressure of the network devices RTA and RTD.
[0139] See also Figure 5 , which is a structural block diagram of a device for generating a label transfer table provided in an embodiment of the present application.
[0140] The device for generating a label forwarding table provided in the embodiment of the present application can be applied to perform Figure 2 The first network device of the method for generating a label forwarding table shown specifically includes:
[0141] A first acquisition unit 201 is configured to acquire a first message sent by a second network device, the first message carrying an address of a third network device and a prefix segment identifier of the third network device, the first network device and the second network device belong to a first area, and the third network device belongs to a second area;
[0142] A routing table entry determining unit 202, configured to determine a routing table entry matching the address of the third network device, wherein the routing table entry includes the address of the next hop network device of the first network device;
[0143] The label forwarding table generating unit 203 is used to generate a label forwarding table according to the prefix segment identifier and the address of the next hop network device.
[0144] Optionally, the label forwarding table generation unit is specifically used to:
[0145] Determine the segment routing global block of the next hop network device according to the address of the next hop network device;
[0146] Generate the label of the next-hop network device in the label forwarding table based on the segment routing global block and prefix segment identifier of the next-hop network device
[0147] Optionally, the device further comprises:
[0148] The routing table entry generating unit is used to receive a second message, where the second message is used to indicate that the fourth network device belongs to both the first area and the second area; in response to receiving the second message, a routing table entry is generated, where the routing table entry is a default routing table entry.
[0149] Optionally, the device further comprises:
[0150] A corresponding relationship establishing unit, used to establish a corresponding relationship between a routing table entry and a label forwarding table entry;
[0151] A third message receiving unit, used to receive a third message, the destination address of the third message is the address of the third network device;
[0152] The matching unit is used to match the routing table entry according to the address of the third network device, and push the label of the next-hop network device in the label forwarding table entry into the third message according to the corresponding relationship.
[0153] The first sending unit is used to send the third message with the label of the next-hop network device pushed into it to the next-hop network device of the first network device.
[0154] Optionally, the label forwarding table includes an address of a third network device, and the apparatus further includes:
[0155] A third message receiving unit, used to receive a third message, the destination address of the third message is the address of a third network device;
[0156] A search unit, configured to search the label forwarding table according to the address of the third network device, and obtain a label of a next-hop network device corresponding to the address of the third network device;
[0157] The second sending unit is used to push the label of the next-hop network device into the third message, and send the third message with the label of the next-hop network device pushed into it to the next-hop network device of the first network device.
[0158] See also Figure 6 , which is a structural block diagram of a message sending device provided in an embodiment of the present application.
[0159] The message sending device provided in the embodiment of the present application is used to execute Figure 3 The second network device of the message sending method shown includes:
[0160] A first message sending unit is used to send a first message to a first network device, where the first message carries an address of a third network device and a prefix segment identifier of the third network device. The first network device and the second network device belong to a first area, and the third network device belongs to a second area. The address of the third network device is used to determine a routing table entry corresponding to the third network device, where the routing table entry includes an address of a next-hop network device of the first network device, and the prefix segment identifier of the third network device and the address of the next-hop network device are used to generate a label forwarding table for the first network device.
[0161] Optionally, the value of the area association bit in the second message is used to indicate that the second network device belongs to both the first area and the second area.
[0162] Optionally, the binding type length value field of the first message carries the address of the third network device and the prefix segment identifier of the third network device.
[0163] Optionally, the first area is a non-backbone area of the operator, and the second area is a backbone area of the operator.
[0164] An embodiment of the present application also provides a network device, which is a second network device. The network device includes a memory and a processor. The memory is used to store instructions; the processor is used to execute the instructions in the memory to execute the above message sending method.
[0165] See also Figure 6 , this figure is one of the hardware architecture diagrams of the network devices (first network device to fifth network device) mentioned in the embodiments of the present application.
[0166] The network device may include a main control board 30 and an interface board 31. The main control board 30 includes a processor 300 and a memory 301, which are connected to each other. The interface board 31 includes a processor 311, a memory 312 and a transceiver 313, and the processor 311 is connected to the memory 312 and the transceiver 313. The interface board 31 is coupled to the main control board 30.
[0167] The transceiver 313 is mainly used for sending and receiving messages. The memory 312 of the interface board 31 usually stores a label forwarding table and a routing table, and the processor 311 is usually used to obtain the source or destination of the message by searching the routing table and the label forwarding table.
[0168] The processor 300 in the main control board 30 is used to call the application program stored in the memory 301 to process the received message according to the source of the message, or to generate a new message.
[0169] For the first network device, its interface board 31 is used to obtain the first message sent by the second network device through the transceiver 313, and find the routing table item matching the address of the third network device according to the routing table stored in the memory 312, and then send the routing table item to the processor 300 of the main control board 30. The processor 300 is used to generate a label forwarding table according to the prefix segment identifier and the address of the next-hop network device, and then store the label forwarding table item in the memory 312.
[0170] For the second network device, its main control board 30 can be used to configure the information that needs to be carried in the first message, and send the first message through the interface board 31 .
[0171] See also Figure 7 , this figure is another hardware architecture diagram of the network devices (first network device to fifth network device) mentioned in the embodiments of the present application.
[0172] The network device may include a transceiver 401, a processor 402, and a memory 403. The transceiver 401, the processor 402, and the memory 403 are connected on a bus.
[0173] The processor 300, processor 311 and processor 402 may be, for example, a central processing unit (CPU), a general processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present application. The processor may also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0174] The above-mentioned memory 301, memory 312 and memory 403 can be random-access memory (RAM), flash memory, read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), register, hard disk, mobile hard disk, CD-ROM or any other form of storage medium known to those skilled in the art.
[0175] The transceiver 313 and the transceiver 401 may be, for example, interface cards, and may be Ethernet interfaces or asynchronous transfer mode (ATM) interfaces.
[0176] The embodiment of the present application also provides a computer-readable storage medium, including instructions, which, when executed on a computer, enable the computer to execute the above method for generating a label forwarding table.
[0177] The embodiment of the present application also provides a computer-readable storage medium, including instructions, which, when executed on a computer, enables the computer to execute the above message sending method.
[0178] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the above method for generating a label forwarding table.
[0179] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the above message sending method.
[0180] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0181] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0182] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0183] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0184] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0185] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0186] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for generating a label forwarding table, characterized in that: Applied to a first network device, the method comprises: Obtain a first message sent by a second network device, where the first message carries an address of a third network device and a prefix segment identifier of the third network device, the first network device and the second network device belong to a first area, the third network device belongs to a second area, the first message is an intermediate system to intermediate system IS-IS link state message LSP or an open shortest path first OSPF link state advertisement LSA, the first area is a non-backbone area of an operator, and the second area is a backbone area of an operator; Determine a routing table entry that matches the address of the third network device, wherein the routing table entry includes the address of a next-hop network device of the first network device; Generate a label forwarding table according to the prefix segment identifier and the address of the next-hop network device; The destination address in the label forwarding table is the address of the third network device; the label forwarding table includes the label of the next-hop network device, and the label of the next-hop network device is obtained by the sum of the segment routing global block initial value of the next-hop network device and the prefix segment identifier of the third network device.
2. The method according to claim 1, characterized in that: The generating of the label forwarding table according to the prefix segment identifier and the address of the next hop network device includes: Determine the segment routing global block of the next-hop network device according to the address of the next-hop network device; A label of the next-hop network device in the label forwarding table is generated according to the segment routing global block of the next-hop network device and the prefix segment identifier.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: receiving a second message, wherein the second message is used to indicate that the fourth network device belongs to both the first area and the second area; In response to receiving the second message, the routing table entry is generated, and the routing table entry is a default routing table entry.
4. The method according to claim 3, characterized in that The value in the area-associated bit in the second message is used to indicate that the fourth network device belongs to both the first area and the second area.
5. The method according to claim 1 or 2, characterized in that: The method further comprises: Establishing a corresponding relationship between the routing table entry and the label forwarding table entry; receiving a third message, wherein the destination address of the third message is the address of the third network device; Matching the routing table entry according to the address of the third network device, and pushing the label of the next-hop network device in the label forwarding table entry into the third message according to the corresponding relationship; The third message with the label of the next-hop network device pushed into it is sent to the next-hop network device of the first network device.
6. The method according to claim 1 or 2, characterized in that: The label forwarding table further includes the address of the third network device, and the method further includes: receiving a third message, wherein the destination address of the third message is the address of the third network device; Search the label forwarding table according to the address of the third network device to obtain the label of the next-hop network device corresponding to the address of the third network device; The label of the next-hop network device is pushed into the third message, and the third message with the label of the next-hop network device pushed into it is sent to the next-hop network device of the first network device.
7. The method according to claim 1 or 2, characterized in that: The binding type length value field of the first message carries the address of the third network device and the prefix segment identifier of the third network device.
8. A message sending method, characterized in that: Applied to the second network device, the method comprises: Sending a first message to a first network device, where the first message is an intermediate system to intermediate system IS-IS link state message LSP or an open shortest path first OSPF link state advertisement LSA, and the first message carries an address of a third network device and a prefix segment identifier of the third network device, the first network device and the second network device belong to a first area, and the third network device belongs to a second area, the address of the third network device is used to determine a routing table entry corresponding to the third network device, the routing table entry includes an address of a next-hop network device of the first network device, and the prefix segment identifier of the third network device and the address of the next-hop network device are used to generate a label forwarding table of the first network device, the first area is a non-backbone area of an operator, and the second area is a backbone area of an operator; The destination address in the label forwarding table is the address of the third network device; the label forwarding table includes the label of the next-hop network device, and the label of the next-hop network device is obtained by the sum of the segment routing global block initial value of the next-hop network device and the prefix segment identifier of the third network device.
9. The method according to claim 8, characterized in that The second network device also belongs to a second area, and the method further includes: A second message is sent to the first network device, where the second message is used to indicate that the second network device belongs to both the first area and the second area, and the second message is used to generate the routing table entry, where the routing table entry is a default routing table entry.
10. The method according to claim 9, characterized in that The value of the area-associated bit in the second message is used to indicate that the fourth network device belongs to both the first area and the second area.
11. The method according to any one of claims 8 to 10, characterized in that: The binding type length value field of the first message carries the address of the third network device and the prefix segment identifier of the third network device.
12. A device for generating a label forwarding table, characterized in that: Applied to a first network device, the apparatus comprises: A first acquisition unit is used to acquire a first message sent by a second network device, wherein the first message carries an address of a third network device and a prefix segment identifier of the third network device, the first network device and the second network device belong to a first area, the third network device belongs to a second area, the first message is an intermediate system to intermediate system IS-IS link state message LSP or an open shortest path first OSPF link state advertisement LSA, the first area is a non-backbone area of an operator, and the second area is a backbone area of an operator; a routing table entry determining unit, configured to determine a routing table entry matching the address of the third network device, wherein the routing table entry includes the address of a next-hop network device of the first network device; A label forwarding table generating unit, configured to generate a label forwarding table according to the prefix segment identifier and the address of the next hop network device; The destination address in the label forwarding table is the address of the third network device; the label forwarding table includes the label of the next-hop network device, and the label of the next-hop network device is obtained by the sum of the segment routing global block initial value of the next-hop network device and the prefix segment identifier of the third network device.
13. The device according to claim 12, characterized in that The label forwarding table generating unit is specifically used for: Determine the segment routing global block of the next-hop network device according to the address of the next-hop network device; A label of the next-hop network device in the label forwarding table is generated according to the segment routing global block of the next-hop network device and the prefix segment identifier.
14. The device according to claim 12 or 13, characterized in that The device also includes: The routing table entry generating unit is used to receive a second message, where the second message is used to indicate that the fourth network device belongs to both the first area and the second area; in response to receiving the second message, the routing table entry is generated, and the routing table entry is a default routing table entry.
15. The device according to claim 12 or 13, characterized in that The device also includes: A corresponding relationship establishing unit, used to establish a corresponding relationship between the routing table entry and the label forwarding table entry; A third message receiving unit, configured to receive a third message, wherein the destination address of the third message is the address of the third network device; A matching unit, configured to match the routing table entry according to the address of the third network device, and push the label of the next-hop network device in the label forwarding table entry into the third message according to the corresponding relationship; The first sending unit is configured to send the third message with the label of the next-hop network device pushed into it to the next-hop network device of the first network device.
16. The device according to claim 12 or 13, characterized in that The label forwarding table includes the address of the third network device, and the apparatus further includes: A third message receiving unit, configured to receive a third message, wherein the destination address of the third message is the address of the third network device; A search unit, configured to search the label forwarding table according to the address of the third network device, and obtain a label of a next-hop network device corresponding to the address of the third network device; The second sending unit is configured to push the label of the next-hop network device into the third message, and send the third message with the label of the next-hop network device pushed into it to the next-hop network device of the first network device.
17. A message sending device, characterized in that: Applied to a second network device, the apparatus comprises: A first message sending unit is used to send a first message to a first network device, where the first message is an intermediate system to intermediate system IS-IS link state message LSP or an open shortest path first OSPF link state advertisement LSA, and the first message carries an address of a third network device and a prefix segment identifier of the third network device, the first network device and the second network device belong to a first area, and the third network device belongs to a second area, the address of the third network device is used to determine a routing table entry corresponding to the third network device, the routing table entry includes an address of a next-hop network device of the first network device, the prefix segment identifier of the third network device and the address of the next-hop network device are used to generate a label forwarding table of the first network device, the first area is a non-backbone area of an operator, and the second area is a backbone area of an operator; The destination address in the label forwarding table is the address of the third network device; the label forwarding table includes the label of the next-hop network device, and the label of the next-hop network device is obtained by the sum of the segment routing global block initial value of the next-hop network device and the prefix segment identifier of the third network device.
18. The device according to claim 17, characterized in that The value of the area association bit in the first message is used to indicate that the second network device belongs to both the first area and the second area.
19. The device according to claim 17 or 18, characterized in that The binding type length value field of the first message carries the address of the third network device and the prefix segment identifier of the third network device.
20. The device according to claim 17 or 18, characterized in that The first area is a non-backbone area of an operator, and the second area is a backbone area of an operator.
21. A network device, characterized in that: The network device includes a memory and a processor. The memory is used to store instructions; The processor is used to execute the instructions in the memory and execute the method according to any one of claims 1 to 11.
22. A computer-readable storage medium for storing instructions, which, when executed on a computer, enables the computer to execute the method according to any one of claims 1 to 11.
23. A computer program product comprising instructions, which, when executed on a computer, causes the computer to execute the method according to any one of claims 1 to 11.
