# cfxdm - dm:dns\_name\_to\_ip

**dm:dns\_name\_to\_ip:** It allows to resolve the FQDN names to IP addresses listed in a column  into another column.

**dm:dns\_name\_to\_ip:** Syntax

* **from\_cols** (mandatory)**:** Comma separated list of column names which has DNS Name (FQDN) values
* **to\_cols** (mandatory)**:** Comma separated list of column names to store resolved DNS Name (FQDN) names into IP Address.
* **keep\_value** (optional): If it is set to **'yes',** it stores the original value, else it stores 'null' value. By default it is set to '**no**'
* **num\_threads** (optional): Number of DNS lookup threads. Must be in the range of 1 to 20, Default is set to 5.

{% hint style="info" %}
This tag uses the DNS servers configured on the host os where **cfxdx** is installed and running for IP Address to DNS or FQDN name resolution.
{% endhint %}

{% hint style="info" %}
It requires an input dataset or a tag which has one or more columns with DNS Name (FQDN) values.
{% endhint %}

In the below example, tag [**dm:recall**](https://docs.cloudfabrix.io/rda/rda-userguide/rda-data-management-cfxdm/cfxdx-dm-recall) is used to retrieve the data from an existing saved dataset.

```
tag @dm:recall
```

```
data name = 'dns-name-dataset' --> @dm:dns_name_to_ip from_cols = 'Server_FQDN' & to_cols = 'Server_IP_Address' & keep_value = 'yes'
```

As shown in the below screen, dataset '**dns-name-dataset**' has a column called '**Server\_FQDN**' with DNS (FQDN) name values which is ingested into **dm:dns\_name\_to\_ip** tag to enrich the DnS name values by resolving them into IP Address and store the output into a new column called '**Server\_IP\_Address**'

**keep\_value = 'yes'** : This means, if a DNS Name (FQDN) is not resolved to IP Address, it will maintain the same DNS name as a value instead of leaving it as empty.

![](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MXF_CjjDJAvoy64LaDU%2F-MXFegs8B5vY9bI-Gl7O%2FScreen%20Shot%202021-04-01%20at%208.40.01%20PM.png?alt=media\&token=fee994c2-595d-4ccd-96d3-cd282ce5a012)

Below screen output shows the resolved IP Addresses under column '**Server\_IP\_Address**'

![](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MXF_CjjDJAvoy64LaDU%2F-MXFf5Th4K0DgphnCALL%2FScreen%20Shot%202021-04-01%20at%208.41.49%20PM.png?alt=media\&token=d6aaf224-3ec0-4e50-a17c-afd67b091abd)
