qos
! define traffic class to be policed
class-map match-all cl_test2
match ip precedence 3 4
! define QoS policy, attach policer to traffic class
policy-map po_test2
class cl_test2
! per-interface policer is defined inside the policy map
police 512k 1000 conform-action transmit exceed-action drop
interface FastEthernet5/14
switchport
! set port to trust DSCP - need this to be able to match to incoming IP precedence
qos trust dscp
! switch to port-based qos mode
no qos vlan-based
! apply QoS policy to an interface
service-policy input po_test2
用于以 下命令监控策略操作:
Yoda#show policy-map interface FastEthernet5/14
FastEthernet5/14
service-policy input: po_test2
class-map: cl_test2 (match-all)
7400026 packets
match: ip precedence 3 4
police: Per-interface
Conform: 1166067574 bytes Exceed: 5268602114 bytes
class-map: class-default (match-any)
13312 packets
match: any
13312 packets
Yoda#show policy-map interface FastEthernet5/14
FastEthernet5/14
service-policy input: po_test2
class-map: cl_test2 (match-all)
7400138 packets
match: ip precedence 3 4
police: Per-interface
Conform: 1166088574 bytes Exceed: 5268693114 bytes
class-map: class-default (match-any)
13312 packets
match: any
13312 packets
计数器在类 映射附近数配比到对应的组的信息包的数量。
意识到以下实施特定考虑:
每种类信息包计数器不单个接口。 即它计数 匹配组在此组在服务策略之内其中是适用的所有接口的之中所有信 息包。
策略不维护信息包计数器, 只有支持字节计数器。
没有特定命 令验证流入的或流出的每调节器数据流速率。
计数器更新根据一个周期基本类型。 如果重 复执行上述命令在快速的连续,计数器也许某时仍然出现。
配置和监控 标记
配置标记包括以下步骤:
定义标准为分类数据流-访问控制列 表、DSCP,IP优先级等等。
定义使 用标准将被分类的话务类别先前定义。
创建附有标记动作和策略动作的一个策略映射定义的 类别。
在 对应接口配置 信任 模式。
应用策略映射于接口 。
参见我们其中希望流入的数据流 带有IP 优先级3招待192.168.196.3 UDP端口777被映射到IP 优先 级6的以下示例。其他IP优先级3 数据流被管辖下来到 1 Mbps,并且应该标记超额数据流下来到IP优先级2。
! enable QoS globally
qos
! define ACL to select UDP traffic to 192.168.196.3 port 777
ip access-list extended acl_test4
permit udp any host 192.168.196.3 eq 777
! define class of traffic using ACL and ip precedence matching
class-map match-all cl_test10
match ip precedence 3
match access-group name acl_test4
! all the remaining ip precedence 3 traffic will match this class
class-map match-all cl_test11
match ip precedence 3
! define policy with above classes
policy-map po_test10
class cl_test10
! mark traffic belonging to class with ip precedence 6
set ip precedence 6
class cl_test11
! police and mark down all other ip precedence 3 traffic
police 1 mbps 1000 exceed-action policed-dscp-transmit
!
! adjust DSCP to policed DSCP map so to map DSCP 24 to DSCP 16
qos map dscp policed 24 to dscp 16
!
interface FastEthernet5/14
! set interface to trust IP DSCP
qos trust dscp
! apply policy to interface
service-policy input po_test10
!
用于 命令sh policy interface 监控标记。示例输出和暗示在以上 策略配置描述。
[page]
在Catalyst 6000及 Catalyst 4000 SE3比较策略与标记

转载地址:http://www.net130.com/CMS/Pub/Tech/tech_config/92242.htm