em 05-12-2025 03:33 AM
IP SLA (IP Service Level Agreements) é uma tecnologia da Cisco que permite medir a performance da rede em tempo real. Com ela, é possível monitorar métricas como:
Ela é amplamente usada para validar SLAs (Service Level Agreements) em links WAN, verificar qualidade de serviço (QoS), e tomar decisões de roteamento com base em desempenho (por exemplo, com tracking e rotas flutuantes).
O IP SLA simula o tráfego de aplicações reais e envia pacotes de teste entre um roteador originador (source) e um destino (target). O roteador monitora a resposta e coleta estatísticas para análise.
Para melhor entendimento, tenho 3 exemplos de laboratório para configuração do IP SLA.
O roteador Matriz possui conexões redundantes com o ServerWeb configuradas com rotas estáticas para cada caminho. Nesta fase inicial do projeto, a gerência gostaria que você usasse o recurso de IP SLA configurando duas sondas, uma originada de cada interface do roteador Matriz.
Primeiro, vamos verificar as rotas para os dois Links Wan.
MATRIZ# show ip route
…
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.3.1.0/30 is directly connected, GigabitEthernet0/0
L 10.3.1.2/32 is directly connected, GigabitEthernet0/0
C 10.3.1.4/30 is directly connected, GigabitEthernet0/1
L 10.3.1.6/32 is directly connected, GigabitEthernet0/1
S 192.168.1.0/24 [1/0] via 10.3.1.5
[1/0] via 10.3.1.1
O destino ServerWeb é alcançado com sucesso.
MATRIZ# ping 192.168.1.100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/5 ms
Configuração do IP SLA:
MATRIZ# conf t
MATRIZ(config)#ip sla 1
MATRIZ(config-ip-sla)#icmp-echo 10.3.1.1 source-interface g0/0
MATRIZ(config-ip-sla-echo)#frequency 5
MATRIZ(config-ip-sla-echo)#exit
MATRIZ(config)#ip sla schedule 1 start-time now life Forever
MATRIZ(config)#ip sla 2
MATRIZ(config-ip-sla)#icmp-echo 10.3.1.5 source-interface g0/1
MATRIZ(config-ip-sla-echo)#frequency 5
MATRIZ(config-ip-sla-echo)#exit
MATRIZ(config)#ip sla schedule 2 start-time now life forever
As sondas testam o acesso via ambas as interfaces. O comando frequency define a periodicidade da checagem (em segundos).
Verificação:
MATRIZ# show ip sla configuration
IP SLAs Infrastructure Engine-III
Entry number: 1
Owner:
Tag:
Operation timeout (milliseconds): 5000
Type of operation to perform: icmp-echo
Target address/Source interface: 10.3.1.1/GigabitEthernet0/0
Type Of Service parameter: 0x0
Request size (ARR data portion): 28
Data pattern: 0xABCDABCD
Verify data: No
Vrf Name:
Schedule:
Operation frequency (seconds): 5 (not considered if randomly scheduled)
Next Scheduled Start Time: Start Time already passed
Group Scheduled : FALSE
Randomly Scheduled : FALSE
Life (seconds): Forever
Entry Ageout (seconds): never
Recurring (Starting Everyday): FALSE
Status of entry (SNMP RowStatus): Active
Threshold (milliseconds): 5000
Distribution Statistics:
Number of statistic hours kept: 2
Number of statistic distribution buckets kept: 1
Statistic distribution interval (milliseconds): 20
Enhanced History:
History Statistics:
Number of history Lives kept: 0
Number of history Buckets kept: 15
History Filter Type: None
MATRIZ# show ip sla statistics 1
IPSLAs Latest Operation Statistics
IPSLA operation id: 1
Latest RTT: 1 milliseconds
Latest operation start time: 18:27:30 UTC Sat May 10 2025
Latest operation return code: OK
Number of successes: 117
Number of failures: 0
Operation time to live: Forever
No link para o ISP-1, simulamos uma falha, desligando a interface.
MATRIZ# conf t
MATRIZ(config)#interface g0/0
MATRIZ(config-if)#shutdown
MATRIZ(config-if)#do show ip sla statistics 1
IPSLAs Latest Operation Statistics
IPSLA operation id: 1
Latest RTT: NoConnection/Busy/Timeout
Latest operation start time: 18:30:54 UTC Sat May 10 2025
Latest operation return code: Timeout
Number of successes: 138
Number of failures: 33
Operation time to live: Forever
A saída do comando show ip sla statistics 1 mostra falhas. Com isso, conseguimos validar a detecção de falhas em tempo real.
A gerência está satisfeita com seu esforço em usar o IP SLA para validar a conectividade WAN com o ServerWeb. Como uma segunda fase, eles gostariam que você usasse o recurso IP SLA para testar o acesso HTTP diretamente ao servidor.
Verificando novamente acesso ao destino.
MATRIZ# ping 192.168.1.100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/2/3 ms
Este teste acessa a URL diretamente para simular o comportamento de um cliente HTTP real.
MATRIZ#conf t
MATRIZ(config)#ip sla 100
MATRIZ(config-ip-sla)#http get http://192.168.1.100
MATRIZ(config-ip-sla-http)#frequency 60
MATRIZ(config-ip-sla-http)#exit
MATRIZ(config)#
MATRIZ(config)#ip sla schedule 100 start-time now life forever
Verificação:
MATRIZ#show ip sla configuration
IP SLAs Infrastructure Engine-III
Entry number: 100
Type of operation to perform: http
Target address/Source address: 192.168.1.100/0.0.0.0
Target port/Source port: 80/0
Type Of Service parameters: 0x0
Vrf Name:
HTTP Operation: get
HTTP Server Version: 1.0
URL: http://192.168.1.100
Proxy:
Raw String(s):
Cache Control: enable
Owner:
Tag:
Operation timeout (milliseconds): 60000
Schedule:
Operation frequency (seconds): 60 (not considered if randomly scheduled)
A saída mostra RTT total da transação HTTP, tempo de conexão TCP e tempo de resposta do servidor:
MATRIZ#show ip sla statistics
IPSLAs Latest Operation Statistics
IPSLA operation id: 100
Latest RTT: 819 milliseconds
Latest operation start time: 19:12:31 UTC Sat May 10 2025
Latest operation return code: OK
Latest DNS RTT: 0 ms
Latest TCP Connection RTT: 27 ms
Latest HTTP Transaction RTT: 792 ms
Number of successes: 1
Number of failures: 0
Operation time to live: Forever
Com isso, é possível monitorar a qualidade da aplicação e não apenas da rede.
Após vários testes de IP SLA, você está pronto para colocá-lo em produção para implementar a redundância testada no ServerWeb.
MATRIZ# conf t
MATRIZ(config)#ip sla 10
MATRIZ(config-ip-sla)#icmp-echo 10.3.1.1 source-interface g0/0
MATRIZ(config-ip-sla-echo)#frequency 5
MATRIZ(config-ip-sla-echo)#exit
MATRIZ(config)#ip sla schedule 10 start-time now life forever
MATRIZ(config)#
MATRIZ(config)#track 1 ip sla 10 reachability
MATRIZ(config-track)#exit
O Object Track 1 monitora a resposta da sonda IP SLA 10.
Roteamento Estático, remover rotas:
MATRIZ#show ip route
...
S 192.168.1.0/24 [1/0] via 10.3.1.5
[1/0] via 10.3.1.1
MATRIZ# conf t
MATRIZ(config)#no ip route 192.168.1.0 255.255.255.0 10.3.1.1
MATRIZ(config)#no ip route 192.168.1.0 255.255.255.0 10.3.1.5
Nova configuração:
MATRIZ(config)#ip route 192.168.1.0 255.255.255.0 10.3.1.1 track 1
MATRIZ(config)#ip route 192.168.1.0 255.255.255.0 10.3.1.5 5
A rota primária (via G0/0) depende do track. A secundária (via G0/1) tem distância administrativa maior (5), sendo usada apenas em caso de falha.
MATRIZ(config)#do show ip route
…
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.3.1.0/30 is directly connected, GigabitEthernet0/0
L 10.3.1.2/32 is directly connected, GigabitEthernet0/0
C 10.3.1.4/30 is directly connected, GigabitEthernet0/1
L 10.3.1.6/32 is directly connected, GigabitEthernet0/1
S 192.168.1.0/24 [1/0] via 10.3.1.1
Em ISP-1, realizamos uma falha na interface g0/0 que está conectada diretamente no roteador Matriz:
ISP-1#conf t
ISP-1(config)#int g0/0
ISP-1(config-if)#shutdown
No roteador Matriz, recebe uma notificação:
MATRIZ# *May 10 20:23:57.516: %TRACK-6-STATE: 1 ip sla 10 reachability Up -> Down
E muda a rota para:
MATRIZ# show ip route
…
S 192.168.1.0/24 [5/0] via 10.3.1.5
Novamente em ISP-1, ativamos a interface g0/0:
ISP-1(config-if)#no shutdown
Em Matriz, o roteador detecta:
MATRIZ# *May 10 20:27:22.518: %TRACK-6-STATE: 1 ip sla 10 reachability Down -> Up
E a rota retorna ao caminho principal.
MATRIZ#show ip route
…
S 192.168.1.0/24 [1/0] via 10.3.1.1
O IP SLA é uma poderosa ferramenta de diagnóstico e automação em redes Cisco. Ele permite decisões inteligentes com base na qualidade real do caminho, tornando a rede mais resiliente e adaptável.
Neste artigo, mostramos como:
Referência:
Este artigo foi baseado nos laboratórios demonstrados por Jeremy Cioara, instrutor da CBT Nuggets, no curso CCNP Enterprise.
Muito interessante seu trabalho, querido Assis. Podemos negociar sobre a implementação dessa framework?
@pablohierro obrigado pelo elogio, no caso, essa ferramenta é própria da cisco e já integrada nos IOS, não precisa realizar instalação.
Esse recurso é exclusivo nos dispositivos Cisco, no Windows não conheço ferramenta nativa que monitoraria as aplicações, sugiro uma pesquisa por sistemas de terceiros. Espero ter ajudado.
A proposta do IP SLA é ser um sensor dentro da infraestrutura Cisco, não um software multi-plataforma.
o IP SLA é uma funcionalidade do IOS da Cisco, focada no monitoramento ativo da Rede, e não tem como objetivo se integrar diretamente com sistemas operacionais como o Windows. Ele gera métricas como latência, jitter e perda de pacotes que podem ser coletadas por ferramentas de monitoramento compatíveis com SNMP, muitas das quais rodam em Linux, Windows ou mesmo na nuvem
Muito bom conteúdo.
Encontre respostas, faça perguntas e conecte-se com nossa comunidade de especialistas da Cisco de todo o mundo.
Estamos felizes por você estar aqui! Participe de conversas e conecte-se com sua comunidade.
Navegue pelos links rápidos da Comunidade e usufrua de um conteúdo personalizado e em seu idioma nativo: