OcNOS-SP : Ansible Guide : Ansible User Guide : ACL Configuration
ACL Configuration
Template File for ACL
ocnos_acl.j2
{%if ACL is defined%}
{% for acl in ACL.params -%}
ip access-list {{ acl.name }}
{{acl.seq_no}} {{acl.permission}} {{acl.protocol}} {{acl.prefix}} {{acl.dst}}
{% endfor %}
end
{%endif%}
 
Sample Parameter File for ACL
sw2.yml
 
ACL:
ACL configurations
params:
ACL parameters configuration
- name: only_lo
Configures the name of the ACL
seq_no: 10
Configures the sequence no. to give the priority to the matched prefixes
permission: permit
Configure the permission type as permit for acl
protocol: any
Configure any command to match any type of protocol packet to match
prefix: 36.0.0.0/24
Configure the prefix to matched
dst: any
Configure the destination address as any
- name: only_lo
Configures the name of the ACL
seq_no: 11
Configures the sequence no. to give the priority to the matched prefixes
permission: deny
Configure the permission type as deny for acl
Last modified date: 06/08/2023