DHCP Clients do not have dynamic IP assigned
search cancel

DHCP Clients do not have dynamic IP assigned

book

Article ID: 394075

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

Title: Alarm for DHCP clients not having dynamic IP assigned.

Event ID: clients_need_ip_from_dhcp_server

Alarm Description:

  • Purpose: To indicate one or more DHCP clients do not have dynamic IP assigned.
  • Added in release: 9.1
  • Impact: In this case, the virtual machine intended for network connection will receive an Automatic Private IP Addressing (APIPA) and won't obtain a legitimate IP address from the DHCP server.

Environment

VCF 9.1

Cause

This can happen if a VM started using static IP address for it's network adapter resulting in DHCP server to reclaim/release the pre-allocated IP and later a DHCP request was received on the same network adapter.

Resolution

For VCF 9.1 and higher:

  • Retrieve the affected Org, Project, VPC and Subnet details from the Alarm message.
  • Identify the port MAC addresses for which the server has reclaimed the dynamic IP by using /policy/api/v1/orgs/{org-id}/projects/{project-id}/vpcs/{vpc-id}/subnets/{subnet-id}/state/dhcp-server-managed-ports and looking for ‘ip’_allocation_state’ , ‘mac_address’ and ‘ip_address’ fields.
  • In the below sample, MAC "00:50:56:##:##:##” is determined as FAILURE (“ip_allocation_state” field) and it’s dynamic IP (“ip_address” field) is released by the server.

{ "ports": [ { "port_path": "/orgs/default/projects/default/vpcs/###/subnets/###/ports/default:########-6aaf-4363-b36f-############", "ip_allocation_state": “FAILURE”, "client_mode": “DHCP”, "mac_address": "00:50:56:#:##:##”, "ip_address": "0.0.0.0", "ip_address_consumed": false }, …. ] }

  • On VC, identify VM and the network adapter using the MAC address retrieved from above step.
  • Go to VM’s ‘Edit Settings’ page, perform disconnect & reconnect for the affected network adapter.
  • For the above network adapter’s MAC, verify SUCCESS for ‘ip_allocation_state’ valid IP address for the MAC is assigned by DHCP server IP using the above API.

{ "ports": [ { "port_path": "/orgs/default/projects/default/vpcs/###/subnets/###/ports/default:########-6aaf-4363-b36f-############", "ip_allocation_state": “SUCCESS”, "client_mode": “DHCP”, "mac_address": "00:50:56:#:##:##”, "ip_address": "10.X.Y.Z”, "ip_address_consumed": false }, …. ] }

  • Ensure DHCP client runs on the VM’s interface to acquire the newly allocated IP from the server.