IE实验-Qos教学实验

 

S1
diffserv domain boss    //创建差分服务域
 8021p-inbound 0 phb ef green
//将外部优先级为0的流量,映射到内部优先级ef

interface GigabitEthernet0/0/2
 trust upstream boss  //在接口下调用查分服务域

trust dscp override
qos map-table dscp-dscp
acl number 2000
rule 5 permit source 

R1
interface GigabitEthernet0/0/0
 trust dscp override
//信任上游接口发来的报文优先级,根据该优先级进行流量处理
如果希望流量在本设备享有不同于该流量优先级的服务,则可以进行映射;
qos map-table dscp-dscp                //修改dscp到dscp的映射规则
input 46 output 33                         
//将收到的网络层头部带有ef优先级的流量,映射到AF41队列进行处理;
acl number 2000  
 rule 5 permit source 192.168.1.1 0 

traffic classifier boss
 if-match acl 2000
//创建流分类,将acl 2000作为匹配条件

traffic behavior boss
 remark dscp ef
//创建流行为,将流量优先级重标记为ef

traffic policy boss
 classifier boss behavior boss
//创建流策略,绑定流分类以及流行为

interface GigabitEthernet0/0/1
 traffic-policy boss inbound//接口入方向调用流策略

R1
qos queue-profile a   //创建队列模版a
schedule pq 5 to 7 wfq 0 to 4 //设置队列0~4为wfq队列,5~7队列为pq队列
queue 4 weight 3
queue 1 to 3 weight 2
queue 0 weight 1

int g0/0/0
qos queue-profile a 

drop-profile a                                                                    //创建丢弃模板a
         wred dscp                                                                        //设置基于ip头dsnp优先级进行wred丢弃
           dscp cs1 low-limit 30 high-limit 50 discard-percentage 80     //针对队列1(AF10)流量进行设置
           dscp cs3 low-limit 50 high-limit 80 discard-percentage 50     //针对队列3(AF30)流量进行设置
           dscp ef low-limit 70 high-limit 100 discard-percentage 20     //针对ef队列的流量设置低门限、高门限以及丢弃率qos queue-profile a


qos queue-profile a 
          schedule wfq 0 to 5 pq 6 to 7
          queue 1 drop-profile a                              //将丢弃模板应用到对应的队列中
          queue 3 drop-profile a                              //实际项目中,需要为不同队列设置不同的丢弃模板
          queue 5 drop-profile a                              //如队列3,可以针对cs3、af31....流量进行设置丢弃模板,应用到queue 3


 interface GigabitEthernet0/0/0
           qos queue-profile a                                   //接口下调用队列模板a,从该接口发送的流量会调用队列模板a进行发送;


 traffic classifier ef          //创建流分类ef
       if-match dscp ef         //匹配优先级为ef的流量

    traffic behavior ef         //创建流行为ef
       queue ef bandwidth 819200           //为ef队列分配100M带宽

    traffic policy ef                                   //创建流策略ef
       classifier ef behavior ef

    interface GigabitEthernet0/0/0
      ip address 10.1.12.1 24
      traffic-policy ef outbound                //接口下调用

  子策略:

    traffic classifier pc2                            //创建流分类pc2
      if-match acl 2000                             //通过ACL将PC2的流量匹配出来

    traffic behavior pc2
      queue ef bandwidth 696320           //创建流行为pc2,为PC2的流量分配带宽85M

    traffic policy pc2
      classifier pc2 behavior pc2             //创建流策略pc

    traffic behavior ef
     queue ef bandwidth 819200 
     traffic-policy pc2                             //在流行为ef(父策略)  中调用子策略(pc2),实现流策略嵌套;

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值