CN110191055B - Label distribution method and device - Google Patents

Label distribution method and device Download PDF

Info

Publication number
CN110191055B
CN110191055B CN201910468465.2A CN201910468465A CN110191055B CN 110191055 B CN110191055 B CN 110191055B CN 201910468465 A CN201910468465 A CN 201910468465A CN 110191055 B CN110191055 B CN 110191055B
Authority
CN
China
Prior art keywords
adjacent
label
adjacency
equipment
tag
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910468465.2A
Other languages
Chinese (zh)
Other versions
CN110191055A (en
Inventor
刘贤友
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Information Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201910468465.2A priority Critical patent/CN110191055B/en
Publication of CN110191055A publication Critical patent/CN110191055A/en
Application granted granted Critical
Publication of CN110191055B publication Critical patent/CN110191055B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Abstract

The present disclosure provides a label assignment method and apparatus, which can acquire an adjacent label assigned to an adjacent device before an abnormality when a connection between a network device and the adjacent device returns from the abnormality to normal and assign the adjacent label to the adjacent device, and assign the acquired adjacent label to the adjacent device. Compared with the prior art, the method and the device can distribute the adjacent label before abnormal connection for the adjacent equipment with normal connection recovery, so that the adjacent label of the adjacent equipment is kept unchanged before and after abnormal connection, the timeliness of the LSP is prolonged, and the problem of unstable network caused by frequent change of the LSP is avoided.

Description

Label distribution method and device
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method and an apparatus for allocating labels.
Background
The SR (Segment Routing) technique is to issue path information, which is usually identified by an ordered label list, i.e. a label stack, to a source device in a target path through a controller. When the source device forwards the packet, the label stack corresponding to the path information may be encapsulated in the packet header, and other intermediate devices only need to forward the packet according to the label stack in the packet header.
According to different target label distribution forms, the SR has two types of Prefix labels and adjacent labels, and the disclosure mainly focuses on dynamically distributed adjacent labels. At present, a routing device may dynamically allocate an adjacent label to an adjacent device through a routing protocol, where the allocation of a label value is related to the routing protocol, and after the routing protocol concusses and recovers, a new adjacent label may be allocated to the adjacent device again.
Disclosure of Invention
In view of the above, the present disclosure provides a label distribution method and device to solve the problem that an adjacent label on an adjacent device changes after a routing protocol oscillates.
Specifically, the present disclosure is realized by the following technical solutions:
the present disclosure provides a label distribution method, which is applied to a network device, when connection between the network device and an adjacent device is recovered from an abnormality to a normal state, the method including:
when the adjacent label is distributed to the adjacent equipment, the adjacent label distributed to the adjacent equipment before the abnormity is obtained;
assigning the obtained adjacency label to the adjacency device.
As an embodiment, the obtaining the adjacency label allocated to the adjacent device before the exception by the connection includes:
searching for an adjacent label corresponding to the adjacent equipment in a corresponding relation between the locally stored adjacent equipment and the adjacent label;
and determining the searched adjacent label as the adjacent label distributed to the adjacent equipment before the abnormity.
As an embodiment, finding an adjacency label corresponding to an adjacency device in a locally stored correspondence between the adjacency device and the adjacency label includes:
in the correspondence between the device information of the adjacent device and the adjacent tag stored in the local specified storage medium, searching for the adjacent tag corresponding to the keyword in the specified storage medium by using the device information of the adjacent device as the keyword, and using the searched adjacent tag as the adjacent tag corresponding to the adjacent device.
As an embodiment, the device information includes at least: the device identification of the adjacent device, the port address of the adjacent device connected with the device, and the output interface of the device connected with the adjacent device.
As an embodiment, after assigning the obtained adjacency label to the adjacency device, the method further includes:
reporting the corresponding relation between the adjacent equipment and the adjacent label allocated to the adjacent equipment to a controller, so that the controller determines whether the adjacent label corresponding to the adjacent equipment locally stored by the controller changes according to the corresponding relation between the adjacent equipment and the adjacent label allocated to the adjacent equipment, and if not, reserving the adjacent label corresponding to the adjacent equipment in the created label switching path LSP.
Based on the same concept, the present disclosure also provides a label distribution apparatus, which is applied to a network device, and when a connection between the network device and an adjacent device is recovered from an abnormality to a normal state, the apparatus includes:
an acquisition unit configured to acquire, when an adjacent tag is allocated to an adjacent device, the adjacent tag allocated to the adjacent device before the abnormality;
an assigning unit configured to assign the obtained adjacency label to the adjacency apparatus.
As an embodiment, the obtaining unit includes:
the first subunit is used for searching the adjacent label corresponding to the adjacent equipment in the correspondence between the locally stored adjacent equipment and the adjacent label;
and the second subunit is used for determining the searched adjacent label as the adjacent label allocated to the adjacent equipment before the abnormity.
As an embodiment, the first subunit is specifically configured to, in a correspondence relationship between the device information of the neighboring device and the neighboring tag that are stored in a local specified storage medium, search for the neighboring tag corresponding to the keyword in the specified storage medium by using the device information of the neighboring device as the keyword, and use the searched neighboring tag as the neighboring tag corresponding to the neighboring device.
As an embodiment, the device information includes at least: the device identification of the adjacent device, the port address of the adjacent device connected with the device, and the output interface of the device connected with the adjacent device.
As an embodiment, the apparatus further comprises:
a reporting unit, configured to report, to the controller, a correspondence between the adjacent device and the adjacent label allocated to the adjacent device after the obtained adjacent label is allocated to the adjacent device, so that the controller determines, according to the correspondence between the adjacent device and the adjacent label allocated to the adjacent device, whether an adjacent label corresponding to the adjacent device locally stored by the controller changes, and if not, retains the adjacent label corresponding to the adjacent device in the created label switching path LSP.
Based on the same concept, the present disclosure also provides a computer-readable storage medium having a computer program stored therein, which when executed by a processor implements any one of the steps of the above-mentioned label assignment method.
Based on the same concept, the present disclosure also provides a network device, which includes a memory, a processor, a communication interface, and a communication bus; the memory, the processor and the communication interface are communicated with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to execute the computer program stored in the memory, and when the processor executes the computer program, any step of the label distribution method is implemented.
Therefore, when the connection between the network device and the adjacent device is returned from the abnormality to the normal state, the adjacent tag assigned to the adjacent device before the abnormality is acquired when the adjacent tag is assigned to the adjacent device, and the acquired adjacent tag is assigned to the adjacent device. Compared with the prior art, the method and the device can distribute the adjacent label before abnormal connection for the adjacent equipment with normal connection recovery, so that the adjacent label of the adjacent equipment is kept unchanged before and after abnormal connection, the timeliness of the LSP is prolonged, and the problem of unstable network caused by frequent change of the LSP is avoided.
Drawings
FIG. 1 is a diagram illustrating a prior art SR networking architecture;
FIG. 2 is a process flow diagram of a label assignment methodology in an exemplary embodiment of the present disclosure;
FIG. 3 is an interaction flow diagram of a label assignment methodology in an exemplary embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a label dispensing apparatus in an exemplary embodiment of the present disclosure;
fig. 5 is a hardware block diagram of a network device in an exemplary embodiment of the disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In this embodiment, as shown in fig. 1, the traffic forwarding method based on the SR protocol is a network composed of 4 routing devices (A, B, C, D), and the SDN controller S may acquire state information of the routing devices in real time through a control channel between the SDN controller S and each routing device and issue a control instruction. When the routing protocol is enabled on the routing device to allocate the function of the adjacency label, the routing device may allocate a dynamic adjacency label to its own adjacency device, for example, the adjacency label allocated by a for adjacency device B is 24301; b assigns adjacency label 24302 for adjacency equipment A and 24403 for adjacency equipment C; adjacency label C assigned to adjacency device B is 24404, and adjacency label C assigned to adjacency device D is 2403; d assigns adjacency label 2404 for adjacency device C. At this time, if an LSP forwarding path is to be created: a → b → c → b → c → d, the LSP of the tunnel can be manually configured in the controller to: 24301. 24403, 24404, 24403, 2403.
In the prior art, the allocation method of the adjacent label is generally random allocation, for example, the routing device randomly obtains one adjacent label from a preset label pool to allocate, and since the adjacent label is locally valid, repeated adjacent labels may exist in the same path. However, when the routing protocol between the adjacent devices oscillates, the adjacent devices are disconnected from the local device; when the oscillation resumes, if the neighboring device requests connection again, the local device randomly allocates a new neighboring label to the neighboring device, where the new neighboring label is usually different from the neighboring label allocated before the oscillation, and thus the neighboring label on the neighboring device is changed, so that the original forwarding path corresponding to the LSP cannot be forwarded normally, and thus traffic interruption is caused.
In order to solve the problems in the prior art, the present disclosure provides a method and an apparatus for assigning a label, which can acquire an adjacent label assigned to an adjacent device before an abnormality when a connection between a network device and the adjacent device returns from the abnormality to normal and assigns the acquired adjacent label to the adjacent device. Compared with the prior art, the method and the device can distribute the adjacent label before abnormal connection for the adjacent equipment with normal connection recovery, so that the adjacent label of the adjacent equipment is kept unchanged before and after abnormal connection, the timeliness of the LSP is prolonged, and the problem of unstable network caused by frequent change of the LSP is avoided.
Referring to fig. 2, it is a processing flow chart of a label distribution method in an exemplary embodiment of the present disclosure, where the method is applied to a network device, and when a connection between the network device and an adjacent device returns from an abnormal state to a normal state, the method includes:
step 201, when distributing adjacent labels for adjacent equipment, acquiring the adjacent labels distributed for the adjacent equipment before abnormity;
in this embodiment, in SR networking, two network devices that are adjacent to each other establish a connection according to a dynamic routing protocol. The dynamic Routing Protocol includes, but IS not limited to, RIP (Routing Information Protocol), OSPF (Open Shortest Path First) Protocol, IS-IS (Intermediate System-to-Intermediate System) Protocol, and the like. The specific process comprises the following steps: the network equipment can send a Hello message to the adjacent equipment directly connected in the network, the two adjacent network equipment establish connection by exchanging the Hello message, thereby forming an adjacent relation, and the adjacent network equipment can continuously realize a keep-alive function by exchanging the Hello message, thereby monitoring the state of the adjacent equipment. If the network device does not receive the Hello message of a certain adjacent device any more, the adjacent device can be considered to be unreachable, so that the adjacent relation is determined to be abnormal.
After the network device establishes a connection with an adjacent device, the network device may allocate a corresponding adjacent label to each adjacent device in order to distinguish adjacent links corresponding to different adjacent devices connected to the network device, so as to determine a forwarding path between the network device and the adjacent device based on the adjacent labels.
In this embodiment, when the neighboring device returns to normal, the Hello packet may be sent to the local network device again, so as to establish connection with the local network device again. When the connection between the network device and the adjacent device is restored from the abnormality to the normal state, the network device further needs to allocate an adjacent label to the adjacent device, and when the adjacent label is allocated to the adjacent device, the network device can locally acquire the adjacent label allocated to the adjacent device before the abnormality.
As an embodiment, when the present network device allocates an adjacency label to the adjacent device before the connection is abnormal, the present network device may locally store a correspondence between the adjacent device and the adjacency label, so that when the connection between the adjacent device and the present network device returns to normal from abnormal, the present network device may search for an adjacency label corresponding to the adjacent device in a locally stored correspondence between the adjacent device and the adjacency label.
Specifically, the network device may obtain device information of the neighboring device, where the device information of the neighboring device at least includes: the device identification of the adjacent device, the port address of the adjacent device connected with the device, and the output interface of the device connected with the adjacent device. For example, when the network device (device a) establishes a connection with an adjacent device (device B), the device a establishes a connection with an interface B of the device B through its own interface a, and the device information of the device B, which the device a needs to acquire, includes: the device tag of the device B (such as the System ID unique to the whole network), the port address of the connected device a on the device B (the address of the interface B), and the outgoing interface connected with the device B on the device a (the interface a) can determine whether the connection between the adjacent device and the adjacent device is changed or not through the three pieces of information.
After the device information of the neighboring device is obtained, the network device may search, in the correspondence between the device information of the neighboring device and the neighboring tag stored in the local specified storage medium of the neighboring device, the neighboring tag corresponding to the keyword in the specified storage medium by using the device information of the neighboring device as the keyword, and use the searched neighboring tag as the neighboring tag corresponding to the neighboring device.
After finding the adjacent label, the network device may determine the found adjacent label as the adjacent label allocated to the adjacent device before the connection is abnormal.
Step 202, assigning the obtained adjacency label to the adjacency device.
In this embodiment, when finding the adjacent label allocated to the adjacent device before the connection is abnormal, the network device may indicate that the adjacent device and the connection relationship with the network device are not changed, so that the found adjacent label may be continuously allocated to the adjacent device, and thus when the connection between the adjacent device and the network device is recovered from the abnormality, the adjacent label before the abnormality is continuously allocated to the adjacent device to use, so as to ensure that the adjacent labels of the adjacent device before and after the network oscillation are unchanged, and if all network devices in one LSP can obtain the adjacent label configured before the oscillation after the oscillation is recovered, the adjacent label in the LSP is not changed, thereby prolonging the effective period of the LSP.
As an embodiment, if the device information of the neighboring device changes, for example, the neighboring device changes, and a port for acquiring connection between the neighboring device and the network device changes, the device information of the neighboring device is used as a key, and when an adjacent tag corresponding to the key is not found in the specified storage medium, the neighboring device may be considered to have changed before and after an exception, so that the neighboring device may be considered as a newly accessed device to perform adjacent tag assignment. Specifically, the present network device may select one adjacent label from a local adjacent label pool, except for the adjacent label corresponding to the locally recorded device information, as a new adjacent label of the adjacent device, and since the existing adjacent label is randomly allocated, the present embodiment may select an adjacent label, except for the adjacent label corresponding to the locally recorded routing information, to be allocated to the adjacent device, thereby avoiding the local adjacent label from being repeatedly allocated. After assigning a new adjacency label to an adjacent device, the correspondence between the device information of the adjacent device and the adjacency label may be recorded in a local designated storage medium.
As an embodiment, the present device may further report a correspondence relationship between the neighboring device and the neighboring label that has been allocated to the neighboring device to the controller, so that the controller determines, according to the correspondence relationship between the neighboring device and the neighboring label that has been allocated to the neighboring device, whether an adjacent label that is locally stored by the controller and corresponds to the neighboring device has changed, and if not, retains the adjacent label that corresponds to the neighboring device in the created label switched path LSP. Specifically, if the controller determines that the correspondence between the neighboring device and the neighboring label reported by the network device is the same as the recorded correspondence between the neighboring device and the neighboring label, it may be determined that the neighboring device also uses the neighboring label allocated before the oscillation after the network oscillation, so that the neighboring label of the neighboring device in the LSP does not need to be changed, and thus the LSP after the network oscillation may continue to be valid, thereby extending the validity period of the LSP and improving the stability of the network. If the controller determines that the correspondence between the neighboring device and the neighboring label reported by the network device is not the same as the recorded correspondence between the neighboring device and the neighboring label, it may be determined that the neighboring label of the neighboring device after the network oscillation changes, and therefore, it is necessary to automatically or notify an administrator to manually update the neighboring label corresponding to the neighboring device in the LSP to the neighboring label newly allocated to the neighboring device reported by the network device, so that it may be ensured that the path of the LSP is unobstructed.
In an example, the network device may further set an aging time for an adjacent tag in a locally recorded correspondence between the device information of the adjacent device and the adjacent tag, if the adjacent tag is not aged, the adjacent tag may be continuously allocated to an adjacent device corresponding to the device information, and if the adjacent tag is aged, the adjacent tag is recovered to a local adjacent tag pool, and the correspondence between the device information and the adjacent tag is deleted, so that a large amount of information stored for a long time may be prevented from occupying a storage resource of the network device.
Because the network device in the prior art allocates the adjacent label only according to the principle of random allocation, whether the adjacent device is the device after the shock recovery or not is not considered, and it is difficult to ensure that the adjacent label allocated to the adjacent device is the same as the adjacent label allocated to the adjacent device before the shock; the adjacent label distributed to the adjacent equipment can be recorded by the method, and when the adjacent equipment is determined to be the equipment connected before oscillation through the equipment information, the adjacent label distributed to the adjacent equipment before oscillation can be continuously distributed to the adjacent equipment, so that the adjacent labels of the adjacent equipment before and after oscillation are unchanged, the validity period of the LSP is further prolonged, and the stability of the network is improved.
In order to make the objects, technical solutions and advantages of the present disclosure more apparent, the solution of the present disclosure is further described in detail below with reference to fig. 3.
Please refer to fig. 3, which is an interaction flowchart of a label distribution method in an exemplary embodiment of the present disclosure, taking an interaction process between the routing devices A, B in fig. 3 as an example, the specific interaction process includes:
step 301, before network oscillation, a routing device a sends a connection request to a routing device B for the first time;
step 302, the routing device B determines whether the device information of the routing device a has a corresponding adjacency label;
because the routing device a sends the connection request for the first time, the routing device B has not established connection with the routing device a, and therefore does not locally record the adjacent label corresponding to the device information of the routing device a;
step 303, the routing device B randomly allocates an adjacent label 01 to the routing device a from the adjacent label pool, and locally records the corresponding relationship between the adjacent label 01 and the device information of the routing device a;
step 304, the routing device B reports the corresponding relation of the device information of the adjacent label 01 routing device A to the SND controller;
step 305, after the network oscillates, the routing device a sends a connection request to the routing device B;
step 306, the routing device B determines whether the device information of the routing device a has a corresponding adjacency label;
because the routing device a sends the connection request before the oscillation, the routing device B has already established connection with the routing device a before the oscillation, thereby locally recording the adjacency label corresponding to the device information of the routing device a;
in step 307, the routing device B assigns the adjacent label 01 corresponding to the device information of the routing device a to the routing device a.
The adjacent label distributed to the adjacent equipment can be recorded by the method, and when the adjacent equipment is determined to be the equipment connected before oscillation through the equipment information, the adjacent label distributed to the adjacent equipment before oscillation can be continuously distributed to the adjacent equipment, so that the adjacent labels of the adjacent equipment before and after oscillation are unchanged, the LSP (label switching path) validity period is prolonged, and the network stability is improved.
Corresponding to the embodiment of the label distribution method, the disclosure also provides an embodiment of a label distribution device.
Referring to fig. 4, a schematic structural diagram of a label distribution apparatus in an exemplary embodiment of the present disclosure, where the apparatus is applied to a network device, and when a connection between the network device and an adjacent device is recovered from an abnormal state to a normal state, the apparatus 400 may include:
an obtaining unit 401, configured to, when an adjacent tag is allocated to an adjacent device, obtain the adjacent tag allocated to the adjacent device before the connection is abnormal;
an assigning unit 402 configured to assign the obtained adjacency label to the adjacency device.
As an embodiment, the obtaining unit 401 includes:
the first sub-unit 4011 is configured to search, in a correspondence relationship between locally stored neighboring devices and neighboring tags, for a neighboring tag corresponding to a neighboring device;
the second sub-unit 4012 is configured to determine the found adjacent tag as the adjacent tag that is allocated to the adjacent device before the connection is abnormal.
As an embodiment, the first sub-unit 4011 is specifically configured to, in the correspondence between the device information of the adjacent device and the adjacent tag stored in the local specified storage medium, search for the adjacent tag corresponding to the keyword in the specified storage medium by using the device information of the adjacent device as the keyword, and use the searched adjacent tag as the adjacent tag corresponding to the adjacent device.
As an embodiment, the device information includes at least: the device identification of the adjacent device, the port address of the adjacent device connected with the device, and the output interface of the device connected with the adjacent device.
As an embodiment, the apparatus further comprises:
a reporting unit 403, configured to report, after the obtained adjacent label is allocated to the adjacent device, a correspondence between the adjacent device and the adjacent label allocated to the adjacent device to a controller, so that the controller determines, according to the correspondence between the adjacent device and the adjacent label allocated to the adjacent device, whether an adjacent label corresponding to the adjacent device locally stored by the controller changes, and if not, retains the adjacent label corresponding to the adjacent device in the created label switched path LSP.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. One of ordinary skill in the art can understand and implement it without inventive effort.
Corresponding to the foregoing embodiments of the label distribution method, the present disclosure also provides embodiments of a network device implementing label distribution.
The present disclosure provides a network device, as shown in fig. 5, which includes a memory 51, a processor 52, a communication interface 53, and a communication bus 54; wherein, the memory 51, the processor 52 and the communication interface 53 communicate with each other through the communication bus 54;
the memory 51 is used for storing computer programs;
the processor 52 is configured to execute the computer program stored in the memory 51, and when the processor 52 executes the computer program, any step of the label distribution method provided in the embodiment of the present disclosure is implemented.
Corresponding to the foregoing embodiments of the label distribution method, the present disclosure also provides embodiments of a computer-readable storage medium implementing label distribution.
The present disclosure provides a computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements any of the steps of the label assignment method provided by the embodiments of the present disclosure.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for embodiments of the network device and the computer-readable storage medium, since they are substantially similar to the method embodiments, the description is relatively simple, and in relation to the description, reference may be made to some portions of the description of the method embodiments.
In summary, the present disclosure may acquire, when a connection between a network device and an adjacent device returns from an abnormality to normal and allocates an adjacent tag to the adjacent device, the adjacent tag allocated to the adjacent device before the abnormality, and allocate the acquired adjacent tag to the adjacent device. Compared with the prior art, the method and the device can distribute the adjacent label before abnormal connection for the adjacent equipment with normal connection recovery, so that the adjacent label of the adjacent equipment is kept unchanged before and after abnormal connection, the timeliness of the LSP is prolonged, and the problem of unstable network caused by frequent change of the LSP is avoided.
The above description is only exemplary of the present disclosure and should not be taken as limiting the disclosure, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (12)

1. A label distribution method applied to a network device whose connection with an adjacent device is restored from an abnormality to a normal state, the method comprising:
when the adjacent label is distributed to the adjacent equipment, the adjacent label distributed to the adjacent equipment before the abnormal connection is obtained;
assigning the obtained adjacency label to the adjacency device.
2. The method of claim 1, wherein obtaining an adjacency label assigned to an adjacency device before the connection anomaly comprises:
searching for an adjacent label corresponding to the adjacent equipment in a corresponding relation between the locally stored adjacent equipment and the adjacent label;
and determining the searched adjacent label as the adjacent label distributed for the adjacent equipment before the connection is abnormal.
3. The method of claim 2, wherein searching for the adjacency label corresponding to the adjacency device in the locally stored correspondence between the adjacency device and the adjacency label comprises:
in the correspondence between the device information of the adjacent device and the adjacent tag stored in the local specified storage medium, searching for the adjacent tag corresponding to the keyword in the specified storage medium by using the device information of the adjacent device as the keyword, and using the searched adjacent tag as the adjacent tag corresponding to the adjacent device.
4. The method of claim 3,
the device information includes at least: the device identification of the adjacent device, the port address of the adjacent device connected with the device, and the output interface of the device connected with the adjacent device.
5. The method of claim 1, wherein after assigning the obtained adjacency label to the adjacency device, the method further comprises:
reporting the corresponding relation between the adjacent equipment and the adjacent label allocated to the adjacent equipment to a controller, so that the controller determines whether the adjacent label corresponding to the adjacent equipment locally stored by the controller changes according to the corresponding relation between the adjacent equipment and the adjacent label allocated to the adjacent equipment, and if not, reserving the adjacent label corresponding to the adjacent equipment in the created label switching path LSP.
6. A label distribution apparatus applied to a network device whose connection with an adjacent device is restored from an abnormality to a normal state, comprising:
an acquisition unit configured to acquire an adjacent tag allocated to an adjacent device before the connection abnormality, when the adjacent tag is allocated to the adjacent device;
an assigning unit configured to assign the obtained adjacency label to the adjacency apparatus.
7. The apparatus of claim 6, wherein the obtaining unit comprises:
the first subunit is used for searching the adjacent label corresponding to the adjacent equipment in the correspondence between the locally stored adjacent equipment and the adjacent label;
and the second subunit is used for determining the searched adjacent label as the adjacent label distributed to the adjacent equipment before the abnormal connection.
8. The apparatus of claim 7,
the first subunit is specifically configured to, in the correspondence between the device information of the adjacent device and the adjacent tag stored in the local specified storage medium, search for the adjacent tag corresponding to the keyword in the specified storage medium by using the device information of the adjacent device as the keyword, and use the searched adjacent tag as the adjacent tag corresponding to the adjacent device.
9. The apparatus of claim 8,
the device information includes at least: the device identification of the adjacent device, the port address of the adjacent device connected with the device, and the output interface of the device connected with the adjacent device.
10. The apparatus of claim 6, further comprising:
a reporting unit, configured to report, to the controller, a correspondence between the adjacent device and the adjacent label allocated to the adjacent device after the obtained adjacent label is allocated to the adjacent device, so that the controller determines, according to the correspondence between the adjacent device and the adjacent label allocated to the adjacent device, whether an adjacent label corresponding to the adjacent device locally stored by the controller changes, and if not, retains the adjacent label corresponding to the adjacent device in the created label switching path LSP.
11. A network device, comprising a memory, a processor, a communication interface, and a communication bus; the memory, the processor and the communication interface are communicated with each other through the communication bus;
the memory is used for storing a computer program;
the processor for executing the computer program stored on the memory, the processor implementing the method of any of claims 1-5 when executing the computer program.
12. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method of any one of the claims 1-5.
CN201910468465.2A 2019-05-31 2019-05-31 Label distribution method and device Active CN110191055B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910468465.2A CN110191055B (en) 2019-05-31 2019-05-31 Label distribution method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910468465.2A CN110191055B (en) 2019-05-31 2019-05-31 Label distribution method and device

Publications (2)

Publication Number Publication Date
CN110191055A CN110191055A (en) 2019-08-30
CN110191055B true CN110191055B (en) 2021-11-02

Family

ID=67719328

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910468465.2A Active CN110191055B (en) 2019-05-31 2019-05-31 Label distribution method and device

Country Status (1)

Country Link
CN (1) CN110191055B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111935016A (en) * 2020-08-14 2020-11-13 迈普通信技术股份有限公司 Link label distribution method, device, network equipment and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101296239A (en) * 2008-06-18 2008-10-29 杭州华三通信技术有限公司 Method for refreshing label exchange route and label exchange router
CN108011821A (en) * 2017-12-26 2018-05-08 新华三技术有限公司 The distribution method and device of neighbours' label

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9807001B2 (en) * 2014-07-17 2017-10-31 Cisco Technology, Inc. Segment routing using a remote forwarding adjacency identifier

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101296239A (en) * 2008-06-18 2008-10-29 杭州华三通信技术有限公司 Method for refreshing label exchange route and label exchange router
CN108011821A (en) * 2017-12-26 2018-05-08 新华三技术有限公司 The distribution method and device of neighbours' label

Also Published As

Publication number Publication date
CN110191055A (en) 2019-08-30

Similar Documents

Publication Publication Date Title
US20110249679A1 (en) Method for implementing fast reroute
US10404571B2 (en) Communication among network controllers
US9912633B2 (en) Selective IP address allocation for probes that do not have assigned IP addresses
US20170034080A1 (en) Service Chain Routing Method and System, and Equipment in System
US20200162367A1 (en) Data stream transmission
EP3451592B1 (en) Packet transmission between vxlan domains
CN110266833B (en) IP address management method and edge cluster
CN108259218B (en) IP address allocation method and device
CN112311592B (en) SRv6SID self-adaptive networking method and device
CN108123901B (en) Message transmission method and device
US11546215B2 (en) Method, system, and device for data flow metric adjustment based on communication link state
CN110069210B (en) Storage system, and method and device for allocating storage resources
CN108429824B (en) Address allocation method and device
CN110191055B (en) Label distribution method and device
CN109104369B (en) Path selection method and device
CN113542099A (en) Data transmission method, device, electronic equipment, medium and product
CN105939262B (en) Label distribution method and device
CN106209634B (en) Learning method and device of address mapping relation
CN104426759A (en) Host machine router acquiring method, host machine router acquiring device, and host machine router acquiring system
JP4354379B2 (en) Bandwidth control device
CN108111414B (en) Label deployment method and device based on segment routing
CN113364683B (en) Route sending method and equipment
KR101541168B1 (en) Route control method for flow of controller in software defined network
EP3523928B1 (en) Method and system for managing control connections with a distributed control plane
CN108521336B (en) Method and device for controlling IP address conflict of routing networking

Legal Events

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

Effective date of registration: 20230625

Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: H3C INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 310052 Changhe Road, Binjiang District, Hangzhou, Zhejiang Province, No. 466

Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd.