51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 9243|回复: 0
打印 上一主题 下一主题

[转贴] 使用阿里移动测试平台MQC配置一个案例

[复制链接]
  • TA的每日心情
    无聊
    前天 09:00
  • 签到天数: 1019 天

    连续签到: 3 天

    [LV.10]测试总司令

    跳转到指定楼层
    1#
    发表于 2021-1-5 11:16:25 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
    1测试积点
    案例配置拓扑:
    案例配置需求
      1、 在五台路由器之间运行OSPF协议,发布直连网段和环回口;
      2、 在R4上配置接口S1/4只能接收IP优先级5和6的数据包;
      3、 在R5上配置接口S1/5只能接收IP优先级6的数据包;
      4、 在R1上使用扩展ping,TOS为64,要求可以ping通R4;
      5、 在R2上使用扩展ping,TOS为128,要求可以ping通R5;
      案例配置思路
      1.根据拓扑配置IP地址
    1. R1:
    2. interface Loopback0
    3. ip address 1.1.1.1 255.255.255.0
    4. ip ospf network point-to-point
    5. interface Serial1/1
    6. ip address 13.1.1.1 255.255.255.0
    7. serial restart-delay 0

    8. R2:
    9. interface Loopback0
    10. ip address 2.2.2.2 255.255.255.0
    11. ip ospf network point-to-point
    12. interface Serial1/2
    13. ip address 23.1.1.1 255.255.255.0

    14. R3:
    15. interface Loopback0
    16. ip address 3.3.3.3 255.255.255.0
    17. interface Serial1/1
    18. ip address 13.1.1.2 255.255.255.0      
    19. interface Serial1/2
    20. ip address 23.1.1.2 255.255.255.0
    21. interface Serial1/4
    22. ip address 34.1.1.2 255.255.255.0
    23. interface Serial1/5
    24. ip address 35.1.1.2 255.255.255.0

    25. R4:
    26. interface Loopback0
    27. ip address 4.4.4.4 255.255.255.0
    28. ip ospf network point-to-point
    29. interface Serial1/4
    30. ip address 34.1.1.1 255.255.255.0

    31. R5:
    32. interface Loopback0
    33. ip address 5.5.5.5 255.255.255.0
    34. ip ospf network point-to-point
    35. interface Serial1/5
    36. ip address 35.1.1.1 255.255.255.0
    复制代码
     3.在R4的接口上配置数据过滤:
    1. access-list 100 permit ip any any precedence critical    /只接收IP优先级5的数据/
    2. access-list 100 permit ip any any precedence internet  /只接收IP优先级6的数据/
    3. interface serial 1/4
    4. ip access-group 100 in  /接口下调用ACL/
    复制代码
    4.在R5的接口上配置数据过滤:

    1. access-list 100 permit ip any any precedence internet
    2. interface serial 1/5
    3. ip access-group 100 in
    复制代码
    5.在R3上配置MQC,转换数据优先级:
    1. access-list 100 permit ip host 1.1.1.1 host 4.4.4.4 precedence immediate
    2. /匹配从1.1.1.1发往4.4.4.4且优先级为2的数据/
    3. access-list 101 permit ip host 2.2.2.2 host 5.5.5.5 precedence flash-override
    4. /匹配从2.2.2.2发往5.5.5.5且优先级为4的数据/

    5. class-map match-all pre4   /创建类图pre4/
    6. match access-group 101  /调用ACL 101/
    7. class-map match-all pre2
    8. match access-group 100
    9. !         
    10. !         
    11. policy-map MQC   /创建策略映射图MQC/
    12. class pre2     /调用类图pre2/
    13.   set precedence 5   /设置IP优先级为5/
    14. class pre4
    15.   set precedence 6
    复制代码
    案例检验结果
    1、 配置完成后,用1.1.1.1去ping 4.4.4.4:

    2、 配置完成后,在R1上用1.1.1.1扩展ping的TOS 64去ping 4.4.4.4


    案例总结及其它
      1、 MQC是模块化QOS配置命令集,由匹配流量、设置流量、调用策略三个部分组成;
      2、 使用ACL配合class-map来匹配流量;
      3、 使用policy-map调用class-map来设置流量;
      4、 MQC可以在接口下、子接口、控制模版下调用;
      5、 数据包的优先级可以用TOS、DSCP、IP优先级三种方式来定义,他们之间可以互相转换;
      6、 TOS=DSCP8=IP64;



    附件: 您需要 登录 才可以下载或查看,没有帐号?(注-册)加入51Testing
    分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
    收藏收藏
    回复

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-9-16 13:35 , Processed in 0.080069 second(s), 22 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表