Description

This article explains the meaning of the error: "Must be a non-reserved string of 64 characters or less"

Symptoms

While adding a new firewall filter following error may be encountered:

labroot@MX480-re0# set firewall filter 12345678901234567890123456789012345678901234567890123456789012345 term 10 then accept 

error: filter-name: '12345678901234567890123456789012345678901234567890123456789012345': Must be a non-reserved string of 64 characters or less

error: statement creation failed: filter


The filter name is limited to 64 characters or less as the error suggests. In the above example, the filter name has 65 characters

This has also been documented in the below link which outlines this condition under the section "Firewall Filter Terms" - point 2:
You must specify a unique name for each term within a firewall filter. The term name can contain letters, numbers, and hyphens (-) and can be up to 64 characters long. To include spaces in the name, enclose the entire name in quotation marks (“ ”).
https://www.juniper.net/documentation/us/en/software/junos/routing-policy/topics/concept/firewall-filter-stateless-guidelines-for-configuring.html#guidelines-for-configuring-firewall-filters__d34331e290

Solution

If we limit the filter name to 64 characters the error is no longer seen and the commit goes through:

labroot@MX480-re0# set firewall filter 1234567890123456789012345678901234567890123456789012345678901234 term 10 then accept   

 

{master}[edit]

labroot@MX480-re0# commit check 

re0: 

configuration check succeeds

re1: 

configuration check succeeds

 

Modification History

2024-01-12 : Article Created