packet and no other packets. Because there is a match clause for IP packets in the VLAN map, the default
action is to drop any IP packet that does not match any of the match clauses.
Switch(config)#
ip access-list extended ip1
Switch(config-ext-nacl)#
permit tcp any any
Switch(config-ext-nacl)#
exit
Switch(config)#
vlan access-map map_1 10
Switch(config-access-map)#
match ip address ip1
Switch(config-access-map)#
action drop
Example: Creating an ACL and a VLAN Map to Permit a Packet
This example shows how to create a VLAN map to permit a packet. ACL
ip2
permits UDP packets and any
packets that match the
ip2
ACL are forwarded. In this map, any IP packets that did not match any of the
previous ACLs (that is, packets that are not TCP packets or UDP packets) would get dropped.
Switch(config)#
ip access-list extended ip2
Switch(config-ext-nacl)#
permit udp any any
Switch(config-ext-nacl)#
exit
Switch(config)#
vlan access-map map_1 20
Switch(config-access-map)#
match ip address ip2
Switch(config-access-map)#
action forward
Example: Default Action of Dropping IP Packets and Forwarding MAC Packets
In this example, the VLAN map has a default action of drop for IP packets and a default action of forward
for MAC packets. Used with standard ACL 101 and extended named access lists
igmp-match
and
tcp-match
,
the map will have the following results:
•
Forward all UDP packets
•
Drop all IGMP packets
•
Forward all TCP packets
•
Drop all other IP packets
•
Forward all non-IP packets
Switch(config)#
access-list 101 permit udp any any
Switch(config)#
ip access-list extended igmp-match
Switch(config-ext-nacl)#
permit igmp any any
Switch(config-ext-nacl)#
permit tcp any any
Switch(config-ext-nacl)#
exit
Switch(config)#
vlan access-map drop-ip-default 10
Switch(config-access-map)#
match ip address 101
Switch(config-access-map)#
action forward
Switch(config-access-map)#
exit
Switch(config)#
vlan access-map drop-ip-default 20
Switch(config-access-map)#
match ip address igmp-match
Switch(config-access-map)#
action drop
Switch(config-access-map)#
exit
Switch(config)#
vlan access-map drop-ip-default 30
Switch(config-access-map)#
match ip address tcp-match
Switch(config-access-map)#
action forward
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
1258
Configuration Examples for ACLs and VLAN Maps
Содержание Catalyst 2960 Series
Страница 78: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches lxxviii Contents ...
Страница 96: ......
Страница 184: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 102 Additional References ...
Страница 195: ...P A R T II IP Multicast Routing Configuring IGMP Snooping and Multicast VLAN Registration page 115 ...
Страница 196: ......
Страница 250: ......
Страница 292: ......
Страница 488: ......
Страница 589: ...P A R T VI Cisco Flexible NetFlow Configuring NetFlow Lite page 509 ...
Страница 590: ......
Страница 619: ...P A R T VII QoS Configuring QoS page 539 Configuring Auto QoS page 645 ...
Страница 620: ......
Страница 749: ...P A R T VIII Routing Configuring IP Unicast Routing page 669 Configuring IPv6 First Hop Security page 677 ...
Страница 750: ......
Страница 796: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 714 Additional References ...
Страница 856: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 774 Additional References ...
Страница 1400: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 1318 Additional References ...
Страница 1546: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 1464 Auto Identity ...
Страница 1596: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 1514 Additional References ...
Страница 1604: ......
Страница 1740: ......
Страница 1764: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 1682 Additional References ...
Страница 1942: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 1860 cli_write ...
Страница 1950: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 1868 context_save ...
Страница 2058: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 1976 event_register_wdsysmon ...
Страница 2076: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 1994 smtp_subst ...
Страница 2090: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 2008 sys_reqinfo_syslog_history ...
Страница 2104: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 2022 unregister_counter ...
Страница 2105: ...P A R T XII Configuring Cisco IOS IP SLAs Configuring Cisco IP SLAs page 2025 ...
Страница 2106: ......
Страница 2118: ......
Страница 2164: ......