Define the IP ACL that will match the correct packets.
Switch(config)#
ip access-list extended SERVER1_ACL
Switch(config-ext-nacl))#
permit ip 10.1.2.0 0.0.0.255 host 10.1.1.100
Switch(config-ext-nacl))#
permit ip host 10.1.1.4 host 10.1.1.100
Switch(config-ext-nacl))#
permit ip host 10.1.1.8 host 10.1.1.100
Switch(config-ext-nacl))#
exit
Define a VLAN map using this ACL that will drop IP packets that match SERVER1_ACL and forward IP
packets that do not match the ACL.
Switch(config)#
vlan access-map SERVER1_MAP
Switch(config-access-map)#
match ip address SERVER1_ACL
Switch(config-access-map)#
action drop
Switch(config)#
vlan access-map SERVER1_MAP 20
Switch(config-access-map)#
action forward
Switch(config-access-map)#
exit
Apply the VLAN map to VLAN 10.
Switch(config)#
vlan filter SERVER1_MAP vlan-list 10
Configuration Examples of Router ACLs and VLAN Maps Applied to VLANs
This section gives examples of applying router ACLs and VLAN maps to a VLAN for switched, bridged,
routed, and multicast packets. Although the following illustrations show packets being forwarded to their
destination, each time the packet
’
s path crosses a line indicating a VLAN map or an ACL, it is also possible
that the packet might be dropped, rather than forwarded.
Example: ACLs and Switched Packets
This example shows how an ACL is applied on packets that are switched within a VLAN. Packets switched
within the VLAN without being routed or forwarded by fallback bridging are only subject to the VLAN map
of the input VLAN.
Catalyst 2960-X Switch Security Configuration Guide, Cisco IOS Release 15.0(2)EX
OL-29048-01
191
Configuring IPv4 ACLs
Configuration Examples of Router ACLs and VLAN Maps Applied to VLANs