Got it

XPL Recursive Route-Filter limitation - Multiple Compose Statement Error: Failed to commit configuration

Created: Mar 16, 2020 17:55:53Latest reply: Apr 3, 2020 23:20:10 375 4 0 0 0
  HiCoins as reward: 3 (problem unresolved)

Hello all!

I'm from an ITP - Internet Transit Provider, and I'm using an NE40 for a ITP Border Position.

We need to validate the combination between IP-Prefixes, and Origin ASN, to accept and propagate routes, and to verify the source of Blackhole announcements.

I was trying to use huawei eXtended P*** Language, to create the filters similar to Juniper and Cisco IOS-XR.
But i Found some limitations, and I'm not able to migrate from Route-Policy to Route-Filter.

I created an enviroment to simulate and examplify the issue!

- Tests 1 to 5 Works, and comproves that it solud be possible.

 - Test 6, demonstrate a limitation of the maximum conditons of a Clause.

- Test 7 and 8, do not work AND I DON'T KOWN WHY!


I'm using a Call Route-Filter on the cone to do some Traffic Engineering about Black Hole...
And by some UNIDENTIFIED REASON, the router simply does not accept de commit.


Here is a part of the configuration, and later the tests that i made.

########

bgp 1234
#
ipv4-family
 peer 1.2.3.4 route-filter Cone_MyCustomer_v4 import
 commit  

########
 
xpl route-filter Action_MyCustomer_v4
if ( community matches-all {1000:666} ) and (ip route-destination in {0.0.0.0 0 eq 32} ) then
apply ip next-hop 192.0.2.1
approve
endif
if (ip route-destination in {0.0.0.0 0 le 24} ) then
apply community {1000:1000} additive
approve
endif
end-filter

########

#
xpl ip-prefix-list AS10_v4
10.0.0.0 16 ge 24 le 32
end-list
#
xpl ip-prefix-list AS11_v4
11.0.0.0 16 ge 24 le 32
end-list
#
xpl ip-prefix-list AS12_v4
12.0.0.0 16 ge 24 le 32
end-list
#
xpl ip-prefix-list AS13_v4
13.0.0.0 16 ge 24 le 32
end-list
#
xpl ip-prefix-list AS14_v4
14.0.0.0 16 ge 24 le 32
end-list
#
xpl ip-prefix-list AS15_v4
15.0.0.0 16 ge 24 le 32
end-list
#
xpl ip-prefix-list AS16_v4
16.0.0.0 16 ge 24 le 32
end-list
#
xpl ip-prefix-list AS17_v4
17.0.0.0 16 ge 24 le 32
end-list
#
xpl ip-prefix-list AS18_v4
18.0.0.0 16 ge 24 le 32
end-list
#
xpl ip-prefix-list AS19_v4
19.0.0.0 16 ge 24 le 32
end-list
#
#
xpl ip-prefix-list AS20_v4
20.0.0.0 16 ge 24 le 32
end-list
#
xpl ip-prefix-list AS21_v4
21.0.0.0 16 ge 24 le 32
end-list
#
xpl ip-prefix-list AS22_v4
22.0.0.0 16 ge 24 le 32
end-list
#
xpl ip-prefix-list AS23_v4
23.0.0.0 16 ge 24 le 32
end-list
#
xpl ip-prefix-list AS24_v4
24.0.0.0 16 ge 24 le 32
end-list
#
xpl ip-prefix-list AS25_v4
25.0.0.0 16 ge 24 le 32
end-list
#
xpl ip-prefix-list AS26_v4
26.0.0.0 16 ge 24 le 32
end-list
#
xpl ip-prefix-list AS27_v4
27.0.0.0 16 ge 24 le 32
end-list
#
xpl ip-prefix-list AS28_v4
28.0.0.0 16 ge 24 le 32
end-list
#
xpl ip-prefix-list AS29_v4
29.0.0.0 16 ge 24 le 32
end-list
#



[~My-NE40]
[~My-NE40]### 1 - This way works!
[~My-NE40]### Multiple IF statements simple(Test with Route Destination clause).
[~My-NE40]### Each action with a Call Route-Filter.
[~My-NE40]xpl route-filter Cone_MyCustomer_v4
Warning: The XPL filter or list Cone_MyCustomer_v4 has been configured. New configuration will override the previous one. To exit the configuration, run the abort command.
[~My-NE40-xpl-filter] if ip route-destination in AS10_v4 then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] elseif ip route-destination in AS11_v4 then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif ip route-destination in AS12_v4 then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif ip route-destination in AS13_v4 then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif ip route-destination in AS14_v4 then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif ip route-destination in AS15_v4 then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif ip route-destination in AS16_v4 then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif ip route-destination in AS17_v4 then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif ip route-destination in AS18_v4 then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif ip route-destination in AS19_v4 then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif ip route-destination in AS20_v4 then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif ip route-destination in AS21_v4 then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif ip route-destination in AS22_v4 then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif ip route-destination in AS23_v4 then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif ip route-destination in AS24_v4 then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif ip route-destination in AS25_v4 then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif ip route-destination in AS26_v4 then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif ip route-destination in AS27_v4 then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif ip route-destination in AS28_v4 then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif ip route-destination in AS29_v4 then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] else
[~My-NE40-xpl-filter-else]  refuse
[~My-NE40-xpl-filter-else] endif
[~My-NE40-xpl-filter] end-filter
[*My-NE40]#
[*My-NE40]
[*My-NE40]commit
[~My-NE40]
[~My-NE40]
[~My-NE40]### 2 - This way works!
[~My-NE40]### Multiple IF statements simple(Test with as-path origin clause).
[~My-NE40]### Each action with a Call Route-Filter.
[~My-NE40]xpl route-filter Cone_MyCustomer_v4
Warning: The XPL filter or list Cone_MyCustomer_v4 has been configured. New configuration will override the previous one. To exit the configuration, run the abort command.
[~My-NE40-xpl-filter] if as-path origin '10' then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] elseif as-path origin '11' then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '12' then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '13' then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '14' then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '15' then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '16' then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '17' then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '18' then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '19' then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '20' then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '21' then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '22' then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '23' then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '24' then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '25' then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '26' then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '27' then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '28' then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '29' then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] endif
[~My-NE40-xpl-filter] end-filter
[*My-NE40]#
[*My-NE40]
[*My-NE40]commit
[~My-NE40]
[~My-NE40]
[~My-NE40]### 3 - This way works!
[~My-NE40]### Multiple IF statements, each one wih a compose clause(as-path and route-destination).
[~My-NE40]### The actions are direct (no Call Route-Filter).
[~My-NE40]xpl route-filter Cone_MyCustomer_v4
Warning: The XPL filter or list Cone_MyCustomer_v4 has been configured. New configuration will override the previous one. To exit the configuration, run the abort command.
[~My-NE40-xpl-filter] if (as-path origin '10') and (ip route-destination in AS10_v4) then
[~My-NE40-xpl-filter-if] apply community {1000:1000} additive
[~My-NE40-xpl-filter-if] approve
[~My-NE40-xpl-filter-if] elseif (as-path origin '11') and (ip route-destination in AS11_v4) then
[~My-NE40-xpl-filter-elif] apply community {1000:1000} additive
[~My-NE40-xpl-filter-elif] approve
[~My-NE40-xpl-filter-elif] elseif (as-path origin '12') and (ip route-destination in AS12_v4) then
[~My-NE40-xpl-filter-elif] apply community {1000:1000} additive
[~My-NE40-xpl-filter-elif] approve
[~My-NE40-xpl-filter-elif] elseif (as-path origin '13') and (ip route-destination in AS13_v4) then
[~My-NE40-xpl-filter-elif] apply community {1000:1000} additive
[~My-NE40-xpl-filter-elif] approve
[~My-NE40-xpl-filter-elif] elseif (as-path origin '14') and (ip route-destination in AS14_v4) then
[~My-NE40-xpl-filter-elif] apply community {1000:1000} additive
[~My-NE40-xpl-filter-elif] approve
[~My-NE40-xpl-filter-elif] elseif (as-path origin '15') and (ip route-destination in AS15_v4) then
[~My-NE40-xpl-filter-elif] apply community {1000:1000} additive
[~My-NE40-xpl-filter-elif] approve
[~My-NE40-xpl-filter-elif] elseif (as-path origin '16') and (ip route-destination in AS16_v4) then
[~My-NE40-xpl-filter-elif] apply community {1000:1000} additive
[~My-NE40-xpl-filter-elif] approve
[~My-NE40-xpl-filter-elif] elseif (as-path origin '17') and (ip route-destination in AS17_v4) then
[~My-NE40-xpl-filter-elif] apply community {1000:1000} additive
[~My-NE40-xpl-filter-elif] approve
[~My-NE40-xpl-filter-elif] elseif (as-path origin '18') and (ip route-destination in AS18_v4) then
[~My-NE40-xpl-filter-elif] apply community {1000:1000} additive
[~My-NE40-xpl-filter-elif] approve
[~My-NE40-xpl-filter-elif] elseif (as-path origin '19') and (ip route-destination in AS19_v4) then
[~My-NE40-xpl-filter-elif] apply community {1000:1000} additive
[~My-NE40-xpl-filter-elif] approve
[~My-NE40-xpl-filter-elif] elseif (as-path origin '20') and (ip route-destination in AS20_v4) then
[~My-NE40-xpl-filter-elif] apply community {1000:1000} additive
[~My-NE40-xpl-filter-elif] approve
[~My-NE40-xpl-filter-elif] elseif (as-path origin '21') and (ip route-destination in AS21_v4) then
[~My-NE40-xpl-filter-elif] apply community {1000:1000} additive
[~My-NE40-xpl-filter-elif] approve
[~My-NE40-xpl-filter-elif] elseif (as-path origin '22') and (ip route-destination in AS22_v4) then
[~My-NE40-xpl-filter-elif] apply community {1000:1000} additive
[~My-NE40-xpl-filter-elif] approve
[~My-NE40-xpl-filter-elif] elseif (as-path origin '23') and (ip route-destination in AS23_v4) then
[~My-NE40-xpl-filter-elif] apply community {1000:1000} additive
[~My-NE40-xpl-filter-elif] approve
[~My-NE40-xpl-filter-elif] elseif (as-path origin '24') and (ip route-destination in AS24_v4) then
[~My-NE40-xpl-filter-elif] apply community {1000:1000} additive
[~My-NE40-xpl-filter-elif] approve
[~My-NE40-xpl-filter-elif] elseif (as-path origin '25') and (ip route-destination in AS25_v4) then
[~My-NE40-xpl-filter-elif] apply community {1000:1000} additive
[~My-NE40-xpl-filter-elif] approve
[~My-NE40-xpl-filter-elif] elseif (as-path origin '26') and (ip route-destination in AS26_v4) then
[~My-NE40-xpl-filter-elif] apply community {1000:1000} additive
[~My-NE40-xpl-filter-elif] approve
[~My-NE40-xpl-filter-elif] elseif (as-path origin '27') and (ip route-destination in AS27_v4) then
[~My-NE40-xpl-filter-elif] apply community {1000:1000} additive
[~My-NE40-xpl-filter-elif] approve
[~My-NE40-xpl-filter-elif] elseif (as-path origin '28') and (ip route-destination in AS28_v4) then
[~My-NE40-xpl-filter-elif] apply community {1000:1000} additive
[~My-NE40-xpl-filter-elif] approve
[~My-NE40-xpl-filter-elif] elseif (as-path origin '29') and (ip route-destination in AS29_v4) then
[~My-NE40-xpl-filter-elif] apply community {1000:1000} additive
[~My-NE40-xpl-filter-elif] approve
[~My-NE40-xpl-filter-elif] else
[~My-NE40-xpl-filter-else]  refuse
[~My-NE40-xpl-filter-else] endif
[~My-NE40-xpl-filter] end-filter
[*My-NE40]#
[*My-NE40]
[*My-NE40]commit
[~My-NE40]
[~My-NE40]
[~My-NE40]### 4 - This way works!
[~My-NE40]### A single IF statement, compose clause(as-path and route-destination).
[~My-NE40]### The action with a Call Route-Filter.
[~My-NE40]xpl route-filter Cone_MyCustomer_v4
Warning: The XPL filter or list Cone_MyCustomer_v4 has been configured. New configuration will override the previous one. To exit the configuration, run the abort command.
[~My-NE40-xpl-filter] if (as-path origin '10') and (ip route-destination in AS10_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] else
[~My-NE40-xpl-filter-else]  refuse
[~My-NE40-xpl-filter-else] endif
[~My-NE40-xpl-filter] end-filter
[*My-NE40]#
[*My-NE40]
[*My-NE40]commit
[~My-NE40]
[~My-NE40]
[~My-NE40]
[~My-NE40]### 5 - This way works!
[~My-NE40]### A single IF statement, but compose stant with ANDs and ORs, and less the 32 clauses.
[~My-NE40]### The actions are direct (no Call Route-Filter).
[~My-NE40]xpl route-filter Cone_MyCustomer_v4
Warning: The XPL filter or list Cone_MyCustomer_v4 has been configured. New configuration will override the previous one. To exit the configuration, run the abort command.
[~My-NE40-xpl-filter] if ( (as-path origin '10') and (ip route-destination in AS10_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '11') and (ip route-destination in AS11_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '12') and (ip route-destination in AS12_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '13') and (ip route-destination in AS13_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '14') and (ip route-destination in AS14_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '15') and (ip route-destination in AS15_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '16') and (ip route-destination in AS16_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '17') and (ip route-destination in AS17_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '18') and (ip route-destination in AS18_v4) ) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] else
[~My-NE40-xpl-filter-else]  refuse
[~My-NE40-xpl-filter-else] endif
[~My-NE40-xpl-filter] end-filter
[*My-NE40]#
[*My-NE40]
[*My-NE40]commit
[~My-NE40]
[~My-NE40]
[~My-NE40]
[~My-NE40]
[~My-NE40]
[~My-NE40]### 6 - This way DON NOT works! Limit to 32!
[~My-NE40]### A single IF statement, but compose stant with ANDs and ORs, and MORE the 32 clauses.
[~My-NE40]### The actions are direct (no Call Route-Filter).
[~My-NE40]xpl route-filter Cone_MyCustomer_v4
Warning: The XPL filter or list Cone_MyCustomer_v4 has been configured. New configuration will override the previous one. To exit the configuration, run the abort command.
[~My-NE40-xpl-filter] if ( (as-path origin '10') and (ip route-destination in AS10_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '11') and (ip route-destination in AS11_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '12') and (ip route-destination in AS12_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '13') and (ip route-destination in AS13_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '14') and (ip route-destination in AS14_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '15') and (ip route-destination in AS15_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '16') and (ip route-destination in AS16_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '17') and (ip route-destination in AS17_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '18') and (ip route-destination in AS18_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '19') and (ip route-destination in AS19_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '20') and (ip route-destination in AS20_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '21') and (ip route-destination in AS21_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '22') and (ip route-destination in AS22_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '23') and (ip route-destination in AS23_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '24') and (ip route-destination in AS24_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '25') and (ip route-destination in AS25_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '26') and (ip route-destination in AS26_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '27') and (ip route-destination in AS27_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '28') and (ip route-destination in AS28_v4) ) or
[~My-NE40-xpl-filter]    ( (as-path origin '29') and (ip route-destination in AS29_v4) ) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] else
[~My-NE40-xpl-filter-else]  refuse
[~My-NE40-xpl-filter-else] endif
[~My-NE40-xpl-filter] end-filter
[*My-NE40]#
[*My-NE40]
[*My-NE40]commit
Error: In the Cone_MyCustomer_v4 policy, the number of conditions in an if clause reached the upper limit (32).
[*My-NE40]clear conf can
[~My-NE40]
[~My-NE40]
[~My-NE40]### 7 - This way DO NOT works! And I don't Know why!
[~My-NE40]### Multiplos IFs, all consed with ENDIF. Each one with a compose clause(as-path and route-destination).
[~My-NE40]### Each action with a Call Route-Filter.
[~My-NE40]xpl route-filter Cone_MyCustomer_v4
Warning: The XPL filter or list Cone_MyCustomer_v4 has been configured. New configuration will override the previous one. To exit the configuration, run the abort command.
[~My-NE40-xpl-filter] if (as-path origin '10') and (ip route-destination in AS10_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] endif
[~My-NE40-xpl-filter] if (as-path origin '11') and (ip route-destination in AS11_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] endif
[~My-NE40-xpl-filter] if (as-path origin '12') and (ip route-destination in AS12_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] endif
[~My-NE40-xpl-filter] if (as-path origin '13') and (ip route-destination in AS13_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] endif
[~My-NE40-xpl-filter] if (as-path origin '14') and (ip route-destination in AS14_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] endif
[~My-NE40-xpl-filter] if (as-path origin '15') and (ip route-destination in AS15_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] endif
[~My-NE40-xpl-filter] if (as-path origin '16') and (ip route-destination in AS16_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] endif
[~My-NE40-xpl-filter] if (as-path origin '17') and (ip route-destination in AS17_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] endif
[~My-NE40-xpl-filter] if (as-path origin '18') and (ip route-destination in AS18_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] endif
[~My-NE40-xpl-filter] if (as-path origin '19') and (ip route-destination in AS19_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] endif
[~My-NE40-xpl-filter] if (as-path origin '20') and (ip route-destination in AS20_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] endif
[~My-NE40-xpl-filter] if (as-path origin '21') and (ip route-destination in AS21_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] endif
[~My-NE40-xpl-filter] if (as-path origin '22') and (ip route-destination in AS22_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] endif
[~My-NE40-xpl-filter] if (as-path origin '23') and (ip route-destination in AS23_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] endif
[~My-NE40-xpl-filter] if (as-path origin '24') and (ip route-destination in AS24_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] endif
[~My-NE40-xpl-filter] if (as-path origin '25') and (ip route-destination in AS25_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] endif
[~My-NE40-xpl-filter] if (as-path origin '26') and (ip route-destination in AS26_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] endif
[~My-NE40-xpl-filter] if (as-path origin '27') and (ip route-destination in AS27_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] endif
[~My-NE40-xpl-filter] if (as-path origin '28') and (ip route-destination in AS28_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] endif
[~My-NE40-xpl-filter] if (as-path origin '29') and (ip route-destination in AS29_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] approve
[~My-NE40-xpl-filter-if] else
[~My-NE40-xpl-filter-else]  refuse
[~My-NE40-xpl-filter-else] endif
[~My-NE40-xpl-filter] end-filter
[*My-NE40]#
[*My-NE40]
[*My-NE40]commit
Error: Failed to commit configuration.
[*My-NE40]
[*My-NE40]
[*My-NE40]clear conf can
[~My-NE40]
[~My-NE40]
[~My-NE40]
[~My-NE40]### 8 - This way DO NOT works! And I don't Know why!
[~My-NE40]### A single IFs, with several ELSEIF. Each one with a compose clause(as-path and route-destination).
[~My-NE40]### Each action with a Call Route-Filter.
[~My-NE40]xpl route-filter Cone_MyCustomer_v4
Warning: The XPL filter or list Cone_MyCustomer_v4 has been configured. New configuration will override the previous one. To exit the configuration, run the abort command.
[~My-NE40-xpl-filter] if (as-path origin '10') and (ip route-destination in AS10_v4) then
[~My-NE40-xpl-filter-if]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] elseif (as-path origin '11') and (ip route-destination in AS11_v4) then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif (as-path origin '12') and (ip route-destination in AS12_v4) then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif (as-path origin '13') and (ip route-destination in AS13_v4) then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif (as-path origin '14') and (ip route-destination in AS14_v4) then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif (as-path origin '15') and (ip route-destination in AS15_v4) then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif (as-path origin '16') and (ip route-destination in AS16_v4) then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif (as-path origin '17') and (ip route-destination in AS17_v4) then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif (as-path origin '18') and (ip route-destination in AS18_v4) then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif (as-path origin '19') and (ip route-destination in AS19_v4) then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif (as-path origin '20') and (ip route-destination in AS20_v4) then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif (as-path origin '21') and (ip route-destination in AS21_v4) then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif (as-path origin '22') and (ip route-destination in AS22_v4) then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif (as-path origin '23') and (ip route-destination in AS23_v4) then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif (as-path origin '24') and (ip route-destination in AS24_v4) then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif (as-path origin '25') and (ip route-destination in AS25_v4) then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif (as-path origin '26') and (ip route-destination in AS26_v4) then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif (as-path origin '27') and (ip route-destination in AS27_v4) then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif (as-path origin '28') and (ip route-destination in AS28_v4) then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif (as-path origin '29') and (ip route-destination in AS29_v4) then
[~My-NE40-xpl-filter-elif]  call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] else
[~My-NE40-xpl-filter-else]  refuse
[~My-NE40-xpl-filter-else] endif
[~My-NE40-xpl-filter] end-filter
[*My-NE40]#
[*My-NE40]
[*My-NE40]
[*My-NE40]commit
Error: Failed to commit configuration.
[*My-NE40]
[*My-NE40]
[*My-NE40]clear conf can
[~My-NE40]
[~My-NE40]

Featured Answers

Recommended answer

chenhui
Admin Created Mar 18, 2020 08:54:50

Hi @fischerdouglas,
Please try creating a new xpl route-filter, rather than override the previous Cone_MyCustomer_v4, it might due to the error occurred before, which causing the override failure.
View more
  • x
  • convention:

fischerdouglas
fischerdouglas Created Apr 1, 2020 14:45:53 (0) (0)
Hello Chenhui.
I tried it...
I also tried exclude all XPL code, commit, and insert it all again.
No-Success.

The solution that I Found was try process each attribute of interest before on several call filters, mark the result of those tests with communities, and on the last call filter, and test the existence of those communities applyed on the same run of the parent call filter.

But its not working...
Apparently, XPL only applies efectively the communities after the end process of th 
All Answers
Hi,
It seems that your configuration has reached a certain specification limit. Can the commit succeed after deleting several elseif commands? No related document is found. It is recommended that you contact the TAC.The R&D should be familiar with the specifications.
View more
  • x
  • convention:

Hi @fischerdouglas,
Please try creating a new xpl route-filter, rather than override the previous Cone_MyCustomer_v4, it might due to the error occurred before, which causing the override failure.
View more
  • x
  • convention:

fischerdouglas
fischerdouglas Created Apr 1, 2020 14:45:53 (0) (0)
Hello Chenhui.
I tried it...
I also tried exclude all XPL code, commit, and insert it all again.
No-Success.

The solution that I Found was try process each attribute of interest before on several call filters, mark the result of those tests with communities, and on the last call filter, and test the existence of those communities applyed on the same run of the parent call filter.

But its not working...
Apparently, XPL only applies efectively the communities after the end process of th 
I discovered a way to make it work!
The problem was the parentheses of the matchs...
I'm pretty sure that the cause is some issue on the interpreter of the XPL.

########

xpl route-filter Action_MyCustomer_v4
if community matches-all {1000:666} and ip route-destination in {0.0.0.0 0 eq 32} then
apply ip next-hop 192.0.2.1
approve
endif
if ip route-destination in {0.0.0.0 0 le 24} then
apply community {1000:1000} additive
approve
endif
end-filter

########

[~My-NE40]xpl route-filter Cone_MyCustomer_v4
Warning: The XPL filter or list Cone_MyCustomer_v4 has been configured. New configuration will override the previous one. To exit the configuration, run the abort command.
[~My-NE40-xpl-filter] if as-path origin '10' and ip route-destination in AS10_v4 then
[~My-NE40-xpl-filter-if] call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-if] elseif as-path origin '11' and ip route-destination in AS11_v4 then
[~My-NE40-xpl-filter-elif] call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '12' and ip route-destination in AS12_v4 then
[~My-NE40-xpl-filter-elif] call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '13' and ip route-destination in AS13_v4 then
[~My-NE40-xpl-filter-elif] call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '14' and ip route-destination in AS14_v4 then
[~My-NE40-xpl-filter-elif] call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '15' and ip route-destination in AS15_v4 then
[~My-NE40-xpl-filter-elif] call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '16' and ip route-destination in AS16_v4 then
[~My-NE40-xpl-filter-elif] call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '17' and ip route-destination in AS17_v4 then
[~My-NE40-xpl-filter-elif] call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '18' and ip route-destination in AS18_v4 then
[~My-NE40-xpl-filter-elif] call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '19' and ip route-destination in AS19_v4 then
[~My-NE40-xpl-filter-elif] call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '20' and ip route-destination in AS20_v4 then
[~My-NE40-xpl-filter-elif] call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '21' and ip route-destination in AS21_v4 then
[~My-NE40-xpl-filter-elif] call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '22' and ip route-destination in AS22_v4 then
[~My-NE40-xpl-filter-elif] call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '23' and ip route-destination in AS23_v4 then
[~My-NE40-xpl-filter-elif] call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '24' and ip route-destination in AS24_v4 then
[~My-NE40-xpl-filter-elif] call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '25' and ip route-destination in AS25_v4 then
[~My-NE40-xpl-filter-elif] call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '26' and ip route-destination in AS26_v4 then
[~My-NE40-xpl-filter-elif] call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '27' and ip route-destination in AS27_v4 then
[~My-NE40-xpl-filter-elif] call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '28' and ip route-destination in AS28_v4 then
[~My-NE40-xpl-filter-elif] call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] elseif as-path origin '29' and ip route-destination in AS29_v4 then
[~My-NE40-xpl-filter-elif] call route-filter Action_MyCustomer_v4
[~My-NE40-xpl-filter-elif] else
[~My-NE40-xpl-filter-else] refuse
[~My-NE40-xpl-filter-else] endif
[~My-NE40-xpl-filter] end-filter
[*My-NE40]#
[*My-NE40]

########
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.