| Description | This article describes how to check a VLAN tag on DHCP Messages of devices that request a DHCP IP from FortiGate configured as a DHCP Server. |
| Scope | FortiGate. |
| Solution |
There are cases that which the FortiGate is set up as a DHCP server for a certain VLAN ID and devices are unable to get the IP address for that VLAN. One of the troubleshooting steps is to check if the DHCP Messages is received by the FortiGate and if it is correctly tagged by a VLAN ID. Here is another helpful article to explain the DHCP Process: Technical-Tip-Understanding-DHCP-Process
The example below will provide steps to capture DHCP Messages and check the VLAN tag if correct.
Diagram:
FortiGate's Interfaces:
diagnose sniff packet port2 " " 6 0 l <----- This command will capture all traffic on port2. ctrl+c <----- To stop the sniffer.
Attached an example file of Packet capture that have a VLAN 20 tag for reference:
It shows on the image the DHCP Messages. More importantly, the DHCP Discovery sent by the PC with transaction ID 0x79543bd Another filter related to transaction ID can also be added: bootp.id == 0x79543bd
The image above shows the VLAN tag ID 20 on the DHCP Messages. This tag should be visible on the DHCP Messages so that the FortiGate could provide an IP address that is configured on the DHCP Server for VLAN 20.
Below is another example if the DHCP Messages being untagged. FortiGate will provide an IP address within the range of the DHCP Server in the Physical Interface instead.
The image below is not related to the network setup for the DHCP Messages that have a VLAN tagging:
Related articles: Technical Tip: Diagnosing DHCP on a FortiGate Troubleshooting Tip: Client receives the wrong DHCP scope Troubleshooting Tip: Using the FortiGate sniffer on VLAN interfaces |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.