Associate ports with an ACL

Associate ports with an ACL to apply filters to port traffic.

A port can be part of two different ACLs of different types: IPv6 and non-IPv6.

Before you begin

  • The ACL exists.

Procedure

  1. Enter Global Configuration mode:

    enable

    configure terminal

  2. Associate port interfaces with a particular ACL:

    filter acl port <1-2048> {slot/port[/sub-port][-slot/port[/sub-port]][,...]}

  3. Remove port interfaces from a particular ACL:

    no filter acl port <1-2048> {slot/port[/sub-port][-slot/port[/sub-port]][,...]}

Variable definitions

Use the data in the following table to use the filter acl port command.

Variable

Value

<1-2048>

Specifies the ACL ID.

{slot/port[/sub-port] [-slot/port[/sub-port]] [,...]}

Identifies the slot and port in one of the following formats: a single slot and port (slot/port), a range of slots and ports (slot/port-slot/port), or a series of slots and ports (slot/port,slot/port,slot/port). If the platform supports channelization and the port is channelized, you must also specify the sub-port in the format slot/port/sub-port.