通过配置,保证网页浏览和游戏具有最高优先级。设备通过ethernet0/0(176.133.13.8)连接Internet;PC1(10.200.2.2)和PC2(10.200.1.2)分别连接设备的ethernet0/1(10.200.2.1)和ethernet0/2(10.200.1.1)。

第一步:配置class:
hostname(config)# class-map http
hostname(config-class-map)# match application http
hostname(config-class-map)# exit
hostname(config)# class-map game
hostname(config-class-map)# match application game_kart
hostname(config-class-map)# match application game_dance
hostname(config-class-map)# exit
hostname(config)# class-map ip-range1
hostname(config-class-map)# match ip-range 10.200.2.2 10.200.2.255
hostname(config-class-map)# exit
hostname(config)# class-map ip-range2
hostname(config-class-map)# match ip-range 10.200.1.2 10.200.1.255
hostname(config-class-map)# exit
hostname(config)#

第二步:配置QoS Profile:
hostname(config)# qos-profile ip-priority-mark
hostname(config-qos-profile)# class game
hostname(config-qos-prof-cmap)# set ip-qos-priority 1
hostname(config-qos-prof-cmap)# exit
hostname(config-qos-profile)# class http
hostname(config-qos-prof-cmap)# set ip-qos-priority 2
hostname(config-qos-prof-cmap)# exit
hostname(config-qos-profile)# exit
hostname(config)# qos-profile ip-qos
hostname(config-qos-profile)# class ip-range1
hostname(config-qos-prof-cmap)# ip-qos per-ip max-bandwidth 3000
hostname(config-qos-prof-cmap)# exit
hostname(config-qos-profile)# class ip-range2
hostname(config-qos-prof-cmap)# ip-qos per-ip max-bandwidth 2000
hostname(config-qos-prof-cmap)# exit
hostname(config-qos-profile)# exit

第三步:绑定QoS Profile 到接口:
hostname(config)# interface ethernet0/1
hostname(config-if-eth0/1)# qos-profile input ip-priority-mark
hostname(config-if-eth0/1)# exit
hostname(config)# interface ethernet0/2
hostname(config-if-eth0/2)# qos-profile input ip-priority-mark
hostname(config-if-eth0/2)# exit
hostname(config)# interface ethernet0/0
hostname(config-if-eth0/0)# qos-profile output ip-qos
hostname(config-if-eth0/0)# exit
hostname(config)#

原创文章如转载,请注明:
转载自醉生梦死的博客
原文地址:http://www.liusuping.com/post/Hillstone-qos-ip-priority.html