Configura il DHCP su una Edge NSX-v (EN)

Assign IPs to your VMs through DHCP

Last Updated on 22nd November 2021

Objective

DHCP allows automatic assignment of private IPs to VMs behind your NSX Edge Services Gateway.

This guide explains how to setup the DHCP service.

Requirements

Instructions

Interface access

In the vSphere interface menu, go to the Networking and Security dashboard.

Menu

On the left side, navigate to the NSX Edges section then click on the appliance you're setting up.

NSX

In the DHCP tab, you'll see 3 options:

  • Pools
  • Bindings
  • Relay

We'll set up those 3 services in this guide.

Let's start with Pools. Click on it.

NSX

Pools menu

The Pools menu allows the traditional setup of the DHCP service.
We'll set up a scope for it and will start the service.

Click on + Add.

In the New DHCP Pool window, fill in the informations you need:

  • Start IP is the first usable IP for the DHCP service
  • End IP is the first usable IP for the DHCP service
  • Domain Name is optional but can be useful for your DNS
  • Primary and Secondary Name Server are your personalized DNS settings (can be auto configured if the slider above is turned on)
  • Default Gateway is optional
  • Subnet Mask is self explanatory
  • You can set never ending leases or mofify lease times if that's a requirement
  • You have more advanced options in the DHCP Options tab but those are outside of the scope of this guide

Pool

Click on Add when done.

The DHCP pool is ready but you need to click Start and then Publish to start the service and register the changes.

Pool

The DHCP is now operational. You can see the service status and the basic information on the pool.

Pool

Bindings menu

Now on the left side, click on Bindings.

Bindings will always assign the same DHCP address to a specific network interface, depending on a specific information.
Click on + Add when ready.

Bind

There are 2 ways to create bindings:

  • VM NIC Binding: the IP address will be set for a specific VM network interface
  • MAC Binding: the IP address will be set for a specific MAC address

For VM NIC Binding, type in the information as follows:

  • Interface: Edge Services Gateway interface that will be distributing the address
  • VM Name: VM that will receive the address
  • VM vNIC Index: Which network adapter on the VM will be assigned the address
  • Host Name: DNS name of the VM (optional)
  • IP Address: Address reserved for the NIC
  • Subnet Mask: Subnet mask
  • Domain Name: Domain name (optional)
  • Default Gateway: Default Gateway
  • You can set never ending leases or mofify lease times if that's a requirement

Bind

Don't forget your DNS Settings. They can be put manually or configured automatically.

Click on Save when done.

Bind

Now click on + Add again and choose Use MAC Binding.

  • MAC Address: Target NIC MAC address
  • Host Name: DNS name of the VM (optional)
  • IP Address: Address reserved for the NIC
  • Subnet Mask: Subnet mask
  • Domain Name: Domain name (optional)
  • Default Gateway: Default Gateway
  • You can set never ending leases or mofify lease times if that's a requirement

Bind

Again, do not forget your DNS Settings.

Click on Save when done.

Bind

You can now Publish our changes.

Bind

The DHCP Bindings and their basic settings are now visible.

Bind

Relay menu

Click on Relay.

The set up of a DCHP relay implies the existence of routes to the target DHCP servers.

First, create the Global Configuration by clicking Edit.

Relay

You can add:

  • Pre-existing IP sets set up in your NSX Edge Services Gateway
  • IP adresses of DHCP servers
  • Domain Names

Click Save when ready.

Relay

Now click + Add to set up an agent.

Relay

The vNIC will be the Edge Services Gateway interface that will forward the DHCP requests.
The Gateway Address is the address that will forward the requests.

Click Add.

Relay

You can now Publish the changes.

Relay

Your DHCP Relay will be functional after a short wait.

Relay

Go further

Join our community of users on https://community.ovh.com/en/.


Questa documentazione ti è stata utile?

Prima di inviare la valutazione, proponici dei suggerimenti per migliorare la documentazione.

Immagini, contenuti, struttura... Spiegaci perché, così possiamo migliorarla insieme!

Le richieste di assistenza non sono gestite con questo form. Se ti serve supporto, utilizza il form "Crea un ticket" .

Grazie per averci inviato il tuo feedback.


Potrebbero interessarti anche...

OVHcloud Community

Accedi al tuo spazio nella Community Fai domande, cerca informazioni, pubblica contenuti e interagisci con gli altri membri della Community OVHcloud

Discuss with the OVHcloud community

Conformemente alla Direttiva 2006/112/CE e successive modifiche, a partire dal 01/01/2015 i prezzi IVA inclusa possono variare in base al Paese di residenza del cliente
(i prezzi IVA inclusa pubblicati includono di default l'aliquota IVA attualmente in vigore in Italia).