OcNOS SP : Layer 3 Guide : Border Gateway Protocol Configuration : BGP Labeled Unicast with Implicit Null Label for Local Routes
BGP Labeled Unicast with Implicit Null Label for Local Routes
Overview
In OcNOS, by default, the BGP router allocates a unique, valid MPLS label (>16) for all the IPv4 routes when allocate-label (all | route-map NAME) command is issued. The BGP Labeled Unicast (BGP LU) attaches the MPLS label to the routes and advertises them to its peers. This existing functionality is enhanced for Penultimate hop popping (PHP) requirement with an implicit null label allocation only for locally originated IPv4 routes, whether connected or redistributed from other protocols. Meanwhile, the non local routes are assigned with a valid MPLS label. Using PHP with implicit null eliminates the unnecessary label allocation, providing a more efficient and effective solution for handling local routes in the BGP-LU. If BGP LU is deployed in multiple segments, the implicit null label plays a significant role in the last segment.
A new bgp implicit-null CLI is introduced under the BGP router configuration mode. When the bgp implicit-null CLI is configured, the BGP implicit null label allocation is applied only after the expiry of the currently active BGP RIB scan timer that validates all the routes at the configured interval time.
This feature is supported on Qumran1 series platforms, Qumran2 series platforms, and Qumran series platforms (Q1, Q2 Qax Qux Q2c, Qmx).
Benefits
The regular MPLS label allocation for connected routes necessitates additional label processing on the egress Provider Edge (PE) and, sometimes, fails to forward traffic. The BGP LU with IMPLICIT NULL support reduces the label processing overheads at the egress node and efficiently uses the hardware FEC resources during route allocation.
Prerequisites
The following is mandatory before issuing the bgp implicit-null CLI:
Set up the global BGP configuration using the command allocate-label (all | route-map NAME) to assign MPLS labels for IPv4 unicast routes. This configuration ensures that IPv4 unicast routes are qualified for MPLS label assignment. The following show running sample output illustrates that the MPLS labels are assigned to the routes.
!
router bgp 100
allocate-label all
neighbor 11.11.11.55 remote-as 100
neighbor 172.3.4.53 remote-as 100
neighbor 11.11.11.55 update-source lo
!
address-family ipv4 unicast
network 21.21.21.56/32
exit-address-family
!
Configuring BGP implicit null among network peers running different OcNOS versions earlier than 6.5.x causes traffic drops. To restore traffic flow, remove the implicit null configuration. Additionally, to implement this feature, ensure all peers are using version 6.5.x or higher.
Configuration
The following configuration adds the implicit null label (3) to the locally connected IPv4 routes.
Topology
In this topology, PE1 node advertise all connected or local IPv4 unicast routes advertised in labeled-unicast address-family mode with implicit null label to remote PE2 via ABR node.
BGP labeled unicast with Implicit Null Label
BGP Labeled Unicast as Transport with Implicit Null Label
Perform the following configurations on OcNOS router to apply implicit null label.
1. Configure BGP-LU using the configuration provided in BGP Labeled Unicast section.
2. In the BGP Labeled Unicast configuration after the alocate-label all CLI issued in PE1 node, enable the address-family IPv4 labeled-unicast mode. Enabling the address-family ipv4 labeled-unicast mode, automatically adds bgp implicit-null CLI to the existing configuration.
(config-router)#allocate-label all
(config-router)#address-family ipv4 labeled- unicast
(config-router-af)#bgp implicit-null
Note: Use of the bgp implicit-null command allows the BGP algorithm to automatically assign an implicit null label to local routes and a valid label (value > 16) to non-local routes.
Sample show running-config Output
The following is an example of the running configuration of PE1 device.
PE1#show running-config
feature netconf-ssh vrf management
feature netconf-tls vrf management
no feature netconf-ssh
no feature netconf-tls
no service password-encryption
!
logging console 7
logging monitor 7
snmp-server enable traps link linkDown
snmp-server enable traps link linkUp
!
!
hardware-profile statistics voq-full-color enable
hardware-profile statistics cfm-ccm enable
hardware-profile port-config mode3
!
hostname PE1-7017
port ce46 breakout 4X10g
port cd50 breakout 4X100g
clock timezone kolkata
no ip domain-lookup
ip domain-lookup vrf management
ip name-server vrf management 10.12.3.23
ip name-server vrf management 10.12.3.25
ip name-server vrf management 10.12.3.35
bridge 1 protocol rstp vlan-bridge
tfo Disable
errdisable cause stp-bpdu-guard
no feature telnet vrf management
no feature telnet
feature ssh vrf management
no feature ssh
snmp-server enable snmp vrf management
snmp-server view all .1 included vrf management
snmp-server community test group network-operator vrf management
snmp-server host 10.12.47.85 traps version 2c test udp-port 162 vrf management
feature dns relay
ip dns relay
ipv6 dns relay
feature ntp vrf management
ntp enable vrf management
ntp master vrf management
.
.
feature rsyslog vrf management
.
.
router bgp 100
bgp router-id 192.168.1.1
allocate-label all
neighbor 192.168.1.4 remote-as 100
neighbor 192.168.1.5 remote-as 100
neighbor 192.168.1.6 remote-as 100
neighbor 192.168.1.7 remote-as 100
neighbor 192.168.1.4 update-source lo
neighbor 192.168.1.4 advertisement-interval 0
neighbor 192.168.1.5 update-source lo
neighbor 192.168.1.5 advertisement-interval 0
neighbor 192.168.1.6 update-source lo
neighbor 192.168.1.6 advertisement-interval 0
neighbor 192.168.1.7 update-source lo
neighbor 192.168.1.7 advertisement-interval 0
!
address-family ipv4 unicast
network 192.168.1.1/32
exit-address-family
!
address-family ipv4 labeled-unicast
bgp implicit-null
neighbor 192.168.1.4 activate
neighbor 192.168.1.5 activate
exit-address-family
!
address-family vpnv4 unicast
neighbor 192.168.1.6 activate
neighbor 192.168.1.7 activate
exit-address-family
!
address-family ipv4 vrf vrf103
redistribute connected
exit-address-family
!
address-family ipv4 vrf vrf100
redistribute connected
exit-address-family
!
address-family ipv4 vrf vrf104
redistribute connected
exit-address-family
!
address-family ipv4 vrf vrf101
redistribute connected
exit-address-family
!
address-family ipv4 vrf vrf102
redistribute connected
exit-address-family
!
exit
!
.
.
end
 
 
 
Validation
Following output displays the BGP routes of neighbor configured on PE1.
PE1
 
PE1#show ip bgp neighbors 21.21.21.56
BGP neighbor is 21.21.21.56, remote AS 100, local AS 100, internal link, peer index: 3
BGP version 4, local router ID 11.11.11.55, remote router ID 21.21.21.56
BGP state = Established, up for 01:12:26
Last read 00:00:06, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family VPNv4 Unicast: advertised and received
Received 173 messages, 0 notifications, 0 in queue
Sent 172 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
Update source is lo
 
For address family: VPNv4 Unicast BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
AIGP is enabled
Community attribute sent to this neighbor (both)
Large Community attribute sent to this neighbor
0 accepted prefixes
1 announced prefixes
 
Connections established 1; dropped 0
Local host: 11.11.11.55, Local port: 35217
Foreign host: 21.21.21.56, Foreign port: 179
TCP MSS: (0), Advertise TCP MSS: (1460), Send TCP MSS: (1460), Receive TCP MSS: (536)
Sock FD : (28)
Nexthop: 11.11.11.55
Nexthop global: ::
Nexthop local: ::
BGP connection: non shared network
 
 
PE1#show ip bgp neighbors 172.4.5.52
BGP neighbor is 172.4.5.52, remote AS 100, local AS 100, internal link, peer index: 4
BGP version 4, local router ID 11.11.11.55, remote router ID 22.22.22.52
BGP state = Established, up for 01:17:24
Last read 00:00:17, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Labeled-Unicast: advertised and received
Received 273 messages, 1 notifications, 0 in queue
Sent 272 messages, 1 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
 
For address family: IPv4 Labeled-Unicast BGP table version 4, neighbor version 4
Index 1, Offset 0, Mask 0x2
AIGP is enabled
Community attribute sent to this neighbor (both)
Large Community attribute sent to this neighbor
1 accepted prefixes
1 announced prefixes
 
Connections established 2; dropped 1
Local host: 172.4.5.55, Local port: 33740
Foreign host: 172.4.5.52, Foreign port: 179
TCP MSS: (0), Advertise TCP MSS: (1460), Send TCP MSS: (1460), Receive TCP MSS: (536)
Sock FD : (27)
Nexthop: 172.4.5.55
Nexthop global: ::
Nexthop local: ::
BGP connection: non shared network
Last Reset: 01:17:29, due to BGP Notification received
Notification Error Message: (Cease/Administratively Reset.)
 
Following output displays the Labels attached to the BGP routes on PE1. The local route under “In Label” is replaced with 3.
PE1#show ip bgp labeled-unicast
 
Status codes: s suppressed, d damped, h history, a add-path, b back-up, * valid, > best, i - internal, S - stale
Network Next Hop In Label Out Label
*> 11.11.11.55/32 0.0.0.0 3 -
*>i 21.21.21.56/32 172.4.5.52 25600 25601
 
 
PE1#show mpls forwarding-table
Codes: > - installed FTN, * - selected FTN, p - stale FTN, ! - using backup
B - BGP FTN, K - CLI FTN, (t) - tunnel, P - SR Policy FTN, (b) - bypass,
L - LDP FTN, R - RSVP-TE FTN, S - SNMP FTN, I - IGP-Shortcut,
U - unknown FTN, O - SR-OSPF FTN, i - SR-ISIS FTN, k - SR-CLI FTN
(m) - FTN mapped over multipath transport, (e) - FTN is ECMP
 
FTN-ECMP LDP: Disabled
 
Code FEC FTN-ID Nhlfe-ID Tunnel-id Pri LSP-Type Out-Label Out-Intf ELC Nexthop
B> 21.21.21.56/32 1 3 - Yes LSP_DEFAULT 25601 ce46/1 No 172.4.5.52
PE1#
 
PE1#
PE1#show mpls ilm-table
Codes: > - installed ILM, * - selected ILM, p - stale ILM, ! - using backup
K - CLI ILM, T - MPLS-TP, s - Stitched ILM
S - SNMP, L - LDP, R - RSVP, C - CRLDP
B - BGP , K - CLI , V - LDP_VC, I - IGP_SHORTCUT
O - OSPF/OSPF6 SR, i - ISIS SR, k - SR CLI
P - SR Policy, U - unknown
 
ILM-ECMP LDP: Disabled
 
Code FEC/VRF/L2CKT ILM-ID In-Label Out-Label In-Intf Out-Intf/VRF Nexthop pri LSP-Type
B> vrf1 2 25601 Nolabel N/A N/A N/A Yes LSP_DEFAULT
B> 21.21.21.56/32 1 25600 25601 N/A N/A 172.4.5.52 Yes LSP_DEFAULT
 
PE1#
ABR1
Following output displays the BGP routes of neighbor configured on ABR1.
 
ABR1#show ip ospf neighbor
 
Total number of full neighbors: 2
OSPF process 1 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
11.11.11.55 1 Full/DR 00:00:34 172.4.5.55 xe3 0
200.200.200.54 1 Full/Backup 00:00:33 172.6.7.54 xe21 0
 
 
Following output displays the Labels attached to the BGP routes on ABR1. The local route under “Out Label” is replaced with 3.
ABR1#show ip bgp labeled-unicast
 
Status codes: s suppressed, d damped, h history, a add-path, b back-up, * valid, > best, i - internal, S - stale
Network Next Hop In Label Out Label
*>i 11.11.11.55/32 172.4.5.55 25600 3
*>i 21.21.21.56/32 172.6.7.54 25601 25601
 
ABR1#show mpls forwarding-table | include 11.11.11.55
 
B> 11.11.11.55/32 1 4 - Yes LSP_DEFAULT 3 xe3 No 172.4.5.55
 
P1
Following output displays the BGP routes of neighbor configured on P1.
 
P1#show ip bgp neighbors 172.1.2.53
BGP neighbor is 172.1.2.53, remote AS 100, local AS 100, internal link, peer index: 2
BGP version 4, local router ID 200.200.200.54, remote router ID 44.44.44.53
BGP state = Established, up for 01:14:22
Last read 00:00:15, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Labeled-Unicast: advertised and received
Received 178 messages, 0 notifications, 0 in queue
Sent 182 messages, 1 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
 
For address family: IPv4 Labeled-Unicast BGP table version 3, neighbor version 3
Index 1, Offset 0, Mask 0x2
AIGP is enabled
Route-Reflector Client
NEXT_HOP is always this router
Community attribute sent to this neighbor (both)
Large Community attribute sent to this neighbor
1 accepted prefixes
1 announced prefixes
 
Connections established 2; dropped 1
Local host: 172.1.2.54, Local port: 179
Foreign host: 172.1.2.53, Foreign port: 52756
TCP MSS: (0), Advertise TCP MSS: (1460), Send TCP MSS: (1460), Receive TCP MSS: (536)
Sock FD : (26)
Nexthop: 172.1.2.54
Nexthop global: ::
Nexthop local: ::
BGP connection: non shared network
Last Reset: 01:14:22, due to Administratively Reset (Cease Notification sent)
Notification Error Message: (Cease/Administratively Reset.)
 
Following output displays the Labels attached to the BGP routes on P1.
P1#
P1#show ip bgp labeled-unicast
 
Status codes: s suppressed, d damped, h history, a add-path, b back-up, * valid, > best, i - internal, S - stale
Network Next Hop In Label Out Label
*>i 11.11.11.55/32 172.6.7.52 25600 25600
*>i 21.21.21.56/32 172.1.2.53 25601 25600
 
 
P1#show mpls forwarding-table | include 11.11.11.55
 
B> 11.11.11.55/32 1 3 - Yes LSP_DEFAULT 25600 xe21 No 172.6.7.52
 
 
Following output displays the Labels attached to the BGP routes on ABR2.
ABR2:
ABR2#show ip bgp labeled-unicast
 
Status codes: s suppressed, d damped, h history, a add-path, b back-up, * valid, > best, i - internal, S - stale
Network Next Hop In Label Out Label
*>i 11.11.11.55/32 172.1.2.54 25601 25600
*>i 21.21.21.56/32 172.3.4.56 25600 3
 
 
ABR2#show mpls forwarding-table | include 11.11.11.55
 
B> 11.11.11.55/32 2 6 - Yes LSP_DEFAULT 25600 xe6 No 172.1.2.54
 
PE2
Following output displays the PE2 configuration.
 
PE2#show running-config bgp
!
router bgp 100
allocate-label all
neighbor 11.11.11.55 remote-as 100
neighbor 172.3.4.53 remote-as 100
neighbor 11.11.11.55 update-source lo
!
address-family ipv4 unicast
network 21.21.21.56/32
exit-address-family
!
address-family ipv4 labeled-unicast
bgp implicit-null
neighbor 172.3.4.53 activate
exit-address-family
!
address-family vpnv4 unicast
neighbor 11.11.11.55 activate
exit-address-family
!
address-family ipv4 vrf vrf1
redistribute connected
exit-address-family
!
exit
!
PE2#
 
Following output displays the Labels attached to the BGP routes on PE2.
PE2:
PE2#show ip bgp labeled-unicast
 
Status codes: s suppressed, d damped, h history, a add-path, b back-up, * valid, > best, i - internal, S - stale
Network Next Hop In Label Out Label
*>i 11.11.11.55/32 172.3.4.53 25600 25601
*> 21.21.21.56/32 0.0.0.0 3 -
 
PE2#show mpls forwarding-table | include 11.11.11.55
B> 11.11.11.55/32 1 2 - Yes LSP_DEFAULT 25601 ge10 No 172.3.4.53
 
PE2#show mpls ftn-table
Primary FTN entry with FEC: 11.11.11.55/32, id: 1, row status: Active, Tunnel-Policy: N/A, State: Installed
Owner: BGP, distance: 0, Action-type: Redirect to LSP, Exp-bits: 0x0, Incoming DSCP: none
VRF id 0, BGP peer 172.3.4.53 BGP prefix 11.11.11.55
Tunnel id: 0, Protected LSP id: 0, LSP-type: Primary, Description: N/A, , Color: 0
Cross connect ix: 1, in intf: - in label: 0 out-segment ix: 2 refcount: 1
Owner: BGP, Persistent: No, Admin Status: Up, Oper Status: Up
Out-segment with ix: 2, owner: BGP, Stale: NO, refcount: 2, out intf: ge10, out label: 25601
Nexthop addr: 172.3.4.53 cross connect ix: 1, op code: Push
 
PE2#show mpls vrf-table
Output for IPv4 VRF table with id: 2
Primary FTN entry with FEC: 172.10.20.0/24, id: 1, row status: Active, Tunnel-Policy: N/A, State: Installed
Owner: BGP, distance: 0, Action-type: Redirect to LSP, Exp-bits: 0x0, Incoming DSCP: none
VRF id 2, BGP peer 11.11.11.55 BGP prefix 172.10.20.0
Transport Tunnel id: 0, Protected LSP id: 0, LSP-type: Primary, Description: N/A, , Color: 0
Cross connect ix: 2, in intf: - in label: 0 out-segment ix: 1 refcount: 1
Owner: BGP, Persistent: No, Admin Status: Up, Oper Status: Up
Out-segment with ix: 1, owner: BGP, Stale: NO, refcount: 1, BGP out intf: ge10, transport out intf: ge10, out label: 25601
Nexthop addr: 11.11.11.55 cross connect ix: 2, op code: Push and Lookup
 
 
PE2#show mpls ilm-table
Codes: > - installed ILM, * - selected ILM, p - stale ILM, ! - using backup
K - CLI ILM, T - MPLS-TP, s - Stitched ILM
S - SNMP, L - LDP, R - RSVP, C - CRLDP
B - BGP , K - CLI , V - LDP_VC, I - IGP_SHORTCUT
O - OSPF/OSPF6 SR, i - ISIS SR, k - SR CLI
P - SR Policy, U - unknown
 
ILM-ECMP LDP: Disabled
 
Code FEC/VRF/L2CKT ILM-ID In-Label Out-Label In-Intf Out-Intf/VRF Nexthop pri LSP-Type
B> 11.11.11.55/32 1 25600 25601 N/A N/A 172.3.4.53 Yes LSP_DEFAULT
B> vrf1 2 25601 Nolabel N/A N/A N/A Yes LSP_DEFAULT
PE2#
 
CLI Commands
The BGP-LU with implicit null label introduces the following configuration commands.
bgp implicit-null
Use this command to assign the MPLS label implicit-null (with a label value of 3) for locally originated IPv4 routes, whether they are connected or redistributed from other protocols which are found in the BGP IPv4 Unicast RIB.
Use the no form of this command to disable the default implicit-null behavior by configuring no bgp implicit-null under address-family ipv4 labeled-unicast. The no bgp implicit-null CLI command prompts BGP to assign a valid label (with a value greater than 16) to all IPv4 prefixes.
Command Syntax
bgp implicit-null
no bgp implicit-null
Parameters
None
Default
The bgp implicit-null is enabled under address-family ipv4 labeled-unicast.
Command Mode
BGP address-family ipv4 labelled-unicast mode
Applicability
Introduced in OcNOS version 6.5.1.
Example
Explain or describe the example.
OcNOS#configure terminal
 
Note: Describe the show output fields for new show commands. (Example: Refer the command show streaming-telemetry dynamic-subscriptions).
To allocate an MPLS implicit-null label to IPv4 unicast prefix 22.2.2.2/32
!
router bgp 100
bgp router-id 2.2.2.2
allocate-label all
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source lo
!
address-family ipv4 unicast
network 22.2.2.2/32
exit-address-family
!
address-family ipv4 labeled-unicast
bgp implicit-null
neighbor 1.1.1.1 activate
exit-address-family
!
exit
!
 
Example for non-implicit-null
To allocate a valid MPLS unique label (> 16) to IPv4 unicast prefix 22.2.2.2/32
!
router bgp 100
bgp router-id 2.2.2.2
allocate-label all
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source lo
!
address-family ipv4 unicast
network 22.2.2.2/32
exit-address-family
!
address-family ipv4 labeled-unicast
no bgp implicit-null
neighbor 1.1.1.1 activate
exit-address-family
!
exit
!
Glossary
 
Key Terms/Acronym
Description
BGP
Border Gateway Protocol
LU
BGP Labeled-Unicast
MPLS
Multi Protocol Label Switching
PHP
Penultimate Hop Popping of MPLS label