Master CCNA

How to Master CCNA Ebook


 Start your networking career and Master CCNA


How to master CCNP SWITCH ebook


 Become a switching guru and Master CCNP SWITCH


How to master CCNP ROUTE Ebook


 Dominate routing protocols and Master CCNP ROUTE


How to Master CCNP TSHOOT


 Complete your CCNP R&S journey and Master CCNP TSHOOT


GNS3 IP SLA Traffic Generator

Written by Rene Molenaar on . Posted in Blog

Hi Folks,


I've been busy studying/upgrading my QoS knowledge to get to the CCIE R&S level. I've been playing around finding a way to generate traffic through my routers to create bottlenecks and to have packets to classify / mark and such.


There are a couple of options you have if you want to play with GNS3 / Dynamips:


  • Connect your routers to your physical interface (eg internet) and have another one connect to a virtual machine. Download some stuff from your virtual machine through your GNS3 network and you have plenty of traffic to play with.
  • Use a traffic generator which you connect to your GNS3 routers.
  • Use Cisco IP Sla to generate traffic.


I didn't like option 1 and 2 much since it's too much work and I prefer having a "router-only" solution. That's why I've been playing with IP SLA. The result is the following configuration that i created which will generate ICMP, DNS, HTTP, HTTPS, Telnet, SSH and RTP (G711 and G729) traffic on a router.


! ICMP Echo
ip sla monitor 1
type echo protocol ipIcmpEcho
timeout 0
frequency 9
ip sla monitor schedule 1 start-time now life forever


! DNS Request
ip sla monitor 2
type dns target-addr name-server
timeout 0
frequency 9
ip sla monitor schedule 2 start-time now life forever


! G711 conversation
ip sla monitor 3
type jitter dest-ipaddr dest-port 16384 codec g711ulaw codec-numpackets 50 codec-size 160 codec-interval 20
timeout 0
frequency 1
ip sla monitor schedule 3 start-time now life forever


! G729 conversation
ip sla monitor 4
type jitter dest-ipaddr dest-port 16385 codec g729a codec-numpackets 50 codec-size 20 codec-interval 20
timeout 0
frequency 1
ip sla monitor schedule 4 start-time now life forever


! HTTP GET Traffic
ip sla monitor 5
type http operation get url
frequency 60
ip sla monitor schedule 5 start-time now life forever


! TCPConnect to Telnet
ip sla monitor 6
type tcpConnect dest-ipaddr dest-port 23 control disable
timeout 1000
frequency 2
ip sla monitor schedule 6 life forever start-time now


! TCPConnect to HTTPS
ip sla monitor 7
type tcpConnect dest-ipaddr dest-port 443 control disable
timeout 1000
frequency 3
ip sla monitor schedule 7 life forever start-time now


! TCPConnect to FTP
ip sla monitor 8
type tcpConnect dest-ipaddr dest-port 21 control disable
timeout 1000
frequency 1
ip sla monitor schedule 8 life forever start-time now


! TCPConnect to SSH
ip sla monitor 9
type tcpConnect dest-ipaddr dest-port 22 control disable
timeout 1000
frequency 2
ip sla monitor schedule 9 life forever start-time now


IP SLA will also allow you to monitor jitter/delay for voice traffic, if you want you need to enable "ip sla responder" on your destination router.


If you enable NBAR on a router in your network you can see traffic is actually flowing through the interface:


Router#show ip nbar protocol-discovery


Input                    Output                 
-----                    ------                 
Protocol                 Packet Count             Packet Count           
Byte Count               Byte Count             
5min Bit Rate (bps)      5min Bit Rate (bps)    
5min Max Bit Rate (bps)  5min Max Bit Rate (bps)
------------------------ ------------------------ ------------------------
telnet                   70                       28                     
4200                     1974                   
1000                     0                      
1000                     0                      
ssh                      64                       24                     
3840                     1440                   
1000                     0                      
1000                     0                      
secure-http              40                       15                     
2400                     900                    
1000                     0                      
1000                     0                      
icmp                     14                       18                     
1452                     1716                   
0                        0                      
0                        0                      
ftp                      30                       15                     
1800                     900


This configuration is what i'll be using on my upcoming QOS labs, hopefully you find it usefull!


If you like this config, please let me know by leaving a comment.