• class-map and policy-map config


    class-map match-all a
     match input-interface FastEthernet0/0
    
    policy-map a
     class a
      set ip precedence 5
    interface FastEthernet0/0
     service-policy output a
    
    二层匹配来自相接的对端设备接口MAC地址流量
    class-map B
     match source-add mac 0c00.41fc.0000
    policy-map B
     class B
      set ip dscp ef
    int f0/0
     service-policy input B

    依赖四层或者高层信息来做marking
    class-map match-any apple
    match access-group name tcp
    match access-group name udp
    ip access-list extended tcp
    permit tcp any host 44.1.1.1
    policy-map apple
    class apple
    set ip precedence 4
    int f0/0
    service-policy input apple

    show policy-map int

    class-map match-all C1
    match protocol icmp
    class-map match-all C2
    match ip recedence 1
    policy-map P1
    class C1
    bandwidth 20000 分配带宽为20Mb/s
    class C2
    bandwidth 30000
    int f0/0
    service-policy output P1

    show policy-map
    show int f0/0

    在默认情况下,可用带宽是总带宽的75%。

    用百分比方式来配置CB-WFQ

    policy-map P1
    class C1
    bandwidth percent 20
    class C2
    bandwidth percent 30
    class C3
    bandwidth remaining percent 20 (剩余方式)
    int f0/0
    service-policy output P1
    对默认分类的修改从默认的FIFO队列改为WFQ队列。
    policy-map P1
    class class-default
    fair-queue
    修改CB-WFQ可以占用的带宽数值(默认为75%):
    int f0/0
    max-reserved-bandwidth 100

    采用MQC的方式配置基本的CB-LLQ
    ip access-list extended telnet
    permit tcp host 12.1.1.1 host 12.1.1.2 eq 23
    class-map telnet
    match access-group name telnet
    policy-map telnet
    priority 8 //代表8KB。
    int f0/0
    service-policy output telnet

    采用带宽百分比的方式配置低延时队列
    policy-map telnet
    class telnet
    priority percent 10


    CB-WRED基于类的WRED

    ip access-list extended udp
    permit ip any any precedence 5
    permit udp any any eq ntp
    class-map match-any udp
    match access-group name udp
    policy-map WRED
    class udp
    bandwidth percent 10
    random-detect
    int f0/0
    service-policy output WRED

  • 相关阅读:
    SpringBoot开发中的坑 记录一些
    MongoDB 文档【行】
    MongoDB 集合【表】
    MongoDB 数据库
    MongoDB 基础
    gitlab或github下fork后如何同步源的新更新内容?
    解决:android源码同步repo sync 时出现的fatal:duplicate path错误
    android ROM刷机updater-script单刷补丁包脚本
    一键解包/打包boot.img/recovery.img工具(高通/MTK双版 支持android 5.1以上)
    解决:github上传时出现error: src refspec master does not match any
  • 原文地址:https://www.cnblogs.com/vincent-liang/p/6504619.html
Copyright © 2020-2023  润新知