EMAIL SUPPORT

dclessons@dclessons.com

LOCATION

NZ

LAB NSX Edge Service Gateway as DHCP Relay

LAB NSX Edge Service Gateway as DHCP Relay

Posted on Jan 17, 2020 (0)

LAB NSX Edge Service Gateway as DHCP Relay

Task:

Create a new network segment within NSX

  • Enable the DHCP Relay agent on the new network segment
  • Utilize a pre-created DHCP scope on a DHCP server that requires DHCP Relay
  • Network boot (PXE) a blank VM via DHCP scope options

Topology: 

Solution :

  1. Click Home icon.
  2. Click Networking & Security.

Create New Logical Switch

We must first create a new Logical Switch that will run our new 172.16.50.0/24 network.

  1. Click Logical Switches.
  2. Click the Green Plus icon to create a new Logical Switch.

  1. Enter DClessons-DHCP-Relay as Name.
  2. Click OK.

Connect Logical Switch to Perimeter Gateway

We will now attach the logical switch to an interface on the Perimeter Gateway. This interface will be the default gateway for the 172.16.50.0/24 network with an address of 172.16.50.1.

  1. Click NSX Edges.
  2. Double-click Perimeter-Gateway-01.

  1. Click Manage.
  2. Click Settings.
  3. Click Interfaces.
  4. Click to select vnic9.
  5. Click the Pencil icon.

We will select what Logical Switch the interface is connected to.

  1. Click Select. Click the radio button to the left of Dclessons-DHCP-Relay to select it.
  2. Click OK.

Enter Dclessons-DHCP Relay as the Name.

  1. Click Green Plus icon.
  2. Enter 172.16.50.1 as the Primary IP address.
  3. Enter 24 as the Subnet Prefix Length.
  4. Click OK.

CONFIGURE DHCP RELAY

Staying inside of the Perimeter Gateway, we must do the global configuration of DHCP Relay.

  1. Click Manage.
  2. Click DHCP.
  3. Click Relay.
  4. Click Edit.

This lab will use a single IP address for its configuration:

  1. Enter 192.168.110.10 in IP Addresses text-box.
  2. Click OK.

Configure DHCP Relay Agent

The DHCP Relay Agent will relay any DHCP requests from the gateway address on the logical switch to the configured DHCP Servers. We must add an agent to the logical switch / segment we created on 172.16.50.0/24.

  1. Click Green Plus icon.
  2. Select DClessons-DCHP-Relay as vNIC.
  3. Click OK.

Click Publish Changes.

 Create Blank VM for PXE Boot

We will now create a blank VM that will PXE boot from the DHCP server we are relaying to.

  1. Click Home icon.
  2. Click Hosts and Clusters.
  3. Expand RegionA01-COMP01.
  4. Right-click esx-02a.corp.local.
  5. Click New Virtual Machine.
  6. Click New Virtual Machine...

Select Create a New Virtual Machine.

  1. Click Next.
  2. Enter PXE VM for virtual machine name.
  3. Click Next.

Click to expand RegionA01-COMP01.

  1. Click to select host esx-02a.corp.local.
  2. Click Next. And select the same datastore and click Next | Click Next

Select Linux under Guest OS Family.

  1. Select Other Linux (64-bit) under Guest OS Version.
  2. Click Next.

We need to delete the default hard disk. Since we are booting from the network, the hard disk is not needed. This is because the PXE image is booting and running completely within RAM.

  1. Hover over New Hard Disk and click X.
  2. Select DHCP Relay network. The UUID of the logical switch may vary from the screenshot, but there is only one network named DClessons-DHCP-Relay. If you cannot find the network, click "show more networks"
  3. Click Next.
  4. Click Finish.

 Power on VM

Right click PXE VM.

  1. Click Power.
  2. Click Power On.

Next we will open a console to this VM and watch it boot from the PXE image. It receives this information via the remote DHCP server we configured earlier.

  1. Click PXE VM.
  2. Click Summary.
  3. Click VM Console.

Note the VM is now attempting to boot and obtain a DHCP address.


Comment

    You are will be the first.

LEAVE A COMMENT

Please login here to comment.