PPT Presentation

advertisement
Author: Bill Buchanan
Applied Cisco Networking
(CCNP BCMSN)
Unit 7
QoS
PoTs and IP Network
PoTs (Plain Old Telephone
System)
IP Network
PSTN (Public
Switch
Telephone
Network)
Internet
Author: Bill Buchanan
PBX
(Private Branch
eXchange)
Migration towards
Integrated solution
Base rate
Sampler
8000 times per
seconds)
Once every 125
microSeconds
Analogue-to-digital
converter
(12-bits)
Compressor
(u-Law/A-Law)
12-to-8-bits
Serialiser
Author: Bill Buchanan
64 kbps
ISDN, E1 and T1
64kbps
(Data)
Base-rate
ISDN
64kbps
(Data 1)
64kbps
(Data 1)
64kbps
(Data 2)
64kbps
(Data 2)
Total rate: 160kbps
Primary-rate
ISDN
(E1 PRI)
Primary-rate
ISDN
(T1 PRI)
16 kbps
(Signal)
64kbps
(Data 23)
64kbps
(Data 30)
64 kbps
(Signal)
64 kbps
(Signal)
Total bit rate: 1.544 Mbps
Total bit rate: 2.048 Mbps
Author: Bill Buchanan
64kbps
(Data)
AVVID
AVVID: Architecture
for Voice, Video and
Integrated Data
Key focus:
· Network Management
· High availability
· Security
· QoS
Author: Bill Buchanan
Key metrics (Voice):
· Necessary bandwidth
· Acceptable delay
· Acceptable jitter
· Acceptable loss
Voice:
· Constant requirement for
bandwidth.
· Delay sensitive.
· Jitter sensitive.
· Relatively error
insensitive
Data:
· Bursty bandwidth
requirement.
· Delay insensitive
· Jitter insensitive.
· Error sensitive
QoS methods
Traffic shaping
Prioritised
Queues
Congestion
Avoidance
Methods
Traffic
compression
Author: Bill Buchanan
Traffic
classification
Bandwidth calculation
Voice:
· Constant requirement for
bandwidth.
· Delay sensitive.
· Jitter sensitive.
· Relatively error
insensitive
Voice payload
[G.711 (64Kbps)]
160 Bytes
Voice payload
[G.726 (32Kbps)]
120 Bytes
Ethernet
(14 bytes)
IP
(20 bytes)
UDP (8 bytes)
Ethernet
(4 bytes)
RTP (12 bytes)
Voice payload
[G.729 (8Kbps)]
40 Bytes
Packets generated by second (G.711) = 50 pps
Bandwidth required for each call (G.711) = 218x8x50 = 87.2kbps
Author: Bill Buchanan
Total data frame size (G.711) = 14+20+8+12+160+4 = 218 bytes
Providing power to the phone over Ethernet
4000-series switch with
In-line Power module
WS-PWR-PANEL
(Patch panel in-line power)
Author: Bill Buchanan
3524-PWR-XL
(based on 3524XL switch)
Good design practices
AVVID: Architecture for Voice,
Video and Integrated Data
Good practice (Layer 2)
· Separate VLANs for data and
voice.
· STP features: PortFast,
UpLinkFast UDLD and Root
Guard.
· 802.1P/802.1Q tagging.
Typical prioritization:
1. Voice/video (highest priority)
2. Transactional applications
3. Data transfers (lowest priority)
Author: Bill Buchanan
Good pratice (Layer 3)
· OSPF/EIGRP for fast
convergence.
· Passive interfaces for access
layer so that there is no routing
updates sent to them.
· HSRP/GLBP used for gateway
redundancy.
Delay, Jitter and Packet Loss
Transmission
system
Delay (<60ms)
Transmission
system
Jitter (<20ms)
Packet loss
Error on line, or when congestion:
Tail drop,
Random early detection (RED)
Weight RED
Author: Bill Buchanan
Transmission
system
Delays
Issues for QoS:
· Bandwidth.
· Delay.
· Jitter.
· Packet loss.
Processing
Processing
Packetization
Queuing
Processing
Propagation
Serialization
Packetization
Fixed delay. Such as amount of time to
encapsulate/de-capsulate and propagation
delay.
Variable delay. Such as queuing time and
processing on the devices.
Author: Bill Buchanan
Serialization
Jitter
Transmission
system
Jitter (<20ms)
Jitter
Overrun
Buffer cannot resize itself to handle
changes in delay variation -> leads
to dropped packets
Jitter
Underrun
Variation in delays is too large, that
the buffer cannot smooth-out
Author: Bill Buchanan
Jitter buffers
- smooths-out
delays
QoS Methods
Classification. Sorts and
classifies traffic.
Marking. Adds tags to the
packets/frames to classify/
prioritize flow.
Traffic shaping. Tries to
smooth-out traffic flows to
remove jitter, or restrict
bandwidth usage.
Forwarding. Switching traffic
from one interface to another
(CEF/fast switching)
Policing. Analyse bandwidth,
jitter, delay, and packet loss,
and determine whether to
drop or break.
Dropping. Defines which
packets to drop, and when.
Queuing. Determines the
queue that the packets should
be placing for egress queuing.
Scheduling. Defines how the
queues should be serviced …
highest priority first, or roundrobin?
Author: Bill Buchanan
Issues for QoS:
· Bandwidth.
· Delay.
· Jitter.
· Packet loss.
IntServ and DiffServ
Best effort
No QoS.
First-in, first-out
IntServ (Integrated
Services)
Connection reserved at
start via RSVP for every
connection.
All the devices are
enabled to support the
connection.
Strength: Guaranteed
QoS
DiffServ (Differentiated
Services)
Done of a hop-to-hop basis.
Mark TOS field in IP header.
Weakness: Not scaleable
and requires extra
bandwidth for RSVP.
Weakness: Best effort.
Requires packet tagging.
Author: Bill Buchanan
Strength: Easier to implement
than IntServ and costs less.
Classification
and marking of
traffic
Queuing
method
Conditioning
traffic
Classification methods
Marking options
· Layer 2. CoS field in IEEE 802.1P frame. Values: 0
(Best effort), 1 (Medium), 2 (High), and so on. 3 bits.
· Layer 3. TOS field in IP header for DiffServ. 6-bits
gives 64 levels. 2 bits used for congestion.
Author: Bill Buchanan
· Policy-based routing. Route maps.
· Priority and Custom Queuing – ACLs, ingress
interface, Layer 3 protocol and/or packet size.
· Committed Access Rate (CAR). ACLs, DSCP,
QoS groups and rate limit ACLs.
· All methods. Class maps.
DiffServ values
Original TOS field definition (RFC 791)
P2
Classification
and marking of
traffic
P1
·
·
·
P0
T2
T1
T0
CU1
CU0
IP precedence—three bits (P2 to
P0)
Delay, Throughput and
Reliability—three bits (T2 to T0)
CU (Currently Unused)—two
bits(CU1-CU0)
DiffServ TOS field definition (RFC 2474/2475)
· Layer 3. TOS field in IP header for DiffServ. 6-bits
gives 64 levels. 2 bits used for congestion.
Drop
Class 1
Class 2
Class 3
Class 4
Low
001010
AF11
DSCP
10
010010
AF21
DSCP
18
011010
AF31
DSCP
26
100010
AF41
DSCP
34
Medium
001100
AF12
DSCP
12
010100
AF 22
DSCP
20
011100
AF32
DSCP
28
100100
AF42
DSCP
36
High
001110
AF13
DSCP
14
010110
AF23
DSCP
22
011110
AF33
DSCP
30
100110
AF43
DSCP
38
·
·
D4
D3
D2
D1
D0
ECN
ECN
DSCP - six bits (DS5-DS0)
ECN (Explicit Congestion
Notification)- two bits
(config)# class-map match-all VOIP
1751-uut1(config-cmap)# match ip dscp ?
<0-63>
Differentiated services codepoint value
af11
Match packets with AF11 dscp (001010)
af12
Match packets with AF12 dscp (001100)
af13
Match packets with AF13 dscp (001110)
af21
Match packets with AF21 dscp (010010)
af22
Match packets with AF22 dscp (010100)
af23
Match packets with AF23 dscp (010110)
af31
Match packets with AF31 dscp (011010)
af32
Match packets with AF32 dscp (011100)
af33
Match packets with AF33 dscp (011110)
af41
Match packets with AF41 dscp (100010)
af42
Match packets with AF42 dscp (100100)
af43
Match packets with AF43 dscp (100110)
cs1
Match packets with CS1(precedence 1) dscp
cs2
Match packets with CS2(precedence 2) dscp
cs3
Match packets with CS3(precedence 3) dscp
cs4
Match packets with CS4(precedence 4) dscp
cs5
Match packets with CS5(precedence 5) dscp
cs6
Match packets with CS6(precedence 6) dscp
cs7
Match packets with CS7(precedence 7) dscp
default Match packets with default dscp (000000)
ef
Match packets with EF dscp (101110)
(config-cmap)# match ip dscp af31
(001000)
(010000)
(011000)
(100000)
(101000)
(110000)
(111000)
Author: Bill Buchanan
D5
Marking options
Queuing methods
Priority Queuing (PQ)
Queuing method which has four queues of high,
medium, normal and low priorities. Always empty
the highest priority queue first.
Weighted Fair Queuing (WFQ)
Queuing method that examines the traffic flow, such
as for source and destination addresses, to
determine the type of queuing.
Weighted Round-Robin Queuing (WRRQ)
Queuing method which priorities based on the IP
precedence value, but still gives low priority a
chance.
Author: Bill Buchanan
Class-based Weighted Fair Queuing (CB-WFQ)
Decides queuing method automatically determines
what should go into higher and lower priority queues
Low Latency Queuing (LLQ)
Checks the classification of the egress traffic and if
the priority is high, it is process first, otherwise it
uses a class-based weighted-fair queue
Congestion Avoidance
Interface
Route
Processor
Packet
Packet
Buffer is
full. Next
packets
will be
dropped
unless the
buffer is
emptied
Packet
Packet
Tail Dropping
Author: Bill Buchanan
Egress
buffer
RED and WRED
Interface
Route
Processor
Packet
Packet
Random
Early
Detection
Packet
Weighted RED. Uses
CoS value to drop
backs.
Threshold 1 (50%)
CoS=0,1
Random drop.
Packet
Egress
buffer
RED and WRED
Threshold 2 (80%)
CoS=2,3
Random drop.
CoS 2,3 has higher
priority.
Author: Bill Buchanan
Randomly
delete
Example of Modular QoS
(config)# access-list 1 permit 192.168.0.0 0.0.0.255
(config)# class-map class1
(config-cmap)# match access-group 101
(config-cmap)# exit
(config)# interface e1
(config-if)# service-policy output policy1
(config-if)# exit
Traffic policy
Marking of
traffic, policing
and queue type
Apply policy
Author: Bill Buchanan
(config)# policy-map policy1
(config-pmap)# class class1
(config-pmap-c)# bandwidth 3000
(config-pmap-c)# queue-limit 30
(config-pmap-c)# set dscp AF12
(config-pmap)# exit
Class-map
Classification of
traffic
(config)# access-list 108 permit ip 162.78.102.0 0.0.255.255
247.226.90.0 0.0.255.255
(config)# class-map tayside
(config-cmap)# ?
QoS class-map configuration commands:
description Class-Map description
exit
Exit from QoS class-map configuration mode
match
classification criteria
no
Negate or set default values of a command
rename
Rename this class-map
(config-cmap)# match ?
access-group
Access group
any
Any packets
class-map
Class map
destination-address Destination address
input-interface
Select an input interface to match
ip
IP specific values
mpls
Multi Protocol Label Switching specific values
not
Negate this match result
protocol
Protocol
source-address
Source address
vlan
VLANs to match
(config-cmap)# match access-group 108
(config-cmap)# exit
Class-map
Define traffic
characteristics
Policy-map
Define the
policy for the
traffic
Author: Bill Buchanan
First define Class Map
Service-policy
Apply the policy
(config)# policy-map ankle
(config-pmap)# ?
QoS policy-map configuration commands:
class
policy criteria
description Policy-Map description
exit
Exit from QoS policy-map configuration mode
no
Negate or set default values of a command
rename
Rename this policy-map
(config-pmap)# class tayside
(config-pmap-c)# ?
QoS policy-map class configuration commands:
bandwidth Bandwidth
exit
Exit from QoS class action configuration mode
no
Negate or set default values of a command
trust
Set trust value for the class
<cr>
police
Police
set
Set QoS values
(config-pmap-c)# bandwidth 128
(config-pmap-c)# queue-limit 21
(config-pmap-c)# exit
(config-pmap)# exit
Class-map
Define traffic
characteristics
Policy-map
Define the
policy for the
traffic
Author: Bill Buchanan
Next define Policy map
Service-policy
Apply the policy
Finally apply the policy map
Class-map
Define traffic
characteristics
Policy-map
Define the
policy for the
traffic
Author: Bill Buchanan
(config)# int fa0/1
(config-if)# service-policy ?
history Keep history of QoS metrics
input
Assign policy-map to the input of an interface
output
Assign policy-map to the output of an interface
(config-if)# service-policy output ?
WORD policy-map name
(config-if)# service-policy output ankle
Service-policy
Apply the policy
Finally apply the policy map
Class-map
Define traffic
characteristics
Policy-map
Define the
policy for the
traffic
Author: Bill Buchanan
(config)# int fa0/1
(config-if)# service-policy ?
history Keep history of QoS metrics
input
Assign policy-map to the input of an interface
output
Assign policy-map to the output of an interface
(config-if)# service-policy output ?
WORD policy-map name
(config-if)# service-policy output ankle
Service-policy
Apply the policy
Priority Queuing (PQ)
Priority Queuing (PQ)
High
Medium
(config)# priority-list 1 qUeue-limit 20 40 60 80
(config)# priority-list 1 protocol http high
(config)# priority-list 1 protocol ipx low
(config)# int serial0
(config-if)# priority-group 1
(config-if)# exit
(config)# Exit
# show priority queuing
Normal
Low
High priority queue is
always serviced first,
followed by medium,
then by normal, and then
by low
Author: Bill Buchanan
Packet
PQ
Author: Bill Buchanan
(config)# priority-list ?
<1-16> Priority list number
(config)# priority-list 1 ?
default
Set priority queue for unspecified datagrams
interface
Establish priorities for packets from a named interface
protocol
priority queueing by protocol
queue-limit Set queue limits for priority queues
(config)# int fa0/1
(config)# priority-list 1 q ?
<0-32767> High limit
(config)# priority-list 1 q 20 ?
<0-32767> Medium limit
(config)# priority-list 1 q 20 40 ?
<0-32767> Normal limit
(config)# priority-list 1 q 20 40 60 ?
<0-32767> Lower limit
(config)# priority-list 1 q 20 40 60 80 ?
<cr>
(config)# priority-list 1 q 20 40 60 80
(config)# prio 1 p ?
aarp
AppleTalk ARP
appletalk
AppleTalk
arp
IP ARP
bridge
Bridging
bstun
Block Serial Tunnel
cdp
Cisco Discovery Protocol
clns
ISO CLNS
clns_es
ISO CLNS End System
clns_is
ISO CLNS Intermediate System
cmns
ISO CMNS
compressedtcp
Compressed TCP (VJ)
decnet
DECnet
decnet_node
DECnet Node
decnet_router-l1 DECnet Router L1
decnet_router-l2 DECnet Router L2
dlsw
Data Link Switching (Direct encapsulation only)
http
HTTP
ip
IP
ipv6
IPV6
ipx
Novell IPX
llc2
llc2
pad
PAD links
pppoe
PPP over Ethernet
qllc
qllc protocol
rsrb
Remote Source-Route Bridging
snapshot
Snapshot routing support
Author: Bill Buchanan
PQ
PQ
Author: Bill Buchanan
(config)# priority-list 1 protocol http ?
high
medium
normal
low
(config)# priority-list 1 protocol http high
(config)# priority-list 1 protocol ipx low
(config)# int serial0
(config-if)# prority-group 1
Custom Queuing (CQ)
Custom Queuing (CQ)
1
2
(config)# queue-list 1 protocol ip 1
(config)# queue-list 1 protocol cdp 2
(config)# queue-list 1 queue 1 limit 40
(config)# queue-list 1 queue 2 limit 20
(config)# int fa0/1
(config-if)# Custom-queue-list 1
CQ can use up to 16
queues in a round-robin
manner.
16
Author: Bill Buchanan
Packet
CQ
(config)# queue-list ?
<1-16> Queue list number
Author: Bill Buchanan
(config)# queue-list 1 ?
default
Set custom queue for unspecified datagrams
interface
Establish priorities for packets from a named interfac
lowest-custom Set lowest number of queue to be treated as custom
protocol
priority queueing by protocol
queue
Configure parameters for a particular queue
stun
Establish priorities for stun packets
(config)# queue-list 1 protocol ?
arp
IP ARP
bridge
Bridging
bstun
Block Serial Tunnel
cdp
Cisco Discovery Protocol
compressedtcp Compressed TCP
dlsw
Data Link Switching (Direct encapsulation only)
ip
IP
ipv6
IPV6
llc2
llc2
pad
PAD links
pppoe
PPP over Ethernet
qllc
qllc protocol
rsrb
Remote Source-Route Bridging
snapshot
Snapshot routing support
stun
Serial Tunnel
CQ
(config)# queue-list 1 protocol ip ?
<0-16> queue number
(config)# queue-list 1
gt Classify packets
lt Classify packets
<cr>
(config)# queue-list 1
protocol ip 1 ?
greater than a specified size
less than a specified size
protocol ip 1
(config)# que 1 queue ?
<0-16> queue number
(config)# que 1 q 1 ?
byte-count Specify size in bytes of a particular queue
limit
Set queue entry limit of a particular queue
(config)# que 1 q 1 l 40 ?
byte-count Specify size in bytes of a particular queue
<cr>
(config)# que 1 q 1 l 40
(config)# int fa0/1
(config-if)# custom-queue-list 1
Author: Bill Buchanan
(config)# que 1 q 1 limit ?
<0-32767> number of queue entries
WRRQ
(config-if)#
<1-65536>
(config-if)#
<1-65536>
(config-if)#
<1-65536>
(config-if)#
<1-65536>
(config-if)#
wrr-queue bandwidth ?
enter bandwidth weight for
wrr-queue bandwidth 3 ?
enter bandwidth weight for
wrr-queue bandwidth 3 8 ?
enter bandwidth weight for
wrr-queue bandwidth 3 8 10
enter bandwidth weight for
wrr-queue bandwidth 3 8 10
qid 1
qid 2
qid 3
?
qid 4
12
In this case the bandwidth is:
Author: Bill Buchanan
Queue 1: 3/(3+8+10+12) = 9.1%
Queue 2: 3/(3+8+10+12) = 24.2%
Queue 3: 3/(3+8+10+12) = 30.3%
Queue 4: 3/(3+8+10+12) = 36.4%
WRRQ
(config-if)# wrr-queue cos-map ?
<1-4> enter cos-map queue id
(config-if)# wrr-queue cos-map 1 ?
<0-7> 8 cos values separated by spaces
(config-if)# wrr-queue cos-map 3 4 5
(config-if)# wrr-queue cos-map 1 0 1 2 4
(config-if)# wrr-queue cos-map 3 4 5
Queue 1 has CoS of 0, 1, 2 and 4 allocated to it
Queue 3 has CoS of 4 and 5 allocated to it.
(config-if)# wrr-queue random-detect 1 max-threshold 50 100
(config-if)# wrr-queue random-detect 3 max-threshold 80 100
Queue 1 has a min threshold of 50% and a max of 100%
Queue 3 has a min threshold of 80% and a max of 100%
(config-if)# wrr-queue dscp-map 1 0 1 2 3 4 5 6 7
(config-if)# wrr-queue dscp-map 1 8 9
(config-if)# wrr-queue dscp-map 2 10 11 12 13 14
Author: Bill Buchanan
To assign DSCP values to queues:
SPAN
All the received traffic from FA0/1
and FA0/2 are sent to this node
Author: Bill Buchanan
(config)# monitor session 1 source interface fa0/1 - 2 rx
(config)# monitor session 1 destination interface fa0/14
Remote SPAN (RSPAN)
All the received traffic from FA0/1
and FA0/2 are sent to a remote
station
(config)# int vlan 10
(config-vlan)# remote-span
(config-vlan)# exit
(config)# monitor session 1 source interface fa0/1 - 2 rx
(config)# monitor session 1 destination remote vlan 10
Author: Bill Buchanan
(config)# monitor session 1 remote vlan 10
(config)# monitor session 1 destination interface fa0/14
Download