This article provides information on how to individually limit IPv4 and IPv6 routes in a VPN scenario.
You can limit the routes in a VPN scenario by defining the maximum-prefix threshold. The limit can be put in individually for IPv4 and IPv6.
You can set the limit separately for IPv4 and IPv6, instead of a common limit, by defining the following configurations under the VPN routing-instance:
[edit] User1@router1# show routing-instances VPNA { instance-type vrf; interface ge-3/1/7.0; route-distinguisher 100:1; vrf-target target:100:100; routing-options { rib VPNA.inet.0 { maximum-prefixes 15 threshold 100; < maximum-prefixes prefix-limit <log-only |threshold value log-interval seconds> } rib VPNA.inet6.0 { maximum-prefixes 20 threshold 100; < maximum-prefixes prefix-limit <log-only | threshold value log-interval seconds> } } protocols { bgp { group CE1 { neighbor 172.168.1.2 { family inet { unicast; } peer-as 65001; } neighbor cafe:1890:5000:30d4::2 { family inet6 { unicast; } peer-as 65001; } } } } }
[edit] user@router# run show bgp summary Groups: 2 Peers: 3 Down peers: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.0 0 0 0 0 0 0 bgp.l3vpn.0 0 0 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 4.4.4.4 100 46 45 0 0 11:40 Establ bgp.l3vpn.0: 0/0/0/0 bgp.l3vpn-inet6.0: 0/0/0/0 172.168.1.2 65001 27 37 0 2 2 Establ VPNA.inet.0: 10/10/10/0 cafe:1890:5000:30d4::2 65001 23 37 0 2 23 Establ VPNA.inet6.0: 10/10/10/0
May 17 16:12:22 router1 rpd[69633]: RPD_RT_PREFIX_LIMIT_REACHED: Number of prefixes (15) in table VPNA.inet.0 still exceeds or equals configured maximum (15) May 17 16:12:24 router1 rpd[69633]:RPD_RT_PREFIX_LIMIT_REACHED: Number of prefixes (20) in table VPNA.inet6.0 reached configured maximum (20) [edit] User1@router1# run show bgp summary Groups: 2 Peers: 3 Down peers: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.0 0 0 0 0 0 0 bgp.l3vpn.0 21 21 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 4.4.4.4 100 55 49 0 0 13:47 Establ VPNA.inet.0: 3/3/3/0 VPNA.inet6.0: 6/6/6/0 bgp.l3vpn.0: 21/21/21/0 bgp.l3vpn-inet6.0: 16/16/16/0 172.168.1.2 65001 31 42 0 2 2:09 Establ VPNA.inet.0: 10/10/10/0 cafe:1890:5000:30d4::2 65001 27 43 0 2 2:30 Establ VPNA.inet6.0: 10/10/10/0
[edit] User1@router1# run show route table VPNA.inet.0 terse VPNA.inet.0: 15 destinations, 15 routes (15 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both A Destination P Prf Metric 1 Metric 2 Next hop AS path * 20.0.14.0/24 B 170 100 >so-5/0/2.0 65002 ? * 20.0.15.0/24 B 170 100 >so-5/0/2.0 65002 ? * 20.0.16.0/24 B 170 100 >so-5/0/2.0 65002 ? * 100.0.0.0/24 B 170 100 >172.168.1.2 65001 ? * 100.0.1.0/24 B 170 100 >172.168.1.2 65001 ? * 100.0.2.0/24 B 170 100 >172.168.1.2 65001 ? * 100.0.3.0/24 B 170 100 >172.168.1.2 65001 ? * 100.0.4.0/24 B 170 100 >172.168.1.2 65001 ? * 100.0.5.0/24 B 170 100 >172.168.1.2 65001 ? * 100.0.6.0/24 B 170 100 >172.168.1.2 65001 ? * 100.0.7.0/24 B 170 100 >172.168.1.2 65001 ? * 100.0.8.0/24 B 170 100 >172.168.1.2 65001 ? * 100.0.9.0/24 B 170 100 >172.168.1.2 65001 ? * 172.168.1.0/30 D 0 >ge-3/1/7.0 * 172.168.1.1/32 L 0 Local [edit] User1@router1# run show route table VPNA.inet6.0 terse VPNA.inet6.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both A Destination P Prf Metric 1 Metric 2 Next hop AS path * 5555::c000:1/128 B 170 100 >cafe:1890:5000:30d4::2 64612 ? * 5555::c000:2/128 B 170 100 >cafe:1890:5000:30d4::2 64612 ? * 5555::c000:3/128 B 170 100 >cafe:1890:5000:30d4::2 64612 ? * 5555::c000:4/128 B 170 100 >cafe:1890:5000:30d4::2 64612 ? * 5555::c000:5/128 B 170 100 >cafe:1890:5000:30d4::2 64612 ? * 5555::c000:6/128 B 170 100 >cafe:1890:5000:30d4::2 64612 ? * 5555::c000:7/128 B 170 100 >cafe:1890:5000:30d4::2 64612 ? * 5555::c000:8/128 B 170 100 >cafe:1890:5000:30d4::2 64612 ? * 5555::c000:9/128 B 170 100 >cafe:1890:5000:30d4::2 64612 ? * 5555::c000:a/128 B 170 100 >cafe:1890:5000:30d4::2 64612 ? * 6666::c000:1/128 B 170 100 >so-5/0/2.0 65002 ? * 6666::c000:2/128 B 170 100 >so-5/0/2.0 65002 ? * 6666::c000:3/128 B 170 100 >so-5/0/2.0 65002 ? * 6666::c000:4/128 B 170 100 >so-5/0/2.0 65002 ? * 6666::c000:5/128 B 170 100 >so-5/0/2.0 65002 ? * 6666::c000:6/128 B 170 100 >so-5/0/2.0 65002 ? cafe:1890:5000:30d4::/64 * D 0 >ge-3/1/7.0 cafe:1890:5000:30d4::1/128 * L 0 Local * fe80::/64 D 0 >ge-3/1/7.0 fe80::290:69ff:fe71:7da0/128 * L 0 Local