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

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 there were no response/offer packets 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 0#:5#:5#:6#:#0:5# > 00:X2:Xd:f8:X9:ff, ethertype IPv4 (0x0800), length 400: 10.#.2##.X9.64430 > 10.#.###.##.6081: Geneve, Flags [none], vni 0x1X4X5, proto TEB (0x6558), options [8 bytes]: 0X:5X:X6:X6:4X:52 > 0X:5X:X6:X6:X3:00, ethertype IPv4 (0x0800), length 342: 10.##.##.#.## > 1X0.X5.1X0.2X.6X: BOOTP/DHCP, Request from 0#:5#:#6:9#:#f:#d, length 300
08:11:54.357349 0#:5#:5#:6#:#0:5#:56 > 00:X2:Xd:f8:X9:ff, ethertype IPv4 (0x0800), length 400: 10.#.2##.X9.63939 > 10.#.###.##.6081: Geneve, Flags [none], vni 0x1X4X5, proto TEB (0x6558), options [8 bytes]: 0X:5X:X6:X6:4X:52 > 0X:5X:X6:X6:X3:00, ethertype IPv4 (0x0800), length 342: 10.##.##.#.## > 1X0.X5.1X0.2X.6X: BOOTP/DHCP, Request from 0X:5X:X6:9X:Xb:X2, length 300
08:11:58.033446 0#:5#:5#:6#:#0:5#:56 > 00:X2:Xd:f8:X9:ff, ethertype IPv4 (0x0800), length 400: 10.#.2##.X9.64430 > 10.#.###.##.6081: Geneve, Flags [none], vni 0x1X4X5, proto TEB (0x6558), options [8 bytes]: 0X:5X:X6:X6:4X:52 > 0X:5X:X6:X6:X3:00, ethertype IPv4 (0x0800), length 342: 10.##.##.#.## > 1X0.X5.1X0.2X.6X: BOOTP/DHCP, Request from 0#:5#:#6:9#:#f:#d, length 300
08:11:58.363300 0#:5#:5#:6#:#0:5# > 00:X2:Xd:f8:X9:ff, ethertype IPv4 (0x0800), length 400: 10.#.2##.X9.63939 > 10.#.###.##: Geneve, Flags [none], 0x1X4X5, proto TEB (0x6558), options [8 bytes]: 0X:5X:X6:X6:4X > 0X:5X:X6:X6:X3:00, ethertype IPv4 (0x0800), length 342: 10.##.##.#.## > 1##.9X.1##.2X.X7: BOOTP/DHCP, Request from 0X:5X:X6:9X:Xb:X2, length 300
08:12:01.484896 0#:5#:5#:6#:#0:5# > 00:X2:Xd:f8:X9:ff, ethertype IPv4 (0x0800), length 400: 10.#.2##.X9.63939 > 10.#.###.##: Geneve, Flags [none], 0x1X4X5, proto TEB (0x6558), options [8 bytes]: 0X:5X:X6:X6:4X > 0X:5X:X6:X6:X3:00, ethertype IPv4 (0x0800), length 342: 10.##.##.#.## > 1##.9X.1##.2X.X7: BOOTP/DHCP, Request from 0#:5#:#6:9#:#f:#d, 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

  • Creating a DHCP scope for the VM's subnets should resolve the issue.

Additional Information

Reference KB for capturing the packets:

KB345925