class-map voice_mark

Download Report

Transcript class-map voice_mark

Chapter : 18
DiffServ
Quality
of
Service (QoS)
1
Introducing QoS
2
Quality of Service คือ
อะไร?
Quality of Service (QoS)
หรือ แปลตรงตัว
แล ้วนั่นก็คอ
ื คุณภาพการให ้บริการนั่นเอง แต่ในทีน
่ เี้ รา
จะหมายความถึง
บริการทีไ่ ด ้รับจากโครงข่ายการ
ื่ สารจะเกีย
สอ
่ วข ้องกับการตอบสนองของ
ั่ ต่างๆทีเ่ ราใชงานได
้
แอพพลิเคชน
้ดี หรือสามารถใช ้
งานเครือข่ายนัน
้ ได ้คุณภาพทีด
่ น
ี ั่นเอง โดยสงิ่ ทีส
่ ง่ ผล
ื่ สาร
ต่อคุณภาพดังกล่าว
สาหรับในเครือข่ายการสอ
• Bandwidth
แบบแพ็
กเกตหรือ packet network นัน
้ สงิ่ ต่างๆ
ดังกล่•าวจะได
้แก่loss
Packet
• Delay
3
Other describe
•
Network Based Application Recognition
(NBAR)
• Class of Service (CoS)
• IP Precedence
• Differentiated Service Code Point
(DSCP)
• Modular QoS CLI (MQC)
• Queuing
• Traffic Conditioning
• Congestion Avoidance
4
The
Problems
You
Face
5
Bandwidth
•
Increased bandwidth
• Prioritized traffic
 Weighted fair queuing (WFQ)
 Class-based weighted fair queuing
(CBWFQ)
 Low latency queuing (LLQ)
•  Weighted round robin (WRR)
Compression
6
Delay
•
Processing delay
• Queuing delay
• Serialization delay
• Propagation delay
Path of solve a
• Increase Bandwidth
problem
•
Priority Forwarding
• Compression
7
Packet loss
•
Increased
bandwidth
• Priority
Forwarding
Configure
• Congestion
Avoidance
8
Preparing
to
Implement QoS
9
Preparing to Implement QoS
การใช ้ QoS บนเครือข่ายจะแบ่งเป็ น 3 กระบวนการ
คือ
ื่ สารและเทคนิคทีต
1. การระบุชนิดการสอ
่ ้องการ
ื่ สาร
ของแต่ละชนิดการสอ
ื่ สาร ให ้เป็ นประเภทที่
2. การแบ่งชนิดของการสอ
แตกต่างกันเพือ
่ ให ้ QoS สามารถเข ้าถึงแต่ละ
ื่ สาร
ประเภทของการสอ
3. สร ้างนโยบาย QoS ทีต
่ รงกับความต ้องการของ
ื่ สารและเครือข่ายของคุณ
ประเภทของการสอ
1
0
Preparing to Implement QoS
Identifying Traffic
 Classifying Traffic

1
1
Identifying Traffic
Concept:
NBAR
1
2
Classifying Traffic





Incoming interface
IP precedence
Differentiated Services Code Point (DSCP)
Source or destination address
Application
1
3
Classifying Traffic
1
4
Models for Implementing QoS
่
่ ้ในการเพิม
มีด ้วยกัน 3 รูปแบบ เพือใช
ประสิทธิภาพของ QoS ในระบบเครือข่าย
The best effort model
 Integrated Services model (IntServ)
 Differentiated Services model (DiffServ)

1
5
QoS Mechanisms
1
6
QoS features
Traffic marking
 Queuing
 Traffic conditioning
 Congestion avoidance

1
7
Traffic Marking
ื่ สารนั น
การทาเครือ
่ งหมายการสอ
้ ชว่ ยให ้
อุปกรณ์ในเครือข่ายสามารถแยกประเภทของ
่
แพ็กเก็ต เชน
้
 Data Link Layer ใชการท
าเครือ
่ งหมายแบบ
CoS
 Network Layer มีการใช ้ IP Precedence และ
Differentiated Service Code Point (DSCP)
1
8
Class of Service (CoS)
1
9
IP Precedence && Differentiated
Services Code Point (DSCP)
2
0
Concept: The DiffServ Field
2
1
Concept: PHB Notation
2
2
DSCP with Drop Probability
2
3
Tell Yourself, “Six Bits, Only Six Bits!”
2
4
Queuing






First- In-First-Out (FIFO)
Priority Queuing (PQ)
Weighted round robin (WRR)
Weighted fair queuing (WFQ)
Class-based weighted fair queuing
(CBWFQ)
Low latency queuing (LLQ)
2
5
Traffic Conditioning
Policing
 Shaping

2
6
Congestion Avoidance
Random early detection (RED)
 Weighted random early detection (WRED)

2
7
Configuring QoS
2
8
Configuring QoS
Legacy Command-Line Interface (CLI)
 Modular QoS CLI (MQC)
 Auto QoS
 SDM QoS Wizard

2
9
Legacy Command-Line Interface
(CLI)
In the past, the only way to implement a
QoS policy in the network was by using the
Command-Line Interface (CLI) to individually
configure QoS policies at each interface.
3
0
Modular QoS CLI (MQC)
Cisco introduced the Modular QoS
CLI (MQC) to simplify QoS configuration.
With MQC, QoS can be configured in a
building-block approach, using a single
module repeatedly to apply policy to
multiple interfaces.
3
1
Auto QoS
Cisco AutoQoS represents innovative
technology that simplifies the challenges of
network administration
by reducing QoS complexity, cost, and
deployment time.
3
2
SDM QoS Wizard
You can easily configure, manage, and
troubleshoot QoS deployments using the
Cisco Security Device Manager (SDM) QoS
Wizard.
3
3
Small Office/ Home Office
(SOHO)
3
4
Concept: MQC
Class-map (for traffic classification)
 Policy-map (QoS component assignment)
 Service-policy (for applying to an interface)

3
5
Incoming Class-Map
Configuration
เป็ นสว่ นแรกของการตัง้ ค่านโยบาย สามารถ
เลือกพารามิเตอร์เพือ
่ กาหนด class-map หาก
ต ้องการกาหนดหลาย state ให ้ใช ้ AND แต่ถ ้า
้ ้กาหนด OR เพือ
เลือกใชให
่ เลือกตัวใดตัวหนึง่ ถ ้า
ไม่ใชตั้ วเลือกนีใ้ ห ้ตัง้ ค่าเป็ นค่าเริม
่ ต ้นทัง้ หมด
3
6
ื่ สาหรับ class-map การกาหนด
ต ้องระบุชอ
ื่ มต่อ
นโยบาย QoS สาหรับ SOHO เพือ
่ การเชอ
ื่ ทีใ่ ชค้ ้นหาบน
DalRtr1 ไปทีฐ
่ าน class-map ชอ
ชนิดของข ้อมูลเข ้าออก voice_mark video_mark
ตั
วอย่างการสร ้าง class-map voice_mark
DalRtr1(config)#class-map
DalRtr1(config-cmap)#
3
7
การจัดกลุม
่ class-map
DalRtr1(config-cmap)# match ?
access-group
กลุม
่ access
any
แพ็กเกตใดๆ
class-map
Class map
cos
IEEE 802.1Q/ISL
ระดับการ
ให ้บริการ
ความสาคัญของผู ้ใช ้
destination-address ทีอ
่ ยูป
่ ลายทาง
discard-class
ระบุการยกเลิก
3
dscp
ตรง DSCP ใน
8
IP (v4) และ IPv6
DalRtr1(config)#class-map voice_mark
DalRtr1(config-cmap)#match protocol rtp
audio
DalRtr1(config)#class-map http_mark
DalRtr1(config-cmap)#match protocol http
DalRtr1(config-cmap)#exit
DalRtr1(config)#class-map ftp_mark
DalRtr1(config-cmap)#match protocol ftp
DalRtr1(config-cmap)#exit
DalRtr1(config)#class-map
business_app_mark
DalRtr1(config-cmap)#match acccess-group
101
3
9
Incoming Policy-Map
Configuration
้
การเข ้าใชงานต
้องมีการระบุ class-map
้
กาหนดตัง้ ค่านโยบายสาหรับการเข ้าใชงาน
โดยตรง
QoS สามารถกาหนดเครือ
่ งหมายได ้และไม่
้
จาแนกประเภทการเข ้าใชโดยโปรโตคอล
เริม
่ ต ้นด ้วยคาสงั่ policy-map โดยจะต ้องระบุ
ื่ ให ้ตรงกับ class-map จะสร ้าง policy-map
ชอ
ื่ ตามนโยบายจะ
ทัง้ หมดของ class-map ดังนั น
้ ชอ
ื่ minemark_traffic สงิ่ ทีค
ตัง้ ชอ
่ วรรู ้คือ คาสงั่ ของ
class
4
0
DalRtr1(config ) #policy-map mark-traffic
DalRtr1(config-pmap)#?
คาสงั่ การตัง้ ค่า QoS policy-map
class
เกณฑ์นโยบาย
description
ประเภท Policy-Map
exit
ออกจากนโยบาย QoS โหมด การ
ตัง้ ค่า policymap
no
ปฏิเสธ หรือ ตัง้ ค่าเริม
่ ต ้น
ื่ ของ policy-map
rename
เปลีย
่ นชอ
4
1
ื่ มโยง class-map และ
คาสงั่ class เชอ
้
เสนทางที
ร่ ะบุโดย class-map ไปยัง policy-map
ื่ ของ
ตัวเลือกทีจ
่ ะใส่ หลังจากคาสงั่ class คือ ชอ
class-map Output ของคุณควรจะเหมือนดังต่อไปนี้
DalRtr1(config-pmap)#class voice_mark
DalRtr1(config-pmap-c)#
4
2
ข ้อสงั เกตในการกาหนด class-map โดยการ
เคลือ
่ นย ้ายด ้วยโหมด
class policy-map-c ในโหมดนีค
้ ณ
ุ สามารถ
่ งทางการสอ
ื่ สารสามารถ
กาหนดค่า class ของชอ
กาหนดค่าดังนี้
DalRtr1(config-pmap-c)#?
คาสงั่ กาหนดค่า QoS policy-map class
bandwidth
แบนด์วด
ิ ธ์
compression
ตอบสนองการบีบ
อัด
drop
ทิง้ แพ็คเก็ตทัง้ หมด
estimate
ประเมินทรัพยากรใน
4
คลาส
3
exit
ออกจากการกาหนดค่า
netflow-sampler
no
ของคาสงั่
police
priority
นี้
queue-limit
ทิง้
random-detect
เท่ากับการทิง้
service-policy
การทา NetFlow
คัดค ้านหรือตัง้ ค่าเริม
่ ต ้น
Police
ให ้ความสาคัญใน class
ขีดจากัดสูงสุดในการละ
่ การค ้นหา
เปิ ดการสุม
กาหนดค่า Flow Next
4
4
DalRtr1(config-pmap-c)#set ?
atm-clp
ตัง้ ATM CLP bit เป็ น 1
cos
กาหนด IEEE 802.1Q/ISL class
ของ service/user
priority
discard-class
ระบุการยกเลิก
dscp
กาหนด DSCP ในแพ็กเก็ต
IP(v4) และ IPv6
fr-de
กาหนด FR DE bit เป็ น 1
ip
กาหนด IP ค่าเฉพาะ
mpls
กาหนด MPLS ค่าเฉพาะ
precedence
กาหนดแพ็คเก็ตสาคัญใน 4
IP (v4) และ IPv6
5
Incoming Service-Policy
Configuration
สว่ นสุท ้ายของการกาหนดค่าบริการนโยบาย โดยมี
การกาหนดการเข ้าใชดั้ งนี้
DalRtr1(config-pmap-c)#exit
DalRtr1(config)#int fa0/0
DalRtr1(config-if)#service-policy input
mark_traffic
4
6
Outgoing Policy-Map
Configuration
ในนโยบายนี้ class-map แบ่งประเภทการ
้
ื่ สาร class-map ควรมีลักษณะดังนี้
ใชงานการส
อ
DalRtr1(config)#class-map queue_voice
DalRtr1(config-cmap)#match dscp ef
DalRtr1(config-cmap)#exit
DalRtr1(config)#class-map
queue_business_app
DalRtr1(config-cmap)#match dscp af31
DalRtr1(config-cmap)#exit
DalRtr1(config)#class-map queue_http_ftp
4
7
Outgoing Service-Policy
Configuration
้
สว่ นนี้ class-map ทีม
่ ก
ี ารประยุกต์ใชการ
ี งโดยใชค้ าสงั่
เพิม
่ เข ้าไปในคิว ใช ้ LLQ class เสย
พิเศษ คุณสามารถเลือกได ้สองตัวเลือกใน LLQ
โดยคุณสามารถกาหนด bandwidth เป็ นกิโลไบต์
DalRtr1(config)#policy-map
queue_traffic
็ ต์
หรือ เป็ นเปอร์เซน
DalRtr1(config-pmap)#class queue_voice
DalRtr1(config-pmap-c)#priority ?
<8-2000000> Kilo Bits per second
percent % of total bandwidth
DalRtr1(config-pmap-c)#priority percent 35
4
8
สาหรับอีกสอง class มีการกาหนดค่า
CBWFQ เป็ นคาสงั่ เพือ
่ ทีก
่ าหนดค่า CBWFQ เป็ น
แบนด์วธิ คาสงั่ CBWFQ มีสองตัวเลือกสาหรับผู ้ที่
ิ ธิ และ ผู ้ทีเ่ ข ้ามาใหม่เป็ นเปอร์เซน
็ ต์ท ี่
ได ้รับสท
เหลือของแบนด์วธิ คาสงั่ ทีเ่ หลือจะมีประโยชน์เมือ
่
้
แบนด์
ว
ธ
ิ
ที
ใ
่
ช
จริ
งทีม
่ ค
ี วามแตกต่างกัน
DalRtr1(config-pmap)#class
queue_business_app
DalRtr1(config-pmap-c)#bandwidth ?
<8-2000000> Kilo Bits per second
็ ต์รวมของ Bandwidth
เปอร์เซน
DalRtr1(config-pmap-c)#bandwidth percent
25
4
9
้
็ ต์ ของ CBWFQ
ใน class สุดท ้าย เราใชเปอร์
เซน
่ กัน
queuing เชน
DalRtr1(config-pmap)#class queue_http_ftp
DalRtr1(config-pmap-c)#bandwidth ?
็ ต์
<8-2000000> Kilo Bits per second เปอร์เซน
รวมของ Bandwidth
DalRtr1(config-pmap-c)#bandwidth percent 15
5
0
Outgoing Class-Map
Configuration
้
สุดท ้ายต ้องใชนโยบายนี
้ ในการติดต่อออกไปยัง
interface ต่างประเทศ เพือ
่ ให ้สามารถจัดคิว และ
้
จัดลาดับความสาคัญการเข ้าใชขณะนี
้ service-policy
้
จะประยุกต์ใชควบคุ
ม output
DalRtr1(config-pmap-c)#exit
DalRtr1(config)#int fa0/1
DalRtr1(config-if)#service-policy output
mark_traffic
5
1
SDM QoS Wizard
QoS ในเราเตอร์ SOHO ทีใ่ ช ้ SDM ใช ้
ตรรกะ ในการเริม
่ กาหนดค่า และไมสามารถเลือก
ประเภทการจราจรได ้ทัง้ หมดโดยจะต ้องมีการจัดการ
ทีด
่ ี SDM Wizard ทางานให ้คุณต่อจากการเริม
่ start
5
2
5
3
5
4
5
5
5
6
5
7
5
8
5
9
6
0
6
1
6
2
6
3
Summary
6
4