# IP Address (IPAddressGenerator)

The [IP Address](/app/generation/generators/generator-reference/ip-address.md) generator generates a random string that is formatted as an IP address.

## Link object structure <a href="#generator-api-ip-address-link-object" id="generator-api-ip-address-link-object"></a>

The IP Address generator does not support linking. It can be self-consistent or consistent with another column. You cannot configure differential privacy.

The `metadata` object is populated from the [`RatioMetadata`](https://app.tonic.ai/apidocs/index.html#/models/RatioMetadata) object. The `ratio` field specifies, as a decimal value, the percentage of values to format as IPV4. The remaining values are formatted as IPV6.

```json
{
  "schema": "string",
  "table": "string",
  "column": "string",
  "path": "string",  //JSON fields only
  "dataType": "string",  //MongoDB, Amazon DynamoDB, and JSON fields only
  "metadata": {
    "presetId": "string",
    "generatorId": "IPAddressGenerator",
    "ratio": numeric,
    "isConsistent": boolean,
    "consistencyColumn": "string",
    "encryptionProcessor": "x-on", //To use configured Structural data encryption
    "customValueProcessor": "string"  //If custom value processor applied
  }
}
```

## Example replacement <a href="#generator-api-ip-address-replacement" id="generator-api-ip-address-replacement"></a>

In the following example replacement for the IP Address generator, 90% of the generated addresses are IPV4. Consistency is disabled.

```json
{
  "name": "ip",
  "table": "servers",
  "schema": "public",
  "links": [
    {
      "schema": "public",
      "table": "servers",
      "column": "ip",
      "metadata": {
        "presetId": "IPAddressGenerator",
        "generatorId": "IPAddressGenerator",
        "ratio": 0.9,
        "isConsistent": false
      }
    }
  ]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tonic.ai/app/api/quick-start-guide/tonic-api-generator-assignment/generator-api-reference/generator-api-ref-ip-address.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
