Master CCNA

How to Master CCNA Ebook

 

 

My book will help you Master CCNA

Master CCNP SWITCH

How to master CCNP SWITCH ebook

 

 

My book will help you Master CCNP SWITCH

Master CCNP ROUTE

How to master CCNP ROUTE Ebook

 

 

My book will help you Master CCNP ROUTE

Print

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 192.168.23.3
timeout 0
frequency 9
ip sla monitor schedule 1 start-time now life forever

 

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

 

! G711 conversation
ip sla monitor 3
type jitter dest-ipaddr 192.168.23.3 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 192.168.23.2 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 http://192.168.23.3
frequency 60
ip sla monitor schedule 5 start-time now life forever

 

! TCPConnect to Telnet
ip sla monitor 6
type tcpConnect dest-ipaddr 192.168.23.3 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 192.168.23.3 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 192.168.23.3 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 192.168.23.3 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

 

FastEthernet0/0
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.

Related Articles
Only registered users can write comments!

Comments (8)

  • avatar
    nld

    http://www.cisco.com/en/US/tech/tk801/tk36/technologies_tech_note09186a0080094694.shtml

  • avatar
    fallenfuzz

    sounds interesting.
    any ccie level lab will be also great :)

  • avatar
    ReneMolenaar

    I'd love to have a CCIE-level lab but those take time...i'm doing labs myself for CCIE and already happy if i finish one without going insane ;D

  • avatar
    Alim

    Rene...

    Awesome man! I can didn't know IP SLA had that much capability. I can definitely use this. Can you provide your running configs on how you applied this to the network and interfaces...

  • avatar
    ReneMolenaar

    Hi Alim,

    I have a couple of labs with configs that use IP SLA. You can use it for static/default routes and stuff like HSRP, VRRP.

    Each protocol that can use "Object Tracking" can be used for IP SLA...so if you want some example you can find them at google. Maybe i'll cook up a lab with different protocols that can use IP SLA :)

    Rene

  • avatar
    Networker25

    The information you have shared is extremely useful for me. A big thanks to you for sharing such a great stuff... :)

  • avatar
    RonB

    Great info. Thanks for posting this. I'm looking forward to testing it out.

    I have been using extended ping to generate packets with QoS tagging in the headers.

    Use ping or ping ip for extended ping

    Router#ping
    Protocol [ip]:
    Target IP address: 10.1.1.2
    Repeat count [5]:
    Datagram size [100]:
    Timeout in seconds [2]:
    Extended commands [n]: y

  • avatar
    ReneMolenaar

    Glad you guys like it. I think IP SLA is extremely useful for testing stuff and generating traffic. In real life networks it's useful to combine with "object tracking". You can use it for static routes, hsrp and such as well.

    good luck!

    Rene