Qos Settings:
Step 1: define the transport type
You must tell the router which data flow needs to be managed by QoS. You can define it by accessing the control list (ACL) or by using the network application recognition (NBAR). The ACL is a traditional way of setting different data types for routers.
NBAR is the type of data that allows the router to identify the data that flows through the router, such as HTTP data, which is the Skype category. But the number of application protocols that routers can identify is limited, depending on a list of program protocols stored within the router.
While the router doesn't recognize the full application, the router vendor adds more programs to the list every time the IOS is updated. In addition, you can also define your own list of programs.
Step 2: create the class map (class-map)
Class mapping is the grouping of different types of data streams. For example, you can create a class mapping called \"VoIP traffic\" and then classify various VoIP protocols into the class.
Step 3: create the policy map (policy-map)
The policy mapping can match the class mapping to determine the bandwidth and/or priority of a certain type of data flow.
Step 4: apply the policy mapping to the interface
Like the ACL list, you must apply the policy mapping to a port that you set. You can set policies to map to input or output patterns Example:
Limit instances of traffic to different IP groups:
Cisco (config) # IP access-list extended BOSS
Cisco (config-ext-nacl) # permit IP host 192.168.1.8 any
Cisco (config-ext-nacl) # permit IP host 192.168.1.18 any
Cisco (config-ext-nacl) # permit IP host 192.168.1.38 any
Cisco (config-ext-nacl) # permit IP host 192.168.1.48 any
Cisco (config-ext-nacl) # permit IP host 192.168.1.58 any
Cisco (config-ext-nacl) # permit IP host 192.168.1.68 any
Cisco (config - ext - nacl) # end
Cisco# config t
Cisco (config) # IP access-list extended COMMON
Cisco (config-ext-nacl) # deny IP host 192.168.1.8 any
Cisco (config-ext-nacl) # deny IP host 192.168.1.18 any
Cisco (config-ext-nacl) # deny IP host 192.168.1.38 any
Cisco (config-ext-nacl) # deny IP host 192.168.1.48 any
Cisco (config-ext-nacl) # deny IP host 192.168.1.58 any
Cisco (config-ext-nacl) # deny IP host 192.168.1.68 any
Csco (config-ext-nacl) # permit IP 192.168.0.0.255.255 any
Cisco (config - ext - nacl) # end
Cisco# config t
Cisco (config) # route - map QoS permit 10
The config -route map # match IP address BOSS
Cisco (config - the route - map) # set IP precedence?
< 0 to 7 > Precedence value
Critical Set critical precedence (5)
Flash Set flash precedence (3)
Flash - override the Set flash override precedence (4)
The immediate Set immediate precedence (2)
The Internet Set internetwork control precedence (6)
The network Set network control precedence (7)
Priority Set priority precedence (1)
The routine Set routine precedence (0)
The < cr >
思科(config-route-map)#设置ip优先至关重要
思科(config-route-map)#退出
思科(配置)#路线图QoS允许20
思科(config-route-map)#常见的ip地址相匹配
思科(config-route-map)#设置ip优先级优先级
思科(config-route-map)#退出
思科(配置)# class-map匹配任何正常
Cisco(config - cmap)#匹配ip优先级0 1 2
思科(config-cmap)# class-map匹配任何溢价
Cisco(config - cmap)#匹配ip优先级0 1 2
思科(config-cmap)#退出
思科(配置)#策略图QoS_OUTPUT
思科(config-pmap)#类溢价
思科(config-pmap-c)# 2048带宽
思科(config - pmap-c)# police 2048000 bc 19200338400
思科(config-pmap-c-police)# conform-action传输
思科(config-pmap-c-police)# exceed-action传输
思科(config-pmap-c-police)#类正常
思科(config-pmap-c)# 512带宽
思科(config - pmapc - c)# police cir 51000 bc 1200是1200
思科(config-pmap-c-police)# conform-action传输
思科(config-pmap-c-police)# exceed-action下降
思科(config-pmap-c-police)#结束
思科#配置t
思科(配置)#接口G 0/0
思科(config-if)# ip nat
思科(config-if)# ip路线图QoS
思科(配置)#接口G 0/1
思科(config-if)# ip nat之外
思科(config-if)#输出QoS_OUTPUT服务策略
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 标记:
1 .定义class-map。
class-map[匹配所有/匹配任何]{映射名称}
默认不打的话是匹配所有
2 .定义匹配命令比赛
匹配访问组{没有}
匹配输入界面{接口}
匹配class-map {映射名称} class-map嵌套
匹配源地址{ mac地址}源mac地址
匹配目的地址{ mac地址}目的mac地址
匹配vlan { vlan id }
匹配的ip dscp { dscp }
匹配的ip precedencc {优先}
匹配协议{协议}基于NBAR
路由器(配置)class-map FOO
路由器(config-cmap)#比赛吗?
访问组访问组
任何任何包
class-map类图
因为IEEE 802.1Q / ISL类的服务/用户优先级值
目的地址目的地址
输入接口选择一个输入接口来匹配
ip ip特定的值
mpls多协议标签切换特定值
不要否定这个匹配结果
协议的协议
qos-group qos-group
Source - address source address
3. Set the policy - the map
The policy - map {policy - the name}
4. Call the class - the map
Class - the map {map - name}
5. Set the tag
Set the IP DSCP {DSCP}
Set the IP precedence {precedence}
The set cos {cos}
Priority {Kbps | percent} [BC] defines the bandwidth of the priority traffic and the sudden flow
The bandwidth {Kbps | percent} is defined to keep the bandwidth
Random - detect enables WRED
Police {CIR BC BE} conform - action {action} exceed - action {action} [violated - action {action}] use the token bucket speed limit
The queue - limit {\\"defines the maximum number of datagram in the queue
Service-policy {policy-name} calls other policies for nesting
Shape {average | peak} {CIR [BE]} The drop
Reduce the use of policy - map in interface mode
Service-policy [input | ouput] {policy-name}
Review the command:
Show policy - map [policy-name]
Show policy - map interface [interface]
Show class - map [class - name]
The show IP nbar PDLM
Show IP nbar port-map shows the protocol used by nbar to map to the port
NBAR application:
Use restrictions:
Fast Ethernet channel
A tunnel interface or an encrypted interface
SVI (exchange virtual interface)
4. The dialer interface
Multi-link PPP (MLP)
Before you use it, you need to command: IP cef
Class - the map {name}
Match the protocol...
IP nbar PDLM flash: / / bittorrent. PDLM loads bittorrent. PDLM to router flash memory. (to copy PDLM to flash in advance.)
Match procotol HTTP url \"*.jpeg | *.jpg\" (matching url with jpeg and JPG connection)
Match procotol HTTP url \"*.gif\"
Congestion management WFQ:
Features:
Based on the flow (5 element) classification, the queue number of N can be configured
The bandwidth is allocated by IP priority after the team, the lower the priority, the less bandwidth
Grab the bandwidth when other queues are idle and return bandwidth when there is traffic
It is the default configuration below the 2.048 Mbps serial interface
Configuration commands:
In interface mode, fair - queue
Show queueing fair
Show the queue (interface) PQ:
Disadvantages: 1. Can only be static configuration, can not adapt to network topology change 2. Does not support tunnel interface 3. Want to pass data classification card, is slower
than FIFO
Configuration:
Define priority queues that can be based on protocols and inbound interfaces
The protocol is based on the poriority - list {list - number} protocol {protocol-name} {high | medium | normal | low}
Interface {the interface} {the interface} {the interface} {high | medium | normal | low}
Define the default priority queue, where unclassified data is sent here and the default level is normal
Priority - list {list-number} default {high | normal | low}
Define the number of data reports in each queue, from high to low, by default to 20,40,60,80
Priority - list {list-number} - limit {high-limit medium - limit normal-limit - limit}
Apply the priority queue to the interface
Priority - group - number} {list
Review the command:
Show the queue (interface)
Show queueing priority
RTP (Real Time Protocol)
The support port number is an even number of udp messages
You can do speed limits, you can throw away, you can configure bandwidth,
The wrr-queue threshold queue - ID THR1%100% THR1 % is the level of the output queue when the traffic is discarded, and the latter is 100% discarded
2. The WRED
The difference between WRED and RED is that the former introduces IP priority DSCP values to distinguish the discard strategy, which can set different queue lengths, queue thresholds, and discard probabilities for different IP priority DSCP. And RED is only useful for TCP traffic
The average calculation of the velocity of the queue data flow determines whether or not to discard, preventing the unfair treatment of the sudden flow.
WRED and LLQ over contradictions
WRED is often used with WRR.
WRED can be configured on the interface, can also be configured
on the policy, can be RED for precedence, also can undertake RED for DSCP values, of course, only a choice between a.
(1) based on DSCP
The random - detect DSCP - -based
Random - detect DSCP {DSCP} {min Max mark}
(2) based on IP precedence
The random - detect
The random - detect precedence {precedence} {min Max mark}
WRED and WRR post:
WRR - queue random - detect min-throshold queue - ID THR1 % [thr%...]
The wrr-queue random - detect Max - throshold queue - ID THR1 % [thr%...]
Min-throshold says that the maximum filling level of some packets is being discarded
Max throshold says the maximum size of the packet is discarded Example:
Int the G1/1
WRR - queue bandwidth 50, 75
WRR - queue queue - limit 100 50
Wrr-queue random - detect min-throshold 1, 5070
Wrr-queue random - detect Max - throshold 1 75 100
Wrr-queue cos - map 1, 1, 0, 2
Wrr-queue cos - map 1, 2, 3
WRR - queue cos - map 2, 1, 4
Wrr-queue cos - map 2, 2, 6
Priority - queue cos - map 1, 1, 5, 7
RCV minus queue cosine minus map 1, 1, 0
switchport
Explanation: there are two queues. When the queue 1 fill level reaches 50% and 70%, switches, respectively, the value of 1 is mapped to the gate and gate value 2 packets of WRED (i.e., began to discard), when the queue 1 fill level reaches 75% and 100%, switches, respectively, the value of 1 is mapped to the gate and gate value 2 packet discard. Note: queue 2 does not take WRED.
Flow based WRED (WRED and WFQ)
Small flows are less likely to be discarded, large flows are discarded, and small streams are protected. Command:
Enable stream-based WRED.
The random - detect flow
Set the value of the average depth factor, which must be a power of two, and the default value is 4.
The parameter of the random - detect flow average - depth - factor {scaling - factor} is the scaling factor of a multiplication, changing the size of the queue, in fact, the length of the queue.
Set the number of stream WRED data streams, with the default value of 256
Random - detect flow count {number}
Traffic strategy
Qos process: 1. Based on flow or class-based classification; To use either a \"CAR\" or \"a\" bucket (CAR or GTS). Congestion avoidance (tail off or WRED); Congestion management (various queue mechanisms); 5. Out of the team.
Where does the mark take place? (mark can be done when CAR is carried out, or CAR can be relabeled)
The CAR (Committed Access Rate)
CAR is controlled by the use of the token barrel TC. After the classification, no flow control flows are sent directly, and the flow of traffic control is required to pass the token bucket. The corresponding flow can only be passed by the token in the token bucket. If there are not enough tokens, either the traffic is discarded directly or cached, and when there is enough tokens to be sent out.
CAR can also be used for mark or remark (that is, to set IP priority or reset IP priority)
CAR can set different traffic characteristics and tag features for different types of messages, which means you can do CAR to each class. CAR's strategy can also be connected in tandem, such as a speed limit for total flow, then a small range of speed limits for each class.
CAR is commonly used on network border routers. You can set more than one CAR policy on an interface, which in turn matches multiple CAR policies, and if there is no match, the packet is forwarded by default.
The use of CAR has the following restrictions: 1. Only the IP traffic speed limit. Fast EtherChannel is not supported; Not supporting the tunnel interface; The ISDN PRI interface is not supported.
Command:
Rate - limit {output | input} {CIR BC BE} -action {action} {action}
Note: CIR units are bit/s; And the unit of BC and BE is byte/s.
The condition-action condition is when the data to be sent is less than the normal burst (BC). Ink-action is the time when the data to be sent is larger than the average burst, less than the maximum burst (be).
The options for action have the following:
Continue continues to execute the next CAR statement
Drops discard packets
Tranmsit forwarding packets
The set - prec - continue {precedence} to set IP priority and continue the next CAR
The set - prec - the transmit {precedence} to set IP priority and forwarding packets
Set - dscp-continue {DSCP} sets the DSCP value and continues to execute the next CAR statement
Set - dscp-transmit {DSCP} set the DSCP value and forward the
packet
All above is only based on the flow of the whole interface for CAR, the following can be respectively for a flow or IP precedence or DSCP values or MAC address for the CAR
Extend the configuration of the
Do CAR for DSCP values
Rate - limit {output | input} [DSCP DSCP] {action} - action} - action}
2. The ACL for the CAR
The rate - limit {output | input} access-group {ACL NUM} {action} -action}
Do CAR for the speed limit ACL
Rate limit {output | input} access-group rate - limit {ACL NUM} {action} -action}
Speed limit the ACL is a kind of call relationship: access - the list rate - limit {ACL NUM} {precedence | MAC address} - can match priority, also can match the MAC address
Review the command:
View the ACL: show access-lists rate-limit [ACL]
View the speed limit of the interface
CAR operation in the policy map
Police {CIR BC BE} conform - action {action} exceed - action {acion} violated - action {acion}
The options for action are the same.
Flow shaping (shaping)
Usually done through a buffer and the token bucket, when the message send too fast, the buffer cache in the first place, under the control of the token bucket evenly send these buffered message again.
The technology used is GTS (general flow).
GTS and CAR the main difference is that: the use of the CAR for message flow control when to discard is not in conformity with the flow characteristic of a message, and GTS to does not conform to the flow characteristic of message buffer is to reduce the packet discard, at the same time satisfy the flow characteristic of a message.
If the message does not need to be GTS, it is not sent directly by the processing of the token bucket.
When GTS is used for lack of sufficient tokens, GTS takes the message from the queue and sends it to the queue. Each send is compared to the token number in the token bucket. Until the
token number in the bucket is reduced to the message in the queue that cannot be sent or the message in the queue is all sent.
Typically, the router's exit is used for the process, the entry is made up. Command:
Basic GTS: traffic - shape rate {CIR BC BE}
Acacl based GTS: traffic - shape group {CIR BC BE} View:
View the GTS configuration information: show traffic - shape [interface]
See the GTS statistics: show traffic - shape statistics [interface]
The implementation of the GTS on Frame Relay
Enable GTS on the interface:
Traffic - shape rate {CIR [Be]}
When the interface receives a backward explicit congestion notification (BECN), estimate the lowest value of the traffic rate:
Traffic - shape the adaptive {CIR}
As a response to BECN with a forward dominant congestion notification (FECN).
Traffic shape fecn -- adapt
The implementation of GTS on the policy map
GTS can also define the average and peak flow of traffic, and you can use CBWFQ when configuring GTS.
The steps to configure a classified flow of traffic are as follows:
Define the average and the peak of CIR, Bc and Be:
(config-pmap-c) # shape {average | peak} {CIR [Be]} average refers to the average, peak is the peak
Define the buffer limit, with the default value of 1000.
(config-pmap-c) # shape Max - buffers {numbers-of-buffers}
Apply CBWFQ to policies. Optional:
(config-if) # service-policy output {policy-name}
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- jqkq.cn 版权所有 赣ICP备2024042794号-4
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务