WO2017045561A1 - 分配全局标签的方法、获取全局标签的方法及相关装置 - Google Patents

分配全局标签的方法、获取全局标签的方法及相关装置 Download PDF

Info

Publication number
WO2017045561A1
WO2017045561A1 PCT/CN2016/098359 CN2016098359W WO2017045561A1 WO 2017045561 A1 WO2017045561 A1 WO 2017045561A1 CN 2016098359 W CN2016098359 W CN 2016098359W WO 2017045561 A1 WO2017045561 A1 WO 2017045561A1
Authority
WO
WIPO (PCT)
Prior art keywords
label
forwarding device
range
message
controller
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.)
Ceased
Application number
PCT/CN2016/098359
Other languages
English (en)
French (fr)
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 EP16845675.4A priority Critical patent/EP3310010B1/en
Publication of WO2017045561A1 publication Critical patent/WO2017045561A1/zh
Priority to US15/923,866 priority patent/US20180205642A1/en
Anticipated expiration legal-status Critical
Ceased 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/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • H04L45/507Label distribution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/42Centralised routing
    • 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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric

Definitions

  • the embodiments of the present invention relate to the field of communications technologies, and in particular, to a method for allocating a global label, a method for acquiring a global label, a controller, and a forwarding device.
  • the global label technology is based on multiprotocol label switching (MPLS) technology.
  • the embodiment provides a method for allocating a global label, a method for obtaining a global label, a controller, and a forwarding device, which helps improve the efficiency of global label allocation.
  • a method of assigning a global label including:
  • the controller Receiving, by the controller, the first message sent by the forwarding device, where the first message carries a first label range, and the multiple labels included in the first label range are a subset of the multiple labels included in the label space of the forwarding device
  • the first label range is not equal to the label space of the forwarding device
  • the controller allocates a global label to the forwarding device according to the first label range carried in the first message, where the global label is a label in the first label range.
  • the first label range includes a label that has been allocated to the first label switching path by the forwarding device, and the forwarding device is the first a method of a label switching path, after the controller receives the first message, and before the controller allocates the global label to the forwarding device, the method further includes:
  • the controller sends a second message to the forwarding device, where the second message includes a second label range, the second label range includes a plurality of labels, and the second label range is the first label range a subset, the second message is used to indicate that the forwarding device allocates a new label for the second label switching path, and the new label is used to replace the second label switching path that has been allocated by the forwarding device.
  • a label the new label being outside the second label range
  • the first The second label switching path is a subset of the first label switching path, and the label that has been allocated by the forwarding device to the second label switching path is a subset of the second label range;
  • the controller allocates a global label to the forwarding device according to the first label range carried in the first message, where the global label is a label in the first label range, and specifically includes:
  • the controller allocates the global label to the forwarding device according to the second label range, and the global label is a label in the second label range.
  • the method further includes:
  • the controller receives a third message sent by the forwarding device, and the third message is used to notify the controller that the forwarding device has allocated the new label to the second label switching path.
  • the method further includes:
  • the controller sends a fourth message to the forwarding device, the fourth message includes the second label range, the fourth message is used to notify the forwarding device, and the controller has the second The label range is used as a candidate global label.
  • the second message is further used to notify the forwarding device,
  • the second tag range is used as a candidate global tag.
  • the first message is further carried in the first label range by the forwarding device a label assigned to the first label switching path, or the first message further carries an identifier of the first sub-range, an identifier of the second sub-range, a quantity of the first label, and a quantity of the second label
  • the first label range includes the first sub-range and the second sub-range, and the label that has been allocated to the first label switching path by the forwarding device in the first sub-range is the first label
  • the label that has been allocated to the first label switching path by the forwarding device in the second sub-range is the second label, and the number of the first label is smaller than the number of the second label;
  • the method further includes:
  • the number of the first tags is smaller than the number of the first tags and the number of the second tags, and the number of the first tags is smaller than the number of the second tags;
  • the controller determines that the first sub-range is the second tag range based on the number of the first tags being less than the number of the second tags.
  • the method before the receiving the first message, the method further includes:
  • the controller sends a fifth message to the forwarding device, where the fifth message is used to instruct the forwarding device to send, to the controller, a label space of the forwarding device and a label that has been allocated by the forwarding device or The number of tags that have been allocated by the forwarding device.
  • the first message further includes a label that has been allocated to the first label switching path by the forwarding device in the first label range, The forwarding device is a node on the first label switching path;
  • the assigning, by the controller, the global label to the forwarding device according to the first label range carried in the first message includes:
  • the controller allocates the global label to the forwarding device according to the first label range and a label that has been allocated to the first label switching path by the forwarding device, where the global label has been forwarded There is no intersection of the labels assigned by the device to the first label switched path.
  • a method for obtaining a global label including:
  • the forwarding device sends a first message to the controller, where the first message carries a first label range, and the multiple labels included in the first label range are a subset of the multiple labels included in the label space of the forwarding device.
  • the first label range is not equal to the label space of the forwarding device;
  • the forwarding device acquires, by the controller, a global label allocated by the forwarding device according to the first label range carried in the first message, where the global label is a label in the first label range.
  • the first label range includes a label that has been allocated to the first label switching path by the forwarding device, and the forwarding device is the first a method of a label switching path, after the forwarding device sends the first message to the controller, and before the forwarding device acquires the global label, the method further includes:
  • the forwarding device receives the controller to send a second message, where the second message includes a second label range, the second label range includes a plurality of labels, and the second label range is the first label range a subset, the second message is used to indicate that the forwarding device allocates a new label for the second label switching path, and the new label is used to replace the second label switching path that has been allocated by the forwarding device.
  • the new label being outside the second label range
  • the second label switching path being a subset of the first label switching path, the having been assigned to the second by the forwarding device
  • the label of the label switched path is a subset of the second label range
  • the second label range is used by the controller to allocate the global label to the forwarding device, the global label being the second label range The label in .
  • the method further includes:
  • the forwarding device sends a third message to the controller, the third message being used to notify the controller that the forwarding device has allocated the new label for the second label switching path.
  • the method further includes:
  • the forwarding device receives a fourth message sent by the controller, the fourth message includes the second label range, and the fourth message is used to notify the forwarding device, the controller has The second tag range is used as a candidate global tag.
  • the second message is further used to notify the forwarding device,
  • the second tag range is used as a candidate global tag.
  • the second label range is a first sub-range
  • the first label range includes the first a sub-range and a second sub-range
  • the said The label allocated by the forwarding device to the first label switching path includes a first label and a second label
  • the label that has been allocated by the forwarding device to the first label switching path within the first label range The number includes the number of the first tag and the number of the second tag, the first tag is a tag in the first sub-range, and the second tag is a tag in the second sub-range
  • the number of the first labels is smaller than the number of the second labels.
  • the forwarding device before the forwarding device sends the first message to the controller, the method also includes:
  • the forwarding device receives a fifth message sent by the controller, where the fifth message is used to instruct the forwarding device to send a label space of the forwarding device to the controller, and the fifth message is further used to indicate
  • the forwarding device transmits to the controller the number of tags that have been assigned by the forwarding device or the tags that have been assigned by the forwarding device.
  • the first message further includes a label that has been allocated by the forwarding device to the first label switching path in the first label range.
  • the forwarding device is a node on the first label switching path, and the global label does not intersect with a label that has been assigned to the first label switching path by the forwarding device.
  • a controller comprising:
  • a first receiving unit configured to receive a first message sent by the forwarding device, where the first message carries a first label range, and the first label range includes multiple labels that are included in the label space of the forwarding device a subset of the labels, the first label range is not equal to the label space of the forwarding device;
  • An allocating unit configured to allocate a global label to the forwarding device according to the first label range carried in the first message received by the first receiving unit, where the global label is in the first label range label.
  • the first label range includes a label that has been allocated to the first label switching path by the forwarding device, and the forwarding device is the first a node on a label switching path
  • the controller further comprising a first sending unit, the first sending unit is configured to: after the first receiving unit receives the first message, and in the allocating unit Before the forwarding device allocates the global label, to the forwarding device Sending a second message, where the second message includes a second label range, the second label range includes a plurality of labels, the second label range is a subset of the first label range, and the second message is used by the second message Instructing the forwarding device to assign a new label to the second label switching path, the new label being used to replace a label that has been assigned to the second label switching path by the forwarding device, the new label is in the Outside the second tag range, the second label switching path is a subset of the first label switching path, and the label that has been assigned to the second label
  • the controller further includes a second receiving unit, where the second receiving unit is configured to After the first sending unit sends the second message to the forwarding device, and before the allocating unit allocates the global label to the forwarding device, receiving a third message sent by the forwarding device, the third The message is used to notify the controller that the forwarding device has assigned the new label to the second label switching path.
  • the controller further includes a second sending unit, where the second sending unit is configured to After receiving the third message sent by the forwarding device, and before the allocating unit allocates the global label to the forwarding device, the second receiving unit sends a fourth message to the forwarding device, where the fourth message includes The second label range, the fourth message is used to notify the forwarding device, and the controller has used the second label range as a candidate global label.
  • the second message is further used to notify the forwarding device that the controller has The second tag range is used as a candidate global tag.
  • the first message further carries a label that has been allocated to the first label switching path by the forwarding device in the first label range, or the first message further carries the first sub-range.
  • the label of the first label switching path is the second label, and the number of the first label is smaller than the number of the second label;
  • the controller further includes a determining unit, the determining unit configured to, after the first receiving unit receives the first message, and before the first sending unit sends the second message to the forwarding device Determining, according to the label that is allocated by the forwarding device to the first label switching path in the first label, that the number of the first label is smaller than the number of the second label, Or the controller determines, according to the number of the first labels carried in the first message and the number of the second labels, that the number of the first labels is smaller than the number of the second labels, based on the The number of one tag is less than the number of the second tags determines that the first sub-range is the second tag range.
  • the controller further includes a third sending unit, where the third sending unit is configured to receive, by the first receiving unit, the Before the first message, sending a fifth message to the forwarding device, where the fifth message is used to instruct the forwarding device to send a label space of the forwarding device to the controller, where the fifth message is further used to indicate
  • the forwarding device transmits to the controller the number of tags that have been assigned by the forwarding device or the tags that have been assigned by the forwarding device.
  • the first message further includes a label that has been allocated to the first label switching path by the forwarding device in the first label range.
  • the forwarding device is a node on the first label switching path;
  • the allocating unit is configured to allocate the global label to the forwarding device according to the first label range and a label that has been allocated to the first label switching path by the forwarding device, where the global label is There is no intersection of the labels assigned by the forwarding device to the first label switching path.
  • a forwarding device including:
  • a first sending unit configured to send a first message to the controller, where the first message carries a first label range, and the first label range includes multiple labels that are multiple included in a label space of the forwarding device a subset of the label, the first label range being not equal to the label space of the forwarding device;
  • An acquiring unit configured to acquire, by the controller, a global label allocated by the forwarding device according to the first label range carried in the first message, where the global label is a label in the first label range.
  • the first label range includes a label that has been allocated to the first label switching path by the forwarding device, and the forwarding device is the first a node on a label switching path, the forwarding device further includes:
  • a first receiving unit configured to: after the first sending unit sends the first message, and before the acquiring unit acquires the global label, receive, by the controller, a second message, where the second message includes a second label range, the second label range includes a plurality of labels, the second label range is a subset of the first label range, and the second message is used to indicate that the forwarding device is a second label exchange
  • the path assigns a new tag for replacing a tag that has been assigned to the second tag switching path by the forwarding device, the new tag being outside the second tag range
  • the first The second label switching path is a subset of the first label switching path
  • the label that has been allocated by the forwarding device to the second label switching path is a subset of the second label range
  • the second A tag range is used by the controller to assign the global tag to the forwarding device, the global tag being a tag in the second tag range.
  • the forwarding device further includes:
  • a second sending unit configured to send a third message to the controller after the first receiving unit receives the second message, and before the acquiring unit acquires the global label, the third message And configured to notify the controller that the forwarding device has allocated the new label to the second label switching path.
  • the forwarding device further includes:
  • a second receiving unit configured to: after the second sending unit sends the third message to the controller, and before the acquiring unit acquires the global label, receive a fourth message sent by the controller, The fourth message includes the second label range, and the fourth message is used to notify the forwarding device, and the controller has used the second label range as a candidate global label.
  • the second message is further used to notify the forwarding device, and the controller has used the second label range as a candidate global label.
  • the second label range is a first sub-range, the first label range includes the first sub-range and a second sub-range, and the first label range has been allocated by the forwarding device
  • the label of the first label switching path includes a first label and a second label, and the number of labels that have been allocated by the forwarding device to the first label switching path within the first label range includes the a number of the first label and a quantity of the second label, the first label is a label in the first sub-range, and the second label is a label in the second sub-range, the first The number of tags is less than the number of the second tags.
  • the forwarding device further includes a third receiving unit, where the third receiving unit is configured to receive the first message before the first sending unit sends the first message a fifth message sent by the controller, the fifth message is used to instruct the forwarding device to send a label space of the forwarding device to the controller, and the fifth message is further used to indicate that the forwarding device is located
  • the controller sends the tag that has been assigned by the forwarding device or the number of tags that have been assigned by the forwarding device.
  • the first message further includes a label that has been allocated to the first label switching path by the forwarding device in the first label range.
  • the forwarding device is a node on the first label switching path, and the global label does not intersect with a label that has been assigned to the first label switching path by the forwarding device.
  • the controller receives the first label range in the first message sent by the forwarding device.
  • the controller may allocate a global label to the forwarding device according to the first label range. Therefore, manual configuration is not required when assigning global labels, which helps to improve the efficiency of global label allocation.
  • the first message carries the first label range
  • the global label is a label of the multiple labels included in the first label range.
  • the global label is the forwarding The label in the label space of the device. Therefore, the above solution can avoid allocating tags outside the tag space of the forwarding device to the forwarding device, thereby avoiding allocating global tags that the forwarding device cannot support for the forwarding device.
  • the first tag range is a subset of the tag space, and the first tag range is not equal to the tag space. Therefore, the first label range is smaller than the label space.
  • the forwarding device may reclaim tags within a certain tag range that have been assigned by the forwarding device such that tags within the tag range become available tags.
  • the overhead of the forwarding device retrieving the label in the first label range that has been allocated by the forwarding device is less than the overhead of the forwarding device reclaiming the label in the label space that has been allocated by the forwarding device. Therefore, the above technical solution helps to reduce the overhead of recycling the tag that has been allocated.
  • the first message may further carry a label that has been allocated by the forwarding device within the first label range.
  • the first message may further carry the number of labels that have been allocated by the forwarding device to the first label switching path in the first sub-range and have been forwarded in the second sub-range
  • the controller may know, by the first message, the number of tags that have been allocated by the forwarding device.
  • the controller can reasonably assign the global tag to the forwarding device based on the number of tags that have been assigned. For example, a smaller number of labels that have been assigned a label is used as a candidate global label.
  • the forwarding device can reclaim the assigned tags in the smaller number of tags that have been assigned tags.
  • the above technical solution helps to alleviate the overhead of the forwarding device reclaiming the tag that has been allocated, relative to the already allocated tag in the range of tags that have a larger number of tags that have been allocated.
  • FIG. 1 is a schematic structural diagram of a network provided by an embodiment
  • FIG. 2 is a schematic diagram of signaling interaction provided by an embodiment
  • FIG. 3 is a schematic flowchart of a method for allocating global labels according to an embodiment
  • FIG. 3a is a schematic flowchart of a method for allocating global labels according to an embodiment
  • FIG. 4 is a schematic structural diagram of a controller provided by an embodiment
  • FIG. 5 is a schematic structural diagram of a controller according to an embodiment
  • FIG. 6 is a schematic structural diagram of a controller provided by an embodiment
  • FIG. 7 is a schematic flowchart of a method for obtaining a global label according to an embodiment
  • FIG. 8 is a schematic flowchart of a method for obtaining a global label according to an embodiment
  • FIG. 9 is a schematic structural diagram of a forwarding device according to an embodiment.
  • FIG. 10 is a schematic structural diagram of a forwarding device according to an embodiment
  • FIG. 11 is a schematic structural diagram of a forwarding device according to an embodiment.
  • FIG. 1 is a schematic structural diagram of a network according to an embodiment of the present invention.
  • the network structure includes a controller (Controller) network and an OpenFlow Switch (OpenFlow Switch) network.
  • the controller network includes a controller 1.
  • the OpenFlow switch network includes an OpenFlow switch 1, an OpenFlow switch 2, an OpenFlow switch 3, and an OpenFlow switch 4.
  • the controller network may also include other controllers, and the OpenFlow switch network may also include other OpenFlow switches, not shown.
  • the OpenFlow switch network may also include only one OpenFlow switch, two OpenFlow switches, or three OpenFlow switches.
  • the controller 1 can communicate with the OpenFlow switch 1, the OpenFlow switch 2, the OpenFlow switch 3, and the OpenFlow switch 4 through the control channel 1, the control channel 2, the control channel 3, and the control channel 4, respectively.
  • the control channel may specifically be an OpenFlow Channel.
  • OpenFlow Switch Specification Version 1.3.1 released by the OPEN NETWORKING FOUNDATION refer to the OpenFlow Switch Specification Version 1.3.1 released by the OPEN NETWORKING FOUNDATION.
  • the communication process of the controller 1 with the OpenFlow switch 1 includes the controller 1 transmitting a message 1 to the OpenFlow switch 1.
  • the OpenFlow switch 1 sends a message 2 to the controller 1.
  • the controller 1 sends a message 3 to the OpenFlow switch 1.
  • the OpenFlow switch 1 sends a message 4 to the controller 1.
  • the controller 1 sends a message 5 to the OpenFlow switch 1.
  • the OpenFlow switch 1 sends a message 6 to the controller 1.
  • the controller 1 sends a message 1 to the open flow switch 1.
  • OpenFlow switch 1 instructs OpenFlow switch 1 to report to controller 1 the label space of OpenFlow switch 1 and the number of labels that OpenFlow switch 1 has assigned for the label switched path or that have been assigned for the label switched path.
  • Open flow switch 1 is the node of the label switched path.
  • the label switched path is included in the OpenFlow switch network.
  • OpenFlow switch 1 can be an MPLS-enabled switch.
  • the label stack supported by the OpenFlow switch 1 may include only one MPLS label or multiple MPLS labels.
  • An MPLS packet carries an MPLS header.
  • the label field of the MPLS header carries an MPLS label.
  • the tag field includes 20 bits. That is, the value of the tag field can be one of 2 20 different values. Therefore, the label space of the OpenFlow switch 1 can theoretically be 0 to 2 20 -1.
  • the OpenFlow switch 1 is a node of the OpenFlow switch network. Prior to S201, controller 1 may have indicated through the control channels (eg, control channel 1, control channel 2, and control channel 3) that the open flow switch network has established five label switched paths (LSPs).
  • the OpenFlow switch 1 may be a node of three of the five label switched paths. The three label switching paths are LSP1, LSP2, and LSP3.
  • the OpenFlow switch 1 has allocated three labels for the three label switching paths, respectively. Specifically, the OpenFlow switch 1 assigns Label 1, Label 2, and Label 3 to LSP1, LSP2, and LSP3, respectively. The OpenFlow switch 1 generates a label forwarding entry 1, a label forwarding entry 2, and a label forwarding entry 3 according to the label 1, the label 2, and the label 3, respectively. Label 1 is included in the match field of label forwarding entry 1. Therefore, the OpenFlow switch 1 has the capability of forwarding a message carrying the tag 1. Specifically, the OpenFlow switch 1 receives the message 1 transmitted on the LSP1. The MPLS header is carried in the packet header of the packet 1. MPLS header The value of the label field is equal to label 1. The OpenFlow switch 1 can look up the label matching the label 1 in the label forwarding table according to the label 1. The entry matching the label 1 is the label forwarding entry 1. The OpenFlow switch 1 can forward the message 1 according to the label forwarding entry 1.
  • the OpenFlow switch 1 and the controller 1 can perform label capability notification.
  • the tag capability may specifically include the OpenFlow switch 1 reporting the tag range to the controller 1 and the controller 1 assigning the global tag to the OpenFlow switch 1.
  • the label range may be the label space of the OpenFlow switch 1, the label range of the label not allocated to the LSP, the label range of the label allocated to the LSP, and the reclaimed label range.
  • the Request For Comments (RFC) 5492 issued by the Internet Engineering Task Force (IETF) may be extended to enable the OpenFlow switch or the controller 1 to perform capability advertisement.
  • the extended Capabilities Optional Parameter field can be carried in the Optional Parameters field of the OPEN message.
  • the OpenFlow switch 1 and the controller 1 performing the label capability notification may specifically include:
  • the extended capability option parameter field of Open Message 1 carries information indicating whether the controller 1 has the tag capability. See Table 1 for the expanded capability option parameters:
  • the length of the Capability Code field is one byte.
  • the value of the capability code is used to indicate the indicator Signing ability.
  • the length of the Capability Length field is one byte.
  • the value of the capability length is used to define the length of the Capability Value field.
  • the length of the Capability Value field is variable. When the value of the capability value field is 1, it indicates that it has the tag capability. When the value of the capability value field is 0, it indicates that there is no tag capability.
  • the open flow switch 1 After receiving the open message 1, the open flow switch 1 determines that the controller 1 has the tag capability according to the value of the capability value field.
  • the OpenFlow switch 1 In response to the open message 1, the OpenFlow switch 1 sends an open message 2 to the controller 1.
  • the extended capability option parameter field carried by the open message 2 carries information indicating whether the OpenFlow switch 1 has the tag capability. See Table 1 for the structure of the extended capability option parameter field in Open Message 2. When the value of the capability value field is 1, it indicates that the OpenFlow switch 1 has the tag capability. When the value of the capability value field is 0, it indicates that the OpenFlow switch 1 does not have the tag capability.
  • the OpenFlow switch 1 determines from the open message 1 that the controller 1 has a tag capability.
  • the controller 1 determines from the open message 2 that the OpenFlow switch 1 also has tag capability. After the controller 1 determines that the OpenFlow switch 1 has the label capability, it sends a message 1 to the OpenFlow switch 1.
  • message 1 can carry a step size field.
  • the step size field is used to carry the value of the step size.
  • the step size field is used to instruct the OpenFlow switch 1 to report the label range of the OpenFlow switch 1 to the controller 1 according to the value of the step size field.
  • the step size field can also be used to instruct the OpenFlow switch 1 to report to the controller 1 the number of tags allocated within the tag range based on the value of the step size field.
  • the step size field can be carried in the extended properties of Open Message.
  • Table 2 For the structure of the step size field, please refer to Table 2:
  • the step size field is 2 bytes in length.
  • the value of the step size field is used to indicate that the OpenFlow switch reports the label range of the OpenFlow switch based on the value of the step size field. E.g, When the value of the step size field is equal to 1024, the value of the step size field is used to indicate that the OpenFlow switch reports the label range of the OpenFlow switch according to the step size of 1024.
  • the reserved field is 2 bytes in length. Reserved domains can be used for future expansion.
  • the OpenFlow switch 1 sends a message 2 to the controller 1.
  • OpenFlow switch 1 sends message 2 to controller 1.
  • Message 2 carries the label range 1. If there is no description to the contrary, a certain range mentioned in the message mentioned in the present application means that the message carries information indicating the range. For example, the message 2 in the above message carries the label range 1, which means that the message 2 carries the information indicating the label range 1.
  • the message 2 carries the label that the OpenFlow switch 1 has assigned to the LSP in the label range 1.
  • the OpenFlow switch 1 is a node of the LSP.
  • the label range 1 may be the label space of the OpenFlow switch 1, for example 0 to 2 20 -1.
  • the labels that the OpenFlow switch 1 has assigned to the LSPs (LSP1, LSP2, and LSP3) in 0 to 2 20 -1 may be Label 1, Label 2, and Label 3.
  • the label range 1 may also be one sub-label space of the above label space, for example, 0 to 2 10 .
  • the labels that OpenFlow switch 1 has assigned to LSPs (LSP1 and LSP2) in 0 to 2 10 may be Label 1 and Label 2.
  • the label range 1 may also be a plurality of sub-label spaces of the above label space, such as 0 to 2 10 and 2 10 +1 to 2 15 .
  • the labels that OpenFlow switch 1 has assigned to LSPs (LSP1 and LSP2) in 0 to 2 10 may be Label 1 and Label 2.
  • the label that the OpenFlow switch 1 has assigned to the LSP (LSP3) within 2 10 +1 to 2 15 may be the label 3.
  • multiple subtag spaces are contiguous.
  • multiple sub-label spaces may also be discontinuous.
  • the plurality of subtag spaces may be 0 to 2 10 and 2 10 +2 to 2 15 .
  • S202 may also be:
  • OpenFlow switch 1 In response to message 1, OpenFlow switch 1 sends message 2 to controller 1. Message 2 carries the label range 1.
  • message 2 carries the number of labels that OpenFlow switch 1 has assigned to the LSP within label range 1.
  • the label range 1 may be the label space of the OpenFlow switch 1, for example 0 to 2 20 -1.
  • the labels that the OpenFlow switch 1 has assigned to the LSPs (LSP1, LSP2, and LSP3) in 0 to 2 20 -1 may be Label 1, Label 2, and Label 3. Therefore, the number of labels that the OpenFlow switch 1 has allocated to the LSP in the label range 1 is three.
  • the label range 1 may also be one sub-label space of the above label space, for example, 0 to 2 10 .
  • the labels that OpenFlow switch 1 has assigned to LSPs (LSP1 and LSP2) in 0 to 2 10 may be Label 1 and Label 2. Therefore, the number of labels that the OpenFlow switch 1 has allocated to the LSP in the label range 1 is 2.
  • the label range 1 may also be a plurality of sub-label spaces of the above label space, such as 0 to 2 10 and 2 10 +1 to 2 15 .
  • the labels that OpenFlow switch 1 has assigned to LSPs (LSP1 and LSP2) in 0 to 2 10 may be Label 1 and Label 2.
  • the label that the OpenFlow switch 1 has assigned to the LSP (LSP3) within 2 10 +1 to 2 15 may be the label 3. Therefore, the number of tags that the OpenFlow switch 1 has allocated to the LSPs in 0 to 2 10 is 2.
  • the number of labels that the OpenFlow switch 1 has assigned to the LSP in 2 10 +1 to 2 15 is 1.
  • multiple subtag spaces are contiguous.
  • multiple sub-label spaces may also be discontinuous.
  • the plurality of subtag spaces may be 0 to 2 10 and 2 10 +2 to 2 15 .
  • message 2 can include the structure shown in Table 3:
  • the Start Label field is 4 bytes long.
  • the start tag field is used to indicate the value of the start tag of a large tag range.
  • the length of the End Label field is 4 bytes.
  • the end tag field is used to indicate the value of the end tag of a large tag range.
  • the Step size field is 2 bytes long.
  • the step size field is used to indicate the step size of a small label range.
  • the length of the label block Capabilities Optional Parameter field is 4 bytes.
  • the Block Number field is 2 bytes in length.
  • the block number is used to indicate a small label range.
  • the start tag for a small tag range and the number of tags that a small tag range contains are a function of the step size. For example, when the value of the block number field is equal to 1, the value of the start tag of the small tag range corresponding to the block number field is equal to 1 ⁇ step size.
  • the number of labels included in a small label range is equal to the step size. That is to say, the small tag range whose value of the block number field is equal to 1 is ⁇ 1024, 2047>.
  • the value of the block number field is equal to 2
  • the value of the start tag of the small tag range corresponding to the block number field is equal to 2 x steps.
  • the number of labels included in a small label range is equal to the step size. That is to say, the small tag range whose value of the block number field is equal to 2 is ⁇ 2048, 3071>.
  • the Occupied Label Count field is 2 bytes long.
  • the value of the occupied tag number field is used to indicate the number of tags that are allocated within the tag range 1.
  • Label range 1 is the intersection of a large label range and a small label range. For example, when the value of the start tag is equal to 2000, the value of the end tag is equal to 3000, the value of the block number field is equal to 2, and the value of the occupied tag number field is equal to 500, indicating that the tag range 1 is ⁇ 2000, 3000> and ⁇ 2048,3071> The intersection of. That is, there are 500 tags in ⁇ 2048, 3000> that have been assigned to the LSP.
  • the label block capability option parameter field in Table 3 may be one or multiple.
  • the tag range 1 carried in the message 2 includes a plurality of tag ranges.
  • the plurality of label ranges respectively correspond to the number of the plurality of assigned labels.
  • the value of the start tag is equal to 3050.
  • the end tag has a value equal to 4000.
  • the value of the block number field in the first tag block capability option parameter field is equal to 2, and the value of the occupied tag number field is equal to 5.
  • the value of the block number field in the second tag block capability option parameter field is equal to 3, and the value of the occupied tag number field is equal to 3.
  • the label range 1 includes two label ranges.
  • the first label range is the intersection of ⁇ 3050, 4000> and ⁇ 2048, 3071>. In other words, the first label range is ⁇ 3050,3071>.
  • the second label range is the intersection of ⁇ 3050, 4000> and ⁇ 3071, 4095>. In other words, the second label range is ⁇ 3071,4000>. That is, 2 tags in ⁇ 3050, 3071> have been assigned to the LSP. Three tags in ⁇ 3071, 4000> have been assigned to the LSP.
  • the controller 1 sends a message 3 to the OpenFlow switch 1.
  • controller 1 sends message 3 to OpenFlow switch 1.
  • Message 3 carries the label range 2.
  • Label range 2 is a subset of label range 1.
  • Label range 2 is not equal to label range 1.
  • Message 3 is used to instruct OpenFlow switch 1 to assign a new label to the LSP of OpenFlow switch 1 that has been assigned a label in label range 2.
  • the new label is outside the label range 2.
  • the open flow switch 1 has been allocated the label in the label range 2 by the open flow switch 1.
  • the recycled tag becomes a tag that is not assigned by the OpenFlow switch 1. Therefore, the controller 1 can use the tag in the tag range 2 as a candidate global tag.
  • the label range 1 is 0 to 2 20 -1.
  • the labels that the OpenFlow switch 1 has assigned to the LSPs (LSP1, LSP2, and LSP3) in the label range 1 are Label 1, Label 2, and Label 3.
  • the label range 2 can be 0 to 2 10 .
  • the labels that OpenFlow switch 1 has assigned to LSPs (LSP1 and LSP2) in label range 2 are label 1 and label 2.
  • Message 3 carries a label range of 2 (eg, 0 to 2 10 ).
  • the OpenFlow switch 1 assigns a new label to LSP1 and LSP2.
  • label 4 is assigned to LSP1 and label 5 is assigned to LSP2.
  • Label 4 and Label 5 cannot be labels in label range 2.
  • the label 4 and the label 5 are labels in 2 10 +1 to 2 20 -1.
  • the label range 1 carried in the message 2 sent by the OpenFlow switch 1 to the controller 1 is a union of sub-range 1 (ie 0 to 2 10 ) and sub-range 2 (ie 2 10 +1 to 2 15 ).
  • the tag range 1 is composed of subrange 1 (i.e., 0 to 2 10 ) and subrange 2 (i.e., 2 10 +1 to 2 15 ).
  • the message 2 also carries the label 1 that the OpenFlow switch 1 has assigned to the LSP1 in the sub-range 1, the open flow switch 1 has been assigned to the label 2 of the LSP2 in the sub-range 1, and the open flow switch 1 is in the sub-range Label 3 assigned to LSP3 in 2.
  • the controller 1 After receiving the message 2, the controller 1 can determine, according to the sub-range 1, the tag 1 and the tag 2, that the number of tags that the OpenFlow switch 1 has allocated for the LSP in the sub-range 1 is 2. Similarly, after receiving the message 2, the controller 1 can determine, according to the sub-range 2, the tag 3, that the number of tags that the OpenFlow switch 1 has allocated for the LSP in the sub-range 1 is one. The controller 1 generates a message 3 based on the message 2. Message 3 can carry a sub-range 1 (eg, 0 to 2 10 ). After receiving the message 3, the OpenFlow switch 1 assigns a new label to LSP1 and LSP2. For example, label 4 is assigned to LSP1 and label 5 is assigned to LSP2.
  • Label 4 and Label 5 cannot be labels from 0 to 2 10 .
  • tag 4 and tag 5 are tags in 2 10 +1 to 2 16 .
  • message 3 does not carry sub-range 1 (ie 0 to 2 10 ), but carries sub-range 2 (ie 2 10 +1 to 2 15 ).
  • the OpenFlow switch 1 assigns a new label to the LSP3.
  • Tag 6 cannot be a tag in 2 10 +1 to 2 15 .
  • the label 6 is a label in 2 15 +1 to 2 20 -1.
  • message 3 carries a sub-range of 1 (ie 0 to 2 10 ).
  • message 3 carries a sub-range 2 (ie, 2 10 +1 to 2 15 ). That is to say, after the controller 1 receives the message 2 whose sub-range 1 (ie, 0 to 2 10 ) and the sub-range 2 (ie, 2 10 +1 to 2 15 ) are carried, the sub-range 1 can be That is, 0 to 2 10 ) is determined to be the label range 2, and the sub-range 2 (ie, 2 10 +1 to 2 15 ) can also be determined as the label range 2.
  • the controller 1 can determine, according to the message 2, that the number of labels that the OpenFlow switch 1 has allocated for the LSP in the sub-range 1 is 2, and the label that the OpenFlow switch 1 has allocated for the LSP in the sub-range 1 The number is 1. That is, the controller 1 can determine that the number of labels that the OpenFlow switch 1 has allocated in the sub-range 1 is greater than the number of labels that the OpenFlow switch 1 has allocated in the sub-range 2. Therefore, if the controller 1 determines the sub-range 2 as the tag range 2, it helps to reduce the number of tags that the OpenFlow switch 1 needs to recycle. Further, it helps to reduce the number of new tags that the OpenFlow switch 1 needs to allocate. Therefore, it helps to reduce the overhead of the OpenFlow switch 1.
  • the controller 1 determines the sub-range 1 as the tag range 2, and the number of tags that the open-flow switch 1 needs to recycle is 2. The number of new tags that OpenFlow Switch 1 needs to allocate is also 2. The controller 1 determines the sub-range 2 as the tag range 2, and the number of tags that the open-flow switch 1 needs to recycle is one. The number of new tags that OpenFlow Switch 1 needs to allocate is also one.
  • Tag range 2 can be carried in an extended open message.
  • message 3 may include the structure shown in Table 5:
  • the length of the Start Label field is equal to 4 bytes.
  • the value of the start tag field is used to indicate the start tag of tag range 2.
  • the length of the End Label field is equal to 4 bytes.
  • the value of the end tag field is used to indicate the end tag of tag range 2.
  • the Start Label field and the End Label field define the label range 2.
  • the value of the start tag field is equal to 3000.
  • the value of the end tag field is equal to 3500.
  • the label range 2 is equal to ⁇ 3000, 3500>.
  • the OpenFlow switch 1 sends a message 4 to the controller 1.
  • OpenFlow switch 1 sends message 4 to controller 1.
  • the message 4 is used to inform the controller 1 that the open flow switch 1 has assigned a new label to the LSP of the OpenFlow switch 1 that has been assigned a label in the label range 2. That is to say, the OpenFlow switch 1 acts as a node of the LSP to which the new label is assigned, and the new label can be used to forward the traffic transmitted on the LSP to which the new label is allocated. Therefore, the OpenFlow switch 1 reclaims the label that has been assigned to the LSP within the label range 2.
  • Label range 2 becomes the range of labels that have been recycled.
  • the range of recovered labels in this application refers to a special range of labels.
  • the tags in the special tag range were once assigned by the forwarding device (e.g., OpenFlow Switch 1) to the LSP where the forwarding device is located.
  • the assigned tag is then recycled by the forwarding device.
  • the forwarding device may implement the collection of the allocated label by assigning a new label to the LSP where the forwarding device is located.
  • the forwarding device can also be implemented. Recycling of assigned labels.
  • the message 4 can carry the label range 2 and the information indicating that the label in the label range 2 has been recovered by the OpenFlow switch 1. After receiving the message 4, the controller 1 can determine that the OpenFlow switch 1 has recovered the label in the label range 2 by parsing the message 4.
  • the labels that OpenFlow switch 1 has assigned to LSPs (LSP1 and LSP2) in 0 to 2 10 are Label 1 and Label 2.
  • the label that the OpenFlow switch 1 has assigned to the LSP (LSP3) within 2 10 +1 to 2 15 may be the label 3.
  • OpenFlow switch 1 receives message 3. Message 3 carries 2 10 +1 to 2 15 .
  • the OpenFlow switch 1 assigns a new label to the LSP3 to which the OpenFlow switch 1 has assigned the label in 2 10 +1 to 2 15 .
  • Tag 4 is a tag from 0 to 2 10 . Therefore, the OpenFlow switch 1 can forward the traffic transmitted on the LSP 3 according to the tag 4.
  • OpenFlow Switch 1 no longer needs to use 2 10 +1 to 2 15 tags (eg, Tag 3) to forward traffic transmitted over LSP3.
  • tags e.g., Tag 3
  • the controller 1 can use a tag of 2 10 +1 to 2 15 (for example, tag 3) as a candidate global tag.
  • message 4 can be an extended open message.
  • the adjustment result field can be carried in message 4.
  • the structure of the adjustment result field can be as shown in Table 6:
  • the length of the Adjust Result field is 4 bytes.
  • the adjustment result field is used to indicate whether the OpenFlow switch 1 reclaims the allocated label. For example, when the value of the adjustment result field is equal to 1, it indicates that the OpenFlow switch 1 has reclaimed the allocated label. When the value of the adjustment result field is equal to 0, it indicates that the OpenFlow switch 1 does not reclaim the allocated label.
  • the controller 1 sends a message 5 to the open flow switch 1.
  • controller 1 sends a message 5 to OpenFlow switch 1.
  • Message 5 carries the label range 2.
  • Message 5 is used to notify OpenFlow switch 1, controller 1 has taken label range 2 as Candidate global label.
  • Tag range 2 can be carried in an extended open message.
  • message 5 may include the structure shown in Table 7:
  • the length of the Start Label field is equal to 4 bytes.
  • the value of the start tag field is used to indicate the start tag of tag range 2.
  • the length of the End Label field is equal to 4 bytes.
  • the value of the end tag field is used to indicate the end tag of tag range 2.
  • the Start Label field and the End Label field define the label range 2.
  • the value of the start tag field is equal to 3000.
  • the value of the end tag field is equal to 3500.
  • the label range 2 is equal to ⁇ 3000, 3500>.
  • the OpenFlow switch 1 can determine that ⁇ 3000, 3500> has been used as a candidate global tag by the controller 1.
  • the OpenFlow switch 1 assigns a label to the new LSP where the OpenFlow switch 1 is located outside the label range 2.
  • the controller 1 assigns a global label to the OpenFlow switch 1 within the label range 2. Specifically, the controller 1 may send a message carrying the global label to the OpenFlow switch 1. After receiving the message carrying the global label, the OpenFlow switch 1 uses the global label as a global label of the OpenFlow switch 1 and generates a label forwarding entry including the global label. Of course, the controller 1 can send a message carrying the global label to other OpenFlow switches. The other OpenFlow switch uses the global label as a global label of the other OpenFlow switch and generates a label forwarding entry containing the global label.
  • FIG. 3 is a schematic flowchart of a method for allocating global labels according to an embodiment of the present invention.
  • the execution body of the method is a controller.
  • the method can be applied to the network structure shown in FIG. 1 to implement the signaling interaction shown in FIG. 2.
  • the controller may be the controller 1 shown in FIG. 1.
  • the method includes:
  • the controller receives the first message sent by the forwarding device.
  • the first message carries a first label range.
  • the plurality of tags included in the first tag range are a subset of the plurality of tags included in the tag space of the forwarding device.
  • the label space is a special label range.
  • the label space of the forwarding device refers to a collection of all tags that the forwarding device can use.
  • the label space of the forwarding device includes a plurality of labels.
  • the first label range is not equal to the label space of the forwarding device.
  • the first label range may be a continuous label range or multiple consecutive label ranges.
  • the continuous label range includes multiple labels that are continuous.
  • the first label range may be 0 to 2 2 -1. That is, the plurality of tags in the first tag range are 0, 1, 2, and 3, respectively. Obviously, 0, 1, 2, and 3 are continuous.
  • the first label range may be 0 to 2 10 -1 and 2 15 to 2 20 -1. Obviously, 0 to 2 10 -1 is a continuous range of labels, and 2 15 to 2 20 -1 is also a continuous range of labels.
  • the forwarding device may process the received message by using a label in the label space. If the forwarding device has not assigned a label, the label space includes a label that has not been assigned by the forwarding device. If the forwarding device has assigned a tag but also includes a tag that has not been assigned, the tag space includes tags that have been assigned by the forwarding device and tags that have not been assigned by the forwarding device.
  • the forwarding device is a node of a label switched path. The forwarding device has assigned a label to the label switching path, and generates a label forwarding entry according to the allocated label. The forwarding device may forward the traffic transmitted on the label switching path according to the label forwarding entry. That is, the forwarding device assigns a label to the label switching path such that the forwarding device has the capability to forward traffic transmitted over the label switched path.
  • the forwarding device allocates a label to a label switching path where the forwarding device is located.
  • the forwarding device is a node of a label switched path.
  • the controller can be the controller 1.
  • the forwarding device may be an open flow switch 1.
  • the controller allocates a global label to the forwarding device according to the first label range carried in the first message.
  • the global tag is a tag in the first tag range.
  • the global tag can be one tag or multiple tags.
  • the global tag can be an available tag in the first tag range.
  • the available labels in the first label range refer to labels of the plurality of labels included in the first label range that have not been allocated by the forwarding device. Specifically, it may be that the tag has never been assigned by the forwarding device. It may also be a tag that is recovered by the forwarding device.
  • the tag that is recovered by the forwarding device refers to a tag that has been allocated by the forwarding device but is distributed by the forwarding device and then recovered by the forwarding device.
  • the global label is used to match a field in an MPLS header in a packet received by the forwarding device, so as to determine a label forwarding entry that matches the packet.
  • the global tag is used to perform operations other than the push, pop or swap operations involved in MPLS.
  • the global label is used to determine whether the global label matches a field in an MPLS header in the received message.
  • the global tag can be used to identify a network or a service.
  • the global label involved in the embodiment refers to a MPLS global label.
  • MPLS global label refer to the working group draft draft-li-mpls-global-label-framework-00 issued by the Internet Engineering Task Force (IETF).
  • IETF Internet Engineering Task Force
  • the controller involved in the embodiment assigning a global label to the forwarding device means that the controller instructs the forwarding device to generate a forwarding entry including the global label. Therefore, the forwarding device may process the traffic transmitted on the label switching path according to the forwarding entry including the global label.
  • FIG. 3a is a schematic flowchart of a method for allocating global labels according to an embodiment.
  • the method shown in Fig. 3a is obtained by expanding the method of assigning a global label as shown in Fig. 3.
  • S303, S304, S305, S306, and S307 refer to FIG. 3a.
  • the first label range includes a label that has been allocated to the first label switching path by the forwarding device, and the forwarding device is on the first label switching path.
  • the node, after S301 and before S302, the method may further include:
  • the controller sends a second message to the forwarding device.
  • the second message includes a second tag range.
  • the second label range includes a plurality of labels.
  • the second tag range is a subset of the first tag range.
  • the second message is used to instruct the forwarding device to allocate a new label for the second label switching path.
  • the new tag is for replacing a tag that has been assigned to the second label switching path by the forwarding device.
  • the new tag is outside the range of the second tag.
  • the second label switching path is a subset of the first label switching path.
  • the tag that has been assigned to the second label switching path by the forwarding device is a subset of the second tag range.
  • the global tag may be a tag of the plurality of tags included in the second tag range.
  • S302 may specifically include: the controller assigning the global label to the forwarding device according to the second label range, where the global label is a label in the second label range. It can be understood that the intersection of the label allocated by the forwarding device to the first label switching path and the plurality of labels included in the second label range is equal to the label that has been allocated by the forwarding device to the second label switching path. .
  • the fact that the new tag is outside the range of the second tag means that there is no intersection between the new tag and the plurality of tags included in the second tag range. If there is no indication to the contrary, the scope of the label in the application file contains at least one label.
  • the label range A is a subset of the label range B. It means that all the labels included in the label range A exist in all the labels included in the label range B.
  • the label C is a subset of the label range D means that the label C exists in all the labels included in the label range D.
  • the first tag range may be 0 to 2 10 -1.
  • the number of tags that have been assigned to the first label switching path by the forwarding device within 0 to 2 10 -1 may be five.
  • the first label switching path may be LSP1, LSP2, LSP3, LSP4, and LSP5.
  • the forwarding device is a node on LSP1 to LSP5.
  • the second label may range from 2 5 -1 to 2 6 -1.
  • the number of tags that have been assigned to the second tag switching path by the forwarding device within 2 5 -1 to 2 6 -1 may be 3.
  • the second label switching path may be LSP1, LSP2, and LSP3.
  • the values of the labels that have been assigned to the LSP1, LSP2, and LSP3 by the forwarding device are 2 5 , 2 5 +1 , and 2 5 + 2 , respectively.
  • the forwarding device assigns labels of LSP1, LSP2, and LSP3 values of 2 6 , 2 6 +1 , and 2 6 + 2 , respectively.
  • Labels with values of 2 6 , 2 6 +1 , and 2 6 + 2 are used to replace labels with labels of 2 5 , 2 5 +1 , and 2 5 + 2 , respectively. Therefore, after the label is replaced, the values of the labels corresponding to LSP1, LSP2, and LSP3 are 2 6 , 2 6 +1 , and 2 6 +2, respectively.
  • the forwarding device no longer needs to process the traffic transmitted on the LSP1 by using a label whose value is 2 5 .
  • Tags with values of 2 5 , 2 5 +1 and 2 5 + 2 are recovered by the forwarding device.
  • the first label range may be 0 to 2 10 -1 and 2 15 to 2 20 -1.
  • the labels assigned to LSP1, LSP2, and LSP3 by the forwarding device in 0 to 2 10 -1 are Label 1, Tag 2, and Tag 3, respectively.
  • the labels assigned to the LSP 4 and the LSP 5 by the forwarding device in 2 15 to 2 20 -1 are the tag 4 and the tag 5, respectively.
  • the first label switching path includes LSP1, LSP2, LSP3, LSP4, and LSP5.
  • the first message carries 0 to 2 10 -1, 2 15 to 2 20 -1, 3, and 2.
  • 3 denotes the number of tags allocated by the forwarding device within 0 to 2 10 -1.
  • 2 denotes the number of tags allocated by the forwarding device within 2 15 to 2 20 -1.
  • the first message may carry 0 to 2 10 -1, 2 15 to 2 20 -1, tag 1, tag 2, tag 3, tag 4, and tag 5.
  • 0 to 2 10 -1 correspond to the labels 1 to 3
  • 2 15 to 2 20 -1 correspond to the labels 4 to 5.
  • the forwarding device may determine that the number of labels allocated by the forwarding device in 0 to 2 10 -1 is equal to 3, 2 15 to 2 20 -1 and is allocated by the forwarding device.
  • the number of tags is equal to 2. Further, the forwarding device determines that the second tag range is equal to 2 15 to 2 20 -1. The forwarding device allocates a new label to LSP4 and LSP5 according to the indication of the second message. Specifically, the value of the new label assigned to LSP4 is equal to 5, and the value of the new label assigned to LSP5 is equal to 6. Therefore, the forwarding device can process the traffic transmitted on LSP4 using a tag having a value of 5. The forwarding device may process the traffic transmitted on the LSP 5 using a label having a value of 6. The forwarding device no longer uses the tag 4 to process the traffic transmitted on the LSP4. The forwarding device no longer uses the label 5 to process the traffic transmitted on the LSP 5. Therefore, the tag 4 and the tag 5 are recovered by the forwarding device.
  • the new label replacement forwarding device involved in the embodiment has been assigned a label of the label switching path, and the forwarding device includes a label forwarding entry corresponding to the label switching path.
  • the matching field of the label forwarding entry includes a label that the forwarding device has assigned to the label switching path.
  • the forwarding device needs to replace the label included in the matching field of the label forwarding entry with the new label. That is to say, the matching field of the replaced label forwarding entry no longer contains the label that the forwarding device has assigned to the label switching path.
  • the label advertisement protocol may be a label distribution protocol (LDP) or a resource reservation protocol-traffic engineering (RSVP-TE) or a border gateway protocol (BGP).
  • LDP label distribution protocol
  • RSVP-TE resource reservation protocol-traffic engineering
  • BGP border gateway protocol
  • Existing label advertisement protocols can support the assignment of labels to label switched paths.
  • the extended label advertisement protocol may identify the second message carrying the second label range.
  • the extended label advertisement protocol not only supports the allocation of labels for label switched paths, but also supports the assignment of new labels to label switched paths for assigned labels. The new tag is used to replace the assigned tag.
  • the method may further include:
  • the controller receives a third message sent by the forwarding device.
  • the third message is used to notify the controller that the forwarding device has allocated the new label for the second label switching path.
  • the third message may carry the second label range.
  • the forwarding device has assigned the new label to the second label switching path and replaces the label assigned by the forwarding device to the second label switching path with the new label. Therefore, the forwarding device reclaims the label assigned by the forwarding device to the second label switching path. Therefore, after receiving the third message, the controller may determine that the forwarding device reclaims the label allocated by the forwarding device to the second label switching path. After the forwarding device reclaims the tag, the controller allocates the global tag to the forwarding device within a second tag range. The global label assigned by the controller does not collide with the label used by the second label switching path, which helps to improve the reliability of the forwarding device as a node of the existing label switching path.
  • the method may further include:
  • the controller sends a fourth message to the forwarding device.
  • the fourth message includes the second tag range.
  • the fourth message is used to notify the forwarding device, and the controller has used the second label range as a candidate global label.
  • the second label range may be carried in the fourth message.
  • the forwarding device After the forwarding device receives the fourth message including the second label range, if the forwarding device needs to be a node that is a new label switching path, the forwarding device allocates the new label switching path. When the tag is used, the tag in the second tag range is not used. Therefore, the above technical solution helps to reduce the conflict between the forwarding device assigning a label to the new label switching path and the global label allocated by the controller to the forwarding device. Therefore, the above scheme helps to improve the reliability of the forwarding device as a node of the new label switching path.
  • the second message is further used to notify the forwarding device, and the controller has used the second label range as a candidate global label.
  • the first message is further carried in the first label a label that has been allocated to the first label switching path by the forwarding device, or the first message further carries an identifier of the first sub-range, an identifier of the second sub-range, the number of the first label, and a number of second tags, the first tag range including the first sub-range and the second sub-range, in the first sub-range, allocated to the first label switching path by the forwarding device
  • the label is the first label
  • the label that has been allocated to the first label switching path by the forwarding device in the second sub-range is the second label
  • the number of the first label is smaller than The number of second labels.
  • the controller determines that the first sub-range is the second label range.
  • S306 can include:
  • the number of the first tags is smaller than the number of the second tags, and the controller determines that the number of the first tags is smaller than the number of the second tags.
  • the controller determines that the first sub-range is the second tag range based on the number of the first tags being less than the number of the second tags.
  • the method may further include:
  • the controller sends a fifth message to the forwarding device.
  • the fifth message is used to instruct the forwarding device to send a label space of the forwarding device to the controller.
  • the fifth message is further configured to instruct the forwarding device to send, to the controller, a label that has been allocated by the forwarding device or a number of labels that have been allocated by the forwarding device.
  • the first message further carries a label that has been allocated to the first label switching path by the forwarding device in the first label range, and the forwarding device is the first The node on the label switched path.
  • the controller may include: the controller assigning the global label to the forwarding device according to the first label range and a label that has been allocated to the first label switching path by the forwarding device, where the global label is There is no intersection of the labels assigned by the forwarding device to the first label switching path.
  • FIG. 4 is a schematic structural diagram of a controller provided by an embodiment.
  • Controller 400 is specifically a device for assigning global tags. Controller 400 can be used to perform the method illustrated in FIG. Control The 400 can be applied to the network structure shown in FIG. 1 to implement the signaling interaction shown in FIG. 2. Specifically, the controller 400 may be the controller 1 shown in FIG. 1.
  • the controller 400 includes a first receiving unit 401 and an allocating unit 402.
  • the first receiving unit 401 is configured to receive the first message sent by the forwarding device.
  • the first message carries a first label range.
  • the plurality of tags included in the first tag range are a subset of the plurality of tags included in the tag space of the forwarding device.
  • the label space is a special label range.
  • the label space of the forwarding device refers to a collection of all tags that the forwarding device can use.
  • the label space of the forwarding device includes a plurality of labels.
  • the first label range is not equal to the label space of the forwarding device.
  • the first label range may be a continuous label range or multiple consecutive label ranges.
  • the continuous label range includes multiple labels that are continuous.
  • the first label range may be 0 to 2 2 -1. That is, the plurality of tags in the first tag range are 0, 1, 2, and 3, respectively. Obviously, 0, 1, 2, and 3 are continuous.
  • the first label range may be 0 to 2 10 -1 and 2 15 to 2 20 -1. Obviously, 0 to 2 10 -1 is a continuous range of labels, and 2 15 to 2 20 -1 is also a continuous range of labels.
  • the forwarding device may process the received message by using a label in the label space. If the forwarding device has not assigned a label, the label space includes a label that has not been assigned by the forwarding device. If the forwarding device has assigned a tag but also includes a tag that has not been assigned, the tag space includes tags that have been assigned by the forwarding device and tags that have not been assigned by the forwarding device.
  • the forwarding device is a node of a label switched path. The forwarding device has assigned a label to the label switching path, and generates a label forwarding entry according to the allocated label. The forwarding device may forward the traffic transmitted on the label switching path according to the label forwarding entry. That is, the forwarding device assigns a label to the label switching path such that the forwarding device has the capability to forward traffic transmitted over the label switched path.
  • the forwarding device allocates a label to a label switching path where the forwarding device is located.
  • the forwarding device is a node of a label switched path.
  • the controller 400 may be the controller 1.
  • the forwarding device may be an open flow switch 1.
  • the allocating unit 402 is configured to carry according to the first message received by the first receiving unit 401
  • the first tag range is a global tag assigned to the forwarding device.
  • the global tag is a tag in the first tag range.
  • the global tag can be one tag or multiple tags.
  • the global tag can be an available tag in the first tag range.
  • the available labels in the first label range refer to labels of the plurality of labels included in the first label range that have not been allocated by the forwarding device. Specifically, it may be that the tag has never been assigned by the forwarding device. It may also be a tag that is recovered by the forwarding device.
  • the tag that is recovered by the forwarding device refers to a tag that has been allocated by the forwarding device but is distributed by the forwarding device and then recovered by the forwarding device.
  • the global label is used to match a field in an MPLS header in a packet received by the forwarding device, so as to determine a label forwarding entry that matches the packet.
  • the global tag is used to perform operations other than the push, pop or swap operations involved in MPLS.
  • the global label is used to determine whether the global label matches a field in an MPLS header in the received message.
  • the global tag can be used to identify a network or a service.
  • the controller involved in the embodiment allocates a global label to the forwarding device
  • the controller instructs the forwarding device to generate a forwarding entry that includes the global label. Therefore, the forwarding device may process the traffic transmitted on the label switching path according to the forwarding entry including the global label.
  • FIG. 5 is a schematic structural diagram of a controller provided by an embodiment.
  • the controller 400 of FIG. 5 is expanded based on the controller 400 shown in FIG. For details, refer to FIG. 5 for the first sending unit 403, the second receiving unit 404, the second sending unit 405, the determining unit 406, and the third sending unit 407.
  • the first label range includes a label that has been allocated to the first label switching path by the forwarding device, and the forwarding device is on the first label switching path. node.
  • the controller 400 may also include a first transmitting unit 403.
  • the first sending unit 403 is configured to send a second message to the forwarding device after the first receiving unit 401 receives the first message, and before the allocating unit 402 allocates the global label to the forwarding device.
  • the second message includes a second tag range.
  • the second label range includes a plurality of labels.
  • the second tag range is a subset of the first tag range.
  • the second message is used to instruct the forwarding device to allocate a new label for the second label switching path.
  • the new label is used to replace the already A tag assigned to the second label switching path by the forwarding device.
  • the new tag is outside the range of the second tag.
  • the second label switching path is a subset of the first label switching path.
  • the tag that has been assigned to the second label switching path by the forwarding device is a subset of the second tag range.
  • the global tag may be a tag of the plurality of tags included in the second tag range.
  • the allocating unit 402 may be specifically configured by the controller to allocate the global label to the forwarding device according to the second label range, where the global label is a label in the second label range. It can be understood that the intersection of the label allocated by the forwarding device to the first label switching path and the plurality of labels included in the second label range is equal to the label that has been allocated by the forwarding device to the second label switching path. .
  • the fact that the new tag is outside the range of the second tag means that there is no intersection between the new tag and the plurality of tags included in the second tag range.
  • the first tag range may be 0 to 2 10 -1.
  • the number of tags that have been assigned to the first label switching path by the forwarding device within 0 to 2 10 -1 may be five.
  • the first label switching path may be LSP1, LSP2, LSP3, LSP4, and LSP5.
  • the forwarding device is a node on LSP1 to LSP5.
  • the second label may range from 2 5 -1 to 2 6 -1.
  • the number of tags that have been assigned to the second tag switching path by the forwarding device within 2 5 -1 to 2 6 -1 may be 3.
  • the second label switching path may be LSP1, LSP2, and LSP3.
  • the values of the labels that have been assigned to the LSP1, LSP2, and LSP3 by the forwarding device are 2 5 , 2 5 +1 , and 2 5 + 2 , respectively.
  • the forwarding device assigns labels of LSP1, LSP2, and LSP3 values of 2 6 , 2 6 +1 , and 2 6 + 2 , respectively.
  • Labels with values of 2 6 , 2 6 +1 , and 2 6 + 2 are used to replace labels with labels of 2 5 , 2 5 +1 , and 2 5 + 2 , respectively. Therefore, after the label is replaced, the values of the labels corresponding to LSP1, LSP2, and LSP3 are 2 6 , 2 6 +1 , and 2 6 +2, respectively.
  • the forwarding device no longer needs to process the traffic transmitted on the LSP1 by using a label whose value is 2 5 .
  • Tags with values of 2 5 , 2 5 +1 and 2 5 + 2 are recovered by the forwarding device.
  • the first label range may be 0 to 2 10 -1 and 2 15 to 2 20 -1.
  • the labels assigned to LSP1, LSP2, and LSP3 by the forwarding device in 0 to 2 10 -1 are Label 1, Label 2, and Label 3, respectively.
  • the labels assigned to the LSP 4 and the LSP 5 by the forwarding device in 2 15 to 2 20 -1 are the tag 4 and the tag 5, respectively.
  • the first label switching path includes LSP1, LSP2, LSP3, LSP4, and LSP5.
  • the first message carries 0 to 2 10 -1, 2 15 to 2 20 -1, 3, and 2.
  • said forwarding number 3 represents a tag dispensing apparatus in 0 to 210-1.
  • 2 denotes the number of tags allocated by the forwarding device within 2 15 to 2 20 -1.
  • the first message may carry 0 to 2 10 -1, 2 15 to 2 20 -1, tag 1, tag 2, tag 3, tag 4, and tag 5.
  • 0 to 2 10 -1 correspond to the labels 1 to 3
  • 2 15 to 2 20 -1 correspond to the labels 4 to 5.
  • the forwarding device may determine that the number of labels allocated by the forwarding device in 0 to 2 10 -1 is equal to 3, 2 15 to 2 20 -1 and is allocated by the forwarding device.
  • the number of tags is equal to 2. Further, the forwarding device determines that the second tag range is equal to 2 15 to 2 20 -1. The forwarding device allocates a new label to LSP4 and LSP5 according to the indication of the second message. Specifically, the value of the new label assigned to LSP4 is equal to 5, and the value of the new label assigned to LSP5 is equal to 6. Therefore, the forwarding device can process the traffic transmitted on LSP4 using a tag having a value of 5. The forwarding device may process the traffic transmitted on the LSP 5 using a label having a value of 6. The forwarding device no longer uses the tag 4 to process the traffic transmitted on the LSP4. The forwarding device no longer uses the label 5 to process the traffic transmitted on the LSP 5. Therefore, the tag 4 and the tag 5 are recovered by the forwarding device.
  • the new label replacement forwarding device involved in the embodiment has been assigned a label of the label switching path, and the forwarding device includes a label forwarding entry corresponding to the label switching path.
  • the matching field of the label forwarding entry includes a label that the forwarding device has assigned to the label switching path.
  • the forwarding device needs to replace the label included in the matching field of the label forwarding entry with the new label. That is to say, the matching field of the replaced label forwarding entry no longer contains the label that the forwarding device has assigned to the label switching path.
  • the label advertisement protocol can be LDP or RSVP-TE or BGP.
  • Existing label advertisement protocols can support the assignment of labels to label switched paths.
  • the extended label advertisement protocol may identify the second message carrying the second label range.
  • the extended label advertisement protocol not only supports the allocation of labels for label switched paths, but also supports the assignment of new labels to label switched paths for assigned labels.
  • the new tag is used to replace the assigned tag.
  • the controller 400 may further include a second receiving unit 404.
  • the second receiving unit 404 is configured to: after the first sending unit 403 sends the second message to the forwarding device, and before the allocating unit 402 allocates the global label to the forwarding device, receive the sending by the forwarding device Third message.
  • the third message is used to notify the controller 400 that the forwarding device has assigned the new label to the second label switching path.
  • the third message may carry the second label range.
  • the forwarding device has assigned the new label to the second label switching path and replaces the label assigned by the forwarding device to the second label switching path with the new label. Therefore, the forwarding device reclaims the label assigned by the forwarding device to the second label switching path. Therefore, after receiving the third message, the controller 400 may determine that the forwarding device reclaims the label allocated by the forwarding device to the second label switching path. After the forwarding device reclaims the tag, the controller 400 allocates the global tag to the forwarding device within the second tag range. The global label assigned by the controller 400 does not collide with the label used by the second label switching path, helping to improve the reliability of the forwarding device as a node of the existing label switching path.
  • the controller 400 may further include a second sending unit 405.
  • the second sending unit 405 is configured to send, after the second receiving unit 404 receives the third message sent by the forwarding device, to the forwarding device before the allocating unit 402 allocates the global tag to the forwarding device Fourth message.
  • the fourth message includes the second tag range.
  • the fourth message is used to notify the forwarding device, and the controller 400 has used the second tag range as a candidate global tag.
  • the second label range may be carried in the fourth message.
  • the forwarding device After the forwarding device receives the fourth message including the second label range, if the forwarding device needs to be a node that is a new label switching path, the forwarding device allocates the new label switching path. When the tag is used, the tag in the second tag range is not used. Therefore, the above technical solution helps to reduce the conflict between the forwarding device assigning a label to the new label switching path and the global label allocated by the controller to the forwarding device. Therefore, the above scheme helps to improve the reliability of the forwarding device as a node of the new label switching path.
  • the second message is further used to notify the forwarding device, and the controller 400 has used the second label range as a candidate global label.
  • the first message further carries a label that has been allocated to the first label switching path by the forwarding device in the first label range, or the first message.
  • the identifier of the first sub-range, the identifier of the second sub-range, the number of the first label, and the number of the second label, the first label range including the first sub-range and the second sub-range, a tag that has been assigned by the forwarding device to the first label switching path within the first sub-range is the first tag, which has been assigned by the forwarding device to the second sub-range
  • the label of the first label switching path is the second label, and the number of the first label The amount is less than the number of the second tags.
  • the controller 400 can also include a determination unit 406.
  • the determining unit 406 is configured to determine the first message after the first receiving unit 401 receives the first message sent by the forwarding device, and before the first sending unit 403 sends the second message to the forwarding device
  • the sub-range is the second tag range.
  • the determining unit 406 determines the second label range according to the first label range carried in the first message.
  • the determining unit 406 may be configured to: determine, according to the label that is allocated by the forwarding device to the first label switching path in the first label range that is carried in the first message, The number of the first tags is smaller than the number of the second tags, or the number of the first tags is smaller than the number of the first tags and the number of the second tags. Quantity.
  • the first sub-range is determined to be the second tag range based on the number of the first tags being less than the number of the second tags.
  • the controller 400 may further include a third sending unit 407.
  • the third sending unit 407 is configured to send a fifth message to the forwarding device before the first receiving unit 401 receives the first message sent by the forwarding device.
  • the fifth message is used to instruct the forwarding device to send the label space of the forwarding device to the controller 400.
  • the fifth message is further configured to instruct the forwarding device to send, to the controller, a label that has been allocated by the forwarding device or a number of labels that have been allocated by the forwarding device.
  • the first message further carries a label that has been allocated to the first label switching path by the forwarding device in the first label range, and the forwarding device is the first The node on the label switched path.
  • the allocating unit 402 may be configured to: allocate the global label to the forwarding device according to the first label range and a label that has been allocated to the first label switching path by the forwarding device, where the global label has been There is no intersection of the labels assigned by the forwarding device to the first label switching path.
  • FIG. 6 is a schematic structural diagram of a controller provided by an embodiment.
  • the controller 600 includes a transmitter 601, a receiver 602, a processor 603, and a memory 604.
  • Processor 603 is coupled to transmitter 601, receiver 602, and memory 604, respectively.
  • a computer program is stored in the memory 604.
  • the processor 603 can execute the processing in this embodiment by accessing the computer program.
  • the controller 600 can be used to implement the controller shown in FIG. 4 or 5.
  • Controller 600 can be used to perform the method shown in FIG.
  • the receiver 602 is configured to receive the first message sent by the forwarding device.
  • the receiver 602 can be used to implement the first receiving unit 401.
  • the first message please refer to the description of the embodiment corresponding to FIG. 4, and details are not described herein again.
  • the processor 603 is configured to allocate a global label to the forwarding device according to the first label range carried in the first message received by the receiver 602.
  • processor 603 can be used to perform the processing of allocation unit 402.
  • allocation unit 402. For the forwarding device and the global label, refer to the description of the embodiment corresponding to FIG. 4, and details are not described herein again.
  • the transmitter 601 is configured to send a second message to the forwarding device after the receiver 602 receives the first message and before the processor 603 allocates the global tag to the forwarding device.
  • the transmitter 601 can be used to implement the first transmitting unit 403.
  • the transmitter 601 can be used to implement the first transmitting unit 403.
  • the second message please refer to the description of the embodiment corresponding to FIG. 5, and details are not described herein again.
  • the receiver 602 is further configured to: after the transmitter 601 sends the second message to the forwarding device, and before the processor 603 allocates the global label to the forwarding device, receive the forwarding device The third message sent.
  • the receiver 602 can be used to implement the second receiving unit 404.
  • the receiver 602 can be used to implement the second receiving unit 404.
  • the third message refer to the description of the embodiment corresponding to FIG. 5, and details are not described herein again.
  • the transmitter 601 is further configured to: after the receiver 602 receives the third message sent by the forwarding device, and before the processor 603 allocates the global label to the forwarding device, The device sends a fourth message.
  • the transmitter 601 can be used to implement the second transmitting unit 405.
  • the transmitter 601 can be used to implement the second transmitting unit 405.
  • the fourth message refer to the description of the embodiment corresponding to FIG. 5, and details are not described herein again.
  • the second message is further used to notify the forwarding device, and the controller has used the second label range as a candidate global label.
  • the first message further carries a label that has been allocated to the first label switching path by the forwarding device in the first label range, or the first message.
  • the label of the switching path is the first label
  • the label that has been allocated to the first label switching path by the forwarding device in the second sub-range is the second label, and the number of the first label Less than the number of the second tags.
  • the processor 603 is further configured to determine the first sub-range after the receiver 602 receives the first message sent by the forwarding device, and before the transmitter 601 sends the second message to the forwarding device. Is the second label range.
  • the processor 603 may be configured to: determine, according to the label that is allocated by the forwarding device to the first label switching path in the first label range that is carried in the first message, The number of the first tags is smaller than the number of the second tags, or the number of the first tags is smaller than the number of the first tags and the number of the second tags. Quantity.
  • the first sub-range is determined to be the second tag range based on the number of the first tags being less than the number of the second tags.
  • the transmitter 601 is further configured to send the fifth message to the forwarding device before the receiver 602 receives the first message sent by the forwarding device.
  • the transmitter 601 can be used to implement the third transmitting unit 407.
  • the transmitter 601 can be used to implement the third transmitting unit 407.
  • the fifth message refer to the description of the embodiment corresponding to FIG. 5, and details are not described herein again.
  • FIG. 7 is a schematic flowchart diagram of a method for acquiring a global label according to an embodiment of the present invention.
  • the execution body of the method is a forwarding device.
  • the method can be applied to the network structure shown in FIG. 1 to implement the signaling interaction shown in FIG. 2.
  • the controller may be the OpenFlow switch 1 shown in FIG. 1.
  • the method includes:
  • the forwarding device sends a first message to the controller.
  • the first message carries a first label range.
  • the plurality of tags included in the first tag range are a subset of the plurality of tags included in the tag space of the forwarding device.
  • the label space is a special label range.
  • the label space of the forwarding device refers to a collection of all tags that the forwarding device can use.
  • the label space of the forwarding device includes a plurality of labels.
  • the first label range is not equal to the label space of the forwarding device.
  • the forwarding device acquires, by the controller, a global label that is allocated by the forwarding device according to the first label range carried in the first message.
  • the global tag is a tag in the first tag range.
  • the global label can be one Tags can also be multiple tags.
  • the global tag can be an available tag in the first tag range.
  • the available labels in the first label range refer to labels of the plurality of labels included in the first label range that have not been allocated by the forwarding device. Specifically, it may be that the tag has never been assigned by the forwarding device. It may also be a tag that is recovered by the forwarding device.
  • the tag that is recovered by the forwarding device refers to a tag that has been allocated by the forwarding device but is distributed by the forwarding device and then recovered by the forwarding device.
  • the message carrying the global label may be sent to the forwarding device.
  • the forwarding device may acquire the global label from the message.
  • S702 reference may be made to the description of S302 in the embodiment corresponding to FIG. 3. I will not repeat them here.
  • FIG. 8 is a schematic flowchart of a method for obtaining a global label according to an embodiment.
  • the method shown in Fig. 8 is obtained by expanding on the basis of the method shown in Fig. 7.
  • the expanded method may further include S703, S704, S705, and S706.
  • S703, S704, S705, and S706, refer to FIG. 8.
  • the first label range includes a label that has been allocated to the first label switching path by the forwarding device, and the forwarding device is on the first label switching path. node.
  • the method may further include:
  • the forwarding device receives the controller to send a second message.
  • the second message includes a second tag range.
  • the second label range includes a plurality of labels.
  • the second tag range is a subset of the first tag range.
  • the second message is used to instruct the forwarding device to allocate a new label for the second label switching path.
  • the new tag is for replacing a tag that has been assigned to the second label switching path by the forwarding device.
  • the new tag is outside the range of the second tag.
  • the second label switching path is a subset of the first label switching path.
  • the tag that has been assigned to the second label switching path by the forwarding device is a subset of the second tag range.
  • the second tag range is used by the controller to allocate the global tag to the forwarding device.
  • the global tag may be a tag in the second tag range.
  • the global tag involved in S702 is determined by the controller assigning the global tag to the forwarding device according to the second tag range. It can be understood that the intersection of the label allocated by the forwarding device to the first label switching path and the plurality of labels included in the second label range is equal to the label that has been allocated by the forwarding device to the second label switching path. sign.
  • the fact that the new tag is outside the range of the second tag means that there is no intersection between the new tag and the plurality of tags included in the second tag range.
  • the method further includes:
  • the forwarding device sends a third message to the controller.
  • the third message is used to notify the controller that the forwarding device has allocated the new label for the second label switching path.
  • the method may further include:
  • the forwarding device receives a fourth message sent by the controller.
  • the fourth message includes the second tag range.
  • the fourth message is used to notify the forwarding device, and the controller has used the second label range as a candidate global label.
  • the second message is further used to notify the forwarding device, and the controller has used the second label range as a candidate global label.
  • the first message further carries a label that has been allocated to the first label switching path by the forwarding device in the first label range, or the first message.
  • the label of the first label switching path is the second label, and the number of the first label is smaller than the number of the second label.
  • the controller determines that the first sub-range is the second tag range. Specifically, the controller is allocated to the first label by the forwarding device according to the first label in the first message. Determining the number of the first label is smaller than the number of the second label, or the controller is based on the number of the first label carried in the first message and the number of the second label Determining that the number of the first tags is less than the number of the second tags. The controller determines that the first sub-range is the second tag range based on the number of the first tags being less than the number of the second tags.
  • the method before S701, the method further includes:
  • the forwarding device receives a fifth message sent by the controller.
  • the fifth message is used to instruct the forwarding device to send a label space of the forwarding device to the controller.
  • the fifth message is further configured to instruct the forwarding device to send, to the controller, a label that has been allocated by the forwarding device or a number of labels that have been allocated by the forwarding device.
  • FIG. 9 is a schematic structural diagram of a forwarding device according to an embodiment.
  • the forwarding device is specifically a device for acquiring a global label.
  • the forwarding device can be used to perform the method illustrated in FIG.
  • the controller can be applied to the network structure shown in FIG. 1 to implement the signaling interaction shown in FIG. 2.
  • the controller may be the OpenFlow switch 1 shown in FIG. 1.
  • the forwarding device 900 specifically includes:
  • the first sending unit 901 is configured to send a first message to the controller.
  • the first message carries a first label range.
  • the plurality of tags included in the first tag range are a subset of the plurality of tags included in the tag space of the forwarding device.
  • the label space is a special label range.
  • the label space of the forwarding device refers to a collection of all tags that the forwarding device can use.
  • the label space of the forwarding device includes a plurality of labels.
  • the first label range is not equal to the label space of the forwarding device.
  • the first sending unit 901 can be used to perform the step of S701.
  • the controller and the first message refer to the description of the corresponding embodiment in FIG. 7 , and details are not described herein again.
  • the obtaining unit 902 is configured to acquire, by the controller, a global label allocated by the forwarding device according to the first label range carried in the first message.
  • the global tag is a tag in the first tag range.
  • the global tag can be one tag or multiple tags.
  • the global tag can be an available tag in the first tag range.
  • the available labels in the first label range refer to labels of the plurality of labels included in the first label range that have not been allocated by the forwarding device. Specifically, it may be that the tag has never been assigned by the forwarding device. It may also be a tag that is recovered by the forwarding device.
  • the tag that is recovered by the forwarding device refers to a tag that has been allocated by the forwarding device but is distributed by the forwarding device and then recovered by the forwarding device.
  • the obtaining unit 902 can be used to perform the steps of S702.
  • the obtaining unit 902 can be used to perform the steps of S702.
  • details about the global label refer to the description of the embodiment corresponding to FIG. 7 , and details are not described herein again.
  • FIG. 10 is a schematic structural diagram of a forwarding device according to an embodiment.
  • the forwarding device shown in Fig. 10 is obtained by expanding the forwarding device shown in Fig. 9.
  • the extended forwarding device includes a first receiving unit 903, a second transmitting unit 904, a second receiving unit 905, and a third receiving unit 906.
  • the first label range includes a label that has been allocated to the first label switching path by the forwarding device, and the forwarding device is a node on the first label switching path.
  • the forwarding device 900 shown in FIG. 9 may further include:
  • the first receiving unit 903 is configured to: after the first sending unit 901 sends the first message, and before the acquiring unit 902 acquires the global label, receive the second message sent by the controller.
  • the second message includes a second tag range.
  • the second label range includes a plurality of labels.
  • the second tag range is a subset of the first tag range.
  • the second message is used to instruct the forwarding device to allocate a new label for the second label switching path.
  • the new tag is for replacing a tag that has been assigned to the second label switching path by the forwarding device.
  • the new tag is outside the range of the second tag.
  • the second label switching path is a subset of the first label switching path.
  • the tag that has been assigned to the second label switching path by the forwarding device is a subset of the second tag range.
  • the second tag range is used by the controller to allocate the global tag to the forwarding device.
  • the global tag may be a tag in the second tag range.
  • intersection of the label allocated by the forwarding device to the first label switching path and the plurality of labels included in the second label range is equal to the label that has been allocated by the forwarding device to the second label switching path.
  • the fact that the new tag is outside the range of the second tag means that there is no intersection between the new tag and the plurality of tags included in the second tag range.
  • the first receiving unit 903 can be used to perform the step of S703.
  • the first receiving unit 903 can be used to perform the step of S703.
  • the forwarding device 900 may further include:
  • the second sending unit 904 is configured to send a third message to the controller after the first receiving unit 903 receives the second message, and before the acquiring unit 902 acquires the global label.
  • the third message is used to notify the controller that the forwarding device has allocated the new label for the second label switching path.
  • the second sending unit 904 can be used to perform the steps of S704.
  • the third message refers to the description of the embodiment corresponding to FIG. 7, and details are not described herein again.
  • the forwarding device 900 may further include:
  • a second receiving unit 905 configured to: after the second sending unit sends the third message to the controller, and before the acquiring unit acquires the global label, receive a fourth message sent by the controller .
  • the fourth message includes the second tag range.
  • the fourth message is used to notify the forwarding device, and the controller has used the second label range as a candidate global label.
  • the second receiving unit 905 can be used to perform the step of S705.
  • the fourth message refers to the description of the embodiment corresponding to FIG. 7, and details are not described herein again.
  • the second message is further used to notify the forwarding device, and the controller has used the second label range as a candidate global label.
  • the first message further carries a label that has been allocated to the first label switching path by the forwarding device in the first label range, or the first message.
  • the label of the first label switching path is the second label, and the number of the first label is smaller than the number of the second label.
  • the controller determines that the first sub-range is the second tag range. Specifically, the controller determines, according to the label that is included in the first label that has been allocated by the forwarding device to the first label switching path, in the first message, that the number of the first label is smaller than The number of the second label, or The controller determines that the number of the first labels is smaller than the number of the second labels according to the number of the first labels carried in the first message and the number of the second labels. The controller determines that the first sub-range is the second tag range based on the number of the first tags being less than the number of the second tags.
  • the forwarding device 900 may further include:
  • the third receiving unit 906 is configured to receive the fifth message sent by the controller before the first sending unit sends the first message.
  • the fifth message is used to instruct the forwarding device to send a label space of the forwarding device to the controller.
  • the fifth message is further configured to instruct the forwarding device to send, to the controller, a label that has been allocated by the forwarding device or a number of labels that have been allocated by the forwarding device.
  • the third receiving unit 906 can be configured to perform the steps of S706.
  • the third receiving unit 906 can be configured to perform the steps of S706.
  • FIG. 11 is a schematic structural diagram of a forwarding device according to an embodiment.
  • the forwarding device 1100 includes a transmitter 1101, a receiver 1102, a processor 1103, and a memory 1104.
  • the processor 1103 is coupled to a transmitter 1101, a receiver 1102, and a memory 1104, respectively.
  • a computer program is stored in the memory 1104.
  • the processor 1103 can perform the processing in this embodiment by accessing the computer program.
  • the forwarding device 1100 can be used to implement the forwarding device shown in FIG. 9 or FIG.
  • the forwarding device 1100 can be used to perform the method shown in FIG. 7 or 8.
  • the transmitter 1101 is configured to send a first message to the controller.
  • the first message please refer to the description in the embodiment corresponding to FIG. 9.
  • the first transmitting unit 901 please refer to the description of the first transmitting unit 901 with reference to the embodiment corresponding to FIG.
  • the transmitter 1100 can be used to perform the steps of S701.
  • the controller and the first message refer to the description of the corresponding embodiment in FIG. 7 , and details are not described herein again.
  • the processor 1103 is configured to acquire, by the controller, a global label allocated by the forwarding device according to the first label range carried in the first message.
  • the global tag is a tag in the first tag range.
  • the global tag can be one tag or multiple tags.
  • the processor 1103 can be configured to perform the steps of S702.
  • the processor 1103 can be configured to perform the steps of S702.
  • details about the global label refer to the description of the embodiment corresponding to FIG. 7 , and details are not described herein again.
  • the first label range includes the forwarding device that has been A tag assigned to the first label switching path, the forwarding device being a node on the first label switching path.
  • the receiver 1102 can be configured to receive the controller to send the second message after the transmitter 1101 sends the first message and before the processor 1103 acquires the global tag.
  • the receiver 1102 can be used to perform the steps of S703.
  • the receiver 1102 can be used to perform the steps of S703.
  • details about the second message refer to the description of the embodiment corresponding to FIG. 7, and details are not described herein again.
  • the transmitter 1101 may be further configured to send a third message to the controller after the receiver 1102 receives the second message and before the processor 1103 acquires the global label.
  • the transmitter 1101 can be used to perform the steps of S704.
  • the transmitter 1101 can be used to perform the steps of S704.
  • details about the third message refer to the description of the embodiment corresponding to FIG. 7, and details are not described herein again.
  • the receiver 1102 is further configured to: after the transmitter 1101 sends the third message to the controller, and before the processor 1103 acquires the global label, receive the fourth message sent by the controller. .
  • the receiver 1102 can be used to perform the steps of S705.
  • the receiver 1102 can be used to perform the steps of S705.
  • details about the fourth message refer to the description of the embodiment corresponding to FIG. 7, and details are not described herein again.
  • the second message is further used to notify the forwarding device, and the controller has used the second label range as a candidate global label.
  • the first message further carries a label that has been allocated to the first label switching path by the forwarding device in the first label range, or the first message.
  • the label of the first label switching path is the second label, and the number of the first label is smaller than the number of the second label.
  • the receiver 1102 is further configured to receive, after the transmitter 1101 sends the first message, a fifth message sent by the controller.
  • the receiver 1102 can be used to perform the steps of S706.
  • the receiver 1102 can be used to perform the steps of S706.
  • details about the fifth message refer to the description of the embodiment corresponding to FIG. 7, and details are not described herein again.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit may be only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined. Or it can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product.
  • the technical solution of the present invention which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to make a computer device (can be a personal computer, service)
  • the server, or network device, etc. performs all or part of the steps of the method of the various embodiments of the present invention.
  • the foregoing storage medium includes: a flash disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store a computer program. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

提供了一种分配全局标签的方法,包括:控制器接收转发装置发送的第一消息,所述第一消息中携带第一标签范围,所述第一标签范围包括的多个标签是所述转发装置的标签空间包括的多个标签的子集,所述第一标签范围不等于所述转发装置的标签空间;所述控制器根据所述第一消息中携带的所述第一标签范围为所述转发装置分配全局标签,所述全局标签是所述第一标签范围中的标签。此外,还提供了获取全局标签的方法、控制器以及转发装置。上述方案有助于提高全局标签的分配效率。

Description

分配全局标签的方法、获取全局标签的方法及相关装置 技术领域
本发明实施例涉及通信技术领域,特别涉及分配全局标签的方法、获取全局标签的方法、控制器以及转发装置。
背景技术
全局标签(global label)技术是基于多协议标记交换(multiprotocol label switching,MPLS)的技术。
现有技术中,为转发装置分配全局标签需要通过手工配置实现。上述技术方案中,全局标签的分配效率比较低。
发明内容
实施例提供了分配全局标签的方法、获取全局标签的方法、控制器以及转发装置,有助于提高全局标签的分配效率。
一方面,提供了一种分配全局标签的方法,包括:
控制器接收转发装置发送的第一消息,所述第一消息中携带第一标签范围,所述第一标签范围包括的多个标签是所述转发装置的标签空间包括的多个标签的子集,所述第一标签范围不等于所述转发装置的标签空间;
所述控制器根据所述第一消息中携带的所述第一标签范围为所述转发装置分配全局标签,所述全局标签是所述第一标签范围中的标签。
结合第一方面,在第一方面的第一种可能的实现方式中,所述第一标签范围包括已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点,所述控制器接收所述第一消息之后,以及所述控制器为所述转发装置分配所述全局标签之前,所述方法还包括:
所述控制器向所述转发装置发送第二消息,所述第二消息包括第二标签范围,所述第二标签范围包括多个标签,所述第二标签范围是所述第一标签范围的子集,所述第二消息用于指示所述转发装置为第二标签交换路径分配新的标签,所述新的标签用于替换已被所述转发装置分配给所述第二标签交换路径的标签,所述新的标签在所述第二标签范围之外,所述第 二标签交换路径是所述第一标签交换路径的子集,所述已被所述转发装置分配给所述第二标签交换路径的标签是所述第二标签范围的子集;
所述控制器根据所述第一消息中携带的所述第一标签范围为所述转发装置分配全局标签,所述全局标签是所述第一标签范围中的标签,具体包括:
所述控制器根据所述第二标签范围为所述转发装置分配所述全局标签,所述全局标签是所述第二标签范围中的标签。
结合第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述控制器向所述转发装置发送所述第二消息之后,以及所述控制器为所述转发装置分配所述全局标签之前,所述方法还包括:
所述控制器接收所述转发装置发送的第三消息,所述第三消息用于通知所述控制器所述转发装置已为所述第二标签交换路径分配了所述新的标签。
结合第一方面的第二种可能的实现方式,在第一方面的第三种可能的实现方式中,所述控制器接收所述转发装置发送的第三消息之后,以及所述控制器为所述转发装置分配所述全局标签之前,所述方法还包括:
所述控制器向所述转发装置发送第四消息,所述第四消息包括所述第二标签范围,所述第四消息用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
结合第一方面的第一种可能的实现方式,在第一方面的第四种可能的实现方式中,所述第二消息还用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
结合第一方面的上述任意一种可能的实现方式,在第一方面的第五种可能的实现方式中,所述第一消息中还携带在所述第一标签范围内已被所述转发装置分配给所述第一标签交换路径的标签,或者,所述第一消息中还携带第一子范围的标识、第二子范围的标识、第一标签的数量以及第二标签的数量,所述第一标签范围包括所述第一子范围以及所述第二子范围,在所述第一子范围内已被所述转发装置分配给所述第一标签交换路径的标签是所述第一标签,在所述第二子范围内已被所述转发装置分配给所述第一标签交换路径的标签是所述第二标签,所述第一标签的数量小于所述第二标签的数量;
所述控制器接收所述第一消息之后,以及所述控制器向所述转发装置发送所述第二消息之前,所述方法还包括:
所述控制器根据所述第一消息中携带的在所述第一标签范围内已被所述转发装置分配给第一标签交换路径的标签确定所述第一标签的数量小于所述第二标签的数量,或者所述控制器根据所述第一消息中携带的所述第一标签的数量以及所述第二标签的数量确定所述第一标签的数量小于所述第二标签的数量;
所述控制器基于所述第一标签的数量小于所述第二标签的数量确定所述第一子范围是所述第二标签范围。
结合第一方面或者第一方面的上述任意一种可能的实现方式,在第一方面的第六种可能的实现方式中,接收所述第一消息之前,所述方法还包括:
所述控制器向所述转发装置发送第五消息,所述第五消息用于指示所述转发装置向所述控制器发送所述转发装置的标签空间以及已被所述转发装置分配的标签或者所述已被所述转发装置分配的标签的数量。
结合第一方面在第一方面的第七种可能的实现方式中,所述第一消息中还携带在所述第一标签范围内已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点;
所述控制器根据所述第一消息中携带的所述第一标签范围为所述转发装置分配全局标签包括:
所述控制器根据所述第一标签范围以及已被所述转发装置分配给所述第一标签交换路径的标签为所述转发装置分配所述全局标签,所述全局标签与已被所述转发装置分配给所述第一标签交换路径的标签的没有交集。
第二方面,提供了一种获取全局标签的方法,包括:
转发装置向控制器发送第一消息,所述第一消息中携带第一标签范围,所述第一标签范围包括的多个标签是所述转发装置的标签空间包括的多个标签的子集,所述第一标签范围不等于所述转发装置的标签空间;
所述转发装置获取所述控制器根据所述第一消息中携带的所述第一标签范围为所述转发装置分配的全局标签,所述全局标签是所述第一标签范围中的标签。
结合第二方面,在第二方面的第一种可能的实现方式中,所述第一标签范围包括已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点,所述转发装置向所述控制器发送所述第一消息之后,以及所述转发装置获取所述全局标签之前,所述方法还包括:
所述转发装置接收所述控制器发送第二消息,所述第二消息包括第二标签范围,所述第二标签范围包括多个标签,所述第二标签范围是所述第一标签范围的子集,所述第二消息用于指示所述转发装置为第二标签交换路径分配新的标签,所述新的标签用于替换已被所述转发装置分配给所述第二标签交换路径的标签,所述新的标签在所述第二标签范围之外,所述第二标签交换路径是所述第一标签交换路径的子集,所述已被所述转发装置分配给所述第二标签交换路径的标签是所述第二标签范围的子集,所述第二标签范围被所述控制器用于为所述转发装置分配所述全局标签,所述全局标签是所述第二标签范围中的标签。
结合第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述转发装置接收所述控制器发送的所述第二消息之后,以及所述转发装置获取所述全局标签之前,所述方法还包括:
所述转发装置向所述控制器发送第三消息,所述第三消息用于通知所述控制器所述转发装置已为所述第二标签交换路径分配了所述新的标签。
结合第二方面的第二种可能的实现方式,在第二方面的第三种可能的实现方式中,所述转发装置向所述控制器发送所述第三消息之后,以及所述转发装置获取所述全局标签之前,所述方法还包括:
所述转发装置接收所述控制器发送的第四消息,所述第四消息包括所述第二标签范围,所述第四消息用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
结合第二方面的第一种可能的实现方式,在第二方面的第四种可能的实现方式中,所述第二消息还用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
结合第二方面的上述任意一种可能的实现方式,在第二方面的第五种可能的实现方式中,所述第二标签范围是第一子范围,所述第一标签范围包括所述第一子范围以及第二子范围,所述在所述第一标签范围内已被所 述转发装置分配给所述第一标签交换路径的标签包括第一标签和第二标签,所述在所述第一标签范围内已被所述转发装置分配给所述第一标签交换路径的标签的数量包括所述第一标签的数量和所述第二标签的数量,所述第一标签是所述第一子范围中的标签,所述第二标签是所述第二子范围中的标签,所述第一标签的数量小于所述第二标签的数量。
结合第二方面或者第二方面的上述任意一种可能的实现方式,在第二方面的第六种可能的实现方式中,所述转发装置向所述控制器发送所述第一消息之前,所述方法还包括:
所述转发装置接收所述控制器发送的第五消息,所述第五消息用于指示所述转发装置向所述控制器发送所述转发装置的标签空间,所述第五消息还用于指示所述转发装置向所述控制器发送已被所述转发装置分配的标签或者所述已被所述转发装置分配的标签的数量。
结合第二方面,在第二方面的第七种可能的实现方式中,所述第一消息中还携带在所述第一标签范围内已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点,所述全局标签与已被所述转发装置分配给所述第一标签交换路径的标签的没有交集。
第三方面,提供了一种控制器,包括:
第一接收单元,用于接收转发装置发送的第一消息,所述第一消息中携带第一标签范围,所述第一标签范围包括的多个标签是所述转发装置的标签空间包括的多个标签的子集,所述第一标签范围不等于所述转发装置的标签空间;
分配单元,用于根据所述第一接收单元接收的所述第一消息中携带的所述第一标签范围为所述转发装置分配全局标签,所述全局标签是所述第一标签范围中的标签。
结合第三方面,在第三方面的第一种可能的实现方式中,所述第一标签范围包括已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点,所述控制器还包括第一发送单元,所述第一发送单元用于在所述第一接收单元接收所述第一消息之后,以及在所述分配单元为所述转发装置分配所述全局标签之前,向所述转发装置 发送第二消息,所述第二消息包括第二标签范围,所述第二标签范围包括多个标签,所述第二标签范围是所述第一标签范围的子集,所述第二消息用于指示所述转发装置为第二标签交换路径分配新的标签,所述新的标签用于替换已被所述转发装置分配给所述第二标签交换路径的标签,所述新的标签在所述第二标签范围之外,所述第二标签交换路径是所述第一标签交换路径的子集,所述已被所述转发装置分配给所述第二标签交换路径的标签是所述第二标签范围的子集,所述全局标签是所述第二标签范围中的标签。
结合第三方面的第一种可能的实现方式,在第三方面的第二种可能的实现方式中,所述的控制器还包括第二接收单元,所述第二接收单元用于在所述第一发送单元向所述转发装置发送所述第二消息之后,以及在所述分配单元为所述转发装置分配所述全局标签之前,接收所述转发装置发送的第三消息,所述第三消息用于通知所述控制器所述转发装置已为所述第二标签交换路径分配了所述新的标签。
结合第三方面的第二种可能的实现方式,在第三方面的第三种可能的实现方式中,所述的控制器还包括第二发送单元,所述第二发送单元用于在所述第二接收单元接收所述转发装置发送的第三消息之后,以及在所述分配单元为所述转发装置分配所述全局标签之前,向所述转发装置发送第四消息,所述第四消息包括所述第二标签范围,所述第四消息用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
结合第三方面的第一种可能的实现方式,在第三方面的第四种可能的实现方式中,所述第二消息还用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
结合第三方面的第一种可能的实现方式、第二种可能的实现方式、第三种可能的实现方式或者第四种可能的实现方式,在第三方面的第五种可能的实现方式中,所述第一消息中还携带在所述第一标签范围内已被所述转发装置分配给所述第一标签交换路径的标签,或者,所述第一消息中还携带第一子范围的标识、第二子范围的标识、第一标签的数量以及第二标签的数量,所述第一标签范围包括所述第一子范围以及所述第二子范围,在所述第一标签范围内已被所述转发装置分配给所述第一标签交换路径的标签是所述第一标签,在所述第二子范围内已被所述转发装置分配给所述 第一标签交换路径的标签是所述第二标签,所述第一标签的数量小于所述第二标签的数量;
所述控制器还包括确定单元,所述确定单元用于在所述第一接收单元接收所述第一消息之后,以及在所述第一发送单元向所述转发装置发送所述第二消息之前,根据所述第一消息中携带的在所述第一标签范围内已被所述转发装置分配给第一标签交换路径的标签确定所述第一标签的数量小于所述第二标签的数量,或者所述控制器根据所述第一消息中携带的所述第一标签的数量以及所述第二标签的数量确定所述第一标签的数量小于所述第二标签的数量,基于所述第一标签的数量小于所述第二标签的数量确定所述第一子范围是所述第二标签范围。
结合第三方面、第三方面的第一种可能的实现方式、第二种可能的实现方式、第三种可能的实现方式、第四种可能的实现方式或者第五种可能的实现方式,在第三方面的第六种可能的实现方式中,所述的控制器,还包括第三发送单元,所述第三发送单元用于在所述第一接收单元接收所述转发装置发送的所述第一消息之前,向所述转发装置发送第五消息,所述第五消息用于指示所述转发装置向所述控制器发送所述转发装置的标签空间,所述第五消息还用于指示所述转发装置向所述控制器发送已被所述转发装置分配的标签或者所述已被所述转发装置分配的标签的数量。
结合第三方面,在第三方面的第七种可能的实现方式中,所述第一消息中还携带在所述第一标签范围内已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点;
所述分配单元具体用于:根据所述第一标签范围以及已被所述转发装置分配给所述第一标签交换路径的标签为所述转发装置分配所述全局标签,所述全局标签与已被所述转发装置分配给所述第一标签交换路径的标签的没有交集。
第四方面,提供了一种转发装置,包括:
第一发送单元,用于向控制器发送第一消息,所述第一消息中携带第一标签范围,所述第一标签范围包括的多个标签是所述转发装置的标签空间包括的多个标签的子集,所述第一标签范围不等于所述转发装置的标签空间;
获取单元,用于获取所述控制器根据所述第一消息中携带的所述第一标签范围为所述转发装置分配的全局标签,所述全局标签是所述第一标签范围中的标签。
结合第四方面,在第四方面的第一种可能的实现方式中,所述第一标签范围包括已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点,所述的转发装置还包括:
第一接收单元,用于在所述第一发送单元发送所述第一消息之后,以及在所述获取单元获取所述全局标签之前接收所述控制器发送第二消息,所述第二消息包括第二标签范围,所述第二标签范围包括多个标签,所述第二标签范围是所述第一标签范围的子集,所述第二消息用于指示所述转发装置为第二标签交换路径分配新的标签,所述新的标签用于替换已被所述转发装置分配给所述第二标签交换路径的标签,所述新的标签在所述第二标签范围之外,所述第二标签交换路径是所述第一标签交换路径的子集,所述已被所述转发装置分配给所述第二标签交换路径的标签是所述第二标签范围的子集,所述第二标签范围被所述控制器用于为所述转发装置分配所述全局标签,所述全局标签是所述第二标签范围中的标签。
结合第四方面的第一种可能的实现方式,在第四方面的第二种可能的实现方式中,所述的转发装置还包括:
第二发送单元,用于在所述第一接收单元接收所述第二消息之后,以及在所述获取单元获取所述全局标签之前,向所述控制器发送第三消息,所述第三消息用于通知所述控制器所述转发装置已为所述第二标签交换路径分配了所述新的标签。
结合第四方面的第二种可能的实现方式,在第四方面的第三种可能的实现方式中,所述的转发装置还包括:
第二接收单元,用于在所述第二发送单元向所述控制器发送所述第三消息之后,以及所述获取单元获取所述全局标签之前,接收所述控制器发送的第四消息,所述第四消息包括所述第二标签范围,所述第四消息用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
结合第四方面的第一种可能的实现方式,在第四方面的第四种可能的 实现方式中,所述第二消息还用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
结合第四方面的第一种可能的实现方式、第二种可能的实现方式,第三种可能的实现方式或者第四种可能的实现方式,在第四方面的第五种可能的实现方式中,所述第二标签范围是第一子范围,所述第一标签范围包括所述第一子范围以及第二子范围,所述在所述第一标签范围内已被所述转发装置分配给所述第一标签交换路径的标签包括第一标签和第二标签,所述在所述第一标签范围内已被所述转发装置分配给所述第一标签交换路径的标签的数量包括所述第一标签的数量和所述第二标签的数量,所述第一标签是所述第一子范围中的标签,所述第二标签是所述第二子范围中的标签,所述第一标签的数量小于所述第二标签的数量。
结合第四方面、第四方面的第一种可能的实现方式、第二种可能的实现方式,第三种可能的实现方式、第四种可能的实现方式或者第五种可能的实现方式,在第四方面的第六种可能的实现方式中,所述的转发装置还包括第三接收单元,所述第三接收单元用于在所述第一发送单元发送所述第一消息之前,接收所述控制器发送的第五消息,所述第五消息用于指示所述转发装置向所述控制器发送所述转发装置的标签空间,所述第五消息还用于指示所述转发装置向所述控制器发送已被所述转发装置分配的标签或者所述已被所述转发装置分配的标签的数量。
结合第四方面,在第四方面的第七种可能的实现方式中,所述第一消息中还携带在所述第一标签范围内已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点,所述全局标签与已被所述转发装置分配给所述第一标签交换路径的标签的没有交集。
上述技术方案中,控制器接收转发装置发送的第一消息中携带第一标签范围。所述控制器可以根据所述第一标签范围为所述转发装置分配全局标签。因此,分配全局标签时不需要手工配置,有助于提高全局标签的分配效率。另外,所述第一消息中携带了所述第一标签范围,所述全局标签是所述第一标签范围包括的多个标签中的标签。所述全局标签是所述转发 装置的标签空间中的标签。因此,上述方案可以避免为所述转发装置分配所述转发装置的标签空间之外的标签,从而避免为所述转发装置分配所述转发装置无法支持的全局标签。另外,所述第一标签范围是所述标签空间的子集,并且所述第一标签范围不等于所述标签空间。因此,所述第一标签范围小于所述标签空间。所述转发装置可以回收某个标签范围内的已被所述转发装置分配的标签,从而使得该标签范围内的标签成为可用的标签。所述转发装置回收所述第一标签范围中的已被所述转发装置分配的标签的开销小于所述转发装置回收所述标签空间中的已被所述转发装置分配的标签的开销。因此,上述技术方案有助于降低回收已被分配的标签的开销。进一步的,所述第一消息还可以携带在所述第一标签范围内已被所述转发装置分配的标签。或者所述第一消息还可以携带在所述第一子范围内已被所述转发装置分配给所述第一标签交换路径的标签的数量以及在所述第二子范围内已被所述转发装置分配给所述第一标签交换路径的标签的数量。所述控制器可以通过第一消息获知已被所述转发装置分配的标签的数量。因此,所述控制器可以根据已被分配的标签的数量,合理的为所述转发装置分配所述全局标签。例如,将已被分配标签的数量较小的标签范围作为候选的全局标签。所述转发装置可以回收已被分配标签的数量较小的标签范围中的已被分配的标签。相对于回收已被分配标签的数量较大的标签范围中的已被分配的标签,上述技术方案有助于减轻所述转发装置回收已被分配的标签的开销。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍。显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1是实施例提供的一种网络结构示意图;
图2是实施例提供的一种信令交互示意图;
图3是实施例提供的一种分配全局标签的方法的流程示意图;
图3a是实施例提供的一种分配全局标签的方法的流程示意图;
图4是实施例提供的一种控制器的结构示意图;
图5是实施例提供的一种控制器的结构示意图;
图6是实施例提供的一种控制器的结构示意图;
图7是实施例提供的一种获取全局标签的方法的流程示意图;
图8是实施例提供的一种获取全局标签的方法的流程示意图;
图9是实施例提供的一种转发装置的结构示意图;
图10是实施例提供的一种转发装置的结构示意图;
图11是实施例提供的一种转发装置的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行描述。显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的其他实施例属于本发明保护的范围。
图1为本发明实施例提供的一种网络结构示意图。参见图1,所述网络结构包括控制器(Controller)网络以及开放流交换机(OpenFlow Switch)网络。所述控制器网络包括控制器1。所述开放流交换机网络包括开放流交换机1、开放流交换机2、开放流交换机3以及开放流交换机4。所述控制器网络还可以包括其他控制器,所述开放流交换机网络还可以包括其他开放流交换机,图中未示出。当然,所述开放流交换机网络也可以只包括1个开放流交换机、2个开放流交换机或者3个开放流交换机。
控制器1可以分别通过控制通道1、控制通道2、控制通道3以及控制通道4与开放流交换机1、开放流交换机2、开放流交换机3以及开放流交换机4进行通信。控制通道具体可以是开放流通道(OpenFlow Channel)。关于开放流交换机,控制器以及开放流通道,可以参考开放网络基础(OPEN NETWORKING FOUNDATION)发布的开放流交换机说明书第1.3.1版(OpenFlow Switch Specification Version 1.3.1)。
图2为图1中的控制器1通过控制通道1与开放流交换机1进行通信的信令交互示意图。参见图2,控制器1与开放流交换机1的通信过程包括:控制器1向开放流交换机1发送消息1。开放流交换机1向控制器1发送消息2。控制器1向开放流交换机1发送消息3。开放流交换机1向控制器1发送消息4。控制器1向开放流交换机1发送消息5。开放流交换机1向控制器1发送消息6。下文将对上述过程进行具体说明。
S201、控制器1向开放流交换机1发送消息1。
消息1指示开放流交换机1向控制器1报告开放流交换机1的标签空间以及开放流交换机1已为标签交换路径分配的标签或者已为标签交换路径分配的标签的数量。开放流交换机1是所述标签交换路径的节点。所述标签交换路径被包含在所述开放流交换机网络中。
举例来说,开放流交换机1可以是支持MPLS的交换机。开放流交换机1支持的标签栈(label stack)可以只包括一个MPLS标签,也可以包括多个MPLS标签。
下文对开放流交换机1支持的标签栈只包括一个MPLS标签的场景进行举例:开放流交换机1接收到的MPLS报文。MPLS报文中携带一个MPLS头(MPLS header)。所述MPLS header的标签域中携带MPLS标签。所述标签域包括20比特。也就是说,所述标签域的值可以是220个不同的值中的一个。因此,理论上开放流交换机1的标签空间可以是0至220-1。
另外,开放流交换机1是所述开放流交换机网络的节点。S201之前,控制器1可能已通过控制通道(例如控制通道1、控制通道2和控制通道3)指示所述开放流交换机网络建立了5个标签交换路径(label switched path,LSP)。开放流交换机1可以是所述5个标签交换路径中的3个标签交换路径的节点。所述3个标签交换路径分别是LSP1,LSP2以及LSP3。
因此,S201之前,开放流交换机1已分别为所述3个标签交换路径分配了3个标签。具体的,开放流交换机1分别为LSP1,LSP2以及LSP3分配了标签1、标签2以及标签3。开放流交换机1分别根据标签1、标签2以及标签3生成标签转发表项1、标签转发表项2以及标签转发表项3。标签转发表项1的匹配域(match field)中包括标签1。因此,开放流交换机1具有转发携带标签1的报文的能力。具体来说,开放流交换机1接收到在LSP1上传输的报文1。报文1的报文头中携带MPLS header。MPLS header 的标签域的值等于标签1。开放流交换机1可以根据标签1在标签转发表中查找与标签1匹配的标签。与标签1匹配的表项是标签转发表项1。开放流交换机1可以根据标签转发表项1转发报文1。
举例来说,S201之前,开放流交换机1以及控制器1可以进行标签能力通告。标签能力具体可以包括开放流交换机1向控制器1报告标签范围以及控制器1向开放流交换机1分配全局标签。所述标签范围可以是开放流交换机1的标签空间,不包含已分配给LSP的标签的标签范围,包含了已分配给LSP的标签的标签范围以及已回收的标签范围。例如,可以对英特网工程任务组(Internet Engineering Task Force,IETF)发布的请求注解(Request For Comments,RFC)5492进行扩展,从而使得开放流交换机或者控制器1进行能力通告(capabilities advertisement)时,能够在开放消息(OPEN message)的选项参数(Optional Parameters)域中携带扩展的能力选项参数(Capabilities Optional Parameter)域。
举例来说,开放流交换机1以及控制器1进行标签能力通告可以具体包括:
控制器1与开放流交换机1建立传输控制协议(Transmission Control Protocol,TCP)连接后,控制器1向开放流交换机1发送开放消息1。开放消息1的扩展的能力选项参数域中携带用于指示控制器1是否具有标签能力的信息。关于扩展的能力选项参数,请参见表1:
Figure PCTCN2016098359-appb-000001
表1
能力码(Capability Code)域的长度为一个字节。能力码的值用于指示标 签能力。
能力长度(Capability Length)域的长度为一个字节。能力长度的值用于限定能力值(Capability Value)域的长度。
能力值(Capability Value)域的长度是可变的。当能力值域的值为1,表明具有标签能力。当能力值域的值为0,表明不具有标签能力。
开放流交换机1接收到开放消息1后,根据能力值域的值确定控制器1具有标签能力。
响应于开放消息1,开放流交换机1向控制器1发送开放消息2。开放消息2携带的扩展的能力选项参数域中携带用于指示开放流交换机1是否具有标签能力的信息。关于开放消息2中的扩展的能力选项参数域的结构,请参见表1。当能力值域的值为1,表明开放流交换机1具有标签能力。当能力值域的值为0,表明开放流交换机1不具有标签能力。
开放流交换机1根据开放消息1确定控制器1具有标签能力。控制器1根据开放消息2确定开放流交换机1也具有标签能力。控制器1确定开放流交换机1具有标签能力后,向开放流交换机1发送消息1。
举例来说,消息1中可以携带步长大小域(step size field)。步长大小域用于携带步长的值。步长大小域用于指示开放流交换机1根据步长大小域的值向控制器1报告开放流交换机1的标签范围。此外,步长大小域还可以用于指示开放流交换机1根据步长大小域的值向控制器1报告在所述标签范围内被分配的标签的数量。例如,步长大小域可以携带在Open Message的扩展属性中。关于步长大小域的结构,请参考表2:
Figure PCTCN2016098359-appb-000002
表2
步长大小(step size)域的长度为2个字节。步长大小域的值用于指示开放流交换机根据步长大小域的值报告开放流交换机的标签范围。例如, 当步长大小域的值等于1024时,步长大小域的值用于指示开放流交换机根据值为1024的步长报告开放流交换机的标签范围。
保留(Reserved)域的长度为2个字节。保留域可以用于将来扩展。
S202、开放流交换机1向控制器1发送消息2。
响应于消息1,开放流交换机1向控制器1发送消息2。消息2中携带标签范围1。如无相反的说明,本申请中提及的某消息中携带某范围是指,该消息中携带用于指示该范围的信息。例如,上文中的消息2中携带标签范围1,是指消息2中携带了用于指示标签范围1的信息。
可选地,消息2中携带开放流交换机1在标签范围1内已分配给LSP的标签。开放流交换机1是所述LSP的节点。
举例来说,标签范围1可以是开放流交换机1的标签空间,例如0至220-1。开放流交换机1在0至220-1内已分配给LSP(LSP1、LSP2以及LSP3)的标签可以是标签1、标签2以及标签3。
另外,标签范围1也可以是上述标签空间的1个子标签空间,例如0至210。开放流交换机1在0至210内已分配给LSP(LSP1以及LSP2)的标签可以是标签1以及标签2。
可替换的,标签范围1也可以是上述标签空间的多个子标签空间,例如0至210以及210+1至215。开放流交换机1在0至210内已分配给LSP(LSP1以及LSP2)的标签可以是标签1以及标签2。开放流交换机1在210+1至215内已分配给LSP(LSP3)的标签可以是可以是标签3。上述例子中,多个子标签空间是连续的。具体实现时,多个子标签空间也可以是不连续的。例如,多个子标签空间可以是0至210以及210+2至215
可选地,S202具体实现时也可以是:
响应于消息1,开放流交换机1向控制器1发送消息2。消息2中携带标签范围1。
可选地,消息2中携带开放流交换机1在标签范围1内已分配给LSP的标签的数量。
举例来说,标签范围1可以是开放流交换机1的标签空间,例如0至220-1。开放流交换机1在0至220-1内已分配给LSP(LSP1、LSP2以及LSP3)的标签可以是标签1、标签2以及标签3。因此,开放流交换机1在标签范围1内已分配给LSP的标签的数量是3。
另外,标签范围1也可以是上述标签空间的1个子标签空间,例如0至210。开放流交换机1在0至210内已分配给LSP(LSP1以及LSP2)的标签可以是标签1以及标签2。因此,开放流交换机1在标签范围1内已分配给LSP的标签的数量是2。
可替换的,标签范围1也可以是上述标签空间的多个子标签空间,例如0至210以及210+1至215。开放流交换机1在0至210内已分配给LSP(LSP1以及LSP2)的标签可以是标签1以及标签2。开放流交换机1在210+1至215内已分配给LSP(LSP3)的标签可以是标签3。因此,开放流交换机1在0至210内已分配给LSP的标签的数量是2。开放流交换机1在210+1至215内已分配给LSP的标签的数量是1。上述例子中,多个子标签空间是连续的。具体实现时,多个子标签空间也可以是不连续的。例如,多个子标签空间可以是0至210以及210+2至215
标签范围1以及开放流交换机1在标签范围1内已分配给LSP的标签可以携带在扩展的开放消息中。举例来说,消息2可以包括表3所示的结构:
Figure PCTCN2016098359-appb-000003
表3
开始标签(Start Label)域的长度为4个字节。开始标签域用于指示大的标签范围的开始标签的值。
结束标签(End Label)域的长度为4个字节。结束标签域用于指示大的标签范围的结束标签的值。
步长大小(Step size)域的长度为2个字节。步长大小域用于指示小的标签范围的步长。
标签块能力选项参数(label block Capabilities Optional Parameter)域的长度为4个字节。
标签块能力选项参数域的结构请参见表4。
Figure PCTCN2016098359-appb-000004
表4
块号码(Block Number)域的长度为2个字节。块号码用于指示小的标签范围。小的标签范围的开始标签以及小的标签范围包含的标签的数量是步长的函数。举例来说,当块号码域的值等于1时,块号码域对应的小的标签范围的开始标签的值等于1×步长。小的标签范围中包含的标签的数量等于步长。也就是说,块号码域的值等于1的小的标签范围是<1024,2047>。当块号码域的值等于2时,块号码域对应的小的标签范围的开始标签的值等于2×步长。小的标签范围中包含的标签的数量等于步长。也就是说,块号码域的值等于2的小的标签范围是<2048,3071>。
被占用的标签数量(Occupied Label Count)域的长度为2个字节。被占用的标签数量域的值用于指示在标签范围1内,被分配的标签的数量。标签范围1是大的标签范围与小的标签范围的交集。举例来说,当开始标签的值等于2000,结束标签的值等于3000,块号码域的值等于2,被占用的标签数量域的值等于500时,表明标签范围1是<2000,3000>与<2048,3071> 的交集。也就是说,<2048,3000>中有500个标签已被分配给LSP。
需要说明的是,表3中的标签块能力选项参数域可以是一个,也可以是多个。当消息2中包括多个标签块能力选项参数域时,消息2中携带的标签范围1包括多个标签范围。另外,所述多个标签范围分别对应多个被分配的标签的数量。举例来说,开始标签的值等于3050。结束标签的值等于4000。第一个标签块能力选项参数域中块号码域的值等于2,被占用的标签数量域的值等于5。第二个标签块能力选项参数域中块号码域的值等于3,被占用的标签数量域的值等于3。上述方案中,标签范围1包括两个标签范围。第一个标签范围是<3050,4000>与<2048,3071>的交集。也就是说,第一个标签范围是<3050,3071>。第二个标签范围是<3050,4000>与<3071,4095>的交集。也就是说,第二个标签范围是<3071,4000>。也就是说,<3050,3071>中有2个标签已被分配给LSP。<3071,4000>中有3个标签已被分配给LSP。
S203、控制器1向开放流交换机1发送消息3。
响应于消息2,控制器1向开放流交换机1发送消息3。消息3中携带标签范围2。标签范围2是标签范围1的子集。标签范围2不等于标签范围1。消息3用于指示开放流交换机1为开放流交换机1在标签范围2内已分配标签的LSP分配新的标签。新的标签在标签范围2之外。通过上述技术方案,开放流交换机1在标签范围2内已分配标签被开放流交换机1回收。被回收的标签成为未被开放流交换机1分配的标签。因此,控制器1可以将标签范围2中的标签作为候选的全局标签。
举例来说,标签范围1是0至220-1。开放流交换机1在标签范围1内已分配给LSP(LSP1、LSP2以及LSP3)的标签是标签1、标签2以及标签3。标签范围2可以是0至210。开放流交换机1在标签范围2内已分配给LSP(LSP1以及LSP2)的标签是标签1以及标签2。消息3中携带标签范围2(例如0至210)。开放流交换机1收到消息3后,为LSP1和LSP2分配新的标签。例如,为LSP1分配标签4,为LSP2分配标签5。标签4和标签5不能是标签范围2中的标签。例如,标签4和标签5是210+1至220-1中的标签。
可替换的,开放流交换机1向控制器1发送的消息2中携带的标签范围1是子范围1(即0至210)以及子范围2(即210+1至215)的并集。也 就是说,标签范围1由子范围1(即0至210)以及子范围2(即210+1至215)组成。此外,消息2中还携带了开放流交换机1在子范围1内已分配给LSP1的标签1,开放流交换机1在子范围1内已分配给LSP2的标签2,以及开放流交换机1在子范围2内已分配给LSP3的标签3。接收到消息2后,控制器1可以根据子范围1、标签1以及标签2确定开放流交换机1在子范围1内已为LSP分配的标签的数量是2。类似地,接收到消息2后,控制器1可以根据子范围2、标签3确定开放流交换机1在子范围1内已为LSP分配的标签的数量是1。控制器1根据消息2生成消息3。消息3可以携带子范围1(例如0至210)。开放流交换机1收到消息3后,为LSP1和LSP2分配新的标签。例如,为LSP1分配标签4,为LSP2分配标签5。标签4和标签5不能是0至210中的标签。例如,标签4和标签5是210+1至216中的标签。可替换的,消息3没有携带子范围1(即0至210),而是携带子范围2(即210+1至215)。开放流交换机1收到消息3后,为LSP3分配新的标签。例如,为LSP3分配标签6。标签6不能是210+1至215中的标签。例如,标签6是215+1至220-1中的标签。
需要说明的是,上文提供了两个可替代方案。第一种方案中,消息3携带子范围1(即0至210)。第二种方案中,消息3携带子范围2(即210+1至215)。也就说,控制器1接收到携带的标签范围1是子范围1(即0至210)以及子范围2(即210+1至215)的消息2后,可以将子范围1(即0至210)确定为标签范围2,也可以将子范围2(即210+1至215)确定为标签范围2。根据上文的论述,控制器1可以根据消息2确定开放流交换机1在子范围1内已为LSP分配的标签的数量是2,开放流交换机1在子范围1内已为LSP分配的标签的数量是1。也就是说,控制器1可以确定开放流交换机1在子范围1内已分配的标签的数量大于开放流交换机1在子范围2内已分配的标签的数量。因此,如果控制器1将子范围2确定为标签范围2,有助于减少开放流交换机1需要回收的标签的数量。进而,有助于减少开放流交换机1需要分配的新的标签的数量。因此,有助于降低开放流交换机1的开销。具体来说,控制器1将子范围1确定为标签范围2,开放流交换机1需要回收的标签的数量为2。开放流交换机1需要分配的新的标签的数量也是2。控制器1将子范围2确定为标签范围2,开放流交换机1需要回收的标签的数量为1。开放流交换机1需要分配的新的标签的数量也是1。
标签范围2可以携带在扩展的开放消息中。举例来说,消息3可以包括表5所示的结构:
Figure PCTCN2016098359-appb-000005
表5
开始标签(Start Label)域的长度等于4个字节。开始标签域的值用于指示标签范围2的开始标签。
结束标签(End Label)域的长度等于4个字节。结束标签域的值用于指示标签范围2的结束标签。
因此,开始标签(Start Label)域和结束标签(End Label)域定义了标签范围2。例如,开始标签域的值等于3000。结束标签域的值等于3500。标签范围2等于<3000,3500>。控制器1接收到消息3后可以确定,<3000,3500>内已分配标签已被开放流交换机1回收。
S204、开放流交换机1向控制器1发送消息4。
响应于消息3,开放流交换机1向控制器1发送消息4。消息4用于通知控制器1开放流交换机1已为开放流交换机1在标签范围2内已分配标签的LSP分配了新的标签。也就是说,开放流交换机1作为分配了新的标签的LSP的节点,可以使用所述新的标签对在分配了新的标签的LSP上传输的流量进行转发。因此,开放流交换机1回收了在标签范围2内已分配给LSP的标签。标签范围2成为已回收的标签范围。本申请中的已回收的标签范围是指一种特殊的标签范围。所述特殊的标签范围中的标签曾经被转发装置(例如开放流交换机1)分配给所述转发装置所在的LSP。然后,被分配的标签又被所述转发装置回收。例如,所述转发装置可以通过为所述转发装置所在的LSP分配新的标签的方式实现对被分配的标签的回收。另外,如果所述转发装置所在的LSP已被撤销,所述转发装置也可以实现 对被分配的标签的回收。
举例来说,消息4中可以携带标签范围2以及用于表示标签范围2内的标签已被开放流交换机1回收的信息。控制器1接收到消息4后,可以通过解析消息4确定开放流交换机1回收了在标签范围2内的标签。
例如,S201之前,开放流交换机1在0至210内已分配给LSP(LSP1和LSP2)的标签是标签1以及标签2。开放流交换机1在210+1至215内已分配给LSP(LSP3)的标签可以是标签3。开放流交换机1收到消息3。消息3中携带210+1至215。开放流交换机1收到消息3后为开放流交换机1在210+1至215内已分配标签的LSP3分配新的标签。例如,为LSP3分配标签4。标签4是0至210中的标签。因此,开放流交换机1可以根据标签4对在LSP3上传输的流量进行转发。开放流交换机1不再需要使用210+1至215中的标签(例如标签3)对在LSP3上传输的流量进行转发。以上意味着开放流交换机1回收了在210+1至215中的标签(例如标签3)。因此,控制器1可以将210+1至215中的标签(例如标签3)作为候选的全局标签。
举例来说,消息4可以是扩展的开放消息。消息4中可以携带调整结果域。调整结果域的结构可以如表6所示:
Figure PCTCN2016098359-appb-000006
表6
调整结果(Adjust Result)域的长度是4个字节。调整结果域用于指示开放流交换机1是否回收已分配的标签。例如,当调整结果域的值等于1时,指示开放流交换机1已回收已分配的标签。当调整结果域的值等于0时,指示开放流交换机1没有回收已分配的标签。
S205、控制器1向开放流交换机1发送消息5。
响应于消息4,控制器1向开放流交换机1发送消息5。消息5携带标签范围2。消息5用于通知开放流交换机1,控制器1已将标签范围2作为 候选的全局标签。
标签范围2可以携带在扩展的开放消息中。举例来说,消息5可以包括表7所示的结构:
Figure PCTCN2016098359-appb-000007
表7
开始标签(Start Label)域的长度等于4个字节。开始标签域的值用于指示标签范围2的开始标签。
结束标签(End Label)域的长度等于4个字节。结束标签域的值用于指示标签范围2的结束标签。
因此,开始标签(Start Label)域和结束标签(End Label)域定义了标签范围2。例如,开始标签域的值等于3000。结束标签域的值等于3500。标签范围2等于<3000,3500>。开放流交换机1接收到消息5后可以确定,<3000,3500>已被控制器1作为候选的全局标签。开放流交换机1根据消息5确定标签范围2已被控制器1作为候选的全局标签后,开放流交换机1在标签范围2之外为开放流交换机1所在的新的LSP分配标签。
S205以后,控制器1在标签范围2内为开放流交换机1分配全局标签。具体地,控制器1可以向开放流交换机1发送携带所述全局标签的消息。开放流交换机1接收到携带所述全局标签的消息后,将所述全局标签作为所述开放流交换机1的全局标签并生成包含所述全局标签的标签转发表项。当然,控制器1可以向其他开放流交换机发送携带所述全局标签的消息。其他开放流交换机将所述全局标签作为所述其他开放流交换机的全局标签并生成包含所述全局标签的标签转发表项。
图3为本发明实施例提供的一种分配全局标签的方法的流程示意图。 所述方法的执行主体为控制器。所述方法可以应用于图1所示的网络结构中,从而实现图2所示信令交互。具体来说,所述控制器可以是图1所示的控制器1。
参见图3,所述方法包括:
S301、控制器接收转发装置发送的第一消息。
所述第一消息中携带第一标签范围。所述第一标签范围包括的多个标签是所述转发装置的标签空间包括的多个标签的子集。标签空间是一个特殊的标签范围。所述转发装置的标签空间是指所述转发装置能够使用的所有标签的集合。所述转发装置的标签空间包括多个标签。所述第一标签范围不等于所述转发装置的标签空间。
举例来说,所述第一标签范围可以是一个连续的标签范围,也可以是多个连续的标签范围。连续的标签范围包括的多个标签是连续的。例如,所述第一标签范围可以是0至22-1。也就是说,所述第一标签范围中的多个标签分别是0、1、2以及3。显然,0、1、2以及3是连续的。另外,所述第一标签范围可以是0至210-1以及215至220-1。显然,0至210-1是连续的标签范围,215至220-1也是连续的标签范围。
具体来说,所述转发装置可以使用标签空间中的标签对接收到的报文进行处理。如果所述转发装置尚未分配标签,则所述标签空间包括尚未被所述转发装置分配的标签。如果所述转发装置已分配标签,但还包括尚未被分配的标签,则所述标签空间包括已被所述转发装置分配的标签以及尚未被所述转发装置分配的标签。例如,所述转发装置是标签交换路径的节点。所述转发装置已为所述标签交换路径分配了标签,并根据分配的标签生成标签转发表项。所述转发装置可以根据所述标签转发表项对在所述标签交换路径上传输的流量进行转发。也就是说,所述转发装置为所述标签交换路径分配标签,使得所述转发装置具备了转发在所述标签交换路径上传输的流量的能力。
需要说明的是,实施例中涉及的转发装置分配标签是指,所述转发装置为所述转发装置所在的标签交换路径分配标签。所述转发装置是标签交换路径的节点。
参见图1和图2,所述控制器可以是控制器1。所述转发装置可以是开放流交换机1。
S302、所述控制器根据所述第一消息中携带的所述第一标签范围为所述转发装置分配全局标签。
所述全局标签是所述第一标签范围中的标签。所述全局标签可以是一个标签也可以是多个标签。
举例来说,所述全局标签可以是所述第一标签范围中的可用的标签。所述第一标签范围中的可用的标签是指,所述第一标签范围包括的多个标签中尚未被所述转发装置分配的标签。具体可以是,从来没有被所述转发装置分配的标签。也可以是被所述转发装置回收的标签。被所述转发装置回收的标签是指,曾经被所述转发装置分配,但是被所述转发装置分配后,被所述转发装置回收的标签。
举例来说,所述全局标签用于与所述转发装置接收到的报文中的MPLS头中的字段进行匹配,从而确定与所述报文匹配的标签转发表项。所述全局标签是用于执行MPLS涉及的push,pop或者swap操作之外的操作。
具体来说,所述全局标签被用于确定是否所述全局标签与接收到的报文中的MPLS头中的字段匹配。所述全局标签可以用于标识网络或者业务。
需要说明的是,实施例中涉及的全局标签是指多协议标记交换全局标签(MPLS global label)。关于MPLS global label,可以参考因特网工程任务组(Internet Engineering Task Force,IETF)发布的工作组草案draft-li-mpls-global-label-framework-00。实施例中涉及的控制器为转发装置分配全局标签是指,所述控制器指示所述转发装置生成包含所述全局标签的转发表项。从而,所述转发装置可以根据包含所述全局标签的所述转发表项,对标签交换路径上传输的流量进行处理。
图3a为实施例提供的一种分配全局标签的方法的流程示意图。图3a所示的方法是在图3所示的分配全局标签的方法的基础上进行扩展得到的。关于S303、S304、S305、S306以及S307,具体可以参考图3a。
可选地,图3所示的技术方案中,所述第一标签范围包括已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点,S301之后以及S302之前,所述方法还可以包括:
S303、所述控制器向所述转发装置发送第二消息。
所述第二消息包括第二标签范围。所述第二标签范围包括多个标签。 所述第二标签范围是所述第一标签范围的子集。所述第二消息用于指示所述转发装置为第二标签交换路径分配新的标签。所述新的标签用于替换已被所述转发装置分配给所述第二标签交换路径的标签。所述新的标签在所述第二标签范围之外。所述第二标签交换路径是所述第一标签交换路径的子集。所述已被所述转发装置分配给所述第二标签交换路径的标签是所述第二标签范围的子集。所述全局标签可以是所述第二标签范围包括的多个标签中的标签。S302具体可以包括,所述控制器根据所述第二标签范围为所述转发装置分配所述全局标签,所述全局标签是所述第二标签范围中的标签。可以理解,所述转发装置分配给所述第一标签交换路径的标签与所述第二标签范围包括的多个标签的交集等于已被所述转发装置分配给所述第二标签交换路径的标签。
所述新的标签在所述第二标签范围之外是指所述新的标签与所述第二标签范围包括的多个标签之间没有交集。如果没有相反的说明,申请文件中的标签范围包含至少一个标签。标签范围A是标签范围B的子集是指标签范围A包含的全部标签存在于标签范围B包含的全部标签中。标签C是标签范围D的子集是指标签C存在于标签范围D包含的全部标签中。
举例来说,所述第一标签范围可以是0至210-1。在0至210-1内已被所述转发装置分配给所述第一标签交换路径的标签的数量可以是5。所述第一标签交换路径可以是LSP1、LSP2、LSP3、LSP4以及LSP5。所述转发装置是LSP1至LSP5上的节点。所述第二标签范围可以是25-1至26-1。在25-1至26-1内已被所述转发装置分配给所述第二标签交换路径的标签的数量可以是3。所述第二标签交换路径可以是LSP1、LSP2以及LSP3。已被所述转发装置分配给LSP1、LSP2以及LSP3的标签的值分别是25、25+1以及25+2。所述转发装置接收到所述第二标签后,为LSP1、LSP2以及LSP3分配的标签的值分别是26、26+1以及26+2。标签的值为26、26+1以及26+2的标签分别用于替代标签的值为25、25+1以及25+2的标签。因此,标签被替代后,LSP1、LSP2以及LSP3分别对应的标签的值为26、26+1以及26+2。所述转发装置不再需要使用标签的值为25的标签对LSP1上传输的流量进行处理。标签的值为25、25+1以及25+2的标签被所述转发装置回收。举例来说,所述第一标签范围可以是0至210-1以及215至220-1。在0至210-1内被所述转发装置分配给LSP1、LSP2以及LSP3的标签分别是标签1、标签 2以及标签3。在215至220-1内被所述转发装置分配给LSP4以及LSP5的标签分别是标签4以及标签5。所述第一标签交换路径包括LSP1、LSP2、LSP3、LSP4以及LSP5。所述第一消息携带0至210-1、215至220-1、3以及2。其中,3表示在0至210-1内被所述转发装置分配的标签的数量。2表示在215至220-1内被所述转发装置分配的标签的数量。当然,所述第一消息可以携带0至210-1、215至220-1、标签1、标签2、标签3、标签4以及标签5。其中,0至210-1与标签1至3对应,215至220-1与标签4至5对应。所述转发装置接收到所述第二消息后,可以确定0至210-1内被所述转发装置分配的标签的数量等于3,215至220-1内被所述转发装置分配的标签的数量等于2。进而,所述转发装置确定所述第二标签范围等于215至220-1。所述转发装置根据所述第二消息的指示,为LSP4以及LSP5分配新的标签。具体来说,为LSP4分配的新的标签的值等于5,为LSP5分配的新的标签的值等于6。因此,所述转发装置可以使用值为5的标签对LSP4上传输的流量进行处理。所述转发装置可以使用值为6的标签对LSP5上传输的流量进行处理。所述转发装置不再使用标签4对LSP4上传输的流量进行处理。所述转发装置不再使用标签5对LSP5上传输的流量进行处理。因此,标签4和标签5被所述转发装置回收。
实施例中涉及的新的标签替换转发装置已分配给标签交换路径的标签是指,所述转发装置包含与所述标签交换路径对应的标签转发表项。所述标签转发表项的匹配域包括所述转发装置已分配给所述标签交换路径的标签。所述转发装置需要使用所述新的标签替换所述标签转发表项的匹配域包括的标签。也就是说,替换后的标签转发表项的匹配域中不再包含转发装置已分配给标签交换路径的标签。
可以对现有的标签通告协议进行扩展。举例来说,标签通告协议可以是标签分发协议(label distribution protocol,LDP)或基于流量工程的资源预留协议(resource reservation protocol-traffic engineering,RSVP-TE)或边界网关协议(border gateway protocol,BGP)。现有的标签通告协议可以支持为标签交换路径分配标签。扩展后的标签通告协议可以识别携带所述第二标签范围的所述第二消息。扩展后的标签通告协议不仅可以支持为标签交换路径分配标签,还可以支持为已分配标签的标签交换路径分配新的标签。所述新的标签用于替换已分配的标签。
可选地,上述技术方案中,S303之后以及S302之前,所述方法还可以包括:
S304、所述控制器接收所述转发装置发送的第三消息。
所述第三消息用于通知所述控制器所述转发装置已为所述第二标签交换路径分配了所述新的标签。
举例来说,所述第三消息可以携带所述第二标签范围。
可以看出,所述转发装置已为所述第二标签交换路径分配了所述新的标签,并且用所述新的标签替代所述转发装置分配给所述第二标签交换路径的标签。因此,所述转发装置回收了所述转发装置分配给所述第二标签交换路径的标签。因此,所述控制器接收到所述第三消息后,可以确定所述转发装置回收了所述转发装置分配给所述第二标签交换路径的标签。所述转发装置回收标签后,所述控制器在第二标签范围内为所述转发装置分配所述全局标签。所述控制器分配的全局标签不会与所述第二标签交换路径使用的标签发生冲突,有助于提高作为已经存在的标签交换路径的节点的所述转发装置的可靠性。
可选地,上述技术方案中,S304之后以及S302之前,所述方法还可以包括:
S305、所述控制器向所述转发装置发送第四消息。
所述第四消息包括所述第二标签范围。所述第四消息用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
举例来说,所述第四消息中可以携带所述第二标签范围。
所述转发装置接收到包含所述第二标签范围的所述第四消息后,如果所述转发装置需要为作为新的标签交换路径的节点,所述转发装置为所述新的标签交换路径分配标签时,不使用所述第二标签范围中的标签。因此,上述技术方案有助于减少所述转发装置为所述新的标签交换路径分配标签与所述控制器为所述转发装置分配的所述全局标签发生冲突。因此,上述方案有助于提高作为新的标签交换路径的节点的所述转发装置的可靠性。
可选地,上述技术方案中,所述第二消息还用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
可选地,上述技术方案中,所述第一消息中还携带在所述第一标签范 围内已被所述转发装置分配给所述第一标签交换路径的标签,或者,所述第一消息中还携带第一子范围的标识、第二子范围的标识、第一标签的数量以及第二标签的数量,所述第一标签范围包括所述第一子范围以及所述第二子范围,在所述第一子范围内已被所述转发装置分配给所述第一标签交换路径的标签是所述第一标签,在所述第二子范围内已被所述转发装置分配给所述第一标签交换路径的标签是所述第二标签,所述第一标签的数量小于所述第二标签的数量。S301之后以及S303之前,所述方法还可以包括:
S306、所述控制器确定所述第一子范围是所述第二标签范围。
具体来说,S306可以包括:
所述控制器根据所述第一消息中携带的在所述第一标签范围内已被所述转发装置分配给第一标签交换路径的标签确定所述第一标签的数量小于所述第二标签的数量,或者所述控制器根据所述第一消息中携带的所述第一标签的数量以及所述第二标签的数量确定所述第一标签的数量小于所述第二标签的数量。所述控制器基于所述第一标签的数量小于所述第二标签的数量确定所述第一子范围是所述第二标签范围。
可选地,上述技术方案中,S301之前,所述方法还可以包括:
S307、所述控制器向所述转发装置发送第五消息。
所述第五消息用于指示所述转发装置向所述控制器发送所述转发装置的标签空间。所述第五消息还用于指示所述转发装置向所述控制器发送已被所述转发装置分配的标签或者所述已被所述转发装置分配的标签的数量。
可选地,上述技术方案中,所述第一消息中还携带在所述第一标签范围内已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点。
S302可以包括:所述控制器根据所述第一标签范围以及已被所述转发装置分配给所述第一标签交换路径的标签为所述转发装置分配所述全局标签,所述全局标签与已被所述转发装置分配给所述第一标签交换路径的标签的没有交集。
图4为实施例提供的一种控制器的结构示意图。控制器400具体为用于分配全局标签的装置。控制器400可以用于执行图3所示的方法。控制 器400可以应用于图1所示的网络结构中,从而实现图2所示信令交互。具体来说,控制器400可以是图1所示的控制器1。
参见图4,控制器400包括:第一接收单元401以及分配单元402。
第一接收单元401用于接收转发装置发送的第一消息。
所述第一消息中携带第一标签范围。所述第一标签范围包括的多个标签是所述转发装置的标签空间包括的多个标签的子集。标签空间是一个特殊的标签范围。所述转发装置的标签空间是指所述转发装置能够使用的所有标签的集合。所述转发装置的标签空间包括多个标签。所述第一标签范围不等于所述转发装置的标签空间。
举例来说,所述第一标签范围可以是一个连续的标签范围,也可以是多个连续的标签范围。连续的标签范围包括的多个标签是连续的。例如,所述第一标签范围可以是0至22-1。也就是说,所述第一标签范围中的多个标签分别是0、1、2以及3。显然,0、1、2以及3是连续的。另外,所述第一标签范围可以是0至210-1以及215至220-1。显然,0至210-1是连续的标签范围,215至220-1也是连续的标签范围。
具体来说,所述转发装置可以使用标签空间中的标签对接收到的报文进行处理。如果所述转发装置尚未分配标签,则所述标签空间包括尚未被所述转发装置分配的标签。如果所述转发装置已分配标签,但还包括尚未被分配的标签,则所述标签空间包括已被所述转发装置分配的标签以及尚未被所述转发装置分配的标签。例如,所述转发装置是标签交换路径的节点。所述转发装置已为所述标签交换路径分配了标签,并根据分配的标签生成标签转发表项。所述转发装置可以根据所述标签转发表项对在所述标签交换路径上传输的流量进行转发。也就是说,所述转发装置为所述标签交换路径分配标签,使得所述转发装置具备了转发在所述标签交换路径上传输的流量的能力。
需要说明的是,实施例中涉及的转发装置分配标签是指,所述转发装置为所述转发装置所在的标签交换路径分配标签。所述转发装置是标签交换路径的节点。
参见图1和图2,控制器400可以是控制器1。所述转发装置可以是开放流交换机1。
分配单元402用于根据第一接收单元401接收的所述第一消息中携带 的所述第一标签范围为所述转发装置分配全局标签。
所述全局标签是所述第一标签范围中的标签。所述全局标签可以是一个标签也可以是多个标签。
举例来说,所述全局标签可以是所述第一标签范围中的可用的标签。所述第一标签范围中的可用的标签是指,所述第一标签范围包括的多个标签中尚未被所述转发装置分配的标签。具体可以是,从来没有被所述转发装置分配的标签。也可以是被所述转发装置回收的标签。被所述转发装置回收的标签是指,曾经被所述转发装置分配,但是被所述转发装置分配后,被所述转发装置回收的标签。
举例来说,所述全局标签用于与所述转发装置接收到的报文中的MPLS头中的字段进行匹配,从而确定与所述报文匹配的标签转发表项。所述全局标签是用于执行MPLS涉及的push,pop或者swap操作之外的操作。
具体来说,所述全局标签被用于确定是否所述全局标签与接收到的报文中的MPLS头中的字段匹配。所述全局标签可以用于标识网络或者业务。
需要说明的是,实施例中涉及的控制器为转发装置分配全局标签是指,所述控制器指示所述转发装置生成包含所述全局标签的转发表项。从而,所述转发装置可以根据包含所述全局标签的所述转发表项,对标签交换路径上传输的流量进行处理。
图5为实施例提供的一种控制器的结构示意图。图5的控制器400是在图4所示的控制器400的基础上进行扩展得到的。关于第一发送单元403、第二接收单元404、第二发送单元405、确定单元406以及第三发送单元407,具体可以参考图5。
可选地,图4所示的技术方案中,所述第一标签范围包括已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点。控制器400还可以包括第一发送单元403。
第一发送单元403用于在第一接收单元401接收所述第一消息之后,以及在分配单元402为所述转发装置分配所述全局标签之前,向所述转发装置发送第二消息。
所述第二消息包括第二标签范围。所述第二标签范围包括多个标签。所述第二标签范围是所述第一标签范围的子集。所述第二消息用于指示所述转发装置为第二标签交换路径分配新的标签。所述新的标签用于替换已 被所述转发装置分配给所述第二标签交换路径的标签。所述新的标签在所述第二标签范围之外。所述第二标签交换路径是所述第一标签交换路径的子集。所述已被所述转发装置分配给所述第二标签交换路径的标签是所述第二标签范围的子集。所述全局标签可以是所述第二标签范围包括的多个标签中的标签。分配单元402可以具体用于所述控制器根据所述第二标签范围为所述转发装置分配所述全局标签,所述全局标签是所述第二标签范围中的标签。可以理解,所述转发装置分配给所述第一标签交换路径的标签与所述第二标签范围包括的多个标签的交集等于已被所述转发装置分配给所述第二标签交换路径的标签。
所述新的标签在所述第二标签范围之外是指所述新的标签与所述第二标签范围包括的多个标签之间没有交集。
举例来说,所述第一标签范围可以是0至210-1。在0至210-1内已被所述转发装置分配给所述第一标签交换路径的标签的数量可以是5。所述第一标签交换路径可以是LSP1、LSP2、LSP3、LSP4以及LSP5。所述转发装置是LSP1至LSP5上的节点。所述第二标签范围可以是25-1至26-1。在25-1至26-1内已被所述转发装置分配给所述第二标签交换路径的标签的数量可以是3。所述第二标签交换路径可以是LSP1、LSP2以及LSP3。已被所述转发装置分配给LSP1、LSP2以及LSP3的标签的值分别是25、25+1以及25+2。所述转发装置接收到所述第二标签后,为LSP1、LSP2以及LSP3分配的标签的值分别是26、26+1以及26+2。标签的值为26、26+1以及26+2的标签分别用于替代标签的值为25、25+1以及25+2的标签。因此,标签被替代后,LSP1、LSP2以及LSP3分别对应的标签的值为26、26+1以及26+2。所述转发装置不再需要使用标签的值为25的标签对LSP1上传输的流量进行处理。标签的值为25、25+1以及25+2的标签被所述转发装置回收。举例来说,所述第一标签范围可以是0至210-1以及215至220-1。在0至210-1内被所述转发装置分配给LSP1、LSP2以及LSP3的标签分别是标签1、标签2以及标签3。在215至220-1内被所述转发装置分配给LSP4以及LSP5的标签分别是标签4以及标签5。所述第一标签交换路径包括LSP1、LSP2、LSP3、LSP4以及LSP5。所述第一消息携带0至210-1、215至220-1、3以及2。其中,3表示在0至210-1内被所述转发装置分配的标签的数量。2表示在215至220-1内被所述转发装置分配的标签的数量。当然,所述第一消息 可以携带0至210-1、215至220-1、标签1、标签2、标签3、标签4以及标签5。其中,0至210-1与标签1至3对应,215至220-1与标签4至5对应。所述转发装置接收到所述第二消息后,可以确定0至210-1内被所述转发装置分配的标签的数量等于3,215至220-1内被所述转发装置分配的标签的数量等于2。进而,所述转发装置确定所述第二标签范围等于215至220-1。所述转发装置根据所述第二消息的指示,为LSP4以及LSP5分配新的标签。具体来说,为LSP4分配的新的标签的值等于5,为LSP5分配的新的标签的值等于6。因此,所述转发装置可以使用值为5的标签对LSP4上传输的流量进行处理。所述转发装置可以使用值为6的标签对LSP5上传输的流量进行处理。所述转发装置不再使用标签4对LSP4上传输的流量进行处理。所述转发装置不再使用标签5对LSP5上传输的流量进行处理。因此,标签4和标签5被所述转发装置回收。
实施例中涉及的新的标签替换转发装置已分配给标签交换路径的标签是指,所述转发装置包含与所述标签交换路径对应的标签转发表项。所述标签转发表项的匹配域包括所述转发装置已分配给所述标签交换路径的标签。所述转发装置需要使用所述新的标签替换所述标签转发表项的匹配域包括的标签。也就是说,替换后的标签转发表项的匹配域中不再包含转发装置已分配给标签交换路径的标签。
可以对现有的标签通告协议进行扩展。举例来说,标签通告协议可以是LDP或RSVP-TE或BGP。现有的标签通告协议可以支持为标签交换路径分配标签。扩展后的标签通告协议可以识别携带所述第二标签范围的所述第二消息。扩展后的标签通告协议不仅可以支持为标签交换路径分配标签,还可以支持为已分配标签的标签交换路径分配新的标签。所述新的标签用于替换已分配的标签。
可选地,上述技术方案中,控制器400还可以包括第二接收单元404。
第二接收单元404用于在第一发送单元403向所述转发装置发送所述第二消息之后,以及在分配单元402为所述转发装置分配所述全局标签之前,接收所述转发装置发送的第三消息。
所述第三消息用于通知控制器400所述转发装置已为所述第二标签交换路径分配了所述新的标签。
举例来说,所述第三消息可以携带所述第二标签范围。
可以看出,所述转发装置已为所述第二标签交换路径分配了所述新的标签,并且用所述新的标签替代所述转发装置分配给所述第二标签交换路径的标签。因此,所述转发装置回收了所述转发装置分配给所述第二标签交换路径的标签。因此,控制器400接收到所述第三消息后,可以确定所述转发装置回收了所述转发装置分配给所述第二标签交换路径的标签。所述转发装置回收标签后,控制器400在第二标签范围内为所述转发装置分配所述全局标签。控制器400分配的全局标签不会与所述第二标签交换路径使用的标签发生冲突,有助于提高作为已经存在的标签交换路径的节点的所述转发装置的可靠性。
可选地,上述技术方案中,控制器400还可以包括第二发送单元405。
第二发送单元405用于在第二接收单元404接收所述转发装置发送的所述第三消息之后,以及在分配单元402为所述转发装置分配所述全局标签之前,向所述转发装置发送第四消息。
所述第四消息包括所述第二标签范围。所述第四消息用于通知所述转发装置,控制器400已将所述第二标签范围作为候选的全局标签。
举例来说,所述第四消息中可以携带所述第二标签范围。
所述转发装置接收到包含所述第二标签范围的所述第四消息后,如果所述转发装置需要为作为新的标签交换路径的节点,所述转发装置为所述新的标签交换路径分配标签时,不使用所述第二标签范围中的标签。因此,上述技术方案有助于减少所述转发装置为所述新的标签交换路径分配标签与所述控制器为所述转发装置分配的所述全局标签发生冲突。因此,上述方案有助于提高作为新的标签交换路径的节点的所述转发装置的可靠性。
可选地,上述技术方案中,所述第二消息还用于通知所述转发装置,控制器400已将所述第二标签范围作为候选的全局标签。
可选地,上述技术方案中,所述第一消息中还携带在所述第一标签范围内已被所述转发装置分配给所述第一标签交换路径的标签,或者,所述第一消息中还携带第一子范围的标识、第二子范围的标识、第一标签的数量以及第二标签的数量,所述第一标签范围包括所述第一子范围以及所述第二子范围,在所述第一子范围内已被所述转发装置分配给所述第一标签交换路径的标签是所述第一标签,在所述第二子范围内已被所述转发装置分配给所述第一标签交换路径的标签是所述第二标签,所述第一标签的数 量小于所述第二标签的数量。控制器400还可以包括确定单元406。
确定单元406用于在第一接收单元401接收所述转发装置发送的所述第一消息之后,以及在第一发送单元403向所述转发装置发送所述第二消息之前,确定所述第一子范围是所述第二标签范围。
举例来说,确定单元406根据所述第一消息中携带的所述第一标签范围确定所述第二标签范围。
具体来说,确定单元406可以用于:根据所述第一消息中携带的在所述第一标签范围内已被所述转发装置分配给第一标签交换路径的标签确定所述第一标签的数量小于所述第二标签的数量,或者根据所述第一消息中携带的所述第一标签的数量以及所述第二标签的数量确定所述第一标签的数量小于所述第二标签的数量。基于所述第一标签的数量小于所述第二标签的数量确定所述第一子范围是所述第二标签范围。
可选地,上述技术方案中,控制器400还可以包括第三发送单元407。
第三发送单元407用于在第一接收单元401接收所述转发装置发送的所述第一消息之前,向所述转发装置发送第五消息。
所述第五消息用于指示所述转发装置向控制器400发送所述转发装置的标签空间。所述第五消息还用于指示所述转发装置向所述控制器发送已被所述转发装置分配的标签或者所述已被所述转发装置分配的标签的数量。
可选地,上述技术方案中,所述第一消息中还携带在所述第一标签范围内已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点。
分配单元402可以用于:根据所述第一标签范围以及已被所述转发装置分配给所述第一标签交换路径的标签为所述转发装置分配所述全局标签,所述全局标签与已被所述转发装置分配给所述第一标签交换路径的标签的没有交集。
图6为实施例提供的一种控制器的结构示意图。参见图6,控制器600包括发送器601,接收器602,处理器603以及存储器604。处理器603分别与发送器601,接收器602以及存储器604耦合。存储器604中存储计算机程序。处理器603可以通过访问所述计算机程序执行本实施例中的处理。举例来说,控制器600可以用于实现图4或者图5所示的控制器。控制器 600可用于执行图3所示的方法。
接收器602用于接收转发装置发送的第一消息。
举例来说,接收器602可以用于实现第一接收单元401。关于所述第一消息,请参见图4对应的实施例的描述,此处不再赘述。
处理器603用于根据接收器602接收的所述第一消息中携带的第一标签范围为所述转发装置分配全局标签。
举例来说,处理器603可以用于执行分配单元402的处理。关于所述转发装置以及所述全局标签,请参见图4对应的实施例的描述,此处不再赘述。
发送器601用于在接收器602接收所述第一消息之后,以及在处理器603为所述转发装置分配所述全局标签之前,向所述转发装置发送第二消息。
举例来说,发送器601可以用于实现第一发送单元403。关于所述第二消息,请参见图5对应的实施例的描述,此处不再赘述。
可选地,接收器602还可以用于在发送器601向所述转发装置发送所述第二消息之后,以及在处理器603为所述转发装置分配所述全局标签之前,接收所述转发装置发送的第三消息。
举例来说,接收器602可以用于实现第二接收单元404。关于所述第三消息,请参见图5对应的实施例的描述,此处不再赘述。
可选地,发送器601还可以用于在接收器602接收所述转发装置发送的所述第三消息之后,以及在处理器603为所述转发装置分配所述全局标签之前,向所述转发装置发送第四消息。
举例来说,发送器601可以用于实现第二发送单元405。关于所述第四消息,请参见图5对应的实施例的描述,此处不再赘述。
可选地,上述技术方案中,所述第二消息还用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
可选地,上述技术方案中,所述第一消息中还携带在所述第一标签范围内已被所述转发装置分配给所述第一标签交换路径的标签,或者,所述第一消息中还携带第一子范围的标识、第二子范围的标识、第一标签的数量以及第二标签的数量,所述第一标签范围包括所述第一子范围以及所述第二子范围,在所述第一子范围内已被所述转发装置分配给所述第一标签 交换路径的标签是所述第一标签,在所述第二子范围内已被所述转发装置分配给所述第一标签交换路径的标签是所述第二标签,所述第一标签的数量小于所述第二标签的数量。处理器603还可以用于在接收器602接收所述转发装置发送的所述第一消息之后,以及在发送器601向所述转发装置发送所述第二消息之前,确定所述第一子范围是所述第二标签范围。
具体来说,处理器603可以用于:根据所述第一消息中携带的在所述第一标签范围内已被所述转发装置分配给第一标签交换路径的标签确定所述第一标签的数量小于所述第二标签的数量,或者根据所述第一消息中携带的所述第一标签的数量以及所述第二标签的数量确定所述第一标签的数量小于所述第二标签的数量。基于所述第一标签的数量小于所述第二标签的数量确定所述第一子范围是所述第二标签范围。
可选地,发送器601还可以用于在接收器602接收所述转发装置发送的所述第一消息之前,向所述转发装置发送第五消息。
举例来说,发送器601可以用于实现第三发送单元407。关于所述第五消息,请参见图5对应的实施例的描述,此处不再赘述。
图7为本发明实施例提供的一种获取全局标签的方法的流程示意图。所述方法的执行主体为转发装置。所述方法可以应用于图1所示的网络结构中,从而实现图2所示信令交互。具体来说,所述控制器可以是图1所示的开放流交换机1。
参见图7,所述方法包括:
S701、转发装置向控制器发送第一消息。
所述第一消息中携带第一标签范围。所述第一标签范围包括的多个标签是所述转发装置的标签空间包括的多个标签的子集。标签空间是一个特殊的标签范围。所述转发装置的标签空间是指所述转发装置能够使用的所有标签的集合。所述转发装置的标签空间包括多个标签。所述第一标签范围不等于所述转发装置的标签空间。
关于S701的具体实现,可以参见图3对应的实施例对S301的描述。此处不再赘述。
S702、所述转发装置获取所述控制器根据所述第一消息中携带的所述第一标签范围为所述转发装置分配的全局标签。
所述全局标签是所述第一标签范围中的标签。所述全局标签可以是一 个标签也可以是多个标签。
举例来说,所述全局标签可以是所述第一标签范围中的可用的标签。所述第一标签范围中的可用的标签是指,所述第一标签范围包括的多个标签中尚未被所述转发装置分配的标签。具体可以是,从来没有被所述转发装置分配的标签。也可以是被所述转发装置回收的标签。被所述转发装置回收的标签是指,曾经被所述转发装置分配,但是被所述转发装置分配后,被所述转发装置回收的标签。
举例来说,所述控制器分配所述全局标签后,可以向所述转发装置发送携带所述全局标签的消息。所述转发装置接收到所述消息后,可以从所述消息获取所述全局标签。关于S702的具体实现,可以参见图3对应的实施例对S302的描述。此处不再赘述。
图8为实施例提供的一种获取全局标签的方法的流程示意图。图8所示的方法是在图7所示的方法的基础上进行扩展得到的。扩展后的方法还可以包括S703、S704、S705以及S706。关于S703、S704、S705以及S706,具体可以参考图8。
可选地,图7所示的技术方案中,所述第一标签范围包括已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点。S701之后,以及S702之前,所述方法还可以包括:
S703、所述转发装置接收所述控制器发送第二消息。
所述第二消息包括第二标签范围。所述第二标签范围包括多个标签。所述第二标签范围是所述第一标签范围的子集。所述第二消息用于指示所述转发装置为第二标签交换路径分配新的标签。所述新的标签用于替换已被所述转发装置分配给所述第二标签交换路径的标签。所述新的标签在所述第二标签范围之外。所述第二标签交换路径是所述第一标签交换路径的子集。所述已被所述转发装置分配给所述第二标签交换路径的标签是所述第二标签范围的子集。所述第二标签范围被所述控制器用于为所述转发装置分配所述全局标签。所述全局标签可以是所述第二标签范围中的标签。
举例来说,S702涉及的全局标签通过如下方式确定:所述控制器根据所述第二标签范围为所述转发装置分配所述全局标签。可以理解,所述转发装置分配给所述第一标签交换路径的标签与所述第二标签范围包括的多个标签的交集等于已被所述转发装置分配给所述第二标签交换路径的标 签。
所述新的标签在所述第二标签范围之外是指所述新的标签与所述第二标签范围包括的多个标签之间没有交集。
关于S703的具体实现,可以参见图3a对应的实施例对S303的描述。此处不再赘述。
可选地,上述技术方案中,S703之后,以及S702之前,所述方法还包括:
S704、所述转发装置向所述控制器发送第三消息。
所述第三消息用于通知所述控制器所述转发装置已为所述第二标签交换路径分配了所述新的标签。
关于S704的具体实现,可以参见图3a对应的实施例对S304的描述。此处不再赘述。
可选地,上述技术方案中,S704之后,以及S702之前,所述方法还可以包括:
S705、所述转发装置接收所述控制器发送的第四消息。
所述第四消息包括所述第二标签范围。所述第四消息用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
关于S705的具体实现,可以参见图3a对应的实施例对S305的描述。此处不再赘述。
可选地,上述技术方案中,所述第二消息还用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
可选地,上述技术方案中,所述第一消息中还携带在所述第一标签范围内已被所述转发装置分配给所述第一标签交换路径的标签,或者,所述第一消息中还携带第一子范围的标识、第二子范围的标识、第一标签的数量以及第二标签的数量,所述第一标签范围包括所述第一子范围以及所述第二子范围,在所述第一子范围内已被所述转发装置分配给所述第一标签交换路径的标签是所述第一标签,在所述第二子范围内已被所述转发装置分配给所述第一标签交换路径的标签是所述第二标签,所述第一标签的数量小于所述第二标签的数量。S701之后以及S703之前,所述控制器确定所述第一子范围是所述第二标签范围。具体来说,所述控制器根据所述第一消息中携带的在所述第一标签范围内已被所述转发装置分配给第一标签交 换路径的标签确定所述第一标签的数量小于所述第二标签的数量,或者所述控制器根据所述第一消息中携带的所述第一标签的数量以及所述第二标签的数量确定所述第一标签的数量小于所述第二标签的数量。所述控制器基于所述第一标签的数量小于所述第二标签的数量确定所述第一子范围是所述第二标签范围。
可选地,上述技术方案中,S701之前,所述方法还包括:
S706、所述转发装置接收所述控制器发送的第五消息。
所述第五消息用于指示所述转发装置向所述控制器发送所述转发装置的标签空间。所述第五消息还用于指示所述转发装置向所述控制器发送已被所述转发装置分配的标签或者所述已被所述转发装置分配的标签的数量。
关于S706的具体实现,可以参见图3a对应的实施例对S307的描述。此处不再赘述。
图9为实施例提供的一种转发装置的结构示意图。所述转发装置具体为用于获取全局标签的装置。所述转发装置可以用于执行图6所示的方法。所述控制器可以应用于图1所示的网络结构中,从而实现图2所示信令交互。具体来说,所述控制器可以是图1所示的开放流交换机1。
参见图9,转发装置900具体包括:
第一发送单元901,用于向控制器发送第一消息。
所述第一消息中携带第一标签范围。所述第一标签范围包括的多个标签是所述转发装置的标签空间包括的多个标签的子集。标签空间是一个特殊的标签范围。所述转发装置的标签空间是指所述转发装置能够使用的所有标签的集合。所述转发装置的标签空间包括多个标签。所述第一标签范围不等于所述转发装置的标签空间。
举例来说,第一发送单元901可以用于执行S701的步骤。关于所述控制器以及所述第一消息,具体请参见图7对应的实施例的描述,此处不再赘述。
获取单元902,用于获取所述控制器根据所述第一消息中携带的所述第一标签范围为所述转发装置分配的全局标签。
所述全局标签是所述第一标签范围中的标签。所述全局标签可以是一个标签也可以是多个标签。
举例来说,所述全局标签可以是所述第一标签范围中的可用的标签。所述第一标签范围中的可用的标签是指,所述第一标签范围包括的多个标签中尚未被所述转发装置分配的标签。具体可以是,从来没有被所述转发装置分配的标签。也可以是被所述转发装置回收的标签。被所述转发装置回收的标签是指,曾经被所述转发装置分配,但是被所述转发装置分配后,被所述转发装置回收的标签。
举例来说,获取单元902可以用于执行S702的步骤。关于所述全局标签,具体请参见图7对应的实施例的描述,此处不再赘述。
图10是实施例提供的一种转发装置的结构示意图。图10所示的转发装置是在图9所示的转发装置的基础上进行扩展得到的。扩展后的转发装置包括第一接收单元903、第二发送单元904、第二接收单元905以及第三接收单元906。关于第一接收单元903、第二发送单元904、第二接收单元905以及第三接收单元906,具体可以参考图10。
可选地,上述技术方案中,所述第一标签范围包括已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点。图9所示的转发装置900还可以包括:
第一接收单元903,用于在第一发送单元901发送所述第一消息之后,以及在获取单元902获取所述全局标签之前接收所述控制器发送第二消息。
所述第二消息包括第二标签范围。所述第二标签范围包括多个标签。所述第二标签范围是所述第一标签范围的子集。所述第二消息用于指示所述转发装置为第二标签交换路径分配新的标签。所述新的标签用于替换已被所述转发装置分配给所述第二标签交换路径的标签。所述新的标签在所述第二标签范围之外。所述第二标签交换路径是所述第一标签交换路径的子集。所述已被所述转发装置分配给所述第二标签交换路径的标签是所述第二标签范围的子集。所述第二标签范围被所述控制器用于为所述转发装置分配所述全局标签。所述全局标签可以是所述第二标签范围中的标签。
可以理解,所述转发装置分配给所述第一标签交换路径的标签与所述第二标签范围包括的多个标签的交集等于已被所述转发装置分配给所述第二标签交换路径的标签。
所述新的标签在所述第二标签范围之外是指所述新的标签与所述第二标签范围包括的多个标签之间没有交集。
举例来说,第一接收单元903可以用于执行S703的步骤。关于所述第二消息,具体请参见图7对应的实施例的描述,此处不再赘述。
可选地,上述技术方案中,转发装置900还可以包括:
第二发送单元904,用于在第一接收单元903接收所述第二消息之后,以及在所述获取单元902获取所述全局标签之前,向所述控制器发送第三消息。
所述第三消息用于通知所述控制器所述转发装置已为所述第二标签交换路径分配了所述新的标签。
举例来说,第二发送单元904可以用于执行S704的步骤。关于所述第三消息,具体请参见图7对应的实施例的描述,此处不再赘述。
可选地,上述技术方案中,转发装置900还可以包括:
第二接收单元905,用于在所述第二发送单元向所述控制器发送所述第三消息之后,以及所述获取单元获取所述全局标签之前,接收所述控制器发送的第四消息。
所述第四消息包括所述第二标签范围。所述第四消息用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
举例来说,第二接收单元905可以用于执行S705的步骤。关于所述第四消息,具体请参见图7对应的实施例的描述,此处不再赘述。
可选地,上述技术方案中,所述第二消息还用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
可选地,上述技术方案中,所述第一消息中还携带在所述第一标签范围内已被所述转发装置分配给所述第一标签交换路径的标签,或者,所述第一消息中还携带第一子范围的标识、第二子范围的标识、第一标签的数量以及第二标签的数量,所述第一标签范围包括所述第一子范围以及所述第二子范围,在所述第一子范围内已被所述转发装置分配给所述第一标签交换路径的标签是所述第一标签,在所述第二子范围内已被所述转发装置分配给所述第一标签交换路径的标签是所述第二标签,所述第一标签的数量小于所述第二标签的数量。S901之后以及S903之前,所述控制器确定所述第一子范围是所述第二标签范围。具体来说,所述控制器根据所述第一消息中携带的在所述第一标签范围内已被所述转发装置分配给第一标签交换路径的标签确定所述第一标签的数量小于所述第二标签的数量,或者所 述控制器根据所述第一消息中携带的所述第一标签的数量以及所述第二标签的数量确定所述第一标签的数量小于所述第二标签的数量。所述控制器基于所述第一标签的数量小于所述第二标签的数量确定所述第一子范围是所述第二标签范围。
可选地,上述技术方案中,转发装置900还可以包括:
第三接收单元906,用于在所述第一发送单元发送所述第一消息之前,接收所述控制器发送的第五消息。
所述第五消息用于指示所述转发装置向所述控制器发送所述转发装置的标签空间。所述第五消息还用于指示所述转发装置向所述控制器发送已被所述转发装置分配的标签或者所述已被所述转发装置分配的标签的数量。
举例来说,第三接收单元906可以用于执行S706的步骤。关于所述第五消息,具体请参见图7对应的实施例的描述,此处不再赘述。
图11是实施例提供的一种转发装置的结构示意图。参见图11,转发装置1100包括发送器1101,接收器1102,处理器1103以及存储器1104。处理器1103分别与发送器1101,接收器1102以及存储器1104耦合。存储器1104中存储计算机程序。处理器1103可以通过访问所述计算机程序执行本实施例中的处理。举例来说,转发装置1100可以用于实现图9或者图10所示的转发装置。转发装置1100可用于执行图7或者图8所示的方法。
发送器1101,用于向控制器发送第一消息。关于第一消息,请参考图9对应的实施例中的描述。特别是,请参考图9对应的实施例对第一发送单元901的描述。
举例来说,发送器1100可以用于执行S701的步骤。关于所述控制器以及所述第一消息,具体请参见图7对应的实施例的描述,此处不再赘述。
处理器1103,用于获取所述控制器根据所述第一消息中携带的所述第一标签范围为所述转发装置分配的全局标签。
所述全局标签是所述第一标签范围中的标签。所述全局标签可以是一个标签也可以是多个标签。
举例来说,处理器1103可以用于执行S702的步骤。关于所述全局标签,具体请参见图7对应的实施例的描述,此处不再赘述。
可选地,上述技术方案中,所述第一标签范围包括已被所述转发装置 分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点。接收器1102可以用于,在发送器1101发送所述第一消息之后,以及在处理器1103获取所述全局标签之前接收所述控制器发送第二消息。
举例来说,接收器1102可以用于执行S703的步骤。关于所述第二消息,具体请参见图7对应的实施例的描述,此处不再赘述。
可选地,发送器1101还可以用于在接收器1102接收所述第二消息之后,以及在处理器1103获取所述全局标签之前,向所述控制器发送第三消息。
举例来说,发送器1101可以用于执行S704的步骤。关于所述第三消息,具体请参见图7对应的实施例的描述,此处不再赘述。
可选地,接收器1102还可以用于,在发送器1101向所述控制器发送所述第三消息之后,以及处理器1103获取所述全局标签之前,接收所述控制器发送的第四消息。
举例来说,接收器1102可以用于执行S705的步骤。关于第四消息,具体请参见图7对应的实施例的描述,此处不再赘述。
可选地,上述技术方案中,所述第二消息还用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
可选地,上述技术方案中,所述第一消息中还携带在所述第一标签范围内已被所述转发装置分配给所述第一标签交换路径的标签,或者,所述第一消息中还携带第一子范围的标识、第二子范围的标识、第一标签的数量以及第二标签的数量,所述第一标签范围包括所述第一子范围以及所述第二子范围,在所述第一子范围内已被所述转发装置分配给所述第一标签交换路径的标签是所述第一标签,在所述第二子范围内已被所述转发装置分配给所述第一标签交换路径的标签是所述第二标签,所述第一标签的数量小于所述第二标签的数量。
可选地,接收器1102还可以用于,在发送器1101发送所述第一消息之前,接收所述控制器发送的第五消息。
举例来说,接收器1102可以用于执行S706的步骤。关于所述第五消息,具体请参见图7对应的实施例的描述,此处不再赘述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件 的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,可以仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服 务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:闪存盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储计算机程序的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。

Claims (32)

  1. 一种分配全局标签的方法,其特征在于,包括:
    控制器接收转发装置发送的第一消息,所述第一消息中携带第一标签范围,所述第一标签范围包括的多个标签是所述转发装置的标签空间包括的多个标签的子集,所述第一标签范围不等于所述转发装置的标签空间;
    所述控制器根据所述第一消息中携带的所述第一标签范围为所述转发装置分配全局标签,所述全局标签是所述第一标签范围中的标签。
  2. 根据权利要求1所述的方法,其特征在于,所述第一标签范围包括已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点,所述控制器接收所述第一消息之后,以及所述控制器为所述转发装置分配所述全局标签之前,所述方法还包括:所述控制器向所述转发装置发送第二消息,所述第二消息包括第二标签范围,所述第二标签范围包括多个标签,所述第二标签范围是所述第一标签范围的子集,所述第二消息用于指示所述转发装置为第二标签交换路径分配新的标签,所述新的标签用于替换已被所述转发装置分配给所述第二标签交换路径的标签,所述新的标签在所述第二标签范围之外,所述第二标签交换路径是所述第一标签交换路径的子集,所述已被所述转发装置分配给所述第二标签交换路径的标签是所述第二标签范围的子集;
    所述控制器根据所述第一消息中携带的所述第一标签范围为所述转发装置分配全局标签,所述全局标签是所述第一标签范围中的标签,具体包括:
    所述控制器根据所述第二标签范围为所述转发装置分配所述全局标签,所述全局标签是所述第二标签范围中的标签。
  3. 根据权利要求2所述的方法,其特征在于,所述控制器向所述转发装置发送所述第二消息之后,以及所述控制器为所述转发装置分配所述全局标签之前,所述方法还包括:
    所述控制器接收所述转发装置发送的第三消息,所述第三消息用于通知所述控制器所述转发装置已为所述第二标签交换路径分配了所述新的标签。
  4. 根据权利要求3所述的方法,其特征在于,所述控制器接收所述转发装置发送的第三消息之后,以及所述控制器为所述转发装置分配所述全局标签之前,所述方法还包括:
    所述控制器向所述转发装置发送第四消息,所述第四消息包括所述第二标签范围,所述第四消息用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
  5. 根据权利要求2所述的方法,其特征在于,所述第二消息还用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
  6. 根据权利要求2至5中任一所述的方法,其特征在于,所述第一消息中还携带在所述第一标签范围内已被所述转发装置分配给所述第一标签交换路径的标签,或者,所述第一消息中还携带第一子范围的标识、第二子范围的标识、第一标签的数量以及第二标签的数量,所述第一标签范围包括所述第一子范围以及所述第二子范围,在所述第一子范围内已被所述转发装置分配给所述第一标签交换路径的标签是所述第一标签,在所述第二子范围内已被所述转发装置分配给所述第一标签交换路径的标签是所述第二标签,所述第一标签的数量小于所述第二标签的数量;
    所述控制器接收所述第一消息之后,以及所述控制器向所述转发装置发送所述第二消息之前,所述方法还包括:
    所述控制器根据所述第一消息中携带的在所述第一标签范围内已被所述转发装置分配给第一标签交换路径的标签确定所述第一标签的数量小于所述第二标签的数量,或者所述控制器根据所述第一消息中携带的所述第一标签的数量以及所述第二标签的数量确定所述第一标签的数量小于所述第二标签的数量;
    所述控制器基于所述第一标签的数量小于所述第二标签的数量确定所述第一子范围是所述第二标签范围。
  7. 根据权利要求1至6中任一所述的方法,其特征在于,所述控制器接收所述第一消息之前,所述方法还包括:
    所述控制器向所述转发装置发送第五消息,所述第五消息用于指示所 述转发装置向所述控制器发送所述转发装置的标签空间,所述第五消息还用于指示所述转发装置向所述控制器发送已被所述转发装置分配的标签或者所述已被所述转发装置分配的标签的数量。
  8. 根据权利要求1所述的方法,其特征在于,
    所述第一消息中还携带在所述第一标签范围内已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点;
    所述控制器根据所述第一消息中携带的所述第一标签范围为所述转发装置分配全局标签包括:
    所述控制器根据所述第一标签范围以及已被所述转发装置分配给所述第一标签交换路径的标签为所述转发装置分配所述全局标签,所述全局标签与已被所述转发装置分配给所述第一标签交换路径的标签的没有交集。
  9. 一种获取全局标签的方法,其特征在于,包括:
    转发装置向控制器发送第一消息,所述第一消息中携带第一标签范围,所述第一标签范围包括的多个标签是所述转发装置的标签空间包括的多个标签的子集,所述第一标签范围不等于所述转发装置的标签空间;
    所述转发装置获取所述控制器根据所述第一消息中携带的所述第一标签范围为所述转发装置分配的全局标签,所述全局标签是所述第一标签范围中的标签。
  10. 根据权利要求9所述的方法,其特征在于,所述第一标签范围包括已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点,所述转发装置向所述控制器发送所述第一消息之后,以及所述转发装置获取所述全局标签之前,所述方法还包括:
    所述转发装置接收所述控制器发送第二消息,所述第二消息包括第二标签范围,所述第二标签范围包括多个标签,所述第二标签范围是所述第一标签范围的子集,所述第二消息用于指示所述转发装置为第二标签交换路径分配新的标签,所述新的标签用于替换已被所述转发装置分配给所述第二标签交换路径的标签,所述新的标签在所述第二标签范围之外,所述 第二标签交换路径是所述第一标签交换路径的子集,所述已被所述转发装置分配给所述第二标签交换路径的标签是所述第二标签范围的子集,所述第二标签范围被所述控制器用于为所述转发装置分配所述全局标签,所述全局标签是所述第二标签范围中的标签。
  11. 根据权利要求10所述的方法,其特征在于,所述转发装置接收所述控制器发送的所述第二消息之后,以及所述转发装置获取所述全局标签之前,所述方法还包括:
    所述转发装置向所述控制器发送第三消息,所述第三消息用于通知所述控制器所述转发装置已为所述第二标签交换路径分配了所述新的标签。
  12. 根据权利要求11所述的方法,其特征在于,所述转发装置向所述控制器发送所述第三消息之后,以及所述转发装置获取所述全局标签之前,所述方法还包括:
    所述转发装置接收所述控制器发送的第四消息,所述第四消息包括所述第二标签范围,所述第四消息用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
  13. 根据权利要求10所述的方法,其特征在于,所述第二消息还用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
  14. 根据权利要求10至13中任一所述的方法,其特征在于,
    所述第二标签范围是第一子范围,所述第一标签范围包括所述第一子范围以及第二子范围,所述在所述第一标签范围内已被所述转发装置分配给所述第一标签交换路径的标签包括第一标签和第二标签,所述在所述第一标签范围内已被所述转发装置分配给所述第一标签交换路径的标签的数量包括所述第一标签的数量和所述第二标签的数量,所述第一标签是所述第一子范围中的标签,所述第二标签是所述第二子范围中的标签,所述第一标签的数量小于所述第二标签的数量。
  15. 根据权利要求9至14中任一所述的方法,其特征在于,所述转发装置向所述控制器发送所述第一消息之前,所述方法还包括:
    所述转发装置接收所述控制器发送的第五消息,所述第五消息用于指示所述转发装置向所述控制器发送所述转发装置的标签空间,所述第五消息还用于指示所述转发装置向所述控制器发送已被所述转发装置分配的标签或者所述已被所述转发装置分配的标签的数量。
  16. 根据权利要求9所述的方法,其特征在于,所述第一消息中还携带在所述第一标签范围内已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点,所述全局标签与已被所述转发装置分配给所述第一标签交换路径的标签的没有交集。
  17. 一种控制器,其特征在于,包括:
    第一接收单元,用于接收转发装置发送的第一消息,所述第一消息中携带第一标签范围,所述第一标签范围包括的多个标签是所述转发装置的标签空间包括的多个标签的子集,所述第一标签范围不等于所述转发装置的标签空间;
    分配单元,用于根据所述第一接收单元接收的所述第一消息中携带的所述第一标签范围为所述转发装置分配全局标签,所述全局标签是所述第一标签范围中的标签。
  18. 根据权利要求17所述的控制器,其特征在于,所述第一标签范围包括已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点,所述控制器还包括第一发送单元,所述第一发送单元用于在所述第一接收单元接收所述第一消息之后,以及在所述分配单元为所述转发装置分配所述全局标签之前,向所述转发装置发送第二消息,所述第二消息包括第二标签范围,所述第二标签范围包括多个标签,所述第二标签范围是所述第一标签范围的子集,所述第二消息用于指示所述转发装置为第二标签交换路径分配新的标签,所述新的标签用于替换已被所述转发装置分配给所述第二标签交换路径的标签,所述新的标 签在所述第二标签范围之外,所述第二标签交换路径是所述第一标签交换路径的子集,所述已被所述转发装置分配给所述第二标签交换路径的标签是所述第二标签范围的子集,所述全局标签是所述第二标签范围中的标签。
  19. 根据权利要求18所述的控制器,其特征在于,所述控制器还包括第二接收单元,所述第二接收单元用于在所述第一发送单元向所述转发装置发送所述第二消息之后,以及在所述分配单元为所述转发装置分配所述全局标签之前,接收所述转发装置发送的第三消息,所述第三消息用于通知所述控制器所述转发装置已为所述第二标签交换路径分配了所述新的标签。
  20. 根据权利要求19所述的控制器,其特征在于,所述控制器还包括第二发送单元,所述第二发送单元用于在所述第二接收单元接收所述转发装置发送的第三消息之后,以及在所述分配单元为所述转发装置分配所述全局标签之前,向所述转发装置发送第四消息,所述第四消息包括所述第二标签范围,所述第四消息用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
  21. 根据权利要求18所述的控制器,其特征在于,所述第二消息还用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
  22. 根据权利要求18至21中任一所述的控制器,其特征在于,所述第一消息中还携带在所述第一标签范围内已被所述转发装置分配给所述第一标签交换路径的标签,或者,所述第一消息中还携带第一子范围的标识、第二子范围的标识、第一标签的数量以及第二标签的数量,所述第一标签范围包括所述第一子范围以及所述第二子范围,在所述第一标签范围内已被所述转发装置分配给所述第一标签交换路径的标签是所述第一标签,在所述第二子范围内已被所述转发装置分配给所述第一标签交换路径的标签是所述第二标签,所述第一标签的数量小于所述第二标签的数量;
    所述控制器还包括确定单元,所述确定单元用于在所述第一接收单元 接收所述第一消息之后,以及在所述第一发送单元向所述转发装置发送所述第二消息之前,根据所述第一消息中携带的在所述第一标签范围内已被所述转发装置分配给第一标签交换路径的标签确定所述第一标签的数量小于所述第二标签的数量,或者所述控制器根据所述第一消息中携带的所述第一标签的数量以及所述第二标签的数量确定所述第一标签的数量小于所述第二标签的数量,基于所述第一标签的数量小于所述第二标签的数量确定所述第一子范围是所述第二标签范围。
  23. 根据权利要求17至22中任一所述的控制器,其特征在于,所述控制器还包括第三发送单元,所述第三发送单元用于在所述第一接收单元接收所述转发装置发送的所述第一消息之前,向所述转发装置发送第五消息,所述第五消息用于指示所述转发装置向所述控制器发送所述转发装置的标签空间,所述第五消息还用于指示所述转发装置向所述控制器发送已被所述转发装置分配的标签或者所述已被所述转发装置分配的标签的数量。
  24. 根据权利要求17所述的控制器,其特征在于,所述第一消息中还携带在所述第一标签范围内已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点;
    所述分配单元具体用于:根据所述第一标签范围以及已被所述转发装置分配给所述第一标签交换路径的标签为所述转发装置分配所述全局标签,所述全局标签与已被所述转发装置分配给所述第一标签交换路径的标签的没有交集。
  25. 一种转发装置,其特征在于,包括:
    第一发送单元,用于向控制器发送第一消息,所述第一消息中携带第一标签范围,所述第一标签范围包括的多个标签是所述转发装置的标签空间包括的多个标签的子集,所述第一标签范围不等于所述转发装置的标签空间;
    获取单元,用于获取所述控制器根据所述第一消息中携带的所述第一标签范围为所述转发装置分配的全局标签,所述全局标签是所述第一标签 范围中的标签。
  26. 根据权利要求25所述的转发装置,其特征在于,所述第一标签范围包括已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点,所述的转发装置还包括:
    第一接收单元,用于在所述第一发送单元发送所述第一消息之后,以及在所述获取单元获取所述全局标签之前接收所述控制器发送第二消息,所述第二消息包括第二标签范围,所述第二标签范围包括多个标签,所述第二标签范围是所述第一标签范围的子集,所述第二消息用于指示所述转发装置为第二标签交换路径分配新的标签,所述新的标签用于替换已被所述转发装置分配给所述第二标签交换路径的标签,所述新的标签在所述第二标签范围之外,所述第二标签交换路径是所述第一标签交换路径的子集,所述已被所述转发装置分配给所述第二标签交换路径的标签是所述第二标签范围的子集,所述第二标签范围被所述控制器用于为所述转发装置分配所述全局标签,所述全局标签是所述第二标签范围中的标签。
  27. 根据权利要求26所述的转发装置,其特征在于,所述转发装置还包括:
    第二发送单元,用于在所述第一接收单元接收所述第二消息之后,以及在所述获取单元获取所述全局标签之前,向所述控制器发送第三消息,所述第三消息用于通知所述控制器所述转发装置已为所述第二标签交换路径分配了所述新的标签。
  28. 根据权利要求27所述的转发装置,其特征在于,所述转发装置还包括:
    第二接收单元,用于在所述第二发送单元向所述控制器发送所述第三消息之后,以及所述获取单元获取所述全局标签之前,接收所述控制器发送的第四消息,所述第四消息包括所述第二标签范围,所述第四消息用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
  29. 根据权利要求26所述的转发装置,其特征在于,所述第二消息还用于通知所述转发装置,所述控制器已将所述第二标签范围作为候选的全局标签。
  30. 根据权利要求26至29中任一所述的转发装置,其特征在于,
    所述第二标签范围是第一子范围,所述第一标签范围包括所述第一子范围以及第二子范围,所述在所述第一标签范围内已被所述转发装置分配给所述第一标签交换路径的标签包括第一标签和第二标签,所述在所述第一标签范围内已被所述转发装置分配给所述第一标签交换路径的标签的数量包括所述第一标签的数量和所述第二标签的数量,所述第一标签是所述第一子范围中的标签,所述第二标签是所述第二子范围中的标签,所述第一标签的数量小于所述第二标签的数量。
  31. 根据权利要求25至30中任一所述的转发装置,其特征在于,所述转发装置还包括第三接收单元,所述第三接收单元用于在所述第一发送单元发送所述第一消息之前,接收所述控制器发送的第五消息,所述第五消息用于指示所述转发装置向所述控制器发送所述转发装置的标签空间,所述第五消息还用于指示所述转发装置向所述控制器发送已被所述转发装置分配的标签或者所述已被所述转发装置分配的标签的数量。
  32. 根据权利要求25所述的转发装置,其特征在于,所述第一消息中还携带在所述第一标签范围内已被所述转发装置分配给第一标签交换路径的标签,所述转发装置是所述第一标签交换路径上的节点,所述全局标签与已被所述转发装置分配给所述第一标签交换路径的标签的没有交集。
PCT/CN2016/098359 2015-09-16 2016-09-07 分配全局标签的方法、获取全局标签的方法及相关装置 Ceased WO2017045561A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP16845675.4A EP3310010B1 (en) 2015-09-16 2016-09-07 Method for allocating global label, method for acquiring global label and related device
US15/923,866 US20180205642A1 (en) 2015-09-16 2018-03-16 Method for allocating global label, method for obtaining global label, and related apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510590096.6 2015-09-16
CN201510590096.6A CN106549870B (zh) 2015-09-16 2015-09-16 分配全局标签的方法、获取全局标签的方法及相关装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/923,866 Continuation US20180205642A1 (en) 2015-09-16 2018-03-16 Method for allocating global label, method for obtaining global label, and related apparatus

Publications (1)

Publication Number Publication Date
WO2017045561A1 true WO2017045561A1 (zh) 2017-03-23

Family

ID=58288083

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/098359 Ceased WO2017045561A1 (zh) 2015-09-16 2016-09-07 分配全局标签的方法、获取全局标签的方法及相关装置

Country Status (4)

Country Link
US (1) US20180205642A1 (zh)
EP (1) EP3310010B1 (zh)
CN (1) CN106549870B (zh)
WO (1) WO2017045561A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11522793B2 (en) 2018-03-19 2022-12-06 Huawei Technologies Co., Ltd. Stitching label sending method, receiving method, and device

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259341B (zh) * 2017-12-06 2020-12-29 新华三技术有限公司 一种前缀标签分配方法和sdn控制器
CN112154628B (zh) * 2018-05-17 2022-10-14 瑞典爱立信有限公司 拆除经过通信网络的标签交换路径
EP3808042B1 (en) * 2018-06-14 2025-10-22 Nokia Solutions and Networks Oy Flexible label value encoding in label switched packet networks
WO2019239172A1 (en) 2018-06-14 2019-12-19 Nokia Solutions And Networks Oy Path compression in routing of source routed packets
WO2019239171A1 (en) 2018-06-14 2019-12-19 Nokia Solutions And Networks Oy Flow-specific fast rerouting of source routed packets
CN109889445B (zh) * 2019-01-16 2021-06-29 烽火通信科技股份有限公司 一种基于分布式平台的bgp-lsp实现系统及方法
US10972383B2 (en) 2019-03-19 2021-04-06 Arista Networks, Inc. Method and system for processing network traffic using expanded labels

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050169266A1 (en) * 2004-02-03 2005-08-04 Rahul Aggarwal MPLS traffic engineering for point-to-multipoint label switched paths
CN102710533A (zh) * 2012-06-28 2012-10-03 杭州华三通信技术有限公司 一种多协议标签交换标签扩展方法和装置
CN102769540A (zh) * 2012-07-06 2012-11-07 杭州华三通信技术有限公司 一种全局标签管理方法和设备
CN103354520A (zh) * 2013-07-02 2013-10-16 华为技术有限公司 一种标签处理的方法及装置
CN104243362A (zh) * 2013-06-24 2014-12-24 杭州华三通信技术有限公司 一种报文转发方法和装置
CN104579966A (zh) * 2013-10-14 2015-04-29 华为技术有限公司 转发表项生成的方法、转发节点和控制器

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE60134305D1 (de) * 2001-03-08 2008-07-17 Lucent Technologies Inc Verbessertes UMTS
CN100563217C (zh) * 2006-06-09 2009-11-25 华为技术有限公司 解决标签冲突的方法和系统
US9450864B2 (en) * 2013-10-11 2016-09-20 Futurewei Technologies, Inc. Using PCE as SDN controller
CN103986654B (zh) * 2014-05-05 2017-11-28 新华三技术有限公司 一种lsp生成方法和设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050169266A1 (en) * 2004-02-03 2005-08-04 Rahul Aggarwal MPLS traffic engineering for point-to-multipoint label switched paths
CN102710533A (zh) * 2012-06-28 2012-10-03 杭州华三通信技术有限公司 一种多协议标签交换标签扩展方法和装置
CN102769540A (zh) * 2012-07-06 2012-11-07 杭州华三通信技术有限公司 一种全局标签管理方法和设备
CN104243362A (zh) * 2013-06-24 2014-12-24 杭州华三通信技术有限公司 一种报文转发方法和装置
CN103354520A (zh) * 2013-07-02 2013-10-16 华为技术有限公司 一种标签处理的方法及装置
CN104579966A (zh) * 2013-10-14 2015-04-29 华为技术有限公司 转发表项生成的方法、转发节点和控制器

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11522793B2 (en) 2018-03-19 2022-12-06 Huawei Technologies Co., Ltd. Stitching label sending method, receiving method, and device

Also Published As

Publication number Publication date
CN106549870A (zh) 2017-03-29
EP3310010A1 (en) 2018-04-18
EP3310010B1 (en) 2020-07-01
EP3310010A4 (en) 2018-10-10
US20180205642A1 (en) 2018-07-19
CN106549870B (zh) 2019-11-15

Similar Documents

Publication Publication Date Title
CN106549870B (zh) 分配全局标签的方法、获取全局标签的方法及相关装置
CN103929492B (zh) 业务链负载均衡方法及其装置、系统
US8442050B2 (en) Apparatus and method of controlling LSP of RSVP-TE protocol using label with availability of end-to-end range
CN111541613A (zh) 一种基于SRv6的数据处理方法及相关设备
CN113364687A (zh) 一种生成转发表项的方法、控制器和网络设备
WO2019101041A1 (zh) 一种通信方法及其装置
CN105594167A (zh) 转发报文的方法、控制器、转发设备和网络系统
CN105323176A (zh) 地址信息的发布方法及装置
CN109218195A (zh) 一种实现双向segment routing隧道的方法及装置
CN103209088A (zh) 环网标签交换路径创建方法及相关设备和通信系统
CN103354520B (zh) 一种标签处理的方法及装置
WO2011015102A1 (zh) 关联通道能力协商方法和网络设备
CN108881017B (zh) 改变多路径标签交换路径中每跳带宽约束的方法及路由器
CN104144122A (zh) 建立标签交换路径的方法、设备及系统
CN102130829B (zh) 一种lsp的建立方法、装置
CN110290068B (zh) 一种粘连标签的发送方法、接收方法及设备
EP3163812B1 (en) Method and apparatus for cross-layer path establishment
CN107689923B (zh) 报文处理方法及路由器
CN106209559A (zh) 一种建立组播隧道的方法和装置
CN117749687A (zh) 位索引路由表建立方法、网络设备及存储介质
CN103001871A (zh) 一种标签分配方法及装置
CN103238299A (zh) 建立标签交换路径的方法、设备和系统
CN110784403A (zh) 路径标识传输方法、装置和计算机可读存储介质
CN102769540B (zh) 一种全局标签管理方法和设备
CN102170391A (zh) 关联的双向标签交换路径的创建方法及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16845675

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2016845675

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE