To enable the recursive-via-host flag for IP Version 4 (IPv4), VPN Version 4 (VPNv4), virtual routing and forwarding (VRF)
                              address families, and IPv6 address families, use the 
                              		  bgp 
                                 			 recursion 
                                 			 host  command in address family configuration or router configuration mode. To disable the recursive-via-host flag, use the 
                              		  no  form of this command. 
                              		
                           
 
                           	 
                        
                         
                           		
                           bgp recursion host 
                           
                           no bgp recursion host 
                           
 
                           	 
                        
                        
                           Syntax Description
 
                           		
                            This command has no arguments or keywords. 
                              		
                           
 
                           	 
                        
                        
                           Command Default
 
                           		
                            For an internal Border Gateway Protocol (iBGP) IPv4 address family, irrespective of whether Prefix Independent Convergence
                              (PIC) is enabled, the recursive-via-host flag in Cisco Express Forwarding is not set. 
                              		
                           
 
                           		
                            For the VPNv4 and IPv4 VRF address families, the recursive-via-host flag is set and the 
                              		  bgp 
                                 			 recursion 
                                 			 host  command is automatically restored when PIC is enabled under the following conditions: 
                              		
                           
 
                           		
                            
                           	 
                        
                        
                           Command Modes
 
                           		
                           Address family configuration (config-router-af)
 
                           		
                           Router configuration (config-router)
 
                           	 
                        
                         
                           		
                           Command History
                           
                              
                              
                                 
                                 
                              
                              
                                 
                                    |  Release 
                                          					 
                                        |  Modification 
                                          					 
                                        | 
                              
                              
                                 
                                    |  12.2(33)SRE 
                                          					 
                                        |  This command was introduced. 
                                          					 
                                        | 
                                 
                                    |  12.2(33)XNE 
                                          					 
                                        |  This command was integrated into Cisco IOS Release 12.2(33)XNE. 
                                          					 
                                        | 
                                 
                                    |  Cisco IOS XE Release 2.5 
                                          					 
                                        |  This command was integrated into Cisco IOS XE Release 2.5. 
                                          					 
                                        | 
                                 
                                    |  15.0(1)S 
                                          					 
                                        |  This command was integrated into Cisco IOS Release 15.0(1)S. 
                                          					 
                                        | 
                                 
                                    |  Cisco IOS XE Release 3.3S 
                                          					 
                                        |  Support for IPv6 address family configuration mode was added. 
                                          					 
                                        | 
                                 
                                    |  15.1(2)S 
                                          					 
                                        |  Support for IPv6 address family configuration mode was added. 
                                          					 
                                        | 
                                 
                                    | 15.2(3)T 
                                          					 
                                        |  This command was integrated into Cisco IOS Release 15.2(3)T. 
                                          					 
                                        | 
                                 
                                    | 15.2(4)S 
                                          					 
                                        |  This command was integrated into Cisco IOS Release 15.2(4)S. 
                                          					 
                                        | 
                                 
                                    | 15.1(1)SY
                                          					 
                                        |  This command was integrated into Cisco IOS Release 15.1(1)SY. 
                                          					 
                                        | 
                              
                           
 
                           	 
                        
                        
                           Usage Guidelines
 
                           		
                            The bgp
                                 					recursion
                                 					host  command is used to help Cisco Express Forwarding during traffic route absence when a node failure occurs. 
                           
 
                           		
                            For link protection, BGP automatically restricts the recursion for the next hop resolution of connected routes. These routes
                              are provided by the route reflector, which receives the prefix from another provider edge (PE) router that needs the customer
                              edge (CE) router to be protected. 
                              		
                           
 
                           		
                            For node protection, BGP automatically restricts the recursion for the next hop resolution of host routes. These routes are
                              provided by the route reflector, which receives the prefix from the host PE router. If a PE router or Autonomous System Boundary
                              Router (ASBR) fails, for the 
                              		  bgp 
                                 			 recursion 
                                 			 host  command to work, the PE routers must satisfy the following options: 
                              		
                           
 
                           		
                           
                              - 
                                  The host prefix must be used on the PE loopback interfaces. 
                                    		  
                                  
- 
                                  The next-hop-self must be configured on iBGP sessions. 
                                    		  
                                  
- 
                                  The 
                                    			 recursive 
                                       				via 
                                       				host 
                                       				prefix  command must be configured. 
                                    		  
                                  
 To enable Cisco Express Forwarding to use strict recursion rules for an IPv4 address family, you must configure the 
                              		  bgp 
                                 			 recursion 
                                 			 host  command that enables the recursive-via-host flag when PIC is enabled. 
                              		
                           
 
                           		
                            The recursive-via-connected flag is set for directly connected peers only. For example, if the 
                              		  bgp 
                                 			 additional-paths 
                                 			 install  command is configured in IPv4 and IPv4 VRF address family configuration modes, the running configuration shows the following
                              details: 
                              		
                           
 
                           		
address-family ipv4
bgp additional-paths-install
no bgp recursion host
!
address-family ipv4 vrf red
bgp additional-paths-install
bgp recursion host
 
                           		 In the case of an external Border Gateway Protocol (eBGP) directly connected peers route exchange, the recursion is disabled
                              for the connected routes. The recursive-via-connected flag is automatically set in the RIB and Cisco Express Forwarding for
                              the routes from the eBGP single-hop peers. 
                              		
                           
 
                           		
                            For all the VPNs, irrespective of whether PIC is enabled, when the 
                              		  bgp 
                                 			 recursion 
                                 			 host  command is configured in VPNv4 and IPv4 address family configuration modes, the normal recursion rules are disabled and only
                              recursion via host-specific routes is allowed for primary, backup, and multipaths under those address families. To enable
                              the normal recursion rules, configure the 
                              		  no 
                                 			 bgp 
                                 			 recursion 
                                 			 host  command in VPNv4 and IPv4 address family configuration modes. 
                              		
                           
 
                           	 
                        
                        
                           Examples
 
                           		
                            The following example shows the configuration of the 
                              		  bgp 
                                 			 advertise-best-external  and 
                              		  bgp 
                                 			 recursion 
                                 			 host  commands: 
                              		
                           
 
                           		
Router> enable
Router# configure terminal
Router(config)# router ospf 10
Router(config-router)# log-adjacency-changes
Router(config-router)# redistribute connected subnets
Router(config-router)# network 192.168.0.0 0.0.255.255 area 0
Router(config-router)# router bgp 64500
Router(config-router)# no synchronization
Router(config-router)# bgp log-neighbor-changes
Router(config-router)# neighbor 10.5.5.5 remote-as 64500
Router(config-router)# neighbor 10.5.5.5 update-source Loopback0
Router(config-router)# neighbor 10.6.6.6 remote-as 64500
Router(config-router)# neighbor 10.6.6.6 update-source Loopback0
Router(config-router)# no auto-summary
Router(config-router)# address-family vpnv4
Router(config-router-af)# neighbor 10.5.5.5 activate
Router(config-router-af)# neighbor 10.5.5.5 send-community extended
Router(config-router-af)# neighbor 10.6.6.6 activate
Router(config-router-af)# neighbor 10.6.6.6 send-community extended
Router(config-router-af)# exit-address-family
Router(config-router)# address-family ipv4 vrf test1
Router(config-router-af)# no synchronization
Router(config-router-af)# bgp advertise-best-external
Router(config-router-af)# bgp recursion host
Router(config-router-af)# neighbor 192.168.9.2 remote-as 64511
Router(config-router-af)# neighbor 192.168.9.2 fall-over bfd
Router(config-router-af)# neighbor 192.168.9.2 activate
Router(config-router-af)# neighbor 192.168.9.2 as-override
Router(config-router-af)# neighbor 192.168.9.2 route-map LOCAL_PREF in
Router(config-router-af)# exit-address-family
 
                           		 The following example shows the configuration of the 
                              		  bgp 
                                 			 additional-paths 
                                 			 install  and 
                              		  bgp 
                                 			 recursion 
                                 			 host  commands: 
                              		
                           
 
                           		
Router> enable
Router# configure terminal
Router(config)# router ospf 10
Router(config-router)# log-adjacency-changes
Router(config-router)# redistribute connected subnets
Router(config-router)# network 192.168.0.0 0.0.255.255 area 0
Router(config-router)# router bgp 64500
Router(config-router)# no synchronization
Router(config-router)# bgp log-neighbor-changes
Router(config-router)# neighbor 10.5.5.5 remote-as 64500
Router(config-router)# neighbor 10.5.5.5 update-source Loopback0
Router(config-router)# neighbor 10.6.6.6 remote-as 64500
Router(config-router)# neighbor 10.6.6.6 update-source Loopback0
Router(config-router)# no auto-summary
Router(config-router)# address-family vpnv4
Router(config-router-af)# neighbor 10.5.5.5 activate
Router(config-router-af)# neighbor 10.5.5.5 send-community extended
Router(config-router-af)# neighbor 10.6.6.6 activate
Router(config-router-af)# neighbor 10.6.6.6 send-community extended
Router(config-router-af)# exit-address-family
Router(config-router)# address-family ipv4 vrf test1
Router(config-router-af)# no synchronization
Router(config-router-af)# bgp additional-paths install
Router(config-router-af)# bgp recursion host
Router(config-router-af)# neighbor 192.168.9.2 remote-as 64511
Router(config-router-af)# neighbor 192.168.9.2 fall-over bfd
Router(config-router-af)# neighbor 192.168.9.2 activate
Router(config-router-af)# neighbor 192.168.9.2 as-override
Router(config-router-af)# neighbor 192.168.9.2 route-map LOCAL_PREF in
Router(config-router-af)# exit-address-family
 
                           		 
                           		 The following example shows the best external routes and the BGP recursion flags enabled: 
                              		
                           
 
                           		
Router# show ip bgp vpnv4 vrf test1 192.168.13.1
BGP routing table entry for 400:1:192.168.13.0/24, version 4
Paths: (2 available, best #2, table test1)
  Advertise-best-external
  Advertised to update-groups:
     1
  64511, imported path from 300:1:192.168.13.0/24
    10.7.7.7 (metric 20) from 10.5.5.5 (10.5.5.5)
      Origin IGP, metric 0, localpref 50, valid, internal, backup/repair
      Extended Community: RT:100:1 RT:200:1 RT:300:1 RT:400:1
      Originator: 10.7.7.7, Cluster list: 10.5.5.5 , recursive-via-host
      mpls labels in/out 25/17
  64511
    10.8.8.8 from 10.8.8.8 (192.168.13.1)
      Origin IGP, metric 0, localpref 100, valid, external, best
      Extended Community: RT:100:1 RT:200:1 RT:300:1 RT:400:1 , recursive-via-connected
      mpls labels in/out 25/nolabel
 
                           		 The following example shows the additional paths and the BGP recursion flags enabled: 
                              		
                           
 
                           		
Router# show ip bgp vpnv4 vrf test1 192.168.13.1
BGP routing table entry for 400:1:192.168.13.0/24, version 25
Paths: (2 available, best #2, table test1)
  Additional-path
  Advertised to update-groups:
     1
  64511, imported path from 300:1:192.168.13.0/24
    10.7.7.7 (metric 20) from 10.5.5.5 (10.5.5.5)
      Origin IGP, metric 0, localpref 50, valid, internal, backup/repair
      Extended Community: RT:100:1 RT:200:1 RT:300:1 RT:400:1
      Originator: 10.7.7.7, Cluster list: 10.5.5.5 , recursive-via-host
      mpls labels in/out 25/17
  64511
    10.8.8.8 from 10.8.8.8 (192.168.13.1)
      Origin IGP, metric 0, localpref 100, valid, external, best
      Extended Community: RT:100:1 RT:200:1 RT:300:1 RT:400:1 , recursive-via-connected
      mpls labels in/out 25/nolabel
 
                           		The table below describes the significant fields shown in the display. 
                              		
                           
 
                           		
                           
                              Table 4. show ip bgp vpnv4 vrf network-address Field Descriptions
                              
                                 
                                 
                              
                              
                                 
                                    |  Field 
                                          				  
                                        |  Description 
                                          				  
                                        | 
                              
                              
                                 
                                    |  BGP routing table entry for ... version 
                                          				  
                                        |  Internal version number of the table. This number is incremented whenever the table changes. 
                                          				  
                                        | 
                                 
                                    |  Paths 
                                          				  
                                        |  Number of autonomous system paths to the specified network. If multiple paths exist, one of the multipaths is designated
                                          the best path. 
                                          				  
                                        | 
                                 
                                    |  Advertised to update-groups 
                                          				  
                                        |  IP address of the BGP peers to which the specified route is advertised. 
                                          				  
                                        | 
                                 
                                    |  10.7.7.7 (metric 20) from 10.5.5.5 (10.5.5.5) 
                                          				  
                                        |  Indicates the next hop address and the address of the gateway that sent the update. 
                                          				  
                                        | 
                                 
                                    |  Origin 
                                          				  
                                        | Indicates the origin of the entry. It can be one of the following values: 
                                             
                                                 IGP--Entry originated from Interior Gateway Protocol (IGP) and was advertised with a 
                                                   						network  router configuration command. 
                                                   					 
                                                
                                                 incomplete--Entry originated from other than an IGP or Exterior Gateway Protocol (EGP) and was advertised with the 
                                                   						redistribute  router configuration command. 
                                                   					 
                                                
                                                 EGP--Entry originated from an EGP. 
                                                   					 
                                                 | 
                                 
                                    |  metric 
                                          				  
                                        |  The value of the interautonomous system metric. 
                                          				  
                                        | 
                                 
                                    |  localpref 
                                          				  
                                        |  Local preference value as set with the 
                                          					 set 
                                             						local-preference 
                                             						route-map  configuration command. The default value is 50. 
                                          				  
                                        | 
                                 
                                    |  valid 
                                          				  
                                        |  Indicates that the route is usable and has a valid set of attributes. 
                                          				  
                                        | 
                                 
                                    |  internal/external 
                                          				  
                                        |  The field is 
                                          					 internal if the path is learned via iBGP. The field is 
                                          					 external if the path is learned via eBGP. 
                                          				  
                                        | 
                                 
                                    |  best 
                                          				  
                                        |  If multiple paths exist, one of the multipaths is designated the best path and this path is advertised to neighbors. 
                                          				  
                                        | 
                                 
                                    |  Extended Community 
                                          				  
                                        |  Route Target value associated with the specified route. 
                                          				  
                                        | 
                                 
                                    |  Originator 
                                          				  
                                        |  The router ID of the router from which the route originated when route reflector is used. 
                                          				  
                                        | 
                                 
                                    |  Cluster list 
                                          				  
                                        |  The router ID of all the route reflectors that the specified route has passed through. 
                                          				  
                                        |