ทำ QoS (Quality of Service) แบบง่ายๆ

jasper

New member

ทำ QOS แบบง่ายๆ

มี 3 หลักการ สำหรับกุ
- เขียน class map
- กำหนด policy
- map policy กับ interface


class-map match-any web
match access-group 120
 

PlAwAnSaI

Administrator
เออ เข้าใจง่ายดีว่ะ ขอบคุณคับ
wink.gif
 

PlAwAnSaI

Administrator
ไง work มั้ย ต้องใส่ command อะไรเพิ่มป่าว ???



rujipars wrote:
police ใช้ได้กับทั้งขาเข้าและขาออก ตรวจสอบว่า traffic ที่วิ่งผ่านนั้น มีอัตราการส่งที่ conform (อยู่ในอัตราปกติ), exceed (เกินอัตราปกติแต่ยังไม่เกินอัตราที่ยอมให้ burst ได้ชั่วคราว), violate (เกินอัตราที่ยอมให้ burst) แล้วกำหนด action เช่น

drop drop packet
set-clp-transmit set atm clp and send it
set-discard-class-transmit set discard-class and send it
set-dscp-transmit set dscp and send it
set-frde-transmit set FR DE and send it
set-mpls-exp-imposition-transmit set exp at tag impositio n and send it
set-prec-transmit rewrite packet precedenc e and send it
set-qos-transmit set qos-group and send it
transmit transmit packet


  • Basic Traffic Shaping Configuration
    mranuwat.wordpress.com/2009/11/04/qos-basic-traffic-shaping-configuration
  • LLQ ไม่ใช่การจอง Bandwidth

    จะมีคำสั่ง priority หรือ LLQ จะเป็นการให้อภิสิทธิ์ คือ ถ้ามาถึงเมื่อไหร่ก็ได้ไปก่อนเลย แต่ถ้าไม่มาก็ปล่อยให้อย่างอื่นวิ่งได้เต็มที่

    การทำ LLQ เปรียบเหมือนถนนหลวงที่ปกติรถราวิ่งกันได้เต็มที่ แต่ถ้ามีบุคคลสำคัญจะผ่านมา ตำรวจจะกันรถอื่นและให้บุคคลสำคัญผ่านตลอด พอผ่านไปแล้ว รถที่เหลือก็วิ่งได้เต็มถนนตามปกติ

    แต่ LLQ

    โดยปกติแล้วจะไม่ได้ให้ Priority กันอิสระเสรีมากนัก จะมีการจำกัดอยู่ว่าจะได้อภิสิทธิ์ไม่เกินเท่าไหร่

    ถ้าเกินจากนั้นก็ต้องถูก Drop หรือต้องเบียดเข้า Queue กับ Traffic อื่นๆ โดยไม่ได้รับอภิสิทธิ์อีกต่อไป

    Cr: rujipars
  • CBWFQ คือ Class of Service ที่ไม่มี Priority จะไม่เอามาใช้งานกับพวก Voice VDO ส่วน LLQ จะเป็นส่วนเสริมที่เอามาใช้กำหนด Priority ร่วมกับ CBWFQ เพื่อเอาไว้ใช้กับ Voice VDO ได้
  • Congestion Avoidance WRED:
https://www.youtube.com/watch?v=B3339beB6Aw
cool.gif
 

jasper

New member
ใช้เป็นแต่ MQC อะ ใครเข้าใจ AF , EF , Class-Selector มาอะธิบายหน่อยดิ



อันนี้ เป็นรูป การ Apply ขาin ขาout เอามาฝาก

qosinout.jpg
 

PlAwAnSaI

Administrator
  • Command priority ของ LLQ กับ bandwidth command บน CBWFQ ทำงานต่างกันอย่างไร:
    www.cisco.com/c/en/us/support/docs/quality-of-service-qos/qos-packet-marking/10100-priorityvsbw.html#summaryofdifferences
  • ขั้นตอนการ Config QoS, Example Config QoS (Precedence, DSCP):
    www.kritworld.com/search/label/QoS
CoS, DSCP, TOS, IP Precedence Mapping:

QoS-Values-Calculator-v21.jpg

BGP_Routing


  • CoS คืออะไร?:
    www.thaiadmin.org/board/index.php?topic=93241.msg399888#msg399888
  • The IP Datagram, Precedence 000 (0) - Routine 001 (1) - Priority 010 (2) - Immediate:
    www.rhyshaden.com/ipdgram.htm
QoS Configuration:
ต้องเปิด mls qos ก่อนนะ คิดว่าถ้าไม่เปิดไม่น่าจะ map เจออะไรนะ


Quote:
โดย Default ถ้าไม่เปิด Function "mls qos" ทุกๆ packet ที่ผ่านเข้าและออกจาก SW จะไม่มีการปรับปรุงแก้ไขใดๆ เป็นเหมือน Transparent แต่เมื่อมีการเปิดใช้ mls qos เมื่อใด Packet ที่ไม่ได้ถูก trust หรือ set จาก mls qos จะถูก reset มาอยู่ที่ Default (0) เสมอ
Cr: nuaythebest




Code:
http://www.thaiadmin.org/board/index.php?topic=149529



police vlan ต้องทำ policy ซ้อน policy ไปเรียกมา บน 3400 นะ รุ่นอื่นไม่รู้เหมือนกันมั้ย


Quote:
vlan 10
name qos1
!
vlan 20
name qos2
!
class-map match-any VLAN10
match vlan 10
class-map match-any VLAN20
match vlan 20




Quote:
SW1(config)#policy-map CUST1_PARENT
SW1(config-pmap)#cla VLAN10
SW1(config-pmap-c)#pol cir 50k
QoS: Configuration failed. Only child-policies are allowed in Per-Port-Per-VLAN policy classes
SW1(config-pmap-c)#


policy-map 100mb
class class-default
police cir 100000000 bc 50000 บน 3750 ต้องใส่ให้อยู่ในบรรทัดเดียวกัน
conform-action transmit
exceed-action drop violate-action drop

policy-map vlan10_100mb
class VLAN10
service-policy 100mb


[li]3400 frame size 80 เกินมาประมาณ 5%[/li]
[li]3750 frame size 64 เกินมาประมาณ 6%[/li][/list]

QoS ทำการ marking ค่า DSCP แล้ว ไม่เห็นค่าที่ mark, show mls qos, QoS ip packet dscp rewrite enabled


Code:
http://boonmee.blogspot.com/2009/06/cisco-qos-marking-dscp-mark.html



How Quality of Service Works


Code:
http://www.youtube.com/watch?v=VgzRG2CiDcw&feature=BFa&list=PL1BEBD19DCB0936BF



การทำ QOS ของ Voip บน switch cisco และ router


Code:
http://forum.siamnetworker.com/index.php?topic=2008





Quote:
match-all = logical AND of all conditions all conditions must be true for a match
match-any = logical OR of all conditions if at least one condition is true there is a match


Credit: Giuseppe Larosa





MPLS Quality of Service (QoS) Overview


[li]Different service levels for different "classes" (types) of traffic[/li]
[li]SP QoS Goals
[/list]


[li]Traffic admission control from CE
[/list]


[li]Enforce a traffic rate per SLA[/li]
[li]Honor / override CE's classification scheme
[/list]


[li]DSCP / IP Precedence to MPLS EXP mappings[/li][/list]
[/li]

[/list]
[/li]
[li]Transit control


[li]Guarantee bandwidth between sites[/li]
[li]Prioritize important traffic flows[/li]
[li]Sell different transit SLAs[/li][/list]
[/li][/li]
QoS Models


[li]IntServ QoS model
[/list]


[li]Integrated Services[/li]
[li]Network devices request specific service for particular flow[/li][/list]
[/li]
[li]DiffServ QoS model


[li]Differentiated Services[/li]
[li]Flows get specific service based on traffic classification done by the network[/li][/list]
[/li]
Integrated Services QoS


[li]RSVP - Resource Reservation Protocol[/li]
[li]Original goal was for hosts to request service of the network
[/list]


[li]Assumes transit networks will enforce admission control and honor reservations[/li]
[li]Doesn't scale; transit network would need to maintain state for every single flow[/li][/list]
[/li]
[li]Abandoned with few exceptions


[li]MPLS TE for our purposes[/li][/list]
[/li]
[li]RSVP only makes reservation in "control plane", not "data plane"


[li]DiffServ must enforce reservations[/li][/list]
[/li]
Differentiated Services QoS


[li]Packet markings or attributes used to "differentiate" traffic classes[/li]
[li]IPv4 DiffServ
[/list]


[li]DSCP - 6 bits = 64 classes[/li]
[li]IP Precedence - 3 bits = 8 classes[/li][/list]
[/li]
[li]MPLS DiffServ


[li]MPLS EXP bits - 3 bits = 8 classes[/li][/list]
[/li]
[li]Advanced DiffServ


[li]ACLs[/li]
[li]NBAR[/li][/list]
[/li]
[li]Locally Significant DiffServ


[li]QoS Group[/li][/list]
[/li]
[li]Once classified, traffic can be...


[li]Guaranteed bandwidth[/li]
[li]Prioritized[/li]
[li]Scheduled
[/list]


[li]WFQ[/li]
[li]WRR[/li]
[li]WRED[/li][/list]
[/li]
[li]Limited


[li]CAR / Policing[/li]
[li]Shaping[/li][/list]
[/li][/li]
Traffic Classification Methods


[li]DiffServ classification through
[/list]


[li]MQC Match / Set
[/list]


[li]IP Precedence / DSCP / NBAR / ACLs / MPLS EXP / QoS Group[/li][/list]
[/li]
[li]Legacy CAR[/li]
[li]Policy Routing[/li][/li]
MPLS VPN QoS Classification


[li]Marking can occur at many places
[/list]


[li]Am I dealing with IP packet, VPN label, TE label, or transport label?[/li][/list]
[/li]
[li]IP to MPLS


[li]VPN label imposed on IP packet at PE-CE ingress[/li][/list]
[/li]
[li]MPLS to MPLS


[li]Push
[/list]


[li]Transport label imposed on VPN label[/li]
[li]MPLS TE label imposed on transport / VPN label[/li][/list]
[/li]
[li]Swap


[li]Transport label disposed, new transport label imposed[/li][/list]
[/li]
[li]Pop


[li]Transport label disposed to reveal VPN[/li]
[li]MPLS TE label disposed to reveal transport / VPN label[/li][/list]
[/li][/li]
[li]MPLS to IP


[li]VPN label disposed to reveal IP packet[/li][/list]
[/li]
Ultimate Hop Popping


[li]Last hop in MPLS network advertises implicit null label by default
[/list]


[li]Causes "penultimate" hop to pop label[/li][/list]
[/li]
[li]Popping label destroys MPLS EXP policy[/li]
[li]Ultimate hop popping forces penultimate hop to send a blank label (explicit null) to the ultimate hop


[li]router(config)#mpls ldp explicit-null[/li][/list]
[/li]
[li]Allows end-to-end propagation of MPLS EXP[/li]
MPLS VPN QoS Models


[li]Uniform Mode
[/list]


[li]CE IPv4 marking is mapped to MPLS EXP at SP ingress[/li]
[li]SP MPLS EXP may be remarked in transit[/li]
[li]IPv4 egress marking on PE-CE link based on remarked MPLS EXP[/li]
[li]Customer marking is dependent on SP marking[/li][/list]
[/li]
[li]Pipe Mode


[li]CE IPv4 marking may be mapped to MPLS EXP at SP ingress[/li]
[li]SP MPLS EXP may be remarked in transit[/li]
[li]IPv4 not remarked at PE-CE egress[/li]
[li]Customer marking is independent of SP marking[/li][/list]
[/li]
 
Top