Skip to content

IP Access List

Access lists provide packet filtering and traffic classification on NX-OS through ordered sequences of permit/deny rules that match on Layer 3 and Layer 4 header fields including protocol, source/destination prefixes, ports, DSCP, and TCP flags. Each ACL supports per-ACE statistics, fragment handling policies, address and port groups for object-based matching, ICMP type/code filtering, HTTP method matching, packet length operators, time-range restrictions, VLAN/VNI-based filtering, TTL matching, capture sessions, IGMP type filtering, telemetry actions, and redirect options. Access lists are applied to interfaces for ingress/egress traffic filtering and referenced by other features such as route maps, QoS policies, and DHCP snooping for comprehensive traffic control and security enforcement.

Access lists provide packet filtering and traffic classification on NX-OS through ordered sequences of permit/deny rules that match on Layer 3 and Layer 4 header fields including protocol, source/destination prefixes, ports, DSCP, and TCP flags. Each ACL supports per-ACE statistics, fragment handling policies, address and port groups for object-based matching, ICMP type/code filtering, HTTP method matching, packet length operators, time-range restrictions, and VLAN/VNI-based filtering. Access lists are applied to interfaces for ingress/egress traffic filtering and referenced by other features such as route maps, QoS policies, and DHCP snooping for comprehensive traffic control and security enforcement.

NameTypeConstraintMandatoryDefault Value
ip_access_listsList[ip_access_lists]No

ip_access_lists (nxos.devices.configuration)

Section titled “ip_access_lists (nxos.devices.configuration)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
fragmentsChoicepermit-all, deny-allNo
ignore_routableBooleantrue, falseNo
statistics_per_entryBooleantrue, falseNo
entriesList[entries]No

ip_access_lists (nxos.devices.configuration)

Section titled “ip_access_lists (nxos.devices.configuration)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
fragmentsChoicepermit-all, deny-allNo
statistics_per_entryBooleantrue, falseNo
entriesList[entries]No

entries (nxos.devices.configuration.ip_access_lists)

Section titled “entries (nxos.devices.configuration.ip_access_lists)”
NameTypeConstraintMandatoryDefault Value
sequence_numberIntegermin: 1, max: 4294967295Yes
remarkStringNo
actionChoicepermit, denyNo
protocolAnyChoice[ip, icmp, igmp, tcp, udp, gre, esp, ahp, eigrp, ospf, nos, pim, pcp, ethertype, udf] or String or Integer or String[Regex: ^.*[\$\%]\{.*$]No
sourceClass[source]No
destinationClass[destination]No
dscpIntegermin: 0, max: 63No
fragmentBooleantrue, falseNo
logBooleantrue, falseNo
establishedBooleantrue, falseNo
ackBooleantrue, falseNo
finBooleantrue, falseNo
pshBooleantrue, falseNo
rstBooleantrue, falseNo
synBooleantrue, falseNo
urgBooleantrue, falseNo
icmp_typeIntegermin: 0, max: 255No
icmp_codeIntegermin: 0, max: 255No
icmp_messageStringNo
http_methodChoiceget, put, head, post, delete, trace, connectNo
time_rangeStringNo
redirectStringNo
packet_length_operatorChoicenone, eq, neq, lt, gt, rangeNo
packet_length_1Integermin: 19, max: 9210No
packet_length_2Integermin: 19, max: 9210No
precedenceAnyString or Integer or String[Regex: ^.*[\$\%]\{.*$]No
vlanIntegermin: 0, max: 4095No
vniIntegermin: 0, max: 16777216No
revBooleantrue, falseNo
tcp_flags_maskIntegermin: 0, max: 64No
tcp_option_lengthIntegermin: 0, max: 41No
igmp_typeIntegermin: 0, max: 16No
capture_sessionIntegermin: 0, max: 48No
dscp_maskIntegermin: 0, max: 63No
load_shareBooleantrue, falseNo
priority_allBooleantrue, falseNo
protocol_maskStringNo
redirect_all_interface_typeChoiceethernet, loopback, mgmt, port-channel, vlan, vniNo
redirect_all_interface_idAnyString or Integer[min: 0]No
telemetry_pathBooleantrue, falseNo
telemetry_queueBooleantrue, falseNo
tosIntegermin: 0, max: 15No
ttlIntegermin: 0, max: 255No

entries (nxos.devices.configuration.ip_access_lists)

Section titled “entries (nxos.devices.configuration.ip_access_lists)”
NameTypeConstraintMandatoryDefault Value
sequence_numberIntegermin: 1, max: 4294967295Yes
remarkStringNo
actionChoicepermit, denyNo
protocolAnyString or Integer or String[Regex: ^.*[\$\%]\{.*$]No
sourceClass[source]No
destinationClass[destination]No
dscpIntegermin: 0, max: 63No
fragmentBooleantrue, falseNo
logBooleantrue, falseNo
establishedBooleantrue, falseNo
ackBooleantrue, falseNo
finBooleantrue, falseNo
pshBooleantrue, falseNo
rstBooleantrue, falseNo
synBooleantrue, falseNo
urgBooleantrue, falseNo
icmp_typeIntegermin: 0, max: 256No
icmp_codeIntegermin: 0, max: 256No
icmp_messageStringNo
http_methodChoiceget, put, head, post, delete, trace, connectNo
time_rangeStringNo
redirectStringNo
packet_length_operatorChoicenone, eq, neq, lt, gt, rangeNo
packet_length_1AnyString or Integer or String[Regex: ^.*[\$\%]\{.*$]No
packet_length_2AnyString or Integer or String[Regex: ^.*[\$\%]\{.*$]No
precedenceAnyString or Integer or String[Regex: ^.*[\$\%]\{.*$]No
vlanIntegermin: 0, max: 4095No
vniStringNo
revBooleantrue, falseNo
tcp_flags_maskIntegermin: 0, max: 64No
tcp_option_lengthIntegermin: 0, max: 41No
igmp_typeIntegermin: 0, max: 16No
capture_sessionIntegermin: 0, max: 48No
dscp_maskIntegermin: 0, max: 63No
load_shareBooleantrue, falseNo
priority_allBooleantrue, falseNo
protocol_maskStringNo
redirect_allStringNo
telemetry_pathBooleantrue, falseNo
telemetry_queueBooleantrue, falseNo
tosIntegermin: 0, max: 15No
ttlIntegermin: 0, max: 255No

entries (nxos.devices.configuration.ip_access_lists)

Section titled “entries (nxos.devices.configuration.ip_access_lists)”
NameTypeConstraintMandatoryDefault Value
sequence_numberIntegermin: 1, max: 4294967295Yes
remarkStringNo
actionChoicepermit, denyNo
protocolAnyString or Integer or String[Regex: ^.*[\$\%]\{.*$]No
sourceClass[source]No
destinationClass[destination]No
dscpIntegermin: 0, max: 63No
fragmentBooleantrue, falseNo
logBooleantrue, falseNo
establishedBooleantrue, falseNo
ackBooleantrue, falseNo
finBooleantrue, falseNo
pshBooleantrue, falseNo
rstBooleantrue, falseNo
synBooleantrue, falseNo
urgBooleantrue, falseNo
icmp_typeIntegermin: 0, max: 256No
icmp_codeIntegermin: 0, max: 256No
icmp_messageStringNo
http_methodChoiceget, put, head, post, delete, trace, connectNo
time_rangeStringNo
redirectStringNo
packet_length_operatorChoicenone, eq, neq, lt, gt, rangeNo
packet_length_1AnyString or Integer or String[Regex: ^.*[\$\%]\{.*$]No
packet_length_2AnyString or Integer or String[Regex: ^.*[\$\%]\{.*$]No
precedenceAnyString or Integer or String[Regex: ^.*[\$\%]\{.*$]No
vlanIntegermin: 0, max: 4095No
vniStringNo

source (nxos.devices.configuration.ip_access_lists.entries)

Section titled “source (nxos.devices.configuration.ip_access_lists.entries)”
NameTypeConstraintMandatoryDefault Value
prefixAnyIP or Choice[any] or String[Regex: ^.*[\$\%]\{.*$]No
prefix_lengthIntegermin: 0, max: 32No
prefix_maskIPNo
addrgroupStringNo
port_operatorChoicenone, eq, neq, lt, gt, rangeNo
port_1AnyString or Integer or String[Regex: ^.*[\$\%]\{.*$]No
port_2AnyString or Integer or String[Regex: ^.*[\$\%]\{.*$]No
portgroupStringNo

source (nxos.devices.configuration.ip_access_lists.entries)

Section titled “source (nxos.devices.configuration.ip_access_lists.entries)”
NameTypeConstraintMandatoryDefault Value
prefixStringNo
prefix_lengthIntegermin: 0, max: 32No
prefix_maskStringNo
address_groupStringNo
port_operatorChoicenone, eq, neq, lt, gt, rangeNo
port_1AnyString or Integer or String[Regex: ^.*[\$\%]\{.*$]No
port_2AnyString or Integer or String[Regex: ^.*[\$\%]\{.*$]No
port_groupStringNo

destination (nxos.devices.configuration.ip_access_lists.entries)

Section titled “destination (nxos.devices.configuration.ip_access_lists.entries)”
NameTypeConstraintMandatoryDefault Value
prefixAnyIP or Choice[any] or String[Regex: ^.*[\$\%]\{.*$]No
prefix_lengthIntegermin: 0, max: 32No
prefix_maskIPNo
addrgroupStringNo
port_operatorChoicenone, eq, neq, lt, gt, rangeNo
port_1AnyString or Integer or String[Regex: ^.*[\$\%]\{.*$]No
port_2AnyString or Integer or String[Regex: ^.*[\$\%]\{.*$]No
portgroupStringNo

destination (nxos.devices.configuration.ip_access_lists.entries)

Section titled “destination (nxos.devices.configuration.ip_access_lists.entries)”
NameTypeConstraintMandatoryDefault Value
prefixStringNo
prefix_lengthIntegermin: 0, max: 32No
prefix_maskStringNo
address_groupStringNo
port_operatorChoicenone, eq, neq, lt, gt, rangeNo
port_1AnyString or Integer or String[Regex: ^.*[\$\%]\{.*$]No
port_2AnyString or Integer or String[Regex: ^.*[\$\%]\{.*$]No
port_groupStringNo

Example 1: Management plane protection ACL — restrict SSH and SNMP access to trusted subnets

nxos:
devices:
- name: SPINE1
configuration:
ip_access_lists:
- name: ACL-MGMT-ACCESS
statistics_per_entry: true
entries:
- sequence_number: 10
remark: "Allow SSH from management subnet"
- sequence_number: 20
action: permit
protocol: tcp
source:
prefix: 10.50.202.0
prefix_length: 24
destination:
prefix: any
port_operator: eq
port_1: 22
- sequence_number: 30
remark: "Allow SNMP from monitoring servers"
- sequence_number: 40
action: permit
protocol: udp
source:
prefix: 10.50.100.0
prefix_length: 24
destination:
prefix: any
port_operator: eq
port_1: 161
- sequence_number: 50
remark: "Allow TACACS from AAA servers"
- sequence_number: 60
action: permit
protocol: tcp
source:
prefix: 10.50.100.10
prefix_length: 32
destination:
prefix: any
port_operator: eq
port_1: 49
- sequence_number: 1000
action: deny
protocol: ip
source:
prefix: any
destination:
prefix: any
log: true

Example 2: VXLAN fabric infrastructure ACL — permit BFD, BGP, and VXLAN UDP traffic between spine and leaf

nxos:
devices:
- name: LEAF1
configuration:
ip_access_lists:
- name: ACL-FABRIC-INFRA
statistics_per_entry: true
entries:
- sequence_number: 10
remark: "Allow BGP between fabric peers"
- sequence_number: 20
action: permit
protocol: tcp
source:
prefix: 10.1.10.0
prefix_length: 24
destination:
prefix: 10.1.10.0
prefix_length: 24
port_operator: eq
port_1: 179
- sequence_number: 30
remark: "Allow VXLAN encapsulated traffic"
- sequence_number: 40
action: permit
protocol: udp
source:
prefix: 10.1.200.0
prefix_length: 24
destination:
prefix: 10.1.200.0
prefix_length: 24
port_operator: eq
port_1: 4789
- sequence_number: 50
remark: "Allow ICMP for troubleshooting"
- sequence_number: 60
action: permit
protocol: icmp
source:
prefix: 10.1.0.0
prefix_length: 16
destination:
prefix: 10.1.0.0
prefix_length: 16

Example 3: Tenant traffic filtering ACL with TCP flags, DSCP marking, and logging on a border leaf

nxos:
devices:
- name: BORDER-LEAF1
configuration:
ip_access_lists:
- name: ACL-TENANT-BLUE-IN
statistics_per_entry: true
fragments: deny-all
entries:
- sequence_number: 10
remark: "Allow established TCP sessions"
- sequence_number: 20
action: permit
protocol: tcp
source:
prefix: any
destination:
prefix: 192.168.1.0
prefix_length: 24
established: true
- sequence_number: 30
remark: "Allow HTTPS inbound to web tier"
- sequence_number: 40
action: permit
protocol: tcp
source:
prefix: any
destination:
prefix: 192.168.1.0
prefix_length: 24
port_operator: eq
port_1: 443
dscp: 46
- sequence_number: 50
remark: "Allow DNS queries to tenant DNS"
- sequence_number: 60
action: permit
protocol: udp
source:
prefix: any
destination:
prefix: 192.168.1.0
prefix_length: 24
port_operator: eq
port_1: 53
- sequence_number: 70
remark: "Deny and log all other traffic"
- sequence_number: 80
action: deny
protocol: ip
source:
prefix: any
destination:
prefix: any
log: true

Example 4: Advanced ACL with TTL matching, IGMP filtering, capture session, time-range, and telemetry

nxos:
devices:
- name: LEAF2
configuration:
ip_access_lists:
- name: ACL-ADVANCED-SECURITY
statistics_per_entry: true
ignore_routable: true
entries:
- sequence_number: 10
remark: "Capture suspicious traffic for analysis"
- sequence_number: 20
action: permit
protocol: tcp
source:
prefix: 10.99.0.0
prefix_length: 16
destination:
prefix: any
port_operator: eq
port_1: 443
capture_session: 1
telemetry_queue: true
- sequence_number: 30
remark: "Allow IGMP queries from routers"
- sequence_number: 40
action: permit
protocol: igmp
source:
prefix: 10.1.0.0
prefix_length: 16
destination:
prefix: any
igmp_type: 1
- sequence_number: 50
remark: "Permit ICMP echo with TTL check"
- sequence_number: 60
action: permit
protocol: icmp
source:
prefix: any
destination:
prefix: 172.16.0.0
prefix_length: 12
icmp_message: echo
ttl: 64
- sequence_number: 70
remark: "Allow HTTP during business hours"
- sequence_number: 80
action: permit
protocol: tcp
source:
prefix: 10.20.0.0
prefix_length: 16
destination:
prefix: any
port_operator: eq
port_1: 80
http_method: get
time_range: BUSINESS-HOURS
- sequence_number: 90
remark: "Redirect traffic to inspection appliance"
- sequence_number: 100
action: permit
protocol: ip
source:
prefix: 10.30.0.0
prefix_length: 24
destination:
prefix: any
redirect: eth1/48
load_share: true
- sequence_number: 1000
action: deny
protocol: ip
source:
prefix: any
destination:
prefix: any
log: true

Example 1: Management plane protection ACL — restrict SSH and SNMP access to trusted subnets

nxos:
devices:
- name: SPINE1
configuration:
ip_access_lists:
- name: ACL-MGMT-ACCESS
statistics_per_entry: true
entries:
- sequence_number: 10
remark: "Allow SSH from management subnet"
- sequence_number: 20
action: permit
protocol: tcp
source:
prefix: 10.50.202.0
prefix_length: 24
destination:
prefix: any
port_operator: eq
port_1: 22
- sequence_number: 30
remark: "Allow SNMP from monitoring servers"
- sequence_number: 40
action: permit
protocol: udp
source:
prefix: 10.50.100.0
prefix_length: 24
destination:
prefix: any
port_operator: eq
port_1: 161
- sequence_number: 50
remark: "Allow TACACS from AAA servers"
- sequence_number: 60
action: permit
protocol: tcp
source:
prefix: 10.50.100.10
prefix_length: 32
destination:
prefix: any
port_operator: eq
port_1: 49
- sequence_number: 1000
action: deny
protocol: ip
source:
prefix: any
destination:
prefix: any
log: true

Example 2: VXLAN fabric infrastructure ACL — permit BFD, BGP, and VXLAN UDP traffic between spine and leaf

nxos:
devices:
- name: LEAF1
configuration:
ip_access_lists:
- name: ACL-FABRIC-INFRA
statistics_per_entry: true
entries:
- sequence_number: 10
remark: "Allow BGP between fabric peers"
- sequence_number: 20
action: permit
protocol: tcp
source:
prefix: 10.1.10.0
prefix_length: 24
destination:
prefix: 10.1.10.0
prefix_length: 24
port_operator: eq
port_1: 179
- sequence_number: 30
remark: "Allow VXLAN encapsulated traffic"
- sequence_number: 40
action: permit
protocol: udp
source:
prefix: 10.1.200.0
prefix_length: 24
destination:
prefix: 10.1.200.0
prefix_length: 24
port_operator: eq
port_1: 4789
- sequence_number: 50
remark: "Allow ICMP for troubleshooting"
- sequence_number: 60
action: permit
protocol: icmp
source:
prefix: 10.1.0.0
prefix_length: 16
destination:
prefix: 10.1.0.0
prefix_length: 16

Example 3: Tenant traffic filtering ACL with TCP flags, DSCP marking, and logging on a border leaf

nxos:
devices:
- name: BORDER-LEAF1
configuration:
ip_access_lists:
- name: ACL-TENANT-BLUE-IN
statistics_per_entry: true
fragments: deny-all
entries:
- sequence_number: 10
remark: "Allow established TCP sessions"
- sequence_number: 20
action: permit
protocol: tcp
source:
prefix: any
destination:
prefix: 192.168.1.0
prefix_length: 24
established: true
- sequence_number: 30
remark: "Allow HTTPS inbound to web tier"
- sequence_number: 40
action: permit
protocol: tcp
source:
prefix: any
destination:
prefix: 192.168.1.0
prefix_length: 24
port_operator: eq
port_1: 443
dscp: 46
- sequence_number: 50
remark: "Allow DNS queries to tenant DNS"
- sequence_number: 60
action: permit
protocol: udp
source:
prefix: any
destination:
prefix: 192.168.1.0
prefix_length: 24
port_operator: eq
port_1: 53
- sequence_number: 70
remark: "Deny and log all other traffic"
- sequence_number: 80
action: deny
protocol: ip
source:
prefix: any
destination:
prefix: any
log: true