Objetivo
Reunir os comandos de Camada 2 do DmOS mais usados em operação de ISP: criação e diagnóstico de VLAN, aprendizado de MAC, agregação de links (LACP) e Spanning-Tree. Fonte: "DmOS 5.12.0 – Command Reference" (doc. 204.4284.31), Capítulo 5 (Layer 2 - Switching Protocols, páginas 296-411).
Pré‑requisitos
- VLAN ID válido: 1 a 4094 em todos os comandos
- Comandos mac-address-table interface/vlan limit não suportados nos modelos DM4270, DM4775, DM4770, DM4380
- Versão de referência: DmOS 5.12.0
Procedimento
1. MAC Learning — aging-time e controle por porta
config
mac-address-table aging-time 500
mac-address-table interface gigabit-ethernet-1/1/1 learning enabled
mac-address-table interface gigabit-ethernet-1/1/1 limit maximum 10
mac-address-table vlan 15 limit maximum 10
commit
Aging-time é o tempo que uma entrada MAC fica na tabela sem tráfego (padrão 600s, 0 desativa). "learning disabled" desliga aprendizado numa porta — atenção: combinado com storm control unicast pode causar perda de dados por flood DLF. "limit maximum" restringe MACs por porta ou por VLAN (0 = desativa e descarta tráfego); se os dois limites estiverem configurados, vale o mais restritivo.
2. MAC Learning — consultar a tabela
show mac-address-table
show mac-address-table interface gigabit-ethernet-1/1/1
show mac-address-table vlan 100
show mac-address-table type dynamic
Filtra por interface, MAC específico, VLAN ou tipo (dynamic/static). Saída mostra INTERFACE, MAC ADDRESS, VLAN e TYPE.
3. VLAN — criar e adicionar interface
config
dot1q vlan 100 name Clientes-PPPoE
dot1q vlan 100 interface gigabit-ethernet-1/1/1
dot1q vlan 100
interface gigabit-ethernet-1/1/1
untagged
top
commit
Por padrão a interface entra tagged na VLAN. Pra untagged, usa-se o comando "untagged" dentro da árvore de configuração da interface dentro da VLAN. Interfaces membros de LAG não podem ser adicionadas individualmente — configure o LAG. Interfaces service-port não aceitam untagged direto, toda manipulação é via comando service-port.
4. VLAN — Native VLAN
config
switchport interface gigabit-ethernet-1/1/1
native-vlan vlan-id 100
commit
Native VLAN é aplicada a pacotes que chegam sem tag. Pré-requisito oficial obrigatório: a interface precisa já ser membro UNTAGGED da VLAN antes de virar native-vlan dela — pular essa etapa é a causa mais comum de "VLAN incorreta" em campo (ver artigo de Troubleshooting).
5. VLAN — diagnóstico
show vlan brief
show vlan membership brief
show vlan membership detail
"membership detail" mostra PORT STATE (Disabled/Learning/Forwarding/Blocked) por VLAN×porta — controlado por protocolos como RSTP, EAPS e ERPS. Porta "Blocked" numa VLAN que deveria passar tráfego é sinal de proteção de loop ativa, não erro de config de VLAN.
6. Link Aggregation (LACP) e Spanning-Tree
config
interface lag 1
link-aggregation system-priority 32768
link-aggregation load-balance hash-function src-dst-mac
spanning-tree bridge-priority 32768 forward-delay 15 hello-time 2 maximum age 20 mode rstp
commit
show link-aggregation brief
show link-aggregation lacp statistics
show spanning-tree brief
LAG (Link Aggregation Group) agrupa portas físicas num link lógico redundante. Spanning-Tree (aqui em modo RSTP ou MST) evita loop em topologias com redundância física.
Troubleshooting
Referências
Histórico de alterações
Artigo criado.
10/07/2026 · Thiago Gomes Rodrigues