Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    DHCP not working on VLANs - SOLVED

    Scheduled Pinned Locked Moved DHCP and DNS
    1 Posts 1 Posters 492 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      chevdor
      last edited by

      I am running into an issue with DHCP on VLANs.
      tldr: I did end up solving the issue but since I was about to post the topic and it may help others, I decided to keep it.

      I did find a post that sounded similar (https://forum.netgate.com/topic/112358/no-dhcp-on-vlan-interfaces) but I did setup my interface fine I think (see below).

      So here is a recap of where I stand:

      • I am on a Mac and I did create some virtual interfaces for the VLANs
      • I have a typical LAN with DHCP
      • I have a few VLANs, all showing the same issue

      Running a DHCP request on the LAN works as expected:

      sudo nmap  --script broadcast-dhcp-discover -e en0
      
      Starting Nmap 7.93 ( https://nmap.org ) at 2023-04-02 19:30 CEST
      Pre-scan script results:
      | broadcast-dhcp-discover:
      |   Response 1 of 1:
      |     Interface: en0
      |     IP Offered: 192.168.0.197
      |     DHCP Message Type: DHCPOFFER
      |     Server Identifier: 192.168.0.1
      |     IP Address Lease Time: 2h00m00s
      |     Subnet Mask: 255.255.255.0
      |     Router: 192.168.0.1
      |     Domain Name Server: 192.168.0.1
      |_    Domain Name: ....
      

      All good. If I do the same test on a VLAN, I get no DHCP response.

      Here is one of the VLANs:
      666d4858-425d-4972-86e5-6f644b5482ec-image.png

      The interface was created with a static IP:
      0ce8920a-ce4d-49e9-831e-2bc36db0e586-image.png

      And the DHCP was setup for the interface:
      d6717b7a-7b70-426b-bdde-6c88bb573b7d-image.png

      I also defined one static mapping.

      I can ping the router on the VLAN:
      c7a20328-03dc-4f45-80b9-69a6dd0f3411-image.png

      But my machine (Mac) and others do not get leases.
      fd769cb9-bfd5-4de2-abf8-d47410cf1a0e-image.png

      Hardware-wise:

      Mac -> trunk -> Unifi USW -> ... -> ... 🤦

      ... thank you internet for the rubber ducking... In the chain, most (but not all, and that was the issue) links were trunk and ONE was LAN only... so my VLAN traffic did not go through, as expected, and causing my problem.

      Problem solved.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.