access-list ipv6

句法

语法创建IPv6 ACL并输入其上下文。加上语法以删除ACL:

access-list ipv6no access-list ipv6

语法(在ACL上下文中)用于创建或删除协议的ACE,,,,格雷,,,,esp,,,,OSPF,,,,pim((ipv6可作为别名any):

[[<序列数>] {允许| deny} {任何| ipv6 | ah | gre | esp | ospf | pim |} {任何|[[/<前缀长度>这是给予的|} {任何|[[/<前缀长度>这是给予的|} [DSCP这是给予的[[ecn] [ipprecedence这是给予的[[tos] [片段] [vlan这是给予的[[ttl这是给予的[[数数这是给予的[[log] no<序列数>

语法(在ACL上下文中)用于创建或删除协议的ACESCTP,,,,tcp,,,,udp

[[<序列数>] {允许| deny} {sctp | tcp | udp} {any |[[/<前缀长度>}] |} [{eq | gt | lt}|范围|组] {任何|[[/<前缀长度>这是给予的|} [{eq | gt | lt}|范围|组这是给予的[[urg] [ack] [psh] [rst] [syn] [fin] [established] [dscp这是给予的[[ecn] [ipprecedence这是给予的[[tos] [片段] [vlan这是给予的[[ttl这是给予的[[数数这是给予的[[log] no<序列数>

语法(在ACL上下文中)用于为协议创建或删除ACEicmpv6

[[<序列数>这是给予的{permit|deny} {icmpv6} {any|[[/<前缀长度>这是给予的|} {任何|[[/<前缀长度>这是给予的|} [icmp-type {echo | echo-r​​eply |}] [icmp-code这是给予的[[DSCP] [ECN] [ipprecedence这是给予的[[tos] [片段] [vlan这是给予的[[ttl这是给予的[[数数这是给予的[[log] no<序列数>

ACE评论的语法(在ACL上下文中):

[[<序列数>] 评论no<序列数>评论

Description

创建IPv6访问控制列表(ACL)。ACL由一个或多个访问控制条目(ACE)制成,并按序列编号进行优先排序。最低序列编号是最高优先级ACE。

no此命令的形式删除整个ACL,或删除按序列号识别的ACE,或仅删除按序列号识别的ACE的注释。

命令上下文

config

access-list ipv6 command takes you into the named ACL context where you enter the ACEs.

参数

指定此ACL的名称。

<序列数>

指定ACE的序列号。范围:1至4294967295。

{permit|deny}

Specifies whether to permit or deny traffic matching this ACE.

Specifies the protocol as its Internet Protocol number. For example, 2 corresponds to the IGMP protocol. Range: 0 to 255.

{any|[[/<前缀长度>这是给予的|}
Specifies the source IPv6 address.
  • any- specifies any source IPv6 address.

  • - 指定源IPv6主机地址。

    • <前缀长度>- specifies the address bits to mask (CIDR subnet mask notation). Range: 1 to 128.

  • - 指定您先前定义的IPv6地址组object-group ipv6 address

{any|[[/<前缀长度>这是给予的|}
指定目标IPv6地址。
  • any- specifies any destination IPv6 address.

  • - specifies the destination IPv6 host address.

    • <前缀长度>- specifies the address bits to mask (CIDR subnet mask notation). Range: 1 to 128.

  • - 指定您先前定义的IPv6地址组object-group ipv6 address

[[{eq|gt|lt}|范围|组这是给予的
Specifies the port, port range, or port group. Port numbers are in the range of 0 to 65535.
  • 等式- specifies the Layer 4 port.

  • GT- specifies any Layer 4 port greater than the indicated port.

  • lt- 指定小于指示端口的任何4层端口。

  • range- 指定第4层端口范围。

  • group- 指定您先前定义的第4层端口组object-group port

笔记:

使用ACL后,具有L4端口范围的ACE可能会消耗多个硬件条目。

URG,ACK,PSH,RST,SYN,FIN已建立

这se TCP flag-matching parameters are not supported.

[icmp-type {echo | echo-r​​eply |}这是给予的
指定ICMP类型。
  • 回声- specifies an ICMP echo request packet.

  • 回声- specifies an ICMP echo reply packet.

  • - specifies an ICMP type value. Range: 0 to 255.

[[icmp-code这是给予的

Specifies the ICMP code value. Range: 0 to 255.

DSCP

指定差异化服务代码点(DSCP),要么数字((0 to 63) or one of these keywords:

  • AF11- DSCP 10(保证转发类1、低公关obability)

  • AF12- DSCP 12 (Assured Forwarding Class 1, medium drop probability)

  • AF13- DSCP 14 (Assured Forwarding Class 1, high drop probability)

  • AF21-DSCP 18(确保转发2类,低滴概率)

  • AF22-DSCP 20(确保转发2类,中滴概率)

  • AF23-DSCP 22(确保转发2类,高滴概率)

  • AF31-DSCP 26(确保转发3类,低滴概率)

  • AF32-DSCP 28(确保转发3类,中滴概率)

  • AF33-DSCP 30(确保转发3类,高滴概率)

  • AF41- DSCP 34 (Assured Forwarding Class 4, low drop probability)

  • AF42-DSCP 36(确保转发4类,中滴概率)

  • AF43-DSCP 38(确保转发4类,高滴概率)

  • CS0-DSCP 0(类选择器0:默认值)

  • CS1- DSCP 8 (Class Selector 1: Scavenger)

  • CS2- DSCP 16 (Class Selector 2: OAM)

  • CS3- DSCP 24 (Class Selector 3: Signaling)

  • CS4-DSCP 32(类选择器4:实时)

  • CS5- DSCP 40 (Class Selector 5: Broadcast video)

  • CS6-DSCP 48(类选择器6:网络控制)

  • CS7- DSCP 56 (Class Selector 7)

  • EF-DSCP 46(加快转发)

ecn

指定明确的拥塞通知价值。范围:0-3。

ip-precedence

指定IP优先级值。范围:0-7。

tos

指定服务值的类型。范围:0-31。

fragment

不支持。

vlan

不支持。

ttl

不支持。

数数

Keeps the hit counts of the number of packets matching this ACE.

log

保留匹配此ACE的数据包数量的日志。使用否定actions but not with允许actions. Works with ACLs applied on ingress or egress, except for control plane.

[[<序列数>] 评论

向ACE添加评论。这no表格仅删除ACE的评论。

权威

管理员或本地用户组成员具有此命令的执行权。

Usage

  • If theparameter is used instead of a protocol name, ensure that any needed ACE-definition parameters specific to the selected protocol are also provided.

  • 笔记:

    这8400 switch cannot match on MLD (Multicast Listener Discovery) packets using the ICMPv6 protocol number 58 due to the Hop-by-Hop options extension header which is present on MLD packets. The presence of the extension header in the packet causes the 8400 to match on protocol number 0 (HOPOPT) and not protocol number 58 (ICMPv6). Therefore, to achieve the wanted matchings, specify protocol 0 (NOT 58) in your ACEs.

    例如,允许加入FF12 :: 01using protocol 0 in the ACE:

    10 permit 0 any ff12::0/64

  • 使用多种ACL类型(IPv4,IPv6或Mac)在同一接口上登录时,将ACE与ACE匹配的第一个数据包logoption is logged. Until the log-timer wait-period is over, any packets matching other ACL types do not create a log. At the end of the wait-period, the switch creates a summary log all the ACLs that were matched, regardless of type.

Examples

创建具有四个条目的IPv6 ACL:

开关(配置)#访问列表IPv6 my_ipv6_aclswitch(config-acl-ipv6)#10允许UDP任何2001 :: 1/64switch(config-acl-ipv6)#20许可TCP 2001:2001 :: 2:1/128 GT 1023switch(config-acl-ipv6)#30 permit tcp 2001:2011::1/64 anyswitch(config-acl-ipv6)#40拒绝任何计数switch(config-acl-ipv6)#exit开关(配置)#确实显示访问列表类型名称序列评论操作L3协议源IP地址源L4端口IP地址目标目标L4端口 - 其他参数------------------------------------------------------------------------------------------------------------------------------------------------------ IPv6 my_ipv6_acl 10允许UDP Any 2001 :: 1/64 20许可证TCP 2001:2001 :: 2:1> 1023任何30许可证TCP 2001:2011 :: 1/64 40否认任何命中-Counts:启用

Adding a comment to an existing IPv6 ACE:

开关(配置)#访问列表IPv6 my_ipv6_aclswitch(config-acl-ipv6)#20 comment Permit all TCP ephemeral portsswitch(config-acl-ipv6)#exit开关(配置)#确实显示访问列表类型名称序列评论操作L3协议源IP地址源L4端口IP地址目标目标L4端口 - 其他参数------------------------------------------------------------------------------------------------------------------------------------------------------ IPv6 MY_IPV6_ACL 10 permit udp any 2001::1/64 20 Permit all TCP ephemeral ports permit tcp 2001:2001::2:1 > 1023 any 30 permit tcp 2001:2011::1/64 any 40 deny any any any Hit-counts: enabled

Removing a comment from an existing IPv6 ACE:

开关(配置)#访问列表IPv6 my_ipv6_aclswitch(config-acl-ipv6)#没有20条评论switch(config-acl-ipv6)#exit开关(配置)#确实显示访问列表类型名称序列评论操作L3协议源IP地址源L4端口IP地址目标目标L4端口 - 其他参数------------------------------------------------------------------------------------------------------------------------------------------------------ IPv6 my_ipv6_acl 10允许UDP Any 2001 :: 1/64 20许可证TCP 2001:2001 :: 2:1> 1023任何30许可证TCP 2001:2011 :: 1/64 40否认任何命中-Counts:启用

将ACE添加到现有的IPv6 ACL中:

开关(配置)#访问列表IPv6 my_ipv6_aclswitch(config-acl-ipv6)#25许可ICMPV6 2001 :: 1/64任何switch(config-acl-ipv6)#exit开关(配置)#确实显示访问列表类型名称序列评论操作L3协议源IP地址源L4端口IP地址目标目标L4端口 - 其他参数------------------------------------------------------------------------------------------------------------------------------------------------------ IPv6 my_ipv6_acl 10允许UDP任何2001 :: 1/64 20许可TCP 2001 :: 2001 :: 2:1> 1023任何25允许ICMPV6 2001 :: 1/64任何30许可证TCP 2001:2011 ::::::::::1/64任何40否认任何命中率:启用

在现有的IPv6 ACL中取代ACE:

开关(配置)#访问列表IPv6 my_ipv6_aclswitch(config-acl-ipv6)#25 permit icmpv6 2001::2:1/64 anyswitch(config-acl-ipv6)#exit开关(配置)#确实显示访问列表类型名称序列评论操作L3协议源IP地址源L4端口IP地址目标目标L4端口 - 其他参数------------------------------------------------------------------------------------------------------------------------------------------------------ IPv6 my_ipv6_acl 10允许UDP Any 2001 :: 1/64 20许可证TCP 2001:2001 :: 2:1> 1023任何25允许ICMPV6 2001 :: 2:1/64任何30许可证TCP 2001:2011:2011:2011:: 1/64任何40否认任何命中率:启用

从IPv6 ACL中删除ACE:

开关(配置)#访问列表IPv6 my_ipv6_aclswitch(config-acl-ipv6)#no 25switch(config-acl-ipv6)#exit开关(配置)#确实显示访问列表类型名称序列评论操作L3协议源IP地址源L4端口IP地址目标目标L4端口 - 其他参数------------------------------------------------------------------------------------------------------------------------------------------------------ IPv6 my_ipv6_acl 10允许UDP Any 2001 :: 1/64 20许可证TCP 2001:2001 :: 2:1> 1023任何30许可证TCP 2001:2011 :: 1/64 40否认任何命中-Counts:启用

删除IPv6 ACL:

开关(配置)#no access-list ipv6 MY_IPV6_ACL开关(配置)#确实显示访问列表类型名称序列评论操作L3协议源IP地址源L4端口IP地址目标目标L4端口 - 其他参数------------------------------------------------------------------------------------------------------------------------------------------------------ IPv6 MY_IPV6_ACL2 1 permit udp any 2001::1/64 2 Permit all TCP ephemeral ports permit tcp 2001:2001::2:1 > 1023 any 3 permit tcp 2001:2011::1/64 any 4 deny any any any Hit-counts: enabled