> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-xdr-3.x/cortex-xdr-3.x-documentation/cortex-xdr-xql/functions/is_known_private_ipv4.md).

# is\_known\_private\_ipv4

**Syntax**

```programlisting
is_known_private_ipv4(<IPv4_address>)
```

**Description**

The `is_known_private_ipv4()` function accepts an IPv4 address, and returns `true` if the IPv4 string address belongs to any of the following known set of private network IPs:

* 10.0.0.0/8
* 172.16.0.0/12
* 192.168.0.0/16

The IPv4 address can be either an explicit string using quotes (`""`), such as `"192.168.0.1"`, or a string field.

{% hint style="info" %}

### Note

The `<IPv4_address>` must contain an IPv4 address in an IPv4 field. For production purposes, this IPv4 address will normally be carried in a field that you retrieve from a dataset. For manual usage, assign the IPv4 address to a field, and then use that field with this function.
{% endhint %}

**Example**

<details>

<summary>Data table for ips_test_raw dataset</summary>

The example provided is based on the following data table for a dataset called `ips_test_raw`:

| \_TIME                 | IP                   | \_VENDOR | \_PRODUCT |
| ---------------------- | -------------------- | -------- | --------- |
| Mar 26th 2025 19:26:07 | 1.1.1.1              | ips      | test      |
| Mar 26th 2025 19:26:07 | 192.168.1.100        | ips      | test      |
| Mar 26th 2025 19:26:07 | FF0E::1              | ips      | test      |
| Mar 26th 2025 19:26:07 | 127.0.0.1            | ips      | test      |
| Mar 26th 2025 19:26:07 | 172.32.0.1           | ips      | test      |
| Mar 26th 2025 19:26:07 | 2606:4700:4700::1111 | ips      | test      |

</details>

<details>

<summary>Query: Filter the IPv4 addresses belonging to a set of known private network IPs</summary>

```programlisting
dataset = ips_test_raw
| alter IsKnownPrivateIpv4 = is_known_private_ipv4(ip)
| filter IsKnownPrivateIpv4
```

</details>

<details>

<summary>Output results table</summary>

Returns all the IPv4 addresses that belong to a set of known private network IPs from the `ip` field in the `ips_test_raw` dataset. When the `is_known_private_ipv4` function returns `true`, the results are displayed with a new **IsKnownPrivateIpv4** column (field) indicating a **true** value. If the function returns `false`, no results are returned.

| \_TIME                 | IP            | \_VENDOR | \_PRODUCT | ISKNOWNPRIVATEIPV4 |
| ---------------------- | ------------- | -------- | --------- | ------------------ |
| Mar 26th 2025 19:26:07 | 192.168.1.100 | ips      | test      | true               |

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-xdr-3.x/cortex-xdr-3.x-documentation/cortex-xdr-xql/functions/is_known_private_ipv4.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
