IP Access Control List Commands

Use these commands to configure IP Access Control List (ACL) settings.

IP ACLs ensure that only authorized users have access to specific resources and block any unwarranted attempts to reach network resources.

The following rules apply to IP ACLs:

  • The maximum number of ACLs you can create is hardware dependent. The limit applies to all ACLs, regardless of type.
  • The maximum number of rules per IP ACL is hardware dependent.
  • If you configure a MAC ACL on an interface, you cannot configure an IP ACL on the same interface.
  • Wildcard masking for ACLs operates differently from a subnet mask. A wildcard mask is in essence the inverse of a subnet mask. With a subnet mask, the mask has ones (1's) in the bit positions that are used for the network address, and has zeros (0's) for the bit positions that are not used. In contrast, a wildcard mask has (0’s) in a bit position that must be checked. A 1 in a bit position of the ACL mask indicates the corresponding bit can be ignored.

access-list

M4250

M4350

This command creates an IP Access Control List (ACL) that is identified by the access list number, which is 1-99 for standard ACLs or 100-199 for extended ACLs. The table with parameters and descriptions describes the parameters for the access-list command.

The sflow-remote-agent option is supported on the M4350 series switch only.

IP Standard ACL:

Format access-list 1-99 [{remark comment | [sequence-number]}] {deny | permit} {every | srcip srcmask | host srcip} [time-range time-range-name] [log] [assign-queue queue-id] [{mirror | redirect} {unit/slot/port | lag lag-group-id}] [rate-limit rate burst-size] [sflow-remote-agent]
Mode Global Config

IP Extended ACL:

Format access-list 100-199 [{remark comment | [sequence-number]}] {deny | permit} {every | {{eigrp | gre | icmp | igmp | ip | ipinip | ospf | pim | tcp | udp | 0-255} {srcip srcmask | any | host srcip} [range {portkey | startport} {portkey | endport} {eq | neq | lt | gt} {portkey | 0-65535} {dstip dstmask | any | host dstip} [{range {portkey | startport} {portkey | endport} | {eq | neq | lt | gt} {portkey | 0-65535}] [flag [+fin | -fin] [+syn | -syn] [+rst | -rst] [+psh | -psh] [+ack | -ack] [+urg | -urg] [established]] [icmp-type icmp-type [icmp-code icmp-code] | icmp-message icmp-message] [igmp-type igmp-type] [fragments] [precedence precedence | tos tos [tosmask] | dscp dscp] [ttl eq 0-255]}} [time-range time-range-name] [log] [assign-queue queue-id] [{mirror | redirect} {unit/slot/port | lag lag-group-id}] [rate-limit rate burst-size] [sflow-remote-agent]
Mode Global Config

IPv4 extended ACLs have the following limitations for egress ACLs:

  • Match on port ranges is not supported.
  • The rate-limit command is not supported.
Note: An implicit deny all IP rule always terminates the access list.
Note: The mirror parameter allows the traffic matching this rule to be copied to the specified interface, while the redirect parameter allows the traffic matching this rule to be forwarded to the specified interface. The assign-queue and redirect parameters are only valid for a permit rule.

The time-range parameter allows imposing time limitation on the IP ACL rule as defined by the specified time range. If a time range with the specified name does not exist and the ACL containing this ACL rule is applied to an interface or bound to a VLAN, then the ACL rule is applied immediately. If a time range with specified name exists and the ACL containing this ACL rule is applied to an interface or bound to a VLAN, then the ACL rule is applied when the time-range with specified name becomes active. The ACL rule is removed when the time-range with specified name becomes inactive. For information about configuring time ranges, see Time Range Commands for Time-Based ACLs.

The assign-queue parameter allows specification of a particular hardware queue for handling traffic that matches this rule. The allowed queue-id value is 0-(n-1), in which n is the number of user configurable queues available for the hardware platform:

  • M4250 series switch: from 0 to 7.
  • M4350 series switch: from 0 to 6.

The assign-queue parameter is valid only for a permit rule.

The permit command’s optional attribute rate-limit allows you to permit only the allowed rate of traffic as per the configured rate in kbps, and burst-size in kbytes.

The sflow-remote-agent option is supported on the M4350 series switch only.

Parameter Description
1-99 or 100-199 Range 1 to 99 is the access list number for an IP standard ACL. Range 100 to 199 is the access list number for an IP extended ACL.
remark comment Use the remark keyword and comment parameter to add a comment (remark) to an IP standard or IP extended ACL. The remarks make the ACL easier to understand and scan. Each remark is limited to 100 characters. A remark can consist of characters in the range A–Z, a–z, and 0–9, and of special characters: space, hyphen, underscore. Remarks are displayed only in the output of the show running configuration command. For each IP standard or IP extended ACL rule, you can add one remark. You can remove only remarks that are not associated with a rule. Remarks that are associated with a rule are removed when the rule is removed.
sequence-number

The sequence-number parameter specifies the sequence number for the ACL rule. Either you define the sequence number or it is generated.

If no sequence number exists for a rule, a sequence number that is 10 greater than the last sequence number in the ACL is used and the rule is placed at the end of the list. If this is the first ACL rule in the ACL, a sequence number of 10 is assigned. If the calculated sequence number exceeds the maximum sequence number value, the creation of the ACL rule fails. You cannot create a rule that duplicates an already existing one and you cannot configure a rule with a sequence number that is already used for another rule.

For example, if you add a new ACL rule to the ACL without specifying a sequence number, the rule is placed at the bottom of the list. By changing the sequence number, you can move the ACL rule to a different position in the ACL.

{deny | permit}

Specifies whether the IP ACL rule permits or denies an action.

Note: For 5630x and 5650x-based systems, assign-queue, redirect, and mirror attributes are configurable for a deny rule, but they have no operational effect.
every Match every packet.
{eigrp | gre | icmp | igmp | ip | ipinip | ospf | pim | tcp | udp | 0-255} Specifies the protocol to filter for an extended IP ACL rule.
srcip srcmask | any | host srcip

Specifies a source IP address and source netmask for match condition of the IP ACL rule.

Specifying any specifies srcip as 0.0.0.0 and srcmask as 255.255.255.255.

Specifying host A.B.C.D specifies srcip as A.B.C.D and srcmask as 0.0.0.0.

[{range {portkey | startport} {portkey | endport} | {eq | neq | lt | gt} {portkey | 0-65535}]
Note: This option is available only if the protocol is TCP or UDP.

Specifies the source layer 4 port match condition for the IP ACL rule. You can use the port number, which ranges from 0-65535, or you specify the portkey, which can be one of the following keywords:

  • For TCP: bgp, domain, echo, ftp, ftp-data, http, smtp, telnet, www, pop2, or pop3.
  • For UDP: domain, echo, ntp, rip, snmp, tftp, time, or who.

For both TCP and UDP, each of these keywords translates into its equivalent port number, which is used as both the start and end of a port range.

If range is specified, the IP ACL rule matches only if the layer 4 port number falls within the specified port range. The startport and endport parameters identify the first and last ports that are part of the port range. They have values from 0 to 65535. The ending port must have a value equal to or greater than the starting port. The starting port, ending port, and all ports in between will be part of the layer 4 port range.

When eq is specified, the IP ACL rule matches only if the layer 4 port number is equal to the specified port number or portkey.

When lt is specified, IP ACL rule matches if the layer 4 port number is less than the specified port number or portkey. It is equivalent to specifying the range as 0 to <specified port number – 1>.

When gt is specified, the IP ACL rule matches if the layer 4 port number is greater than the specified port number or portkey. It is equivalent to specifying the range as <specified port number + 1> to 65535.

When neq is specified, IP ACL rule matches only if the layer 4 port number is not equal to the specified port number or portkey.

Two rules are added in the hardware one with range equal to 0 to <specified port number - 1> and one with range equal to <specified port number + 1 to 65535>.

Note: Port number matches only apply to unfragmented or first fragments.
dstip dstmask | any | host dstip

Specifies a destination IP address and netmask for match condition of the IP ACL rule.

Specifying any implies specifying dstip as 0.0.0.0 and dstmask as 255.255.255.255.

Specifying host A.B.C.D implies dstip as A.B.C.D and dstmask as 0.0.0.0.

[precedence precedence | tos tos [tosmask] | dscp dscp] Specifies the TOS for an IP ACL rule depending on a match of precedence or DSCP values using the parameters precedence, tos or dscp. tosmask is an optional parameter.
flag [+fin | -fin] [+syn | -syn] [+rst | -rst] [+psh | -psh] [+ack | -ack] [+urg | -urg] [established]
Note: This option is available only if the protocol is tcp.

Specifies that the IP ACL rule matches on the TCP flags.

When +<tcpflagname> is specified, a match occurs if the specified <tcpflagname> flag is set in the TCP header.

When -<tcpflagname> is specified, a match occurs if the specified <tcpflagname> flag is not set in the TCP header.

When established is specified, a match occurs if the specified RST or ACK bits are set in the TCP header. Two rules are installed in the hardware when the established option is specified.

[icmp-type icmp-type [icmp-code icmp-code] | icmp-message icmp-message]
Note: This option is available only if the protocol is icmp.

Specifies a match condition for ICMP packets.

When icmp-type is specified, the IP ACL rule matches on the specified ICMP message type, a number from 0 to 255.

When icmp-code is specified, the IP ACL rule matches on the specified ICMP message code, a number from 0 to 255.

Specifying icmp-message implies that both icmp-type and icmp-code are specified. The following icmp-message options are supported: echo, echo-reply, host-redirect, mobile-redirect, net-redirect, net-unreachable, redirect, packet-too-big, port-unreachable, source-quench, router-solicitation, router-advertisement, time-exceeded, ttl-exceeded, and unreachable.

igmp-type igmp-type

This option is available only if the protocol is igmp.

When igmp-type is specified, the IP ACL rule matches on the specified IGMP message type, a number from 0 to 255.

[ttl eq 0-255] Specifies that the TTL value in the packet must be equal to the TTL value, which can be from 0 to 255.
fragments Specifies that the IP ACL rule matches on fragmented IP packets.
[log] Specifies that this rule is to be logged.
[time-range time-range-name] Allows imposing time limitation on the ACL rule as defined by the parameter time-range-name. If a time range with the specified name does not exist and the ACL containing this ACL rule is applied to an interface or bound to a VLAN, then the ACL rule is applied immediately. If a time range with specified name exists and the ACL containing this ACL rule is applied to an interface or bound to a VLAN, the ACL rule is applied when the time-range with specified name becomes active. The ACL rule is removed when the time-range with specified name becomes inactive. For information about configuring time ranges, see Time Range Commands for Time-Based ACLs.
[assign-queue queue-id]

Specifies the assign-queue, which is the queue identifier to which packets matching this rule are assigned:

  • M4250 series switch: from 0 to 7.
  • M4350 series switch: from 0 to 6.
[{mirror | redirect} {unit/slot/port | lag lag-group-id}]

Specifies the mirror or redirect interface or lag-group-id to which packets matching this rule are copied or forwarded. To specify an actual interface or port, do the following:

  • For an M4250 series switch, use the argument slot/port.
  • For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.
[rate-limit rate burst-size] Specifies the allowed rate of traffic as per the configured rate in kbps, and burst-size in kbytes.
[sflow-remote-agent] This option is supported on the M4350 series switch only. Specifies that sFlow sampling must occur, allowing packets that are matching the rule to be copied to the remote sFlow agent.

no access-list

This command deletes an IP ACL that is identified by the parameter accesslistnumber from the system. The range for accesslistnumber is 1–99 for standard access lists and 100–199 for extended access lists.

Format no access-list accesslistnumber
Mode Global Config

ip access-list

M4250

M4350

This command creates an extended IP Access Control List (ACL) identified by name, consisting of classification fields defined for the IP header of an IPv4 frame. The name parameter is a case-sensitive alphanumeric string from 1 to 31 characters uniquely identifying the IP access list. The rate-limit attribute configures the committed rate and the committed burst size.

If an IP ACL by this name already exists, this command enters IPv4-Access-List config mode to allow updating the existing IP ACL.

Note: The CLI mode changes to IPv4-Access-List Config mode when you successfully execute this command.
Format ip access-list name
Mode Global Config

no ip access-list

This command deletes the IP ACL identified by name from the system.

Format no ip access-list name
Mode Global Config

ip access-list resequence

M4250

M4350

Use this command to renumber the sequence of the entries for a specified IP access list with a specified increment value, starting from a specified sequence number. That is, with this command you can change the sequence numbers of ACL rules in the ACL and, therefore, change the order in which entries are applied. This command is not saved in the startup configuration and does not display in the running configuration.

Note: If the generated sequence number exceeds the maximum sequence number, the ACL rule creation fails and an informational message displays.
Default 10
Format ip access-list resequence {name | id} starting-sequence-number increment
Mode Global Config
Parameter Description
name The name of the access control list.
id The ID of the access control list.
starting-sequence-number The sequence number from which to start the renumbering. The range is 1–2147483647. The default is 10.
increment The value with which the sequence numbers must be incremented. The range is 1–2147483647. The default is 10.

ip access-list rename

M4250

M4350

This command changes the name of an IP Access Control List (ACL). The name parameter is the name of an existing IP ACL. The newname parameter is a case-sensitive alphanumeric string from 1 to 31 characters uniquely identifying the IP access list.

This command fails if an IP ACL by the name that is defined by newname already exists.

Format ip access-list rename name newname
Mode Global Config

[sequence-number] {deny | permit} (IP ACL)

M4250

M4350

This command creates a new rule for the current IP access list. Each rule is appended to the list of configured rules for the list. A rule may either deny or permit traffic according to the specified classification fields. At a minimum, either the every keyword or the protocol, source address, and destination address values must be specified. The source and destination IP address fields may be specified using the keyword any to indicate a match on any value in that field. The remaining command parameters are all optional, but the most frequently used parameters appear in the same relative order as shown in the command format.

Format [sequence-number] {deny | permit} {every | {{eigrp | gre | icmp | igmp | ip | ipinip | ospf | pim | tcp | udp | 0-255} {srcip srcmask | any | host srcip} [{range {portkey | startport} {portkey | endport} | {eq | neq | lt | gt} {portkey | 0-65535}] {dstip dstmask | any | host dstip} [{range {portkey | startport} {portkey | endport} | {eq | neq | lt | gt} {portkey | 0-65535}] [flag [+fin | -fin] [+syn | -syn] [+rst | -rst] [+psh | -psh] [+ack | -ack] [+urg | -urg] [established]] [icmp-type icmp-type [icmp-code icmp-code] | icmp-message icmp-message] [igmp-type igmp-type] [fragments] [precedence precedence | tos tos [tosmask] | dscp dscp] [ttl eq 0-255]}} [time-range time-range-name] [log] [assign-queue queue-id] [{mirror | redirect} {unit/slot/port | lag lag-group-id}] [rate-limit rate burst-size] [sflow-remote-agent]
Mode IPv4-Access-List Config
Note: An implicit deny all IP rule always terminates the access list.
Note: The mirror parameter allows the traffic matching this rule to be copied to the specified interface, while the redirect parameter allows the traffic matching this rule to be forwarded to the specified interface. The assign-queue and redirect parameters are only valid for a permit rule.

For IPv4, the following are not supported for egress ACLs:

  • A match on port ranges.
  • The rate-limit command.

The time-range parameter allows imposing time limitation on the IP ACL rule as defined by the specified time range. If a time range with the specified name does not exist and the ACL containing this ACL rule is applied to an interface or bound to a VLAN, then the ACL rule is applied immediately. If a time range with specified name exists and the ACL containing this ACL rule is applied to an interface or bound to a VLAN, then the ACL rule is applied when the time-range with specified name becomes active. The ACL rule is removed when the time-range with specified name becomes inactive. For information about configuring time ranges, see Time Range Commands for Time-Based ACLs.

The assign-queue parameter allows specification of a particular hardware queue for handling traffic that matches this rule. The allowed queue-id value is 0-(n-1), in which n is the number of user configurable queues available for the hardware platform:

  • M4250 series switch: from 0 to 7.
  • M4350 series switch: from 0 to 6.

The assign-queue parameter is valid only for a permit rule.

The permit command’s optional attribute rate-limit allows you to permit only the allowed rate of traffic as per the configured rate in kbps, and burst-size in kbytes.

The sflow-remote-agent option is supported on the M4350 series switch only.

Table 1. IP ACL command parameters
Parameter Description
sequence-number

The sequence-number parameter specifies the sequence number for the ACL rule. Either you define the sequence number or it is generated.

If no sequence number exists for a rule, a sequence number that is 10 greater than the last sequence number in the ACL is used and the rule is placed at the end of the list. If this is the first ACL rule in the ACL, a sequence number of 10 is assigned. If the calculated sequence number exceeds the maximum sequence number value, the creation of the ACL rule fails. You cannot create a rule that duplicates an already existing one and you cannot configure a rule with a sequence number that is already used for another rule.

For example, if you add a new ACL rule to the ACL without specifying a sequence number, the rule is placed at the bottom of the list. By changing the sequence number, you can move the ACL rule to a different position in the ACL.

{deny | permit} Specifies whether the IP ACL rule permits or denies the matching traffic.
every Match every packet.
{eigrp | gre | icmp | igmp | ip | ipinip | ospf | pim | tcp | udp | 0-255} Specifies the protocol to match for the IP ACL rule.
srcip srcmask | any | host srcip

Specifies a source IP address and source netmask to match for the IP ACL rule.

Specifying “any” implies specifying srcip as “0.0.0.0” and srcmask as “255.255.255.255”.

Specifying “host A.B.C.D” implies srcip as “A.B.C.D” and srcmask as “0.0.0.0”.

[{range {portkey | startport} {portkey | endport} | {eq | neq | lt | gt} {portkey | 0-65535}]
Note: This option is available only if the protocol is tcp or udp.

Specifies the layer 4 port match condition for the IP ACL rule. Port number can be used, which ranges from 0-65535, or the portkey, which can be one of the following keywords:

For tcp protocol: bgp, domain, echo, ftp, ftp-data, http, smtp, telnet, www, pop2, or pop3.

For udp protocol: domain, echo, ntp, rip, snmp, tftp, time, or who.

Each of these keywords translates into its equivalent port number.

When range is specified, the IP ACL rule matches only if the layer 4 port number falls within the specified port range. The startport and endport parameters identify the first and last ports that are part of the port range. They have values from 0 to 65535. The ending port must have a value equal to or greater than the starting port. The starting port, ending port, and all ports in between will be part of the layer 4 port range.

When eq is specified, IP ACL rule matches only if the layer 4 port number is equal to the specified port number or portkey.

When lt is specified, IP ACL rule matches if the layer 4 port number is less than the specified port number or portkey. It is equivalent to specifying the range as 0 to <specified port number – 1>.

When gt is specified, IP ACL rule matches if the layer 4 port number is greater than the specified port number or portkey. It is equivalent to specifying the range as <specified port number + 1> to 65535.

When neq is specified, IP ACL rule matches only if the layer 4 port number is not equal to the specified port number or port key. Two rules are added in the hardware one with range equal to 0 to <specified port number - 1> and one with range equal to <specified port number + 1 to 65535>.

Note: Port number matches only apply to unfragmented or first fragments.
dstip dstmask | any | host dstip

Specifies a destination IP address and netmask for match condition of the IP ACL rule.

Specifying any implies specifying dstip as 0.0.0.0 and dstmask as 255.255.255.255.

Specifying host A.B.C.D implies dstip as A.B.C.D and dstmask as 0.0.0.0.

[precedence precedence | tos tos [tosmask] | dscp dscp] Specifies the TOS for an IP ACL rule depending on a match of precedence or DSCP values using the parameters precedence, tos or dscp. tosmask is an optional parameter.
flag [+fin | -fin] [+syn | -syn] [+rst | -rst] [+psh | -psh] [+ack | -ack] [+urg | -urg] [established]

Specifies that the IP ACL rule matches on the tcp flags.

When +<tcpflagname> is specified, a match occurs if the specified <tcpflagname> flag is set in the TCP header.

When -<tcpflagname> is specified, a match occurs if the specified <tcpflagname> flag is NOT set in the TCP header.

When established is specified, a match occurs if either the specified RST or ACK bits are set in the TCP header. Two rules are installed in hardware when the established option is specified.

This option is available only if protocol is tcp.

[icmp-type icmp-type [icmp-code icmp-code] | icmp-message icmp-message]
Note: This option is available only if the protocol is ICMP.

Specifies a match condition for ICMP packets.

When icmp-type is specified, IP ACL rule matches on the specified ICMP message type, a number from 0 to 255.

When icmp-code is specified, IP ACL rule matches on the specified ICMP message code, a number from 0 to 255.

Specifying icmp-message implies both icmp-type and icmp-code are specified. The following icmp-message options are supported: echo, echo-reply, host-redirect, mobile-redirect, net-redirect, net-unreachable, redirect, packet-too-big, port-unreachable, source-quench, router-solicitation, router-advertisement, time-exceeded, ttl-exceeded, and unreachable.

The ICMP message is decoded into corresponding ICMP type and ICMP code within that ICMP type.

igmp-type igmp-type
Note: This option is visible only if the protocol is IGMP.

When igmp-type is specified, the IP ACL rule matches on the specified IGMP message type, a number from 0 to 255.

[ttl eq 0-255] Specifies that the TTL value in the packet must be equal to the TTL value, which can be from 0 to 255.
fragments Specifies that the IP ACL rule matches on noninitial fragmented packets where the fragment extension header contains a nonzero fragment offset. The fragments keyword is an option only if the protocol is ipv6 and the operator port-number arguments are not specified.
log Specifies that this rule is to be logged.
time-range time-range-name Allows imposing a time limitation on the ACL rule as defined by the parameter time-range-name. If a time range with the specified name does not exist and the ACL containing this ACL rule is applied to an interface or bound to a VLAN, the ACL rule is applied immediately. If a time range with specified name exists and the ACL containing this ACL rule is applied to an interface or bound to a VLAN, the ACL rule is applied when the time-range with specified name becomes active. The ACL rule is removed when the time-range with specified name becomes inactive.
[assign-queue queue-id]

Specifies the assign-queue, which is the queue identifier to which packets matching this rule are assigned:

  • M4250 series switch: from 0 to 7.
  • M4350 series switch: from 0 to 6.
[{mirror | redirect} {unit/slot/port | lag lag-group-id}]

Specifies the mirror or redirect interface or lag-group-id to which packets matching this rule are copied or forwarded. To specify an actual interface or port, do the following:

  • For an M4250 series switch, use the argument slot/port.
  • For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.
rate-limit rate burst-size Specifies the allowed rate of traffic as per the configured rate in kbps, and burst-size in kbytes.
[sflow-remote-agent] This option is supported on the M4350 series switch only. Specifies that sFlow sampling must occur, allowing packets that are matching the rule to be copied to the remote sFlow agent.

Command example:

CODE
(NETGEAR Switch) (Config)#ip access-list ip1

(NETGEAR Switch) (Config-ipv4-acl)#permit icmp any any rate-limit 32 16

(NETGEAR Switch) (Config-ipv4-acl)#exit

no sequence-number (IP ACL)

Use this command to remove the ACL rule with the specified sequence number from the ACL.

Format no sequence-number
Modes IPv4-Access-List Config

ip access-group

M4250

M4350

This command either attaches a specific IP Access Control List (ACL) identified by acl-number or name to an interface, range of interfaces, or all interfaces; or associates it with a VLAN ID in a specific direction. The parameter name is the name of the Access Control List.

An optional sequence number may be specified to indicate the order of this IP access list relative to other IP access lists already assigned to this interface and direction. A lower number indicates higher precedence order. If a sequence number is already in use for this interface and direction, the specified access list replaces the currently attached IP access list using that sequence number. If the sequence number is not specified for this command, a sequence number that is one greater than the highest sequence number currently in use for this interface and direction is used.

An optional control-plane is specified to apply the ACL on CPU port. The IPv4 control packets like RADIUS and TACACS+ are also dropped because of the implicit deny all rule added at the end of the list. To overcome this, permit rules must be added to allow the IPv4 control packets.

Note: The control-plane keyword is available only in Global Config mode. Depending on the platform, the out option might not be available.
Default none
Format ip access-group {acl-number | name} {{control-plane | in | out} | vlan vlan-id {in | out}} [sequence 1-4294967295]
Modes

Interface Config

Global Config

Parameter Description
acl-number Identifies a specific IP ACL. The range is 1 to 199.
name The name of the Access Control List.
vlan-id A VLAN ID associated with a specific IP ACL.
sequence An optional sequence number that indicates the order of this IP access list relative to the other IP access lists already assigned to this interface and direction. The range is 1 to 4294967295.
CODE
(NETGEAR Switch) (Config)#ip access-group ip1 control-plane

no ip access-group

This command removes a specified IP ACL from an interface.

Default none
Format no ip access-group {acl-number | name} {{control-plane | in | out} | vlan vlan-id {in | out}}
Mode

Interface Config

Global Config

Command example:

CODE
(NETGEAR Switch)(Config)#no ip access-group ip1 control-plane

acl-trapflags

M4250

M4350

This command enables the ACL trap mode.

Default disabled
Format acl-trapflags
Mode Global Config

no acl-trapflags

This command disables the ACL trap mode.

Format no acl-trapflags
Mode Global Config

show ip access-lists

M4250

M4350

Use this command to view summary information about all IP ACLs that are configured on the switch. To view more detailed information about a specific access list, specify the ACL number or name that is used to identify the IP ACL. The command output displays the committed rate, committed burst size, and the number of packets that match a configured ACL rule within an ACL (referred to as ACL hit count).

Format show ip access-lists [acl-number | name]
Mode Privileged EXEC
Term Definition
ACL ID/Name Identifies the configured ACL number or name.
Rules Identifies the number of rules configured for the ACL.
Direction Shows whether the ACL is applied to traffic coming into the interface (ingress) or leaving the interface (egress).
Interface(s) Identifies the interface(s) to which the ACL is applied (ACL interface bindings).
VLAN(s) Identifies the VLANs to which the ACL is applied (ACL VLAN bindings).

If you specify an IP ACL number or name, the following information displays:

Note: Only the access list fields that you configure are displayed. Thus, the command output varies based on the match criteria configured within the rules of an ACL.
Term Definition
Rule Number The number identifier for each rule that is defined for the IP ACL.
Action The action associated with each rule. The possible values are Permit or Deny.
Match All Indicates whether this access list applies to every packet. Possible values are True or False.
Protocol The protocol to filter for this rule.
ICMP Type
Note: This is shown only if the protocol is ICMP.

The ICMP message type for this rule.

Starting Source L4 port The starting source layer 4 port.
Ending Source L4 port The ending source layer 4 port.
Starting Destination L4 port The starting destination layer 4 port.
Ending Destination L4 port The ending destination layer 4 port.
ICMP Code
Note: This is shown only if the protocol is ICMP.

The ICMP message code for this rule.

Fragments If the ACL rule matches on fragmented IP packets.
Committed Rate The committed rate defined by the rate-limit attribute.
Committed Burst Size The committed burst size defined by the rate-limit attribute.
Source IP Address The source IP address for this rule.
Source IP Mask The source IP Mask for this rule.
Source L4 Port Keyword The source port for this rule.
Destination IP Address The destination IP address for this rule.
Destination IP Mask The destination IP Mask for this rule.
Destination L4 Port Keyword The destination port for this rule.
IP DSCP The value specified for IP DSCP.
IP Precedence The value specified for IP Precedence.
IP TOS The value specified for IP TOS.
Log Displays when you enable logging for the rule.
Assign Queue The queue identifier to which packets matching this rule are assigned.
Mirror Interface The unit/port to which packets matching this rule are copied.
Redirect Interface The unit/port to which packets matching this rule are forwarded.
Time Range Name Displays the name of the time-range if the IP ACL rule has referenced a time range.
Rule Status Status (Active/Inactive) of the IP ACL rule.
ACL Hit Count

The number of packets that match a configured ACL rule within an ACL (referred to as ACL hit count). The counter resets to 0 when the maximum value is reached. A dedicated counter exists for each ACL rule. ACL counters do not interact with PBR counters.

For an ACL with multiple rules, if a match occurs for a specific rule, the counter that is associated with this rule increments. For example, if an ACL includes three rules, when a match occurs for rule 2, the counter for rule 3 does not increment.

For ACL counters, if an ACL rule is configured without a rate limit condition, the counter shows the number of forwarded and or discarded packets. (For example, for a burst of 100 packets, the counter shows 100.)

If the ACL rule is configured with a rate limit condition, the counter shows the number of packets that match the condition:

  • If the packets are sent at a rate that is lower than the configured rate limit, the counter displays the number of packets that match the condition.
  • If the packets are sent at a rate that exceeds the configured rate limit, the counter still displays the number of packets that match the condition, even though packets are dropped beyond the configured limit. In this situation, the number of packets that match the condition equals the rate at which the packets are sent.

    For example, if the rate limit condition is 10 kbps but the matching traffic is sent at 100 kbps, the counter increments with 100 kbps.

Either way, only the number of packets that match the condition is reflected in the counter, irrespective of whether they are dropped or forwarded.

ACL counters do not interact with diffserv policies.

Command example:

CODE
(NETGEAR Switch) #show ip access-lists ip1

ACL Name: ip1
Inbound Interface(s): 1/0/30
Rule Number: 1
Action......................................... permit
Match All...................................... FALSE
Protocol....................................... 1(icmp)
Committed Rate................................. 32
Committed Burst Size........................... 16
ACL hit count ...............................0

show access-lists interface

M4250

M4350

This command displays IP ACLs, IPv6 ACLs, and MAC access control lists information for a designated interface and direction (in or out). To specify an actual interface or port, do the following:

  • For an M4250 series switch, use the argument slot/port.
  • For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.

Use lag lag-intf-num to specify the LAG interface, in which lag-intf-num is the LAG port number.

Use the control-plane keyword to display the ACLs applied on the CPU port.

Format show access-lists interface {unit/slot/port | lag lag-int-num} {in | out | control-plane}
Mode Privileged EXEC
Term Definition
ACL Type Type of access list (IP, IPv6, or MAC).
ACL ID Access List name for a MAC or IPv6 access list or the numeric identifier for an IP access list.
Sequence Number A sequence number indicates the order of the access list relative to other access lists already assigned to this interface and direction.
in or out
  • in – Display Access List information for a particular interface and the in direction.
  • out – Display Access List information for a particular interface and the out direction.

Command example:

CODE
(NETGEAR Switch) #show access-lists interface control-plane

ACL Type         ACL ID                           Sequence Number
--------         -------------------------------  ---------------
IPv6             ip61                             1

show access-lists vlan

M4250

M4350

This command displays access list information for a particular VLAN ID. The vlan-id parameter is the VLAN ID of the VLAN with the information to view. The in and out options specify the direction of the VLAN ACL information to view.

Format show access-lists vlan vlan-id [in | out]
Mode Privileged EXEC
Term Definition
ACL Type Type of access list (IP, IPv6, or MAC).
ACL ID Access List name for a MAC or IPv6 access list or the numeric identifier for an IP access list.
Sequence Number A sequence number indicates the order of the access list relative to other access lists already assigned to this interface and direction.
in or out
  • in – Display Access List information for a particular interface and the in direction.
  • out – Display Access List information for a particular interface and the out direction.