# US 2021/0288906 A1 · Distributed label assignment for labeled routing protocol routes

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0288906 A1
- Document ID: US20210288906A1
- Status: Published application
- Kind: A1
- Application number: 16/814,664
- Filed: 2020-03-10
- Published: 2021-09-16
- Earliest claimed: 2020-03-10
- Assignees: Juniper Networks, Inc.
- Applicants: Juniper Networks, Inc.
- Inventors: Kevin Wang; Jaihari V. Loganathan; Jeffrey Haas; Sanjay Khanna
- Web page: https://patentgrep.com/patent/US20210288906A1

## CPC

- H04L 45/507: {Label distribution}
- H04L 45/24: Multipath
- H04L 45/42: Centralised routing
- H04L 45/50: using label swapping, e.g. multi-protocol label switch [MPLS]
- H04L 45/586: of virtual routers
- H04L 47/781: {Centralised allocation of resources}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

In general, various aspects of the techniques are described in this disclosure for distributed label assignment for labeled routes. In one example, a method includes obtaining, by a first thread of a plurality of execution threads for at least one routing protocol process executing on processing circuitry of a network device, an allocation of first labels drawn from a label space for a network service; adding, by the first thread, the first labels to a first local label pool for the first thread; generating, by the first thread, after obtaining the allocation of the first labels, a labeled route comprising a route for the network service and a label assigned by the first thread from the first local label pool; and outputting, by the network device, the labeled route.

## Claims

### Claim 1

A method comprising:
obtaining, by a first thread of a plurality of execution threads for at least one routing protocol process executing on processing circuitry of a network device, an allocation of first labels drawn from a label space for a network service;
adding, by the first thread, the first labels to a first local label pool for the first thread;
generating, by the first thread, after obtaining the allocation of the first labels, a labeled route comprising a route for the network service and a label assigned by the first thread from the first local label pool; and
outputting, by the network device, the labeled route.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
obtaining, by a second thread of the plurality of execution threads, an allocation of second labels drawn from the label space for the network service; and
adding, by the second thread, the second labels to a second local label pool for the second thread,
wherein the first labels and the second labels are distinct.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
allocating, by a main thread of the plurality of execution threads that manages the label space for the network service, the first labels to the first thread.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
removing, by the first thread, the label from the first local label pool to obtain a reduced first local label pool;
generating, by the first thread, after obtaining the reduced first local label pool, another labeled route comprising another route for the network service and another label assigned by the first thread from the reduced first local label pool; and
outputting, by the network device, the another labeled route.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
allocating, by a main thread of the plurality of execution threads that manages the label space for the network service, a set of new labels to the first local label pool to obtain a modified first local label pool for the first thread;
generating, by the first thread, after obtaining the modified first local label pool, another labeled route comprising another route for the network service and another label assigned by the first thread from the modified first local label pool; and
outputting, by the network device, the another labeled route.

### Claim 6 (depends on 5)

The method of claim 5, further comprising:
requesting, by the first thread, the set of new labels from the main thread, wherein the allocating is responsive to the requesting.

### Claim 7 (depends on 6)

The method of claim 6, wherein the requesting comprises requesting, by the first thread in response to determining a size of the first local label pool meets or is below a low watermark, an allocation of new labels.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
releasing, by the first thread, a portion of the first local label pool to a main thread of the plurality of execution threads that manages the label space for the network service.

### Claim 9 (depends on 8)

The method of claim 8, wherein the releasing comprises releasing, by the first thread in response to determining a size of the first local label pool meets or exceeds a high watermark, the portion of the first local label pool.

### Claim 10 (depends on 1)

The method of claim 1, further comprising:
obtaining, by the network device, the route for the network service;
saving, by the first thread in response to determining the first local label pool has no available labels for assignment, the route to storage; and
requesting, by the first thread, the allocation of first labels,
wherein the generating comprises generating, by the first thread, the labeled route in response to receiving the allocation of first labels and obtaining the route from storage.

### Claim 11 (depends on 1)

The method of claim 1, further comprising:
receiving, by the network device, a packet comprising the label;
identifying, by the network device based on the label, forwarding information generated from the route for the network service; and
forwarding the packet according to the forwarding information generated from the route.

### Claim 12 (depends on 1)

The method of claim 1, further comprising:
storing the route for the network service to a virtual routing and forwarding instance (VRF) for the network service.

### Claim 13 (depends on 1)

The method of claim 1, wherein the network service comprises one of a Multiprotocol Label Switching-based Virtual Private Network service, a Border Gateway Protocol Unicast service, or an Ethernet Virtual Private Network service.

### Claim 14

A network device comprising:
at least one hardware-based processor for executing a first thread of a plurality of execution threads for at least one routing protocol process executing on processing circuitry of the network device, the at least one hardware-based processor configured to:
obtain, by the first thread of a plurality of execution threads for at least one routing protocol process executing on processing circuitry of the network device, an allocation of first labels drawn from a label space for a network service;
add, by the first thread, the first labels to a first local label pool for the first thread;
generate, by the first thread, after obtaining the allocation of the first labels, a labeled route comprising a route for the network service and a label assigned by the first thread from the first local label pool; and
output, by the network device, the labeled route.

### Claim 15 (depends on 14)

The network device of claim 14, the at least one hardware-based processor configured to:
obtain, by a second thread of the plurality of execution threads, an allocation of second labels drawn from the label space for the network service; and
add, by the second thread, the second labels to a second local label pool for the second thread,
wherein the first labels and the second labels are distinct.

### Claim 16 (depends on 14)

The network device of claim 14, the at least one hardware-based processor configured to:
allocate, by a main thread of the plurality of execution threads that manages the label space for the network service, the first labels to the first thread.

### Claim 17 (depends on 14)

The network device of claim 14, the at least one hardware-based processor configured to:
remove, by the first thread, the label from the first local label pool to obtain a reduced first local label pool;
generate, by the first thread, after obtaining the reduced first local label pool, another labeled route comprising another route for the network service and another label assigned by the first thread from the reduced first local label pool; and
output, by the network device, the another labeled route.

### Claim 18 (depends on 14)

The network device of claim 14, the at least one hardware-based processor configured to:
allocate, by a main thread of the plurality of execution threads that manages the label space for the network service, a set of new labels to the first local label pool to obtain a modified first local label pool for the first thread;
generate, by the first thread, after obtaining the modified first local label pool, another labeled route comprising another route for the network service and another label assigned by the first thread from the modified first local label pool; and
output, by the network device, the another labeled route.

### Claim 19 (depends on 18)

The network device of claim 18, the at least one hardware-based processor configured to:
request, by the first thread, the set of new labels from the main thread, wherein the allocating is responsive to the requesting.

### Claim 20

A computer-readable medium comprising instructions for causing one or more programmable processors of a network device to:
obtain, by the first thread of a plurality of execution threads for at least one routing protocol process executing on processing circuitry of the network device, an allocation of first labels drawn from a label space for a network service;
add, by the first thread, the first labels to a first local label pool for the first thread;
generate, by the first thread, after obtaining the allocation of the first labels, a labeled route comprising a route for the network service and a label assigned by the first thread from the first local label pool; and
output, by the network device, the labeled route.
