cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1394
Views
15
Helpful
3
Replies

import path limit <number>

sachin30720041
Level 1
Level 1

Hello,

     

I am trying to understand the usage of the 'import path limit' command.

 

     PE1

     /.   \

CE       P----PE3

   \.     /

     PE2

 

PE1 vrf:

vrf definition vrf1
rd 2:2
!
address-family ipv4
route-target export 2:2
route-target import 7:7
exit-address-family

 

PE2 VRF:

vrf definition vrf1
rd 2:2
!
address-family ipv4
route-target export 3:3
route-target import 7:7
exit-address-family

 

PE3 VRF:

vrf definition vrf1
rd 2:2
!
address-family ipv4
route-target export 7:7
route-target import 2:2
route-target import 3:3
exit-address-family

 

PE3 BGP:

router bgp 64513
...
address-family ipv4 vrf vrf1
import path selection bestpath
import path limit 4
neighbor 100.70.80.8 remote-as 64514
neighbor 100.70.80.8 activate
maximum-paths eibgp 4
exit-address-family

 

PE3

Router#show ip route vrf vrf1

1.0.0.0/32 is subnetted, 1 subnets
B 1.1.1.1 [200/0] via 3.3.3.3, 00:00:28
                [200/0] via 2.2.2.2, 00:00:28
11.0.0.0/32 is subnetted, 1 subnets
B 11.11.11.11 [200/0] via 3.3.3.3, 00:00:28
                       [200/0] via 2.2.2.2, 00:00:28
111.0.0.0/32 is subnetted, 1 subnets
B 111.111.111.111 [200/0] via 3.3.3.3, 00:00:28
                               [200/0] via 2.2.2.2, 00:00:28
112.0.0.0/32 is subnetted, 1 subnets
B 112.112.112.112 [200/0] via 3.3.3.3, 00:00:28
                               [200/0] via 2.2.2.2, 00:00:28
 113.0.0.0/32 is subnetted, 1 subnets
B 113.113.113.113 [200/0] via 3.3.3.3, 00:00:28
                               [200/0] via 2.2.2.2, 00:00:28

I have configured 'import path limit 4'. But I see 5 routes in vrf1 of PE3. According to my understanding 'import path limit' is used to limit the number of imported routes in a given VRF. So there should be 4 imported routes in vrf1.

 And what is the purpose of 'import path selection bestpath'. Even if I use 'import path selection multipath'. the number of routes in the vrf stays the same. Where one should use 'import path selection bestpath' and where one should use 'mport path selection multipath' command?

 

Thanks,

Sachin

 

 

3 Replies 3

Harold Ritter
Cisco Employee
Cisco Employee

Hi @sachin30720041 ,

 

The "import path limit" is to limit the number of paths per route, not the number of routes. In your case, you have 2 paths for each route, so under the "import path limit 4" that you configured.

 

To limit the number of routes in the VRF, you can use the following command:

 

vrf definition vrf1

maximum routes <number of routes> <threshold>

 

Regards, 

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Hello Harold,

 

Thanks for responding.

When I configure 'maximum-paths ibgp 3' and 'import path limit 2' then I see 3 next hops in the vrf's routing table.

router bgp 64512

address-family ipv4 vrf vrf1
import path limit 2
maximum-paths ibgp 3

show ip route vrf vrf1
B 1.1.1.1 [200/0] via 9.9.9.9, 00:00:04
               [200/0] via 3.3.3.3, 00:00:04
                [200/0] via 2.2.2.2, 00:00:04

 

Maximum-paths command seems to change the number of next-hops. 'import path limit 2' does not have any impact on the number of paths.

 

Thanks,

Sachin

Hi @sachin30720041 ,

 

Two things here.

 

1. "import path limit" is part of a feature called "BGP event based VPN import", which allows dynamic import of prefixes from the VPNv4/VPNv6 structures to the the VRF table. Before this feature, prefixes were imported in the VRF table based on the BGP scanner process. "import path limit" is used to limit the number of paths and is particularly useful in SP networks with lots of routes and potentially lots more paths.

 

2. "maximum-paths ibgp" overrides the limit set by "import paths limit"

 

Please refer to the following document for more information about the "BGP event based VPN import".

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/configuration/15-mt/irg-15-mt-book/irg-event-vpn-import.pdf

 

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México