# Get Gateway IP Address

**URL:** <https://forum.inductiveautomation.com/t/get-gateway-ip-address/79182>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [September 14, 2023, 7:01pm UTC](https://forum.inductiveautomation.com/t/get-gateway-ip-address/79182 "2023-09-14T19:01:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [September 14, 2023, 7:01pm UTC](https://forum.inductiveautomation.com/t/get-gateway-ip-address/79182/1 "2023-09-14T19:01:57Z")

</div>

It's pretty easy to get the Client IP address via `{[System]Client/Network/IPAddress}`

However, the same thing does not exist for the gateway. The similarly named tag `{[System]Client/Network/GatewayAddress}` returns the full address (i.e. [http://localhost:8088](http://localhost:8088)).

How can I get the IP address of the gateway?  
I'll have clients connected to specific gateways in different areas of the plant, all running the same project, and I need to determine which area based on which gateway they're connected to.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [September 14, 2023, 7:40pm UTC](https://forum.inductiveautomation.com/t/get-gateway-ip-address/79182/2 "2023-09-14T19:40:30Z")

</div>

What do you get when you're connected to one not localhost? All of mine return an IP address, but none of them have been added to our DNS, either.

Another option could be tu use [System]Gateway/SystemName. As long as you've given them separate names, of course.

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [September 14, 2023, 7:42pm UTC](https://forum.inductiveautomation.com/t/get-gateway-ip-address/79182/3 "2023-09-14T19:42:31Z")

</div>

Yes, I get the IP address if it's not localhost.

I can use `replace(replace({[System]Client/Network/GatewayAddress},"http://",""),":8088","")` to peel the IP out in that case, since they're all on :8088.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 14, 2023, 8:05pm UTC](https://forum.inductiveautomation.com/t/get-gateway-ip-address/79182/4 "2023-09-14T20:05:15Z")

</div>

Try one of these as well:

- [system.net.getIpAddress - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/system.net.getIpAddress)
- [system.net.getHostName - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/system.net.getHostName)

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [September 14, 2023, 8:19pm UTC](https://forum.inductiveautomation.com/t/get-gateway-ip-address/79182/5 "2023-09-14T20:19:18Z")

</div>

Will `{[System]Client/Network/GatewayAddress}` always be localhost for a client running on the gateway?

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [September 15, 2023, 2:30pm UTC](https://forum.inductiveautomation.com/t/get-gateway-ip-address/79182/6 "2023-09-15T14:30:17Z")

</div>

An expression tag at the gateway scope will work for my use case.

```auto
runScript("system.net.getIpAddress()")

```

I had been trying to use a client tag, but since it's _by definition_ gateway-dependent, there's really no need for every client to have its own tag with the gateway IP.

---

<div class="post-metadata">

**Author:** ![gmartinez02cat](https://avatars.discourse-cdn.com/v4/letter/g/d26b3c/32.png) [@gmartinez02cat](https://forum.inductiveautomation.com/u/gmartinez02cat)\
**Post date:** [January 28, 2026, 7:34pm UTC](https://forum.inductiveautomation.com/t/get-gateway-ip-address/79182/7 "2026-01-28T19:34:04Z")

</div>

Something I use is going to cmd and typing “ping [gateway-url]”, without the port

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [January 28, 2026, 10:00pm UTC](https://forum.inductiveautomation.com/t/get-gateway-ip-address/79182/8 "2026-01-28T22:00:04Z")

</div>

Sure, but that doesn’t get the gateway’s IP address (it’s already known when you ping) and you can’t use that in the project.
