VMs on NSX Segments fail to receive IP addresses from an external DHCP server.
search cancel

VMs on NSX Segments fail to receive IP addresses from an external DHCP server.

book

Article ID: 419891

calendar_today

Updated On:

Products

VMware NSX VMware vSphere ESXi

Issue/Introduction

  • In vCenter, you observe that the newly deployed VMs are getting an APIPA IP address in the range of 169. #.#.#

  • Capturing packets on the edge host uplink, we can see that the DHCP requests are leaving the ESXI host uplink, but no response/offer packets are seen from the external DHCP server:

    [root@is-esx-###:~] pktcap-uw --uplink vmnic# --capture UplinkSndKernel,UplinkRcvKernel -o - | tcpdump-uw -enr - | grep -i BOOTP/DHCP

The session capture point is UplinkSndKernel,UplinkRcvKernel.
pktcap: The output file is -.
pktcap: No server port specified, select 15456 as the port.
pktcap: Local CID 2.
pktcap: Listen on port 15456.
pktcap: Main thread: 351908125888.
pktcap: Dump Thread: 351908656896.
pktcap: The output file format is pcapng.
pktcap: Recv Thread: 351909185280.
pktcap: Accept...
reading from file -, link-type EN10MB (Ethernet)pktcap: Vsock connection from port 1038 cid 2.
, snapshot length 65535

08:11:25.778347 ##:##:##:##:##:## > ##:##:##:##:##:##, ethertype IPv4 (0x0800), length 400: 10.##.##.##.64430 > 10.##.##.##.6081: Geneve, Flags [none], vni 0x####, proto TEB (0x6558), options [8 bytes]: ##:##:##:##:##:## > ##:##:##:##:##:##, ethertype IPv4 (0x0800), length 342: 10.##.##.#.67 > 1##.##.##.##.67: BOOTP/DHCP, Request from ##:##:##:##:##:##, length 300

Environment

  • VMware NSX Datacenter.

Cause

The external DHCP server is not configured with a scope that matches the CIDR of the NSX Segment, causing the server to ignore or drop DHCP Discovery/Request packets originating from those segments.

Resolution

Create a DHCP scope for the VM's subnets on the external DHCP server.

Additional Information

Reference KB for capturing the packets:

KB345925