# System.net functions are not working

**URL:** <https://forum.inductiveautomation.com/t/system-net-functions-are-not-working/115602>\
**Category:** Ignition\
**Tags:** scripting, perspective, ignition81\
**Created:** [May 19, 2026, 3:02pm UTC](https://forum.inductiveautomation.com/t/system-net-functions-are-not-working/115602 "2026-05-19T15:02:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Kareem\_Tabet](https://avatars.discourse-cdn.com/v4/letter/d/4da419/32.png) [@Daniel\_Kareem\_Tabet](https://forum.inductiveautomation.com/u/Daniel_Kareem_Tabet)\
**Post date:** [May 19, 2026, 3:02pm UTC](https://forum.inductiveautomation.com/t/system-net-functions-are-not-working/115602/1 "2026-05-19T15:02:35Z")

</div>

Hi All,

I am trying to troubleshoot a script on a tag that uses the [system.net](http://system.net) functions. Essentially, we are trying to store some gateway information in some custom tags, which are later on used on some more elaborate navigation scripting across all ignition gateways in our campus.

We created a tag that stores the gateway IP address and hostname among other info, and we have a script that uses the system.net.getIpAddress() and system.net.getHostName() functions to pull this data into the tag, but the data being returned from both functions is null.

I even tried creating individual tags that run nothing but these system scripts, but I am still only receiving null data into those tags. Has anyone run into a similar issue?

We are running perspective on ignition 8.1.35.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![travisaggiebrown](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/travisaggiebrown/32/85824_2.png) [@travisaggiebrown](https://forum.inductiveautomation.com/u/travisaggiebrown)\
**Post date:** [May 19, 2026, 3:21pm UTC](https://forum.inductiveautomation.com/t/system-net-functions-are-not-working/115602/2 "2026-05-19T15:21:05Z")

</div>

Where is the script running? you need to make sure that you are running in gateway.

I was able to get both commands to successfully return the hostname and IP by creating a gateway event message handler with this script

```python
def handleMessage(payload):
	return (system.net.getHostName(), system.net.getIpAddress())

```

and then called it with system.util.sendRequest(). [system.util.sendRequest | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-util/system-util-sendRequest)

---

<div class="post-metadata">

**Author:** ![Daniel\_Kareem\_Tabet](https://avatars.discourse-cdn.com/v4/letter/d/4da419/32.png) [@Daniel\_Kareem\_Tabet](https://forum.inductiveautomation.com/u/Daniel_Kareem_Tabet)\
**Post date:** [May 21, 2026, 12:56pm UTC](https://forum.inductiveautomation.com/t/system-net-functions-are-not-working/115602/3 "2026-05-21T12:56:00Z")

</div>

Thanks for your reply, looks like it was a problem caused by our domain controller being down. Not too sure how the issues were related, but the functions now work as expected!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 21, 2026, 1:24pm UTC](https://forum.inductiveautomation.com/t/system-net-functions-are-not-working/115602/4 "2026-05-21T13:24:43Z")

</div>

Ignition has to use a reverse DNS request to convert an IP address to a hostname.

---

<div class="post-metadata">

**Author:** ![Jasmine\_Quick](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jasmine_quick/32/80380_2.png) [@Jasmine\_Quick](https://forum.inductiveautomation.com/u/Jasmine_Quick)\
**Post date:** [May 21, 2026, 1:54pm UTC](https://forum.inductiveautomation.com/t/system-net-functions-are-not-working/115602/5 "2026-05-21T13:54:59Z")

</div>

[It's always DNS](https://isitdns.com/)

---

<div class="post-metadata">

**Author:** ![Daniel\_Kareem\_Tabet](https://avatars.discourse-cdn.com/v4/letter/d/4da419/32.png) [@Daniel\_Kareem\_Tabet](https://forum.inductiveautomation.com/u/Daniel_Kareem_Tabet)\
**Post date:** [May 21, 2026, 3:15pm UTC](https://forum.inductiveautomation.com/t/system-net-functions-are-not-working/115602/6 "2026-05-21T15:15:38Z")

</div>

Fair enough, I get not being able to resolve the hostname, but shouldn't it still be able to return the host IP?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 21, 2026, 4:01pm UTC](https://forum.inductiveautomation.com/t/system-net-functions-are-not-working/115602/7 "2026-05-21T16:01:47Z")

</div>

If there's only one, I think. Keep in mind that the function looks at the gateway's IP address when running in a Perspective script. For Perspective, you should be using `session.props.host` value.

> **[Session Properties Table​ - Session Properties | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.3/ignition-modules/perspective/perspective-sessions/session-properties#session-properties-table)**
>
> Session properties are available for use throughout Perspective Sessions. Sessions of a given project will have the same list of properties, however, the actual values are unique and independent for each running Session.
