3.10.12 ACL Ports Configuration

Use this command to configure the Access Control List (ACL) parameters of each switch port. Select the policy to apply to the port and whether forwarding is permitted or denied. Specify which rate limiter to apply on the port and which port frames are redirected on. Specify the mirror, logging, shut down operation, and the port state.

Command Syntax:

access-list policy <policy_id>
access-list action { permit | deny }
access-list rate-limiter <rate_limiter_id>
access-list { redirect } interface { <port_type> <port_type_id> | <port_type> [ <port_type_list> ] }
access-list mirror 
access-list logging
access-list shutdown
access-list port-state 
Table 3-54. Command Description

Argument

Description

Parameter

<policy_id>

The allowed values are 0 through 63. The default value is 0.

{ permit | deny }

Select whether forwarding is permitted or denied. The default value is ‘Permit’.

<rate_limiter_id>

The allowed values are Disabled or the values 1 through 16. The default value is ‘Disabled’.

<port_type>

GigabitEthernet or 2.5GigabitEthernet

<port_type_id>

Port ID in the format of switch-no/port-no

<port_type_list>

List of Port ID, for example, 1/1,3-5;2/2-4,6

Default

N.A

Mode

Port List Interface mode

Usage

Set the port ACL parameters. To revert to the default, use the ‘no’ version of the command.

Example

Example 1:

On port 2 set the policy ID1 with denied forwarding.

(config)# interface GigabitEthernet 1/2
(config-if)# access-list policy 1
(config-if)# access-list action deny

Example 2:

Restore the default access-list policy ID.

(config-if)#no access-list policy