Configuring an ACL for IPv4

These steps are part of the ACL example for IPv4.

Procedure
  1. Create an ACL. The following example creates an IPv4 ACL named FILTER_TO_HOST_B:

    switch(config)# access-list ip FILTER_TO_HOST_B

  2. To deny access to an IP protocol from 192.168.1.2 to 192.168.2.2, which includes Host B, enter:

    switch(config-acl-ip)# deny any 192.168.1.2 192.168.2.2 log

  3. To allow access from any other IP address, enter:

    switch(config-acl-ip)# permit any any any

  4. To apply the FILTER_TO_HOST_B ACL to inbound (ingress) traffic, enter:

    switch(config-if)# apply access-list ip FILTER_TO_HOST_B in