CN114513445A - Method and device for sending message - Google Patents

Method and device for sending message Download PDF

Info

Publication number
CN114513445A
CN114513445A CN202011148963.8A CN202011148963A CN114513445A CN 114513445 A CN114513445 A CN 114513445A CN 202011148963 A CN202011148963 A CN 202011148963A CN 114513445 A CN114513445 A CN 114513445A
Authority
CN
China
Prior art keywords
network device
identifier
indication information
message
tunnel
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.)
Pending
Application number
CN202011148963.8A
Other languages
Chinese (zh)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202011148963.8A priority Critical patent/CN114513445A/en
Publication of CN114513445A publication Critical patent/CN114513445A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/32Flooding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/82Miscellaneous aspects
    • H04L47/825Involving tunnels, e.g. MPLS

Abstract

The application discloses a method and a device for sending a message, relates to the field of communication, and realizes the purpose of using a tunnel to bear flow in a network architecture for deploying tunnels. The specific scheme is as follows: the first network equipment distributes an identifier and indicating information corresponding to the identifier, the identifier is associated with a tunnel between the first network equipment and the second network equipment, and the indicating information is used for indicating that a message is sent to the third network equipment through the tunnel; the first network equipment determines a port according to the identifier and the indication information, wherein the output port is an output port pointing to the tunnel; the first network equipment receives a first message sent to the third network equipment; and the first network equipment forwards the first message to the second network equipment by using the determined output port. Therefore, flow guiding can be realized, and normal and on-demand forwarding of the message on an end-to-end transmission path is ensured.

Description

Method and device for sending message
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for sending a packet.
Background
With the development of network technology, traffic transmitted in an Internet Protocol (IP) network is increasingly larger. When a large amount of service traffic passes through the backbone network during forwarding, congestion of a backbone network link is easily caused, and service packet loss is further caused.
In order to avoid this situation, an operator may select to create a Traffic Engineering (TE) tunnel in a backbone network, and enable a traffic optimization function of the TE tunnel, when a bandwidth utilization rate of a certain link is high, the TE tunnel passing through the link recalculates a path, and the TE tunnel newly calculating the path uses a link with a low bandwidth utilization rate, which may avoid link congestion of the backbone network, thereby avoiding a service packet loss caused by link congestion. As in a multi-protocol label switching (MPLS) network architecture of fig. 1, a TE tunnel is established between an edge device provider (P) 1 and a P3 of a backbone network, an LDP tunnel is established between a provider edge device (PE) 1 and a PE2, a Virtual Private Network (VPN) traffic between a PE1 and a PE2 is carried in a Label Distribution Protocol (LDP) tunnel of a metropolitan area network, and the LDP tunnel is carried in the TE tunnel when passing through the backbone network.
In a SRv6 network based on Segment Routing (SR) technology of internet protocol version 6 (IPv 6), SRv6policy (policy) can be deployed in a backbone network to avoid the problem of packet loss caused by congestion of the backbone network. In the SRv6 network architecture illustrated in FIG. 2, SRv6Policy is deployed between P1 and P3 for traffic optimization. The VPN traffic sent by PE1 to PE2 uses SRv6 Best Effort (BE) bearer in the metro network, SRv6 BE uses SRv6Policy bearer when passing through the backbone network, and after the VPN traffic reaches P3, SRv6Policy forwarding is ended, and the forwarding continues to use SRv6 BE.
Therefore, how to divert the traffic carried by SRv6 BE to SRv6Policy becomes an urgent problem to BE solved.
Disclosure of Invention
The application provides a method and a device for sending a message, which realize that a tunnel is used for bearing flow in a network architecture for deploying the tunnel.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
in a first aspect, a method for sending a packet is provided, where the method may include: the first network equipment distributes an identifier and indicating information corresponding to the identifier, the identifier is associated with a tunnel between the first network equipment and the second network equipment, and the indicating information is used for indicating that a message is sent to the third network equipment through the tunnel; the first network equipment determines a port according to the identifier and the indication information, wherein the output port is an output port pointing to the tunnel; the first network equipment receives a first message sent to the third network equipment; and the first network equipment forwards the first message to the second network equipment by using the determined output port.
According to the method for sending the message, the first network equipment with the tunnel configured in the network can determine the exit port pointing to the tunnel to which the first network equipment belongs according to the allocated identifier and the indicating information when generating the routing table entry by allocating the identifier associated with the tunnel and allocating the indicating information for indicating the message to be forwarded through the tunnel, and then the exit port is used for forwarding the message through the tunnel, so that the purpose of using the tunnel to carry the flow is achieved.
The exit port may be determined by creating an exit port pointing to the tunnel. The process of determining the corresponding egress port according to the identification and the indication information may also be defined as a process of creating a virtual neighbor, where the virtual neighbor may be used for a drainage operation on the first network device. The virtual neighbor corresponds to a tunnel.
In a possible implementation manner, the tunnel may include SRv6policy, and SRv6 traffic may be directed to SRv6policy by using the method for sending a packet provided in the present application, so as to improve network performance.
In another possible implementation manner, the identifier may include a Segment Identifier (SID) for identifying SRv6policy, or mapping information of the SID, so as to associate the identifier with SRv6policy, and further, by using the method for sending a packet provided by the present application, SRv6 traffic is steered to SRv6policy, so that network performance is improved.
In another possible implementation manner, the segment identifier may be a Binding-SID (BSID).
In another possible implementation manner, the indication information may include a path metric value, so that the network device determines, according to the path metric value, to use the identifier corresponding to the indication information to determine an egress port pointing to the tunnel in the path calculation process, thereby achieving the purpose of sending a packet by using the tunnel.
The path metric value may be a cost (cost) value of the path.
In one possible scenario, the determining, by the first network device, an egress port pointing to the tunnel according to the allocated identifier and the indication information includes: the first network device determines an exit port pointing to the tunnel by using the identifier according to the condition that the path metric value corresponding to the allocated identifier is smaller than the path metric value of the link between the first network device and other neighbor network devices; or, the first network device determines an egress port pointing to the tunnel by using the identifier, according to the preset value of the path metric value corresponding to the assigned identifier. For example, the path metric value is 0, so that the assigned path metric value corresponding to the identifier is smaller than the path metric values of the links between the first network device and the other neighboring network devices.
In another possible implementation manner, when multiple tunnels are established between the first network device and the second network device, the first network device may allocate multiple identifiers to be respectively associated with the multiple tunnels, and allocate corresponding indication information to the multiple identifiers, respectively, so as to indicate that the first network device may determine, according to the multiple identifiers and the multiple indication information, that a corresponding tunnel is to send a packet to the third network device.
In a possible scenario, the multiple pieces of indication information allocated by the first network device may be the same, and the determining, by the first network device, the port according to the allocated identifier and the indication information includes: the first network device selects a tunnel between the first network device and the second network device according to a first preset rule, and determines an exit port pointing to the selected tunnel according to the assigned identifier associated with the tunnel and the indication information corresponding to the identifier.
The first preset rule may be a random selection, or a selection of a tunnel with the smallest load, or other rules.
In another possible situation, the allocating, by the first network device, the plurality of indication information may be different, the first network device may allocate the plurality of indication information according to a second preset rule, and the determining, by the first network device, the port according to the allocated identifier and the indication information includes: the first network equipment determines the indication information meeting the conditions, so as to determine a port by using the identifier corresponding to the indication information according to the indication information meeting the conditions, wherein the identifier associated with the tunnel pointed by the outlet port corresponds to the indication information meeting the conditions.
The second preset rule may include selecting one tunnel according to the first preset rule, and allocating indication information meeting the condition to the selected tunnel. When the indication information is a path metric value, the condition may be that the path metric value is minimum.
In another possible implementation manner, the method for sending a packet provided by the present application may further include: the first network device floods the distributed identification and indication information, so that other network devices in the network determine to send the message sent to the third network device to the first network device according to the identification and indication information, and the first network device forwards the message to the second network device through a tunnel between the first network device and the second network device.
In another possible implementation manner, the identification and indication information of the flooding allocation of the first network device includes: the method comprises the steps that a first network device generates a flooding message, wherein a Type Length Value (TLV) field of neighbor information of the flooding message comprises distributed identification and indication information; the first network device floods the flooding message. The identification which is distributed by the flooding message and is associated with the tunnel and the indication information corresponding to the identification are compatible with the existing routing protocol, and the feasibility of the scheme is improved.
In another possible implementation, the flooding message may be a link state message. For example, the link state packet may be a link-state packet (LSP) in an intermediate system-to-intermediate system (ISIS) routing protocol, or may be a link-state advertisement (LSA) packet in an Open Shortest Path First (OSPF) routing protocol.
In another possible implementation manner, when multiple tunnels are established between the first network device and the second network device, the step of flooding, by the first network device, the allocated identifier and indication information includes: the first network device floods an identifier associated with one tunnel between the first network device and the second network device and indication information corresponding to the identifier, which are selected according to rules, or the first network device floods a plurality of indication information corresponding to a plurality of tunnels and identifiers corresponding to the indication information.
In another possible implementation manner, the method for sending a packet provided by the present application may further include: before the first network equipment allocates the identification and the indication information corresponding to the identification, the first network equipment enables the drainage function. Correspondingly, the allocating, by the first network device, the identifier and the indication information corresponding to the identifier includes: and the first network equipment allocates the identifier and the indication information corresponding to the identifier according to the enabling of the drainage function. As a possible specific approach, the drainage function may be enabled by configuring the ISIS routing protocol on the first network device, or alternatively, the OSPF routing protocol.
In a second aspect, a method for sending a packet is provided, where the method may include: the fourth network equipment receives an identifier and indication information from the first network equipment, wherein the identifier is associated with a tunnel between the first network equipment and the second network equipment, and the indication information is used for indicating that a message is sent to the third network equipment through the tunnel; the fourth network equipment receives a first message sent to the third network equipment; and the fourth network equipment determines to send the first message to the first network equipment according to the identifier and the indication information, so that the first network equipment forwards the first message to the second network equipment through the tunnel.
According to the method for sending the message, the fourth network device determines to send the message sent to the third network device to the first network device according to the identification and the indication information received from the first network device, and the first network device forwards the message to the second network device through the tunnel between the first network device and the second network device, so that the purpose of using the tunnel to carry flow is achieved.
In a possible implementation manner, the receiving, by the fourth network device, the identifier and the indication information from the first network device specifically includes: and the fourth network equipment receives the flooding message from the first network equipment, wherein the TLV field of the neighbor information of the flooding message comprises the identification and the indication information. The identification which is distributed by the flooding message and is associated with the tunnel and the indication information corresponding to the identification are compatible with the existing routing protocol, and the feasibility of the scheme is improved.
In one possible scenario, the flooding message may be a link state message. For example, the link-state packet may be an LSP packet in the ISIS routing protocol, or may be an LSA packet in the OSPF routing protocol.
In another possible implementation manner, the indication information may include a path metric value, which is convenient for the fourth network device to establish an egress port pointing to the first network device through the path metric value in the path calculation process, so as to achieve the purpose of sending the packet by using the tunnel.
The path metric value may be a cost value of the path. In one possible scenario, the path metric value may be 0, so that the assigned path metric value corresponding to the identifier is smaller than the path metric values of the links between the first network device and the other neighboring network devices. And the fourth network equipment determines to use the identifier corresponding to the indication information to determine the output port pointing to the first network equipment according to the path metric value being 0 or other smaller value in the path calculation process.
In another possible implementation manner, the tunnel may include SRv6policy, and SRv6 traffic may be steered to SRv6policy by using the method for sending a packet provided in the present application, so as to improve network performance.
In another possible implementation manner, the identifier may include a SID used for identifying SRv6policy, or mapping information of the SID, so as to associate the identifier with SRv6policy, and further, by using the method for sending a packet provided by the present application, SRv6 traffic is steered to SRv6policy, so that network performance is improved.
In another possible implementation, the segment identifier may be a BSID.
In another possible implementation manner, when multiple tunnels are established between the first network device and the second network device, the fourth network device receives, from the first network device, identification and indication information, where the identification and indication information are associated with one tunnel selected by the first network device, and the manner in which the first network device selects a tunnel may refer to the description in the first aspect.
In another possible implementation manner, when multiple tunnels are established between the first network device and the second network device, the identifier and the indication information received by the fourth network device from the first network device are respectively associated with the multiple tunnels between the first network device and the second network device, and the fourth network device determines to send the first packet to the first network device according to the received multiple identifiers and the indication information corresponding to the multiple identifiers.
In a third aspect, the present application further provides an apparatus for sending a packet, where functions of the apparatus may be executed by the first network device described in the first aspect. The apparatus may include an allocation unit, a determination unit, a reception unit, and a forwarding unit. Wherein:
and the allocation unit is used for allocating the identifier and the indication information corresponding to the identifier, wherein the identifier is associated with the tunnel between the first network equipment and the second network equipment, and the indication information is used for indicating that the message is sent to the third network equipment through the tunnel.
And the determining unit is used for determining an exit port according to the identification and the indication information distributed by the distributing unit, wherein the exit port is an exit port pointing to the tunnel.
A receiving unit, configured to receive a first packet sent to a third network device.
And the forwarding unit is used for forwarding the first message to the second network equipment by using the output port determined by the determining unit.
In a possible implementation manner, the tunnel may include SRv6policy, and SRv6 traffic may be directed to SRv6policy by using the method for sending a packet provided by the present application, so as to improve network performance.
In another possible implementation manner, the identifier may include a SID used for identifying SRv6policy, or mapping information of the SID, so as to associate the identifier with SRv6policy, and further, by using the method for sending a packet provided by the present application, SRv6 traffic is steered to SRv6policy, so that network performance is improved.
In another possible implementation, the segment identifier may be a BSID.
In another possible implementation manner, the indication information may include a path metric value, so that the network device determines, according to the path metric value, to use the identifier corresponding to the indication information to determine an egress port pointing to the tunnel in the path calculation process, thereby achieving the purpose of sending a packet by using the tunnel. The path metric value may be a cost (cost) value of the path.
In one possible scenario, the allocation unit is specifically configured to: determining an exit port pointing to the tunnel by using the identifier according to the condition that the path metric value corresponding to the allocated identifier is smaller than the path metric value of the link between the first network device and other neighbor network devices; or, determining an exit port pointing to the tunnel by using the identifier according to the preset value of the path metric value corresponding to the allocated identifier. For example, the path metric value may be 0 to achieve that the assigned path metric value corresponding to the identifier is less than the path metric values of the links between the first network device and the other neighboring network devices.
In another possible implementation manner, the apparatus for sending a packet provided by the present application may further include a flooding unit, configured to flood the identifier and the indication information allocated by the allocation unit, so that other network devices in the network determine, according to the identifier and the indication information, to send the packet sent to the third network device to the first network device, and the first network device forwards the packet to the second network device through a tunnel between the first network device and the second network device.
In another possible implementation, the flooding unit is specifically configured to: generating a flooding message, wherein TLV fields of neighbor information of the flooding message comprise distributed identifications and indication information; flooding the flooding message. The identification which is distributed by the flooding message and is associated with the tunnel and the indication information corresponding to the identification are compatible with the existing routing protocol, and the feasibility of the scheme is improved.
In another possible implementation, the flooding message may be a link state message. For example, the LSP packet in the ISIS routing protocol, or may be an LSA packet in the OSPF routing protocol.
In another possible implementation manner, the apparatus for sending a message provided by the present application may further include an enabling unit, configured to enable a drainage function before the allocating unit allocates the identifier and the indication information corresponding to the identifier. Correspondingly, the allocation unit is specifically configured to: and allocating the identification and the indication information corresponding to the identification according to the enabling of the drainage function. As a possible specific approach, the drainage function may be enabled by configuring the ISIS routing protocol on the first network device, or alternatively, the OSPF routing protocol.
It should be noted that, in the apparatus for sending a packet provided by the third aspect, for performing the method for sending a packet provided by the first aspect, reference may be made to the specific implementation of the first aspect, and the same effect as that of the second aspect may be achieved.
In a fourth aspect, the present application provides an apparatus for sending a packet, where the function of the apparatus may be performed by the fourth network device described in the second aspect. The apparatus may include: the device comprises a first receiving unit, a second receiving unit, a determining unit and a sending unit. Wherein:
a first receiving unit, configured to receive an identifier and indication information from a first network device, where the identifier is associated with a tunnel between the first network device and a second network device, and the indication information is used to indicate that a packet is sent to a third network device through the tunnel.
And the second receiving unit is used for receiving the first message sent to the third network equipment.
And the determining unit is used for determining to send the first message to the first network equipment according to the identifier and the indication information received by the first receiving unit so that the first network equipment forwards the first message to the second network equipment through a tunnel between the first network equipment and the second network equipment.
And the sending unit is used for sending the first message to the first network equipment.
In a possible implementation manner, the first receiving unit is specifically configured to: and receiving a flooding message from the first network equipment, wherein the TLV field of the neighbor information of the flooding message comprises the identification and the indication information. The identification which is distributed by the flooding message and is associated with the tunnel and the indication information corresponding to the identification are compatible with the existing routing protocol, and the feasibility of the scheme is improved.
In one possible scenario, the flooding message may be a link state message. For example, the link-state packet may be an LSP packet in the ISIS routing protocol, or may be an LSA packet in the OSPF routing protocol.
In another possible implementation manner, the indication information may include a path metric value, which facilitates the device to establish an egress port pointing to the first network device through the path metric value in the path calculation process, so as to achieve the purpose of sending a packet by using a tunnel.
In another possible implementation manner, the tunnel may include SRv6policy, and SRv6 traffic may be steered to SRv6policy by using the method for sending a packet provided in the present application, so as to improve network performance.
In another possible implementation manner, the identifier may include a SID used for identifying SRv6policy, or mapping information of the SID, so as to associate the identifier with SRv6policy, and further, by using the method for sending a packet provided by the present application, SRv6 traffic is steered to SRv6policy, so that network performance is improved.
In another possible implementation, the segment identifier may be a BSID.
It should be noted that, in the apparatus for sending a packet provided in the fourth aspect, for executing the method for sending a packet provided in the second aspect, specific implementation may refer to specific implementation of the second aspect, and may achieve the same effect as that of the second aspect.
In a fifth aspect, the present application provides a first network device, where the first network device may implement the functions in the method example described in the first aspect, where the functions may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or software comprises one or more modules corresponding to the functions. The first network device may exist in the product form of a chip.
In one possible implementation, the first network device may include a processor and a transmission interface. Wherein, the transmission interface is used for receiving and sending data. The processor is configured to invoke program instructions stored in the memory to cause the first network device to perform the functions in the example of the method described in the first aspect above.
In a sixth aspect, the present application provides a fourth network device, where the fourth network device may implement the functions in the method example described in the second aspect, where the functions may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or software comprises one or more modules corresponding to the functions. The fourth network device may exist in the product form of a chip.
In one possible implementation, the fourth network device may include a processor and a transmission interface. Wherein, the transmission interface is used for receiving and sending data. The processor is configured to invoke program instructions stored in the memory to cause the fourth network device to perform the functions in the example of the method described in the second aspect above.
A seventh aspect provides a system for sending a packet, where the system may include the first network device provided in the fifth aspect.
In a possible implementation manner, the system may further include the fourth network device provided in the sixth aspect.
An eighth aspect provides a computer-readable storage medium, which includes instructions that, when executed on a computer, cause the computer to perform the method for sending a message according to any one of the above aspects or any one of the possible implementations.
A ninth aspect provides a computer program product which, when run on a computer, causes the computer to perform the method of sending a message according to any one of the above aspects or any one of the possible implementations.
In a tenth aspect, a chip system is provided, where the chip system includes a processor and may further include a memory, and is configured to implement the functions performed by the first network device or the fourth network device in the foregoing method. The chip system may be formed by a chip, and may also include a chip and other discrete devices.
The solutions provided in the third aspect to the tenth aspect are used to implement the method for sending a packet provided in the first aspect or the second aspect, and therefore the same beneficial effects as those in the first aspect or the second aspect can be achieved, and details are not repeated here.
It should be noted that, on the premise of not contradicting the scheme, various possible implementation manners of any one of the above aspects may be combined.
Drawings
Fig. 1 is a schematic structural diagram of an MPLS network architecture according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an SRv6 network architecture according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a message transmission system according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a network device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a network architecture according to an embodiment of the present application;
fig. 6 is a schematic flowchart of a method for sending a packet according to an embodiment of the present application;
fig. 7 is a schematic flowchart of another method for sending a packet according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an apparatus for sending a packet according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of another apparatus for sending a packet according to the embodiment of the present application;
fig. 10 is a schematic structural diagram of a first network device according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of another apparatus for sending a message according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a fourth network device according to an embodiment of the present application.
Detailed Description
The terms "first," "second," and "third," etc. in the description and claims of this application and the above-described drawings are used for distinguishing between different objects and not for limiting a particular order.
In the embodiments of the present application, words such as "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present relevant concepts in a concrete fashion for ease of understanding.
In the description of the present application, a "/" indicates a relationship in which the objects associated before and after are an "or", for example, a/B may indicate a or B; in the present application, "and/or" is only an association relationship describing an associated object, and means that there may be three relationships, for example, a and/or B, and may mean: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. Also, in the description of the present application, "a plurality" means two or more than two unless otherwise specified. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple.
In the embodiments of the present application, at least one may also be described as one or more, and a plurality may be two, three, four or more, which is not limited in the present application.
In an IP network, each network device needs to perform network configuration to ensure normal forwarding of a packet. The network configuration process performed by the network device may include: each network device periodically sends a Hello message to establish and maintain the adjacency relation. The network device may also flood link state messages periodically or when network architecture changes. The network device receiving the link state message checks whether the network architecture changes, and the link state message can carry the changing content of the network architecture. If the network architecture is determined to be changed, the network equipment calculates a path according to the maintained adjacency relation and the latest network architecture, and calculates the topology from the node to each node in the network. And finally, each network device calculates an exit port reaching each node according to the calculated topology, and generates a routing table. The network device forwards the received message according to the routing table.
As described above, in an IP network, a large amount of traffic needs to pass through a backbone network, resulting in congestion of a backbone network link, and since only the backbone network link is congested and a metropolitan area network link is generally not congested, an operator generally deploys an end-to-end tunnel in the backbone network, which is simple in operation and maintenance, good in expandability, and capable of avoiding congestion of the backbone network link. Under the architecture, when passing through a backbone network, service traffic needs to use configured tunnel bearers, which requires traffic to be steered to tunnels.
Based on this, the present application provides a method for sending a packet, where a network device in a tunnel is configured in a network, and by allocating an identifier associated with the tunnel and allocating indication information for indicating that the packet is forwarded through the tunnel, when creating a routing table, the network device may determine an egress port pointing to the tunnel to which the network device belongs according to the allocated identifier and the indication information, and then forward the packet through the tunnel using the determined egress port, thereby achieving a purpose of using the tunnel to carry traffic.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
The scheme provided by the embodiment of the present application can be applied to the message transmission system 30 shown in fig. 3. As shown in fig. 3, the messaging system 30 may include a plurality of Provider Edge (PE) devices 301 and a plurality of provider P devices 302.
The PE device 301 is located in a metropolitan area network, and is a provider edge node, and is configured to access a traffic packet of a user device to a transport network. The P device 302 is located in the backbone network and is configured to forward the traffic packet accessed by the PE device 301.
The PE device 301 and the P device 302 illustrated in fig. 3 are forwarding devices, and the product form of the forwarding devices may be a router, a switch, a Packet Transport Network (PTN) device, or the like, which is not limited in this embodiment of the present invention.
It should be noted that the number of network devices included in the message transmission system 30 may be configured according to actual requirements, and fig. 3 of the present application is only an illustration, and is not a specific limitation on the scale of the message transmission system 30.
As shown in fig. 3, an end-to-end tunnel (SRv6 policy) for traffic optimization is deployed between two P devices 302, labeled P1 and P3. When the PE device 301 labeled as PE1 sends a packet to the PE device 301 labeled as PE2, after the packet reaches P1, the packet may BE directed to the tunnel between P1 and P3 by the method provided in the present application, and after the packet reaches P3, the forwarding of the traffic optimization tunnel is ended, and the packet is forwarded to PE2 by continuing to use SRv6 BE tunnel.
It should be noted that the tunnel for traffic optimization refers to a tunnel that can adjust (statically adjust or dynamically adjust) a path according to actual needs. The scheme of the embodiment of the application can be applied to tunnel types including a tunnel with flow regulation and the like. When the message transmission system 30 illustrated in fig. 3 uses different transmission protocols, the types of tunnels deployed in the backbone networks for traffic optimization are also different. For example, the tunnel used for traffic tuning in SRv6 may be SRv6 policy.
The embodiments of the present application will be described in detail with reference to the accompanying drawings.
In one aspect, an embodiment of the present application provides a network device 40, configured to execute the method for sending a packet provided by the present application. For example, the network device 40 may be a PE device 301 or a P device 302 schematically shown in fig. 3.
Fig. 4 illustrates a structure diagram of a network device 40 according to an embodiment of the present application. As shown in fig. 4, the network device 40 may include a processor 401, a memory 402, and a transceiver 403.
The following describes each component of the network device 40 in detail with reference to fig. 4:
the memory 402 may be a volatile memory (volatile memory), such as a random-access memory (RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD); or a combination of the above types of memories, for storing application program code, configuration files, data information, or other content that may implement the methods of the present application. The memory 402 may also be disposed in other devices independent of the network device 40 in other possible scenarios.
Transceiver 403 is used for information interaction of network device 40 with other devices.
Processor 401 may be the control center of network device 40. For example, the processor 401 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application, such as: one or more microprocessors (digital signal processors, DSPs), or one or more Field Programmable Gate Arrays (FPGAs).
In one possible implementation, network device 40 belongs to a tunnel, i.e., the tunnel passes through network device 40, and processor 401 executes or executes software programs and/or modules stored in memory 402 to perform the following functions:
allocating an identifier and indication information corresponding to the identifier, wherein the identifier is associated with a tunnel between the network device 40 and the second network device, and the indication information is used for indicating that a message is sent to the third network device through the tunnel; determining a port according to the identifier and the indication information, wherein the output port is an output port pointing to the tunnel; receiving a first message sent to third network equipment; and forwarding the first message to the second network equipment by using the determined exit port.
In another possible implementation, network device 40 is not a tunnel, i.e., the tunnel does not pass through network device 40, and processor 401 executes or executes software programs and/or modules stored in memory 402 to perform the following functions:
receiving an identifier and indication information from a first network device, wherein the identifier is associated with a tunnel between the first network device and a second network device, and the indication information is used for indicating that a message is sent to a third network device through the tunnel; receiving a first message sent to third network equipment; and determining to send the first message to the first network equipment according to the identifier and the indication information, so that the first network equipment forwards the first message to the second network equipment through the tunnel.
On the other hand, an embodiment of the present application provides a method for sending a packet, where the method is applied to a scenario in which a tunnel for traffic optimization is established between a first network device and a second network device. The first network device and the second network device may be network devices in a backbone network. In the method for sending a packet described in the present application, a transmission direction of the packet is sent from a first network device to a second network device, and a destination device of the packet is a network device reachable through the second network device. The first network device may be a head node of the tunnel and the second network device may be a tail node of the tunnel.
Illustratively, in the network architecture illustrated in fig. 5, PE1 sends a message to PE2, and it is assumed that a tunnel is established between P2 and P3 (the tunnel passes through P2-P4-P5-P3), where P2 is a first network device and P3 is a second network device. Assume that a tunnel is established between P1 and P3 (the tunnel passes through P1-P6-P7-P3), P1 is the first network device, and P3 is the second network device.
In some cases, multiple different tunnels may be established between the first network device and the second network device (meaning that the paths of the tunnels are different, i.e., the node devices that pass through are different). The following embodiments are exemplified by using a tunnel between a first network device and a second network device to send a packet.
As shown in fig. 6, a method for sending a packet provided in the embodiment of the present application may include:
s601, the first network device allocates an identifier and indication information corresponding to the identifier, the identifier is associated with a tunnel between the first network device and the second network device, and the indication information is used for indicating that a message is sent to the third network device through the tunnel.
Among other things, the tunnels described herein may be used for traffic tuning. For example, the tunnel may be SRv6policy in SRv 6. The third network device is any network device reachable through the second network device, and the third network device may be connected to the user-side network device and/or the user host.
Specifically, in S601, the first network device allocates an identifier associated with the tunnel and indication information corresponding to the identifier, and may also be defined as creating a virtual neighbor corresponding to the tunnel, that is, equivalent to creating a virtual neighbor between the first network device and the second network device, so that, in the stages of calculating the network topology and adding the route, the tunnel may be regarded as a neighbor (virtual neighbor) to calculate the network topology and add the route, the allocated identifier is the identifier of the virtual neighbor, and the allocated indication information corresponding to the identifier corresponds to the virtual neighbor.
Specifically, the first network device may perform path calculation in the foregoing network configuration process, and execute the operation of S601 when determining that a tunnel is established between the first network device and the second network device when calculating the network topology.
In one possible implementation, the first network device directly performs the operation of S601.
In another possible implementation manner, the first network device enables the drainage function, so that after the first network device has the drainage function, the first network device executes the operation of S601 according to the enablement of the drainage function, and allocates the identifier associated with the tunnel and the indication information corresponding to the identifier.
Specifically, the identifier associated with the tunnel is used to uniquely indicate the tunnel, and the type and content of the identifier may be configured according to actual requirements, which is not limited in this embodiment of the present application.
In a possible implementation manner, when the tunnel is SRv6policy, the identifier allocated in S601 and associated with the tunnel may include mapping information for identifying the SID of SRv6policy, or SRv6 policy.
Illustratively, the SID used to identify the SRv6policy may be defined as a type of SID to identify the functionality that the type of SID may implement, e.g., as an end. The value of the VX SID can be SRv6policy SID or SRv6policy SID mapping information.
The mapping information of the SID refers to information that has a mapping relationship with the SID, and the mapping relationship may be configured in advance, and the content of the mapping relationship is not specifically limited in this embodiment of the application. The mapping information can be used to find and determine the corresponding SID.
Illustratively, the SID may be a BSID.
Specifically, the indication information corresponding to the identifier is used to indicate that a message is sent to the third network device through the tunnel associated with the identifier, and all information capable of implementing the function may be used as the indication information, and the type and content of the indication information may be configured according to actual requirements.
In one possible implementation, the indication information may include a path metric value. The path metric value is used to indicate the cost of the path.
For example, the path metric value may be a path cost (cost) value used to indicate a path forwarding cost, or the path metric value may be other values, which is not limited in this embodiment of the present application.
Optionally, the indication information allocated by the first network device in S601 may be obtained through dynamic calculation, or may also be a preset value. The preset value is a value which is configured in advance and known by necessary equipment in a network domain, and is used for indicating that a tunnel corresponding to the indication information is used for sending a message to third network equipment. Taking the indication information as a cost value as an example, the preset value may be 0.
In a possible implementation manner, the path metric value corresponding to the identifier associated with the tunnel allocated in S601 may be a preset value of 0.
For example, suppose that the network architecture illustrated in fig. 5 adopts SRv6 transport protocol, PE1 sends a packet to PE2, SRv6policy is established between P1 and P3, and BSID corresponding to SRv6policy is a1:: B1. The P1 is used as a first network device, path calculation is carried out in the network configuration process, when the network topology is calculated, SRv6policy is determined to be established between the P3 and the P1, the P1 can execute the operation of S601, a virtual neighbor corresponding to the SRv6policy is created, the virtual neighbor can also be called as a virtual neighbor from P1 to P3, the P1 allocates the END.VX SID associated with the SRv6policy, and the value of the END.VX SID is A1: B1; and the P1 allocates a cost value corresponding to the end.VX SID as 0, and indicates the P1 to select SRv6policy for message forwarding by using the cost value of 0 as indication information.
Further, in practical application, one or more tunnels may be established between two network devices, and the number of tunnels and the establishment manner of the tunnels are not limited in the embodiment of the present application.
In a possible implementation manner, when a tunnel is established between the first network device and the second network device, the first network device allocates an identifier associated with the tunnel and indication information corresponding to the identifier in S601.
In another possible implementation manner, when multiple tunnels are established between the first network device and the second network device, the first network device in S601 may allocate multiple identifiers to be respectively associated with the multiple tunnels, and allocate indication information corresponding to the multiple identifiers respectively, so as to indicate that the first network device may determine, through the multiple identifiers and the multiple indication information, that the corresponding tunnel is to send the packet to the third network device.
Optionally, when multiple tunnels are established between the first network device and the second network device, multiple pieces of indication information allocated by the first network device in S601 may be the same, or multiple pieces of indication information allocated by the first network device in S601 may be different.
In a possible scenario, the multiple pieces of indication information allocated by the first network device may be the same, and the first network device may first select a tunnel between the first network device and the second network device according to a first preset rule, and then determine an identifier associated with the selected tunnel, so as to point the egress port for forwarding the packet to the selected tunnel according to the identifier.
In another possible scenario, when a plurality of tunnels are established between the first network device and the second network device, and the plurality of indication information allocated by the first network device in S601 is different, the first network device may allocate the plurality of indication information according to a second preset rule.
The second preset rule may include selecting one tunnel according to the first preset rule, allocating indication information that satisfies the condition to the selected tunnel, and allocating indication information that does not satisfy the condition to other tunnels, thereby determining that the selected tunnel is determined to be the output port for forwarding the packet according to the indication information that satisfies the condition. The first preset rule may be a random selection, or a selection of a tunnel with the smallest load, or other rules.
For example, when the indication information is the path metric value, the condition may be that the path metric value is minimum. The path metric minimum may refer to the smallest in-domain, or the smallest in-network, or the smallest among path metrics of multiple tunnels.
S602, the first network device determines an egress port according to the allocated identifier and the indication information, wherein the egress port is an egress port pointing to the tunnel.
Specifically, the first network device may perform the operation of S602 when adding a route to create a routing table in the foregoing network configuration process. In S602, the output port determined by the first network device is an output port reaching the third network device, where the output port points to a tunnel between the first network device and the second network device, and a next hop of the output port is a next-hop network device of the first network device on the tunnel.
In a possible implementation manner, when the indication information is a path metric, the first network device calculates a network topology by using a Shortest Path First (SPF) algorithm, and S602 may specifically be implemented as: the first network device determines the egress port using the identifier allocated in S601, according to that the path metric value corresponding to the identifier is smaller than the path metric values of links between the first network device and other neighboring network devices.
The SPF algorithm selects the path with the minimum path metric value from each path from the node to the calculation node. Since the path metric value corresponding to the identifier is smaller than the path metric values of the links between the first network device and the other neighboring network devices, the determined egress port points to the tunnel between the first network device and the second network device.
Still taking fig. 5 as an example, based on the illustration in S601, it is assumed that the first network device P1 already stores the routing table illustrated in table 1, where the routing table includes the destination address and the corresponding egress port, and when forwarding the message, P1 searches the routing table according to the destination address of the message, obtains the egress port corresponding to the destination address of the message, and then sends the message from the egress port to the IP address of the next hop. According to the routing table entry, the packet to be forwarded to PE2 is sent to P2 through the direct connection port between P1 and P2.
TABLE 1
Figure BDA0002740599880000111
The P1 assigns the end.VX SID associated with SRv6policy between the P1 and the P3 by executing S601, wherein the value of the end.VX SID is A1:: B1 assigns the cost value corresponding to the end.VX SID to be 0, and at this time, the neighbor information of the P1 changes. In S602, P1 calculates a route according to the network topology, calculates a route from P1 to PE2, and determines that a packet forwarded to PE2 by using SRv6policy is not used as an egress port by using a port from P1 to P2 whose cost value is greater than 0 before as the cost value of a virtual neighbor corresponding to SRv6policy between P1 and P3 is 0 and the shortest path including SRv6policy is according to the SPF algorithm, thereby implementing drainage. P1 updates the routing table as shown in table 2, updates the routing table entry to PE2, and the updated egress port in the routing table entry points to SRv6policy between P1 and P3, the next hop in the routing table entry is end point (endpoint) IP of SRv6policy between P1 and P3, and the egress port in the routing table entry is port 3 to SRv6policy between P1 and P3.
TABLE 2
Figure BDA0002740599880000112
The table 1 and the table 2 are only illustrated as one possible table entry, and are mainly used to help understand the technical solution provided by the embodiment, and do not form a specific limitation on the form and content of the table entry supporting the design and the planning in the embodiment of the present application. In practical application, the route forwarding table entry can be designed and formulated in combination with a specific use scenario.
The setting manner that the cost is 0 is only used as an illustration, when the indication information is a path metric value, the first network device may be any reasonable preset value described in S601 according to the path metric value corresponding to the identifier allocated in S601, when the first network device adds the route, the first network device recognizes that the indication information is the preset value, and according to the indication of the preset value, the first network device determines the egress port by using the identifier allocated in S601.
For the situation that multiple tunnels are established between the first network device and the second network device, in a possible implementation manner, when multiple pieces of indication information allocated by the first network device in S601 are the same, the determining, by the first network device in S602, a port according to the allocated identifier and the indication information includes: the first network device selects a tunnel between the first network device and the second network device according to a first preset rule, and determines an egress port pointing to the selected tunnel according to the identifier assigned in S601 and associated with the selected tunnel.
In another possible implementation manner, when multiple tunnels are established between the first network device and the second network device, and multiple pieces of indication information allocated by the first network device in S601 are different, the first network device allocates multiple pieces of indication information according to a second preset rule, and the first network device determines a port according to the allocated identifier and the indication information in S602, including: the first network equipment determines the indication information meeting the conditions, so that according to the indication information meeting the conditions, the identifier corresponding to the indication information meeting the conditions is used for determining the port, and the identifier associated with the tunnel pointed by the output port corresponds to the indication information meeting the conditions.
S603, the first network device receives the first packet sent to the third network device.
Specifically, after receiving the first packet, the first network device in S603 determines that the first packet is a packet addressed to the third network device according to the destination address of the first packet and the current network topology.
S604, the first network device forwards the first packet to the second network device using an egress port pointing to a tunnel between the first network device and the second network device.
Specifically, when the first network device determines that the first packet is a packet addressed to the third network device in S603, the first network device searches the routing table, determines an egress port that reaches the third network device, that is, an egress port that points to a tunnel between the first network device and the second network device and is determined in S602, and then executes S604 to forward the first packet.
Exemplarily, assuming that P1 serves as a first network device, a routing table of which is shown in table 2, when P1 determines that the first packet is a packet addressed to PE2 in S603, P1 looks up the routing table shown in table 1, determines that an egress port to P2 is port 3 of SRv6policy between P1 and P3, then P1 uses port 3 to send the first packet to P3 through SRv6policy between P1 and P3, and after receiving the first packet, P3 forwards the first packet to PE2 according to a local routing table.
According to the method for sending the message, the first network equipment with the tunnel configured in the network can determine the exit port pointing to the tunnel to which the first network equipment belongs according to the allocated identifier and the indicating information when the first network equipment creates the routing table by allocating the identifier associated with the tunnel and allocating the indicating information for indicating the message to be forwarded through the tunnel, and then the message is forwarded through the tunnel by using the determined exit port, so that the purpose of using the tunnel to bear flow is achieved.
Further, as shown in fig. 7, after S601, the method for sending a message according to the embodiment of the present application may further include S605.
S605, the first network device floods the distributed identification and the indication information.
Specifically, in S605, the first network device floods the identifier and the indication information allocated in S601, so that after the network device receiving the content of the flooding calculates the network topology and adds the route to generate the routing table, the message sent to the third network device may be sent to the first network device, so that the first network device forwards the message sent to the third network device to the second network device through the tunnel between the first network device and the second network device.
Illustratively, the first network device may flood the identification and indication information allocated in S601 within an Interior Gateway Protocol (IGP) domain to which it belongs. When the border network device of the IGP domain receives the flooded content, the identification and indication information allocated in S601 may be introduced into the neighboring IGP domains in a cross-domain introduction manner.
In a possible implementation manner, the identifier and the indication information allocated in the S601 for the flooding of the first network device in S605 may specifically be implemented as follows: the first network equipment generates a flooding message, wherein TLV fields of neighbor information of the flooding message comprise the identification and the indication information distributed in S601; the first network device floods the flooding message. For example, neighbor information including the identification and indication information allocated in S601 may be defined as virtual neighbor information.
Illustratively, the flooding message may be a link state message. The link state message in the ISIS routing protocol is an LSP message, and the link state message in the OSPF routing protocol is an LSA message.
In another possible implementation manner, when multiple tunnels are configured between the first network device and the second network device, the identifiers and the corresponding indication information that are the same as the number of the tunnels are allocated in S601, the first network device in S605 may flood the identifiers and the indication information that correspond to the identifiers, which are allocated in S601 and are associated with the first tunnels, and the first tunnels are the tunnels selected by the first network device described in S601, or the identifiers and the tunnels corresponding to the indication information that are used by the ports may be determined for the first network device in S602.
In another possible implementation manner, when multiple tunnels are configured between the first network device and the second network device, the identifiers and the corresponding indication information that are the same as the number of the tunnels are allocated in S601, and the first network device in S605 may flood all the identifiers and the indication information corresponding to the identifiers allocated in S601. Other network devices receiving the flooding message can determine the corresponding forwarding tunnel to be selected according to the strategy configured locally. For example, the same routing policy, such as the same SPF algorithm, may be configured on each network device in the network domain, so that each network device determines the same forwarding path according to the routing policy.
For example, assuming that the network architecture illustrated in fig. 5 employs SRv6 transport protocol, PE1 sends a packet to PE2, SRv6policy (P2-P4-P5-P3) is established between P2 and P3, and the BSID of PE SRv6policy is a2:: B2. The P2 is used as a first network device, path calculation is carried out in the network configuration process, when the network topology is calculated, SRv6policy is established between the P3 and the P2, the P2 can execute the operation of the S601, a virtual neighbor corresponding to the SRv6policy is created, the virtual neighbor can also be called a virtual neighbor from P2 to P3, the P2 allocates the end.VX SID associated with the SRv6policy, and the value of the end.VX SID is A2:: B2; the P2 allocates a cost value corresponding to the end.VX SID to be 0, the P2 generates an LSP message, the TLV field of the virtual neighbor information of the LSP message comprises the end.VX SID (value is A2:: B2) and the cost value is 0, and then the P2 floods the LSP message.
Further, as shown in fig. 7, after S605, the method for sending a packet according to the embodiment of the present application may further include S606 to S608.
S606, the fourth network device receives the identification and the indication information from the first network device.
Specifically, the fourth network device is any network device that can reach the first network device.
Illustratively, in the network architecture illustrated in fig. 5, PE1 sends a message to PE2, and it is assumed that a tunnel is configured between P2 and P3, where the tunnel is, for example, SRv6policy passing through P2-P4-P5-P3 in the example of S605, P2 is a first network device, and P1 is a fourth network device.
In S606, the identifier received by the fourth network device is associated with the tunnel between the first network device and the second network device, and the received indication information is used to indicate that the packet is sent to the third network device through the tunnel between the first network device and the second network device. Specifically, in S606, the fourth network device receives the identifier and the indication information from the first network device, which may specifically be implemented as: and the fourth network equipment receives the flooding message from the first network equipment, wherein the TLV field of the neighbor information of the flooding message comprises identification and indication information. The content received by the fourth network device in S606 is the message flooded by the first network device in S605.
It should be noted that the flooding packet is already described in detail in S505, and details are not described here.
For example, assuming that the network architecture illustrated in fig. 5 adopts an SRv6 transport protocol, a PE1 sends a packet to a PE2, SRv6policy is established between a P2 and a P3, and after a TLV field of the P2 flooding virtual neighbor information includes an end.vx SID (value a2:: B2) and an LSP packet whose cost value is 0, the P1 receives the LSP packet.
It should be further noted that, for the identifier associated with the tunnel and the content of the indication information corresponding to the identifier, details have been already described in S501, and are not repeated here.
S607, the fourth network device receives the first packet sent to the third network device.
Specifically, after receiving the first packet, the first network device in S607 determines that the first packet is a packet addressed to the third network device according to the destination address of the first packet and the current network topology.
S608, the fourth network device determines to send the first packet to the first network device according to the received identifier and the indication information, so that the first network device forwards the first packet to the second network device through the tunnel between the first network device and the second network device.
Specifically, in S608, the fourth network device calculates a network topology and adds a routing table according to the identifier associated with the tunnel between the first network device and the second network device and the indication information corresponding to the identifier received in S606, according to the foregoing network configuration process, and because the indication information sends a packet to the third network device through the tunnel between the first network device and the second network device, the fourth network device may determine an egress port reaching the third network device, where the egress port points to the first network device. In S607, after the fourth network device receives the first packet addressed to the third network device, it may determine to send the first packet to the first network device according to the routing table.
After S608, the first packet is forwarded to the first network device, and the first network device performs the foregoing S603 and S604, so that the first packet is forwarded to the second network device, and then the second network device forwards the first packet to the third network device according to the forwarding protocol.
The above description mainly introduces the solutions provided in the embodiments of the present invention from the perspective of the first network device and the fourth network device. It is understood that, in order to implement the above functions, the first network device, the fourth network device, etc. include a hardware structure and/or a software module corresponding to each function, which is referred to as a message sending device. Those of skill in the art will readily appreciate that the present invention can be implemented in hardware or a combination of hardware and computer software, with the exemplary elements and algorithm steps described in connection with the embodiments disclosed herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiment of the present invention, the functional modules of the device for sending a packet and the like may be divided according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, the division of the modules in the embodiment of the present invention is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Under the condition that each functional module is divided according to each function, fig. 8 illustrates a device 80 for sending a packet according to an embodiment of the present application, which is used to implement the function of the first network device in the foregoing embodiment. The apparatus for sending a message 80 may be a first network device or the apparatus for sending a message 80 may be deployed at a first network device. As shown in fig. 8, the apparatus 80 for sending a message may include: an allocation unit 801, a determination unit 802, a reception unit 803, and a forwarding unit 804. The allocation unit 801 is configured to execute the process S601 in fig. 6 or fig. 7; the determining unit 802 is configured to perform the process S602 in fig. 6 or fig. 7; the receiving unit 803 is configured to perform the process S603 in fig. 6 or fig. 7; the forwarding unit 804 is configured to execute the process S604 in fig. 6 or fig. 7. All relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
Further, as shown in fig. 9, the apparatus 80 for sending a message may further include: a flood unit 805, an enable unit 806. Wherein, the flooding unit 805 is configured to execute the process S605 in fig. 7; the enabling unit 806 is used to enable the drainage function, so that the dispensing unit 801 performs the process S601 in fig. 6 or fig. 7 according to the enabling of the drainage function. All relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
In the case of using an integrated unit, as shown in fig. 10, a first network device 100 provided in the embodiment of the present application is used to implement the functions of the first network device in the above-described method. The first network device 100 comprises at least one processing module 1001. For example, the processing module 1001 may be configured to execute the processes S601 to S604 in fig. 6 or fig. 7, which refer to the detailed description in the method example and are not described herein again.
The first network device 100 may also include at least one storage module 1002 for storing program instructions and/or data. The storage module 1002 is coupled with the processing module 1001. The coupling in the embodiments of the present application is an indirect coupling or a communication connection between devices, units or modules, and may be an electrical, mechanical or other form for information interaction between the devices, units or modules. The processing module 1001 may cooperate with the storage module 1002. The processing module 1001 may execute program instructions stored in the storage module 1002. At least one of the at least one memory module may be included in the processing module.
The first network device 100 may further include a communication module 1003 for communicating with other devices via a transmission medium, thereby determining that the first network device 100 may communicate with other devices. The communication module 1003 is used for the device to communicate with other devices. For example, the processor 1001 may execute the processes S603 and S605 in fig. 7 by using the communication module 1003.
When the processing module 1001 is a processor, the storage module 1002 is a memory, and the communication module 1003 is a transceiver, the first network device 100 according to the present application may be the network device 40 shown in fig. 4.
As described above, the apparatus 80 for sending a message or the first network device 100 provided in the embodiment of the present application may be used to implement the function of the first network device in the method implemented in the embodiments of the present application, and for convenience of description, only the part related to the embodiments of the present application is shown, and details of the specific technology are not disclosed, please refer to the embodiments of the present application.
Under the condition that each functional module is divided according to each function, fig. 11 illustrates a device 110 for sending a packet according to an embodiment of the present application, which is used to implement the function of the fourth network device in the foregoing embodiment. The apparatus for sending a message 110 may be a fourth network device or the apparatus for sending a message 110 may be deployed at a fourth network device. As shown in fig. 11, the apparatus 110 for sending a message may include: first receiving section 1101, second receiving section 1102, determining section 1103, and transmitting section 1104. The first receiving unit 1101 is configured to execute the process S606 in fig. 7; the second receiving unit 1102 is configured to perform the process S607 in fig. 7; the determination unit 1103 is configured to execute the process S608 in fig. 7; the sending unit 1104 is configured to send a first packet to the first network device. All relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
In the case of using an integrated unit, as shown in fig. 12, a fourth network device 120 provided in the embodiment of the present application is used to implement the functions of the fourth network device in the foregoing embodiments. The fourth network device 120 may include at least one processing module 1201, configured to implement the function of the fourth network device in this embodiment, for example, the processing module 1201 may execute the processes S606, S607, and S608 in fig. 7, for specific reference, detailed description in the method example is given, and details are not repeated here.
Fourth network device 120 may also include at least one memory module 1202 for storing program instructions and/or data. The memory module 1202 and the processing module 1201 are coupled. The coupling in the embodiments of the present application is an indirect coupling or a communication connection between devices, units or modules, and may be an electrical, mechanical or other form for information interaction between the devices, units or modules. The processing module 1201 may cooperate with the storage module 1202. The processing module 1201 may execute program instructions stored in the storage module 1202. At least one of the at least one memory module may be included in the processing module.
Fourth network device 120 may also include a communication module 1203 configured to communicate with other devices via a transmission medium to determine that fourth network device 120 may communicate with other devices. The communication module 1203 is used for the device to communicate with other devices.
When the processing module 1201 is a processor, the storage module 1202 is a memory, and the communication module 1203 is a transceiver, the fourth network device 120 according to the embodiment of the present application may be the network device 40 shown in fig. 4.
As described above, the apparatus 110 for sending a message or the fourth network device 120 provided in the embodiment of the present application may be used to implement the function of the fourth network device in the above embodiments of the present application, and for convenience of description, only a part related to the embodiment of the present application is shown, and details of the specific technology are not disclosed, please refer to each embodiment of the present application.
The embodiment of the present application further provides a system for sending a packet, which includes the first network device 100.
Further, the system for sending a message may further include the fourth network device 120.
As another form of the present embodiment, there is provided a computer-readable storage medium having stored thereon instructions that, when executed, perform the method of sending a message in the above-described method embodiment.
As another form of the present embodiment, there is provided a computer program product containing instructions, which when run on a computer causes the computer to execute the method of sending a message in the above method embodiments.
The embodiment of the present invention further provides a chip system, which includes a processor and is used for implementing the technical method of the embodiment of the present invention. In one possible design, the system-on-chip further includes a memory for storing program instructions and/or data necessary for an embodiment of the present invention. In one possible design, the system-on-chip further includes a memory for the processor to call application code stored in the memory. The chip system may be composed of one or more chips, and may also include a chip and other discrete devices, which is not specifically limited in this embodiment of the present application.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical functional division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another device, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, that is, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should 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 (31)

1. A method for sending a message, comprising:
a first network device allocates an identifier and indication information corresponding to the identifier, wherein the identifier is associated with a tunnel between the first network device and a second network device, and the indication information is used for indicating that a message is sent to a third network device through the tunnel;
the first network device determines an output port according to the identifier and the indication information, wherein the output port points to the output port of the tunnel;
the first network equipment receives a first message sent to the third network equipment;
and the first network equipment forwards the first message to the second network equipment by using the egress port.
2. The method of claim 1, wherein the indication information comprises a path metric value.
3. The method of claim 2, wherein the determining, by the first network device, the port according to the identifier and the indication information comprises:
the first network equipment determines a port by using the identifier according to the condition that the path metric value corresponding to the identifier is smaller than the path metric value of a link between the first network equipment and other neighbor network equipment; alternatively, the first and second electrodes may be,
and the first network equipment uses the identifier to determine an output port according to the preset value of the path metric value corresponding to the identifier.
4. The method according to any one of claims 1-3, further comprising:
the first network device floods the identifier and the indication information.
5. The method of claim 4, wherein flooding the identity and the indication information by the first network device comprises:
the first network equipment generates a flooding message, wherein a type-length-value (TLV) field of neighbor information of the flooding message comprises the identifier and the indication information;
and the first network equipment floods the flooding message.
6. The method according to any one of claims 1-5, characterized in that the method comprises:
before the first network equipment allocates an identifier and indication information corresponding to the identifier, enabling a drainage function by the first network equipment;
the first network device allocates an identifier and indication information corresponding to the identifier, including:
and the first network equipment allocates an identifier and indication information corresponding to the identifier according to the enabling of the drainage function.
7. A method for sending a message, comprising:
the fourth network equipment receives an identifier and indication information from the first network equipment, wherein the identifier is associated with a tunnel between the first network equipment and the second network equipment, and the indication information is used for indicating that a message is sent to the third network equipment through the tunnel;
the fourth network equipment receives a first message sent to the third network equipment;
and the fourth network equipment determines to send the first message to the first network equipment according to the identifier and the indication information, so that the first network equipment forwards the first message to the second network equipment through the tunnel.
8. The method of claim 7, wherein the fourth network device receives identification and indication information from the first network device, comprising:
and the fourth network equipment receives a flooding message from the first network equipment, wherein the TLV field of the type-length-value of the neighbor information of the flooding message comprises the identifier and the indication information.
9. The method according to claim 7 or 8, wherein the indication information comprises a path metric value.
10. The method according to claim 2, 3 or 9, wherein the path metric value is 0.
11. The method according to claim 5 or 8, wherein the flooding message is a link state message.
12. The method of any of claims 1-11, wherein the tunnel comprises an internet protocol version 6 segment routing technology policy SRv6 policy.
13. The method of claim 12, wherein the identification comprises a Segment Identification (SID) for identifying the SRv6policy, or mapping information of the SID.
14. The method of claim 13, wherein the segment identifier is a Binding-SID.
15. An apparatus for sending a message, the apparatus configured to mate with a first network device, the apparatus comprising:
the distribution unit is used for distributing an identifier and indication information corresponding to the identifier, the identifier is associated with a tunnel between the first network equipment and the second network equipment, and the indication information is used for indicating that a message is sent to third network equipment through the tunnel;
a determining unit, configured to determine an egress port according to the identifier and the indication information, where the egress port is an egress port pointing to the tunnel;
a receiving unit, configured to receive a first packet sent to the third network device;
a forwarding unit, configured to forward the first packet to the second network device using the egress port determined by the determining unit.
16. The apparatus of claim 15, wherein the indication information comprises a path metric value.
17. The apparatus according to claim 16, wherein the determining unit is specifically configured to:
determining a port by using the identifier according to the condition that the path metric value corresponding to the identifier is smaller than the path metric value of a link between the first network equipment and other neighbor network equipment; alternatively, the first and second electrodes may be,
and determining an exit port by using the identifier according to the preset value of the path metric corresponding to the identifier.
18. The apparatus of any one of claims 15-17, further comprising:
and the flooding unit is used for flooding the identification and the indication information.
19. The apparatus according to claim 18, wherein the flooding unit is specifically configured to:
generating a flooding message, wherein a type-length-value (TLV) field of neighbor information of the flooding message comprises the identifier and the indication information;
and flooding the flooding message.
20. The apparatus according to any one of claims 15 to 19,
the device comprises an enabling unit, a processing unit and a control unit, wherein the enabling unit is used for enabling the drainage function before the distribution unit distributes the identification and the indication information corresponding to the identification;
the allocation unit is specifically configured to: and distributing an identifier and indication information corresponding to the identifier according to the enabling of the drainage function.
21. An apparatus for sending a message, the apparatus comprising:
a first receiving unit, configured to receive an identifier and indication information from a first network device, where the identifier is associated with a tunnel between the first network device and a second network device, and the indication information is used to indicate that a packet is sent to a third network device through the tunnel;
a second receiving unit, configured to receive a first packet sent to the third network device;
a determining unit, configured to determine to send the first packet to the first network device according to the identifier and the indication information, so that the first network device forwards the first packet to the second network device through the tunnel;
a sending unit, configured to send the first packet to the first network device.
22. The apparatus of claim 21, wherein the first receiving unit is specifically configured to:
and receiving a flooding message from the first network equipment, wherein a type-length-value (TLV) field of neighbor information of the flooding message comprises the identifier and the indication information.
23. The apparatus according to claim 21 or 22, wherein the indication information comprises a path metric value.
24. The apparatus of claim 16, 17 or 23, wherein the path metric value is 0.
25. The apparatus according to claim 19 or 22, wherein the flooding message is a link state message.
26. The apparatus of any of claims 15-25, wherein the tunnel comprises an internet protocol version 6 segment routing technology policy SRv6 policy.
27. The apparatus of claim 26, wherein the identifier comprises a Segment Identifier (SID) for identifying the SRv6policy, or mapping information of the SID.
28. The apparatus of claim 27, wherein the segment identifier is a Binding segment identifier Binding-SID.
29. A first network device, wherein the first network device comprises: a processor and a memory;
the memory is connected with the processor; the memory is configured to store computer instructions which, when executed by the processor, cause the first network device to perform the method of sending a message according to any of claims 1-6, 10-14.
30. A fourth network device, wherein the fourth network device comprises: a processor and a memory;
the memory is connected with the processor; the memory is configured to store computer instructions that, when executed by the processor, cause the fourth network device to perform the method of sending messages according to any of claims 7 to 14.
31. A computer-readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method of sending a message of any of claims 1 to 14.
CN202011148963.8A 2020-10-23 2020-10-23 Method and device for sending message Pending CN114513445A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011148963.8A CN114513445A (en) 2020-10-23 2020-10-23 Method and device for sending message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011148963.8A CN114513445A (en) 2020-10-23 2020-10-23 Method and device for sending message

Publications (1)

Publication Number Publication Date
CN114513445A true CN114513445A (en) 2022-05-17

Family

ID=81547120

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011148963.8A Pending CN114513445A (en) 2020-10-23 2020-10-23 Method and device for sending message

Country Status (1)

Country Link
CN (1) CN114513445A (en)

Similar Documents

Publication Publication Date Title
CN111385206B (en) Message forwarding method, network system, related equipment and computer storage medium
CN105049350B (en) Utilize the method, apparatus and system of the Segment routing of the reciprocity engineering in outlet
US10637768B1 (en) Enabling non-flexible-algorithm routers to participate in flexible-algorithm routing protocols
US9660897B1 (en) BGP link-state extensions for segment routing
US9998368B2 (en) Zone routing system
USRE47260E1 (en) System and method for point to multipoint inter-domain MPLS traffic engineering path calculation
CN105871722B (en) Label structure and label message forwarding method and device
EP3817446A1 (en) Method and apparatus for creating network slice
CN103155499B (en) For calculating the system and method for the backup outlet of point-to-multipoint label switch paths
EP2540041B1 (en) System and method for computing a backup ingress of a point-to-multipoint label switched path
US7580359B2 (en) Method and system for maximizing network capacity utilization in multiprotocol label switched networks by moving label switched paths
US10298499B2 (en) Technique of operating a network node for load balancing
EP2878107A1 (en) System, method and apparatus conforming path cost criteria across multiple abrs
US11134004B2 (en) Enhanced flexible-algorithm definition
KR101457317B1 (en) Prioritization of routing information updates
EP3886378B1 (en) Seamless end-to-end segment routing across metropolitan area networks
EP3754914B1 (en) Class-based traffic engineering in an ip network
CN113709034A (en) Bit mask route targets in directed information distribution using routing protocols
EP3975489A1 (en) Label deduction with flexible-algorithm
US11824763B2 (en) Filtering topologies for path computation in massively scaled networks
US11303549B2 (en) Segmented traceroute for segment routing traffic engineering
CN114513445A (en) Method and device for sending message
WO2020021558A1 (en) Methods, apparatus and machine-readable media relating to path computation in a communication network
EP3913868A1 (en) Segmented traceroute for segment routing traffic engineering
JP2022538527A (en) Method and apparatus for routing traffic along IGP shortcut paths

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