zoukankan      html  css  js  c++  java
  • ACL 访问控制列表

    在所有ACL应用到到接口上时,在最后都有一条默认的deny all条目,所以,如果需要在没有匹配的报文都正常转发的话要在最后添加一条permit any条目。

    1          

    1.1         MAC ACL

    在接口ge1上应用mac acl 700,允许通过MAC地址为:0003.6B00.xxxx的报文

    1.1.1         配置

    1)配置一条MAC ACL,允许通过MAC地址为:0003.6B00.xxxx的报文

    xNet#configure terminal

    xNet(config)#mac acl 700 permit 0003.6B00.0001 ffff.ffff.0000 any 1

    xNet(config)#end

    xNet#

    2)应用于接口上,MAC ACL只能应用于二层口

    xNet#configure terminal

    xNet(config)#interface ge1

    xNet(config-if)#switchport

    xNet(config-if)#mac access-group 700 in

    xNet(config-if)#end

    xNet#

    1.2         IP ACL

    在接口ge1上应用acl 1,只通过192.168.3.0/24网段的报文,其它的都drop。

    1.2.1         配置

    xNet#configure terminal

    xNet(config)#access-list 1 permit 192.168.3.0 0.0.0.255

    xNet(config)#end

    xNet#

    xNet#configure terminal

    xNet(config)#interface ge1

    xNet(config-if)#ip-access-group 1 in

    xNet(config-if)#end

    xNet#

    1.3         Extended IP ACL

    在接口ge1上应用扩展acl 100,只通过192.168.3.0/24网段的TCP报文,并使用rate-limit限速256kbps,其它的都drop。

    1.3.1         配置

    1)添加扩展ACL

    xNet#configure terminal

    xNet(config)#access-list 100 permit tcp 192.168.3.0/24 any rate-limit 256 4

    xNet(config)#end

    xNet#

    2)应用于接口

    xNet#configure terminal

    xNet(config)#interface ge1

    xNet(config-if)#ip-access-group 100 in

    xNet(config-if)#end

    xNet#

    1.4         Expert ACL

    在接口ge1上应用专家级acl 2700,只通过匹配到IP:192.168.3.0/24,MAC:0003.6B00.xxxx的TCP报文,并该ACL策略只有在每天08:00:00—20:00:00起效(time-range)。

    1.4.1         配置

    1)创建一个time-range规则,命名为xxx

    xNet#configure terminal

    xNet(config)#time-range xxx

    xNet(config-tm-range)#periodic daily 08:00:00 to 20:00:00

    xNet(config-tm-range)#exit

    2)应用于ACL

    xNet(config)#access-list 2700 permit tcp 192.168.3.0/24 0003.6B00.0000 ffff.ffff.0000 any any time-range xxx

    xNet(config)#end

    xNet#

    3)ACL应用于接口

    xNet#configure terminal

    xNet(config)#interface ge1

    xNet(config-if)#expert access-group 2700 in

    xNet(config-if)#end

    xNet#

  • 相关阅读:
    python命名
    类的绑定方法与非绑定方法
    类的封装
    类的多态性
    python中的while循环和for循环
    python的单、双、多分支流程控制
    python中的运算符
    python中的变量
    接口与归一化设计
    类的继承
  • 原文地址:https://www.cnblogs.com/niezhongle/p/11075338.html
Copyright © 2011-2022 走看看