Cisco QOS配置基本步骤

配置QoS

下面我们就来看看在Cisco 871W路由器上配置QoS的具体步骤。

第1步:定义传输类型
你必须告诉路由器,哪种数据流需要进行QoS管理。你可以通过访问控制列表(ACL)或者基于网络应用程序识别(NBAR)的方式来进行定义。其中ACL是为路由器设定不同传输数据类型的传统方式。
而NBAR则是让路由器识别流经路由器的各种数据的类别,比如HTTP数据是HTTP类别,Skype是Skype类别。但是路由器可识别的应用程序协议数量是有限的,这依赖于路由器内部存储的一个程序协议列表。
虽然路由器无法识别全部应用程序,但是路由器厂商在每次IOS升级时,会在列表中加入更多的程序。另外,你也可以自己定义程序识别列表。

第2步:创建类映射(class-map)
类映射就是将不同类型的数据流进行分组。比如,你可以创建一个叫做“VoIP traffic”的类映射,然后将各种VoIP协议归入该类。

第3步:创建策略映射(policy-map)
策略映射可以与类映射匹配,确定某类数据流的带宽和/或优先级。

第4步:将策略映射应用于接口
和ACL列表一样,你必须将策略映射应用于某个你所设定的端口上。你可以设定策略映射为输入或输出模式,以下是相应的指令代码:
service-policy output|input {name of policy-map}
如果你是采用NBAR方式识别应用程序的数据流的,那么你必须在该端口上使用ip nbar protocol-discovery指令。这个指令可以让NBAR开始监视该端口的数据流类型。

附上一个NBAR的例子


4.1
clients on vlanbb1 and vlan55 access a url located on vlanbb2 frequently, this url is <http://www.thiswebsite.com/directory/&gt; .
select one suitable router to configure so as to conserve bandwidth meeting the fa0/0 traffic from this url back to these clients should not exceed 64000 bit/s, if the files download from this url are image files, then drop the traffic.
You may assume image file name end with the suffix .gif .jpg or .jpeg

RackYYR6:
ip cef ip
accesslist extended TRAFFIC
permit ip 150.2.YY.0 0.0.0.255 150.1.YY.00.0.0.255
permit ip 150.2.YY.00.0.0.255 YY.YY.55.0 0.0.0.255
classmap matchall url
match accessgroup name TRAFFIC
match protocol http host www.thiswebsite.com
match protocol http url / directory /*
classmap match-all pic
match classmap url
match protocol http url *.jpg|*.jpeg|*.gif
policymap NBAR
class pic
drop
class url
police cir 64000000
interface Serial0/0/0
servicepolicy output NBAR
ip nbar protocol-discovery

你可能感兴趣的:(职场,Cisco,休闲,QAS)