Diferenças
Esta página mostra as diferenças entre as duas revisões da página.
| public:tutoriais:huawei:huawei-netstream-original [2024/08/25 15:39] – criado - edição externa 127.0.0.1 | public:tutoriais:huawei:huawei-netstream-original [2026/11/27 17:09] (Atual) – ljbernardi | ||
|---|---|---|---|
| Linha 1: | Linha 1: | ||
| - | ====== | + | ====== NetStream (NetFlow) |
| + | O **NetStream** é o equivalente Huawei ao NetFlow: o roteador amostra os pacotes e exporta os fluxos para um coletor (por exemplo, nfdump, ElastiFlow, pmacct ou um sistema de análise de tráfego por ASN). | ||
| + | Este exemplo foi usado na **linha NE (roteadores)**. Valores como slot e interface mudam conforme o equipamento. | ||
| - | Esse exemplo foi usado na Linha NE (Routers). Alguns valores como slot e interface podem mudar. | + | ===== Original ou agregado? ===== |
| - | Configurar dentro do controlado para gerar o NetStream | + | ^ Modo ^ O que exporta ^ Quando usar ^ |
| - | slot X | + | | **Original** | Cada fluxo individual (IP origem/ |
| - | ip netstream sampler to slot self | + | | **Agregado** (por AS) | Fluxos já somados por AS | Relatórios de tráfego por operadora/ |
| - | ipv6 netstream sampler to slot self | + | |
| - | | + | |
| - | Configurar os modos de exportar, especificar a versão e o IP da caixa que irá exportar o fluxo. | + | Os passos 1 a 4 são iguais nos dois modos. Depois, escolha |
| - | ip netstream export index-switch 32 | + | |
| - | ip netstream as-mode 32 | + | |
| - | ip netstream tcp-flag enable | + | |
| - | ip netstream export version 9 peer-as | + | |
| - | ip netstream export source SOURCE_IP | + | |
| - | commit | + | |
| - | Configurar os modos de exportar, especificar a versão e o IPv6 da caixa que irá exportar o fluxo. | + | ---- |
| - | ipv6 netstream export index-switch 32 | + | |
| - | ipv6 netstream as-mode 32 | + | |
| - | ipv6 netstream tcp-flag enable | + | |
| - | ipv6 netstream export version 9 peer-as | + | |
| - | ipv6 netstream export source ipv6 SOURCE_IPv6 | + | |
| - | commit | + | |
| - | Configurar | + | ===== 1. Habilitar |
| - | ip netstream sampler fix-packets 1 inbound | + | |
| - | ip netstream sampler fix-packets 1 outbound | + | |
| - | ipv6 netstream sampler fix-packets 1 inbound | + | |
| - | ipv6 netstream sampler fix-packets 1 outbound | + | |
| - | commit | + | |
| - | Configurar | + | < |
| - | interface Eth-Trunk0.1755 | + | slot X |
| - | | + | ip netstream sampler to slot self |
| - | | + | ipv6 netstream sampler to slot self |
| - | | + | |
| - | | + | </ |
| - | | + | |
| + | ===== 2. Parâmetros de exportação IPv4 ===== | ||
| + | |||
| + | Define o formato (versão 9 com peer-as), o tamanho do índice e do AS (32 bits) e o IP de origem da exportação. | ||
| + | |||
| + | < | ||
| + | ip netstream export index-switch 32 | ||
| + | ip netstream as-mode 32 | ||
| + | ip netstream tcp-flag enable | ||
| + | ip netstream export version 9 peer-as | ||
| + | ip netstream export source SOURCE_IP | ||
| + | commit | ||
| + | </ | ||
| + | |||
| + | ===== 3. Parâmetros de exportação IPv6 ===== | ||
| + | |||
| + | < | ||
| + | ipv6 netstream export index-switch 32 | ||
| + | ipv6 netstream as-mode 32 | ||
| + | ipv6 netstream tcp-flag enable | ||
| + | ipv6 netstream export version 9 peer-as | ||
| + | ipv6 netstream export source ipv6 SOURCE_IPv6 | ||
| + | commit | ||
| + | </ | ||
| + | |||
| + | ===== 4. Taxa de amostragem ===== | ||
| + | |||
| + | No exemplo, '' | ||
| + | |||
| + | < | ||
| + | ip netstream sampler fix-packets 1 inbound | ||
| + | ip netstream sampler fix-packets 1 outbound | ||
| + | ipv6 netstream sampler fix-packets 1 inbound | ||
| + | ipv6 netstream sampler fix-packets 1 outbound | ||
| + | commit | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== 5A. Modo original: definir o coletor ===== | ||
| + | |||
| + | No modo original, o destino da exportação é configurado de forma global. | ||
| + | |||
| + | < | ||
| + | ip netstream export host NetStream_SERVER SERVER_PORT | ||
| + | ipv6 netstream export host NetStream_SERVER SERVER_PORT | ||
| + | commit | ||
| + | </ | ||
| + | |||
| + | ===== 5B. Modo agregado: agregação por AS e coletor ===== | ||
| + | |||
| + | No modo agregado, o destino é configurado dentro de cada agregação. | ||
| + | |||
| + | < | ||
| + | ip netstream aggregation as | ||
| + | | ||
| + | | ||
| + | ip netstream export host NetStream_SERVER SERVER_PORT | ||
| + | | ||
| + | | ||
| + | |||
| + | ipv6 netstream aggregation as | ||
| + | | ||
| + | | ||
| + | ipv6 netstream export host NetStream_SERVER SERVER_PORT | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== 6. Habilitar a captura na interface | ||
| + | |||
| + | Aplique na interface (ou subinterface) por onde passa o tráfego a ser analisado, normalmente | ||
| + | |||
| + | < | ||
| + | interface Eth-Trunk0.1755 | ||
| + | ip netstream inbound | ||
| + | ip netstream outbound | ||
| + | ipv6 netstream inbound | ||
| + | ipv6 netstream outbound | ||
| + | | ||
| + | </ | ||
| + | |||
| + | ===== 7. Verificar ===== | ||
| + | |||
| + | < | ||
| + | display ip netstream statistics | ||
| + | display ip netstream cache | ||
| + | </ | ||
| + | |||
| + | Os parâmetros desses comandos (slot, origem/ | ||
| + | |||
| + | No coletor, confirme que os pacotes chegam na porta configurada (por exemplo, '' | ||