OcNOS-SP : Multi-Protocol Label Switching Guide : Multi-Protocol Label Switching Command Reference : MPLS Commands : mpls label mode
mpls label mode
Use this command to configure label allocation mode for VPNv4 and/or VPNv6 routes. Label allocation mode as per-vrf is the default mode in which single mpls-label is allocated for all VPN Routes in a VRF. Label allocation mode as per-prefix will allocate unique mpls-labels per VPN route in a VRF. If allocation model is disabled using no mpls label mode configuration, the configuration reverts back to default-mode .
Label allocation mode is the local property i.e. the VRF routes are distributed to BGP-peer as per the mode configured on local node. When per-vrf mode is configured, single label for all routes in the VRF will be distributed to peer node.
Label allocation mode can be set for all VRFs or selective VRFs by these commands:
mpls label mode vpnv4 all-vrfs per-vrf
If the admin selects the per-vrf mode for the entire system, then all VRFs switches to per-vrf allocation mode except for the VRFs that has been explicitly configured using command mpls label mode vpnv4 vrf WORD per-prefix. Label allocation mode set using specific VRF takes precedence over all-vrf command.
mpls label mode vpnv6 vrf WORD per-vrf
If the admin selects per-vrf mode for a particular vrf say vrf1, then only vrf1 switches to per-vrf mode and rest of the vrfs will remain in default allocation mode.
Command Syntax
mpls label mode (vpnv4|vpnv6|all-afs) (all-vrfs|vrf WORD) (per-prefix|per-vrf)
no mpls label mode (vpnv4|vpnv6|all-afs) (all-vrfs|vrf WORD) (per-prefix)
 
mpls label mode 6pe per-prefix
no mpls label mode 6pe per-prefix
Parameters
vrf WORD
Enter a string to identify the VRF
all-vrfs
All the VRFs
per-prefix
Unique MPLS labels are allocated per VPN route in a VRF
per-vrf
Single MPLS labels are allocated for all VPN routes in a VRF
all-afs
All the address families
Default
By default, per-vrf is enabled.
Command Mode
Configuration mode
Applicability
This command was introduced before OcNOS version 3.0.
Example
#configure terminal
(config)#mpls label mode all-afs all-vrfs per-vrf
 
(config)#no mpls label mode all-afs all-vrfs
 
(config)#mpls label mode 6pe per-prefix
 
(config)#no mpls label mode 6pe per-prefix
 
Last modified date: 10/17/2023