OcNOS-SP : Layer 3 Guide : Border Gateway Protocol Command Reference : BGP Labeled Unicast Commands : allocate-label
allocate-label
Use this command to allocate MPLS labels to all/route-map permitted IPv4 prefixes present in the BGP RIB. This command enables the label allocation to IPv4 prefixes, where labeled unicast (LU) routes can be exchanged with IPv4 Peers having BGP labeled-unicast capability. This command allocates labels for all IPv4 unicast prefixes (afi:1, safi:1) and IPv4 labeled-unicast prefixes (afi:1, safi:4).
Once configured, BGP will allocate labels to IPv4 unicast prefixes after the expiry of current BGP RIB scan time (default: 60 seconds).
Use the no form of this command to release the labels and disable BGP from allocating label to IPv4 prefixes.
Command Syntax
allocate-label (all|route-map WORD)
no allocate-label (all|route-map)
Parameters
all
All the advertised routes
route-map
Only those routes that match route-map
WORD
Route-map name
Default
Not applicable
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3 and updated in OcNOS version 3.0.
Example
To allocate an MPLS label to IPv4 unicast prefix 1.1.1.1/32
(config)#router bgp 100
(config-router)#neighbor 11.0.0.2 remote-as 100
(config-router)#allocate-label all
(config-router)#address-family ipv4 unicast
(config-router-af)#network 1.1.1.1/32
(config-router-af)#exit-address-family
(config-router)#address-family ipv4 labeled-unicast
(config-router-af)#network 11.0.0.2 activate
(config-router-af)#exit-address-family
 
(config-router)#no allocate-label all
(config-router)#allocate-label route-map bgp
(config-router)#no allocate-label route-map
(config-router)#
 
Last modified date: 08/28/2023