Skip to main content

Tutorial: Assign DNS servers using DHCP for AWS VPC

Abstract

Configure a DHCP option set in your AWS VPC to point DNS to the CloudConnexa Connector's tunnel subnet — enabling VPC resources to resolve Application Domain-Based Routing domains through CloudConnexa without manual DNS configuration on each resource.

This tutorial shows how to configure a DHCP option set on your AWS VPC to assign DNS servers to all resources in your VPC. Doing this lets your VPC resources resolve application domain names defined in CloudConnexa using Application Domain-Based Routing.

How it works

CloudConnexa assigns a tunnel IP address to your network connector when it connects to the WPC. The DNS server for your VPC should be set to the IP address one lower than the connector's tunnel IP address.

For example, if the connector's tunnel IP address is 100.96.1.18, the DNS server IP address is 100.96.1.17.

This DNS server handles resolution for Applications configured on the WPC, allowing your VPC resources to reach them by domain name rather than IP address.

Prerequisites

  • CloudConnexa admin portal access.

  • An AWS VPC with a deployed CloudConnexa network connector.

  • AWS console access with permissions to manage VPC DHCP option sets.

Step 1: Find your connector's tunnel IP address

  1. Select Networks and open the network that contains your AWS connector.

  2. Select Connectors and locate your connector.

  3. Note the IPv4 Address shown for the connector. This is the tunnel IP address.

  4. Subtract 1 from the last octet to get your DNS server IP address. For example:

    • Tunnel IP: 100.96.1.18

    • DNS server IP: 100.96.1.17

Step 2: Create a DHCP option set in AWS

  1. Sign in to the AWS Management Console and open the VPC service.

  2. In the navigation pane, select DHCP option sets.

  3. Select Create DHCP option set.

  4. Enter a name for the option set. For example, cloudconnexa-dns.

  5. In the Domain name servers field, enter the DNS server IP address you calculated in Step 1.

  6. Leave all other fields at their default values unless your environment requires specific settings.

  7. Select Create DHCP option set.

Step 3: Associate the DHCP option set with your VPC

  1. In the navigation pane, select Your VPCs.

  2. Select the VPC that your CloudConnexa connector is deployed in.

  3. Select Actions, then select Edit VPC settings.

  4. Under DHCP option set, select the option set you created in Step 2.

  5. Select Save.

    • AWS applies the new DHCP settings to instances in the VPC as they renew their DHCP leases. To apply the change immediately to a specific instance, you can renew the DHCP lease manually or restart the instance's network interface.

Verify the configuration

To confirm DNS resolution is working correctly:

  1. Connect to an EC2 instance in the VPC and run:

    nslookup your-application-domain.example.com
  2. Verify that the response returns the IP address associated with the CloudConnexa application.

  3. If resolution fails, verify that the DHCP option set is associated with the correct VPC and that the connector's tunnel IP address is correct.