Skip to main content
RunBook Academy

← All runbooks in OPNsense

low riskinformational~30 min

Runbook: Troubleshoot VLAN Connectivity

1 · Prerequisites

Confirm every item is in place before any state change.

  • OPNsense 25.x with at least one VLAN configured and assigned
  • Console or shell access to OPNsense
  • Switch with administrative access for trunk/access verification

2 · Pre-checks

Read-only diagnostic commands. If any of these don't match expected output, stop and investigate further.

  • · Capture a fresh encrypted config backup before any change
  • · Confirm the affected VLAN ID, the parent interface on OPNsense, and the access switch the device is on
  • · Confirm the device IP, expected gateway IP, and expected behavior

3 · Procedure

Execute each step in order. Verify the expected output of a step before moving to the next.

  1. 1Verify the VLAN exists on OPNsense: Interfaces > Other Types > VLAN lists the VLAN ID with the correct parent interface.
  2. 2Verify the VLAN is assigned to an OPT interface: Interfaces > Assignments shows the VLAN with an OPT entry; open the OPT and confirm Enable is checked and the IP/CIDR is correct.
  3. 3Verify the interface is up: at the OPNsense shell, ifconfig <vlan_if> shows status: active and the configured address.
  4. 4Verify the firewall rules on the VLAN interface allow the traffic you expect (Firewall > Rules > [VLAN interface]). The default deny at the bottom catches anything not explicitly allowed.
  5. 5Test from OPNsense to the device: from Diagnostics > Ping, ping the device IP. Success means the path OPNsense → device is healthy.
  6. 6Test from the device to its gateway: from the device, ping the VLAN interface IP. Failure here means the path device → OPNsense is broken.
  7. 7Capture on the parent interface: tcpdump -nei <parent_if> vlan <vlan_id> -c 50 while reproducing. You should see 802.1Q-tagged frames for the VLAN. No frames = the trunk is not carrying the VLAN.
  8. 8If no frames arrive, check the upstream switch: confirm the OPNsense-facing port is a trunk and the VLAN ID is on the allowed list. Confirm the device-facing port is an access port for the VLAN ID.
  9. 9Capture on the VLAN interface itself: tcpdump -nei <vlan_if> -c 50 while reproducing. You should see untagged frames; if you only see tagged frames, the parent NIC is not stripping the tag as expected.
  10. 10Check spanning tree: a blocked port on the access side will silently drop frames; check the switch STP state for the access port.
  11. 11Check for duplicate IPs: a duplicate IP on the VLAN will cause intermittent connectivity; arp -an on the device and on OPNsense should agree.
  12. 12For inter-VLAN issues, confirm inter-VLAN routing: OPNsense routes between local interfaces by default, but a block rule on either side will stop it. Confirm rules in both directions.

4 · Verification

Confirm the procedure actually fixed the problem.

  • Device can ping the VLAN interface IP
  • OPNsense can ping the device IP from Diagnostics > Ping
  • ifconfig <vlan_if> shows status: active and the configured address
  • Packet capture on the parent interface shows 802.1Q-tagged frames for the VLAN
  • Inter-VLAN flows complete end-to-end when expected

5 · Rollback

If verification fails, undo the procedure in reverse order.

  • If firewall rules were changed, disable the new rules and apply.
  • If the VLAN interface was toggled, restore it to its prior enable state.
  • Restore the pre-change encrypted config backup if alias or other changes were made.
  • Revert any switch port changes to the documented prior state.

6 · Escalation

When the runbook isn't enough, contact:

  • · Escalate to the network team if the trunk is not carrying the VLAN: switch port mode mismatch, allowed VLAN list mismatch, or trunk disabled.
  • · Escalate to the network team if spanning tree is blocking a port; portfast or edge-port configuration may be needed on access ports.
  • · Escalate to the platform team if the parent NIC does not show the VLAN despite a correct config; suspect driver issue or unsupported hardware.
  • · Escalate to security if the request is to allow inter-VLAN routing that crosses trust boundaries (e.g. guest to corporate) without a documented exception.

Purpose

This runbook diagnoses why a host on a VLAN cannot reach its gateway or other VLANs, isolating the fault between OPNsense, the trunk, the access switch port, and the host itself. It is the diagnostic companion to opnsense-rb-add-vlan.

When to use this runbook

Use this runbook when a host on a VLAN loses connectivity (was working, or never came up after a VLAN add), or when inter-VLAN routing is failing in a way that points at OPNsense or the trunk. If the issue is clearly a host-side firewall, start on the host and skip the OPNsense-side diagnostics.

Pre-checks

  • Capture a fresh encrypted config backup before any change.
  • Confirm the affected VLAN ID, the parent interface on OPNsense, and the access switch the device is on.
  • Confirm the device IP, expected gateway IP, and expected behavior (gateway reachable? specific destination reachable?).

Procedure

  1. Verify the VLAN exists. Open Interfaces > Other Types > VLAN. The VLAN ID should be listed with the correct parent interface. If missing, the device cannot possibly reach OPNsense until the VLAN is created.
  2. Verify assignment. Open Interfaces > Assignments. The VLAN should be assigned to an OPT entry. Click the OPT and confirm Enable interface is checked and the IP/CIDR is correct.
  3. Verify the interface is up. At the OPNsense shell (Diagnostics > Command Prompt), run ifconfig <vlan_if>. You should see status: active and the configured address. If status: no carrier, the trunk or parent link is down.
  4. Verify the firewall rules. Open Firewall > Rules > [VLAN interface]. The default deny at the bottom catches anything not explicitly allowed. Add or fix rules before going further.
  5. Test from OPNsense to the device. From Diagnostics > Ping, ping the device IP. Success means the path OPNsense → device is healthy; failure means the issue is on the access side or the device.
  6. Test from the device to its gateway. From the device, ping the VLAN interface IP. Failure means the path device → OPNsense is broken — usually the trunk, the access port, or the host firewall.
  7. Capture on the parent interface. At the OPNsense shell, run tcpdump -nei <parent_if> vlan <vlan_id> -c 50 while reproducing. You should see 802.1Q-tagged frames for the VLAN. No frames at all = the trunk is not carrying the VLAN.
  8. If no frames arrive, check the upstream switch. Confirm the OPNsense-facing port is a trunk and the VLAN ID is on the allowed list. Confirm the device-facing port is an access port for the VLAN ID. Watch the counters increment on both ports during the test.
  9. Capture on the VLAN interface itself. Run tcpdump -nei <vlan_if> -c 50 while reproducing. You should see untagged frames; if you only see tagged frames, the parent NIC is not stripping the tag as expected (rare, indicates a driver issue).
  10. Check spanning tree. A blocked port on the access side silently drops frames. Check the switch STP state for the access port; an ALN/BLK state means STP is blocking. Configure portfast/edge on access ports if STP is delaying connectivity.
  11. Check for duplicate IPs. A duplicate IP on the VLAN causes intermittent connectivity. From the device, arp -an shows the gateway MAC. From OPNsense, arp -an | grep <device_ip> should show the same MAC. Mismatch means ARP is fighting.
  12. For inter-VLAN issues. OPNsense routes between local interfaces by default, but a block rule on either side will stop it. Confirm rules exist in both directions on both interfaces. For asymmetric routing across multiple hops, check the path in both directions.

Verification

  • Device can ping the VLAN interface IP.
  • OPNsense can ping the device IP from Diagnostics > Ping.
  • ifconfig <vlan_if> shows status: active and the configured address.
  • Packet capture on the parent interface shows 802.1Q-tagged frames for the VLAN.
  • Inter-VLAN flows complete end-to-end when expected.

Rollback

  • If firewall rules were changed, disable the new rules and apply.
  • If the VLAN interface was toggled, restore it to its prior enable state.
  • Restore the pre-change encrypted config backup if alias or other changes were made.
  • Revert any switch port changes to the documented prior state.

Escalation

  • Escalate to the network team if the trunk is not carrying the VLAN: switch port mode mismatch, allowed VLAN list mismatch, or trunk disabled.
  • Escalate to the network team if spanning tree is blocking a port; portfast or edge-port configuration may be needed on access ports.
  • Escalate to the platform team if the parent NIC does not show the VLAN despite a correct config; suspect driver issue or unsupported hardware.
  • Escalate to security if the request is to allow inter-VLAN routing that crosses trust boundaries (e.g. guest to corporate) without a documented exception.

References

  1. OPNsense documentation — VLAN troubleshooting
  2. OPNsense documentation — Packet capture
  3. OPNsense documentation — Firewall rules