Everytime I study QoS I think about ways to generate a constant rate of traffic from a router. I always test using pings but I never really know at what rate data is being pushed through. With SLA, I can configure a somewhat rudimentary way of doing this.
Suppose I want a router R1 to send 64K to R7 (off in the distance).
Let's figure out the data size and frequency. There are probably multiple ways to do this depending on frequency and request-data-size but here is how I do it:
My load-interval on R7 is going to be 30 seconds so 1,920,000 (64,000 x 30) bits need to flow through every 30 second interval. Now if I send data a 1 second intervals, then I need to send 64000 bits every second. 64000 bits = 8000 bytes.
Formula using 1 second frequency intervals:
Load-interval X desired bitrate = total bits per interval
total bits per interval / 8 = request-data-size
Here is the config:
R1(config)#ip sla monitor 1
R1(config-sla-monitor)#type echo protocol ipIcmpEcho 150.100.56.7
R1(config-sla-monitor-echo)#request-data-size 8000
R1(config-sla-monitor-echo)#frequency 1
On R7 I created this tracker:
ip sla monitor responder
access-list 100 permit icmp host 150.100.12.1 any
class-map match-all SLA
match access-group 100
policy-map TRACK-SLA
class SLA
interface FastEthernet0/0
service-policy input TRACK-SLA
Now Let's start the SLA monitor on R1:
R1(config)#ip sla monitor schedule 1 life forever start-time now
Now on R7 we use the show policy-map interface command to see the bit rate. It takes a little while but it should peak near 64000 bps give or take 1000.
After 750 packets we have 65K:
R7#sho policy-map interface
FastEthernet0/0
Service-policy input: TRACK-SLA
Class-map: SLA (match-all)
750 packets, 1027500 bytes
30 second offered rate 65000 bps
Match: access-group 100
Class-map: class-default (match-any)
91 packets, 6548 bytes
30 second offered rate 0 bps, drop rate 0 bps
Match: any
Now several minutes later we are still at 65K:
R7#sho policy-map interface
FastEthernet0/0
Service-policy input: TRACK-SLA
Class-map: SLA (match-all)
2784 packets, 3814080 bytes
30 second offered rate 65000 bps
Match: access-group 100
Class-map: class-default (match-any)
280 packets, 20188 bytes
30 second offered rate 0 bps, drop rate 0 bps
Match: any
Showing posts with label ip sla. Show all posts
Showing posts with label ip sla. Show all posts
Wednesday, December 17, 2008
Saturday, September 20, 2008
VRRP - SLA tracking
Today I have been doing IPexpert's volume 1 section 14 and 15 labs. Section 15 has to do with router redundancy, namely HSRP, VRRP and GLBP. I ran into a tracking issue that stumped for a short time but I thought it would be wise to document it.
The task states that R2 should be master unless its ping time to 150.100.220.7 exceeds 80ms. So I configure as follows:
track 2 rtr 1
!
ip sla monitor 1
type echo protocol ipIcmpEcho 150.100.220.7
threshold 80
int f1/0
vrrp 1 ip 150.100.12.100
vrrp 1 priority 105
vrrp 1 track 2
Immediately I see this on R2:
*Sep 20 22:18:20.107: %SYS-5-CONFIG_I: Configured from console by conso
*Sep 20 22:18:22.287: %VRRP-6-STATECHANGE: Fa1/0 Grp 1 state Master -> Backup
So I check my ping times:
R2#ping 150.100.220.7
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 150.100.220.7, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/9/12 ms
Way under 80 ms! What gives?
Turns out I never enabled the SLA!!
So I do this:
R2(config)#ip sla monitor schedule 1 start-time now
R2(config)#
*Sep 20 22:20:04.883: %VRRP-6-STATECHANGE: Fa1/0 Grp 1 state Backup -> Master
R2(config)#
I am glad this only took a few minutes to figure out but hopefully if you see this you will recognize the problem.
The task states that R2 should be master unless its ping time to 150.100.220.7 exceeds 80ms. So I configure as follows:
track 2 rtr 1
!
ip sla monitor 1
type echo protocol ipIcmpEcho 150.100.220.7
threshold 80
int f1/0
vrrp 1 ip 150.100.12.100
vrrp 1 priority 105
vrrp 1 track 2
Immediately I see this on R2:
*Sep 20 22:18:20.107: %SYS-5-CONFIG_I: Configured from console by conso
*Sep 20 22:18:22.287: %VRRP-6-STATECHANGE: Fa1/0 Grp 1 state Master -> Backup
So I check my ping times:
R2#ping 150.100.220.7
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 150.100.220.7, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/9/12 ms
Way under 80 ms! What gives?
Turns out I never enabled the SLA!!
So I do this:
R2(config)#ip sla monitor schedule 1 start-time now
R2(config)#
*Sep 20 22:20:04.883: %VRRP-6-STATECHANGE: Fa1/0 Grp 1 state Backup -> Master
R2(config)#
I am glad this only took a few minutes to figure out but hopefully if you see this you will recognize the problem.
Labels:
ip sla,
object tracking,
vrrp
Subscribe to:
Posts (Atom)