SLA Sample TCP Port
tcp connections to 192.168.1.1 port 99 every 1 second
ip sla 1
tcp-connect 192.168.1.1 99 control disable
threshold 1
timeout 1
frequency 1
ip sla schedule 1 life 300 start-time now
SLA Sample UDP Port
udp connections to 192.168.1.1 port 100 from sourceip 1.2.3.4 and sourceport 12345 every 1 second
ip sla 2
udp-echo 192.168.1.1 100 source-ip 1.2.3.4 source-port 12345 control disable
threshold 1
timeout 1
frequency 1
ip sla schedule 2 life 300 start-time now
SLA Sample ICMP
tcp connections to 192.168.1.1 port 100 every 1 second
ip sla 3
icmp-echo 192.168.1.1
threshold 1
timeout 1
frequency 1
ip sla schedule 3 life 300 start-time now
SLA Sample FTP
FTP to check, if a file is on a FTP server
ip sla 11
ftp get ftp://user:password@host/file_name
!
ip sla schedule 11 start-time now
SLA Sample HTTP
HTTP connections to 192.168.1.1 port 100 every 1 second with file index.html
(Limit: Minimum frequency for HTTP should be 60sec )
ip sla 4
http get http://192.168.2.100/index.html
threshold 1
timeout 1
frequency 60
ip sla schedule 4 life 300 start-time now
SLA Sample HTTP (RAW)
HTTP connections to 192.168.1.1 every 1 second with RAW Code
(Limit: Minimum frequency for HTTP should be 60sec )
ip sla 5
http raw http://192.168.1.1
http-raw-request
GET /ch/index.html HTTP/1.0\r\n\r\n
exit
threshold 1
timeout 1
frequency 60
ip sla schedule 5 life 300 start-time now
SLA Sample DNS
DNS request www.laber.com every 9 second to dns server 192.168.1.1
Minimum frequency for DNS operation should be 9
ip sla 6
dns www.laber.com name-server 192.168.1.1
timeout 1
threshold 1
frequency 9
ip sla schedule 10 life 300 start-time now
Schedule the SLA
ip sla schedule 1 start-time 10:00:00 life 300 recurring <- every day at 10:00 for 300 seconds
ip sla schedule 2 start-time now life forever <- start now and run forever
ip sla schedule 3 start-time 10:00:00 1 Jan life 1000 <- start on 1.Jan for 1000 seconds
play around with the options, Source-ip and source-port Lifetime, thershold etc..
and for testing with source-ip and source-port, the source-ip must NOT exist on a Loopback Interface.
For flooding it's requierd, that you have to enter "control disable". For HTTP or DNS Request, you can not
enable or diesale "control", beacause, there is no "CISCO" Responder.