Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How does the IP address field type works?

Amit104
Kilo Expert

Hello,

I would like to understand how does the IP address field type works?

From the docs i understood that it supports dot-decimal e.g.10.34.51.20 and hex notation e.g. 0x0A223314. In the DB, the values are always stored in four-digit groupings in dot-decimal notation.

Is there anything else that I am missing? Or does it have any other function or purpose?

Thanks in advance!

3 REPLIES 3

Ashwini Suryava
Kilo Guru

Hi,

The basic use of IP Address (Validated IPV4, IPV6) [ip_addr] field type stores valid IPv4 and IPv6 addresses.And as you know it supports the dot-decimal and hex notation.

It can be used in service catalog where there is variable type as IP Address and there is also a IP Address (validated IPV4,IPV6) field type predefined in the Form Design,

Refer to the below link for more information

https://community.servicenow.com/community?id=community_question&sys_id=883f3669db58dbc01dcaf3231f96...

 

Mark as Correct,If found it as helpful

Regards

Ashwini

emir
ServiceNow Employee
ServiceNow Employee

in case someone else also ends up here, the docs have this covered:

https://docs.servicenow.com/bundle/orlando-platform-administration/page/administer/reference-pages/r...

Kunal Varkhede
Tera Guru

Hi,

 

As per the servicenow doc Standard IPv6 address in dot-decimal notation are like

1507:f0d0:1002:0051:0000:0000:0000:0004

And the same IPv6 address above using the double-colon in place of zeros:

1507:f0d0:1002:51::

 

The main thing i noted in doc that

.If you enter an IPv6 IP address in an using double-colons, the value in the database is actually expanded to its full IP address without compression: 1507:f0d0:1002:51::4 is saved in the database as 1507:f0d0:1002:0051:0000:0000:0000:0004

.If you enter an IPv4 address in hex notation, it is saved in the database as the standard dot-decimal notation: 0x0A223314 is saved as 10.34.51.20.

 

Thanks,

Kunal.