—QOS
Making sure packets sent in correct order. Does not address bandwidth shortages, if there is not enough speed on the link for all your traffic, only says which traffic to send first.
QOS can be programmed under the dial peer.
Used to fix
Packet loss – Router buffer gets full and then drops packets
Delay – lower average time it takes for packets to reach a destination. must be <150ms
Jitter – buffer packets before sending to prevent spikes in delay from phone to phone
maximium latency of 250ms
jitter 30ms
There are 3 types of Quality of Service
Best effort – this is the default, first in first sent
Intergrated services – routers speak to one another and reserver a set amount of bandwidth for a call. Does not scale well, can reserve to much
Differentiated Services – marks packets according to there priority. sends according to marking.
There are 4 ways to implement QOS
– CLI (Under each interface)
– MQC (Uses class-maps to group traffic, policy-map specifics what to do with a class-map traffic)
– Auto Qos (under each interface)
– QOS Managment (Cisco works)
QOS is only as good as your weakest link, if you have one section where QOS is not configured then QOS will not be running the most efficiently.
Packets need to be inspected to mark them either at TOS(L3) or COS(L2).
Marking the packet means the router only needs to inspect the packet once.
Packets can be marked according to interface, ACL Protcol, Port ect.
—Queuing metheods at the router
Traditional metheods being phased out
-Custom priority – sent 1 packet of http for 2 packets of telnet
-FIFO by default first in first our happens on a router
-Fair wieghted queuing – devices that dont communicate much are given priority.
-Priority queuing – always send the packets with the highest priority first. if you are swamped with data your low priority data will never be sent.
Currently used metheods
-Class based weighted fair queueing – do this 100 VOIP packets for every 50 http packets. 16 types of queues to send quanity of packets + a default queue
-low latency queuing – Same as class based weighted fair queuing, however there is priority traffic.There is only 1 priority queue. Can implement policing where after a set amount of traffic then the router stops sending a type of traffic until the interval has expired.
Stop against voice denying all other types of traffic.
—MQC Marking traffic
Uses class-maps to group traffic, policy-map specifics what to do with a class-map traffic.
show class-map
show policy-map
show policy-map interface fa0/1 //usage on
FIRST TURN ON QOS
mls qos
1. Select the Traffic
class-map <match all/Match any> <Name>//logical AND + OR statement.
match <ip/COS/ACL/port/destination/protocol> //protcol detect traffic is using another port.
2. Mark the traffic with a policy-map
conf t
policy-map <name>
class <policy-map>
set <cos/precedence/dscp> <Value> //Higher is better
drop //can drop bad traffic like p2p if you want to here.
//make sure you mark all other traffic as default priority
3. Apply to the interface you wish to mark packets
int fa1/1
service-policy <input> <class-map name> //will mark class map traffic coming in interface.
Sometimes a new copy of the application will come out and the iOS cannot detect this type of protocol. You can add in the new protocol with the command
ip nbar pdlm flash://filename.pdlm
IP precedence(old way values from 0-7) and DSCP(values of 0-63) are markings in the L3 protocol. Marking the traffic is step 1, then step 2 is using the markings to priority traffic.
—MQC Prioritizing traffic in the queue
FIRST TURN ON QOS
mls qos
1. Select the Traffic to match. Create one for each precedence.
class-map <match all/Match any> <Name>//logical AND + OR statement.
match ip <precedence/dscp/cos> <value>
Example.
class-map Match any P2
match ip precedence 2
class-map Match any P1
match ip precedence 1
class-map Match any P0
match ip precedence 0
2. Set the priority of the traffic on each precedence created.
conf t
policy-map <name>
class <policy-map> //created in step 1
bandwidth <percent/kbit> //once you hit 75% thats all your allowed.
//bandwidth 100, means if there is no other traffic they get more.
Example
policy-map LIMIT
class P2
bandwith 100
<optional> priority <value> send this much traffic before cutting out
<optional> Random-detect //drop packets to reduce the window size so higher priority dont.
<optional> Random-detect precedence 2 <min> <max>
class p1
bandwith 50
<optional> priority <value> send this much traffic before cutting out
<optional> Random-detect //drop packets to reduce the window size so higher priority dont.
<optional> Random-detect precedence 2 <min> <max>
class p0
bandwidth 5
<optional> priority <value> send this much traffic before cutting out
<optional> Random-detect //drop packets to reduce the window size so higher priority dont.
<optional> Random-detect precedence 2 <min> <max>
3. Apply the policy-map outbound on your choosen interfaces.
int fa1/1
service-policy output <Policy Name>
—Policing vs Shaping
Policing can be applied inbound aswell as outbound, shaping can only be applied outbound.
Policing is dropping or remarking packets once the threshold has been reached, Shaping
traffic stores excess packets in a limited buffer to be sent later.
Both have the same 3 states that traffic can be classified as.
Conforming – L1 Traffic is within the allowed boundary. Example action = allow
Exceeding – L2 Traffic has exceeded the allowed boundary. Example action = ip prec = 0
Voilating – L3 Traffic is higher than should be. Example action = drop.
—Policing Configuration
//see top 10 protcols in use on the network
show ip nbar procotol-discovery stats bit-rate top-n 10
show class-map
FIRST TURN ON QOS
mls qos
//Select your traffic
conf t
class-map <name>
Match protocol <Protcol>
//Set your policing actions
policy-map LIMIT_PROTOCOL
class <Class_Name>
police <max speed conforming> <Max speed exceeding> //everything beyond max-sped is voilating.
conform-action <Transmit>
exceed-action <set-dscp-transmit> 0
violate-action <Drop>
//Apply to interface
int fa1/1
service-policy Input LIMIT_PROTOCOL
int fa1/2
service-policy output LIMIT_PROTCOL
—Shaping configuration
Buffers excess data to send laterr, if there is spare bandwith then it send it immediately, this may throw off your benchmarks
//see top 10 protcols in use on the network
show ip nbar protocol-discovery stats bit-rate top-n 10
show class-map
//Select your traffic
conf t
class-map <name>
Match protocol <Protcol>
//Set your Shaping actions
policy-map LIMIT_PROTOCOL
class <Class_Name>
Shape average <speed> //Set the average speed to be sent over the link
shape peak <speed> //set the average peek speed to be sent over the link(bursting NBMA)
//Apply to interface. Can only be applied outbound.
int fa1/2
service-policy output LIMIT_PROTCOL
—Link frame interleaving
This is the ability to chop up large packets and slip in import packets between the chopped
packets, for example. you could slide VOIP packets between a chopped data packet.
Can be done over PPP multilink and Framerelay.
Interface multilink 1 //create virtual interface.
ip add <ip> <subnet>
ppp multilink fragment delay <delay time> //recommended 10ms for voip delay on router.
ppp multilink interleave //send packets after chopping
bandwidth <size> //used for router calculations
Int s0/0
encapsulation ppp
ppp multilink group 1