Topic
  • 7 replies
  • Latest Post - ‏2014-05-02T02:03:32Z by jgstew
Darknight
Darknight
72 Posts

Pinned topic ip address properties

‏2014-04-14T12:31:33Z |

Hi ,

I am trying to get below ip address property via relevance,please guide me how these can be generated:

1. list of all ipv4 and ipv6 address in a single property usign relevance.(ipv4 and ipv6 separate proparties are available)

2.list of ipv4 and ipv6 address of system alongwith their version for eg :

whenever i try to run below relevance output is coming as :

q: (address of ip interfaces of network as string) whose (it as string does not contain "127.0.0.1")& "-" & (ip version of addresses of ip interfaces of network asstring)

A:10.18.154.166-ipv4

but as soon as i make it plural :

q: (addresses of ip interfaces of network as string) whose (it as string does not contain "127.0.0.1")& "-" & (ip versions of addresses of ip interfaces of network asstring)

E:A singular expression is required.

Please advice where i am doing mystake.

 

 

 

  • jgstew
    jgstew
    410 Posts
    ACCEPTED ANSWER

    Re: ip address properties

    ‏2014-04-14T16:07:01Z  

     

    (it as string &"-"& (ip version of it as string)) of addresses whose(it as string does not equal "127.0.0.1") of ip interfaces of network

     

    There are many ways to do the same thing in relevance, but some methods only work for singulars and not plurals.

     

  • jgstew
    jgstew
    410 Posts
    ACCEPTED ANSWER

    Re: ip address properties

    ‏2014-04-16T16:58:55Z  
    • Darknight
    • ‏2014-04-16T16:37:46Z

    thanks a lot jgstew for providing your valuable guidance.

    It would be of great help if you can let me know how to list down all thats is ipv4 as well as ipv6 addresses of any computer system via releavnce.

    i am aware there are two different relevance as mentioned below :

    for ipv4 :

    if ( exists true whose (if true then ( exists ip interfaces of network) else false) ) then addresses whose (it as string != "0.0.0.0") of ip interfaces whose (not loopback of it) of network as string else nothing

     

    for ipv6:

    if (exists property "ipv6 interfaces" and exists network) then addresses of ipv6 interfaces of adapters whose (up of it and not loopback of it) of network as string else ""

    But i am not able to combine both these properties to have desire result.Please suggest

    Thanks again for your valuable inputs.

     

    (address of it as string & "-ipv4"; ipv6 address of it as string & "-ipv6") of adapters whose(up of it AND not loopback of it AND address of it as string != "127.0.0.1") of network

     

  • jgstew
    jgstew
    410 Posts

    Re: ip address properties

    ‏2014-04-14T16:07:01Z  

     

    (it as string &"-"& (ip version of it as string)) of addresses whose(it as string does not equal "127.0.0.1") of ip interfaces of network

     

    There are many ways to do the same thing in relevance, but some methods only work for singulars and not plurals.

     

  • Darknight
    Darknight
    72 Posts

    Re: ip address properties

    ‏2014-04-16T16:37:46Z  
    • jgstew
    • ‏2014-04-14T16:07:01Z

     

    (it as string &"-"& (ip version of it as string)) of addresses whose(it as string does not equal "127.0.0.1") of ip interfaces of network

     

    There are many ways to do the same thing in relevance, but some methods only work for singulars and not plurals.

     

    thanks a lot jgstew for providing your valuable guidance.

    It would be of great help if you can let me know how to list down all thats is ipv4 as well as ipv6 addresses of any computer system via releavnce.

    i am aware there are two different relevance as mentioned below :

    for ipv4 :

    if ( exists true whose (if true then ( exists ip interfaces of network) else false) ) then addresses whose (it as string != "0.0.0.0") of ip interfaces whose (not loopback of it) of network as string else nothing

     

    for ipv6:

    if (exists property "ipv6 interfaces" and exists network) then addresses of ipv6 interfaces of adapters whose (up of it and not loopback of it) of network as string else ""

    But i am not able to combine both these properties to have desire result.Please suggest

    Thanks again for your valuable inputs.

  • jgstew
    jgstew
    410 Posts

    Re: ip address properties

    ‏2014-04-16T16:58:55Z  
    • Darknight
    • ‏2014-04-16T16:37:46Z

    thanks a lot jgstew for providing your valuable guidance.

    It would be of great help if you can let me know how to list down all thats is ipv4 as well as ipv6 addresses of any computer system via releavnce.

    i am aware there are two different relevance as mentioned below :

    for ipv4 :

    if ( exists true whose (if true then ( exists ip interfaces of network) else false) ) then addresses whose (it as string != "0.0.0.0") of ip interfaces whose (not loopback of it) of network as string else nothing

     

    for ipv6:

    if (exists property "ipv6 interfaces" and exists network) then addresses of ipv6 interfaces of adapters whose (up of it and not loopback of it) of network as string else ""

    But i am not able to combine both these properties to have desire result.Please suggest

    Thanks again for your valuable inputs.

     

    (address of it as string & "-ipv4"; ipv6 address of it as string & "-ipv6") of adapters whose(up of it AND not loopback of it AND address of it as string != "127.0.0.1") of network

     

  • Darknight
    Darknight
    72 Posts

    Re: ip address properties

    ‏2014-04-18T07:41:06Z  
    • jgstew
    • ‏2014-04-16T16:58:55Z

     

    (address of it as string & "-ipv4"; ipv6 address of it as string & "-ipv6") of adapters whose(up of it AND not loopback of it AND address of it as string != "127.0.0.1") of network

     

    thanks a billion jgstew..for your help:)

    I have one more query regarding the relevance...if i try to list all the possible ips assigned to particular computer then it throws below error:

    q:(addresses of it as string & "-ipv4"; ipv6 addresses of it as string & "-ipv6") of adapters whose(up of it AND not loopback of it AND address of it as string != "127.0.0.1") ofnetwork

    E:A singular expression is required.

     

    Maube i am goofing up with relevance this time,could you please point out it. thanks again :)

     

    also if i try to run this relevance on redhat machine it gives me below error:

    Q: (address of it as string & "-ipv4"; ipv6 address of it as string & "-ipv6") of adapters whose(up of it AND not loopback of it AND address of it as string != "127.0.0.1") of network
    E: The operator "ipv6 address" is not defined.

  • jgstew
    jgstew
    410 Posts

    Re: ip address properties

    ‏2014-04-22T13:17:33Z  
    • Darknight
    • ‏2014-04-18T07:41:06Z

    thanks a billion jgstew..for your help:)

    I have one more query regarding the relevance...if i try to list all the possible ips assigned to particular computer then it throws below error:

    q:(addresses of it as string & "-ipv4"; ipv6 addresses of it as string & "-ipv6") of adapters whose(up of it AND not loopback of it AND address of it as string != "127.0.0.1") ofnetwork

    E:A singular expression is required.

     

    Maube i am goofing up with relevance this time,could you please point out it. thanks again :)

     

    also if i try to run this relevance on redhat machine it gives me below error:

    Q: (address of it as string & "-ipv4"; ipv6 address of it as string & "-ipv6") of adapters whose(up of it AND not loopback of it AND address of it as string != "127.0.0.1") of network
    E: The operator "ipv6 address" is not defined.

     

    The relevance already does list out all IPs of all NICs.

     

    Try this on redhat / others:

    ((address of it as string & "-ipv4") | ""; (ipv6 address of it as string & "-ipv6") | "") of adapters whose(up of it AND not loopback of it AND address of it as string != "127.0.0.1") of network

     

    The reason it may not have appeared to work to list all IPs of all NICs for you, is it may only return a result if there is BOTH an ipv4 address and an IPv6 address.

     

  • Darknight
    Darknight
    72 Posts

    Re: ip address properties

    ‏2014-04-28T10:32:37Z  
    • jgstew
    • ‏2014-04-22T13:17:33Z

     

    The relevance already does list out all IPs of all NICs.

     

    Try this on redhat / others:

    ((address of it as string & "-ipv4") | ""; (ipv6 address of it as string & "-ipv6") | "") of adapters whose(up of it AND not loopback of it AND address of it as string != "127.0.0.1") of network

     

    The reason it may not have appeared to work to list all IPs of all NICs for you, is it may only return a result if there is BOTH an ipv4 address and an IPv6 address.

     

    Thanks jgstew :)

    Since i have not defined the operator the above relevance was giving error - "The operator "ipv6 address" is not defined."

    I have tried it on RedHat and other operating systems it throwed me the same error , i have modified the above relevance a bit and come up with below solution which is perfectly working in nonwindows as well as on windows machine

     

    Q: ((address of it as string & "-ipv4") | ""; ((if (exists property "ipv6 interfaces" and exists network) then address of ipv6 interfaces of it as string else "") & "-ipv6") | "")of adapters whose(up of it AND not loopback of it AND address of it as string != "127.0.0.1") of network
    A: 172.16.1.139-ipv4
    A: fe80:0:0:0:250:56ff:feab:1d7e-ipv6
    A: 10.18.154.171-ipv4
    A: fe80:0:0:0:250:56ff:feab:3872-ipv6

     

    thanks a lot for providing a hint due to which now i am able to retrive the required property

  • jgstew
    jgstew
    410 Posts

    Re: ip address properties

    ‏2014-05-02T02:03:32Z  
    • Darknight
    • ‏2014-04-28T10:32:37Z

    Thanks jgstew :)

    Since i have not defined the operator the above relevance was giving error - "The operator "ipv6 address" is not defined."

    I have tried it on RedHat and other operating systems it throwed me the same error , i have modified the above relevance a bit and come up with below solution which is perfectly working in nonwindows as well as on windows machine

     

    Q: ((address of it as string & "-ipv4") | ""; ((if (exists property "ipv6 interfaces" and exists network) then address of ipv6 interfaces of it as string else "") & "-ipv6") | "")of adapters whose(up of it AND not loopback of it AND address of it as string != "127.0.0.1") of network
    A: 172.16.1.139-ipv4
    A: fe80:0:0:0:250:56ff:feab:1d7e-ipv6
    A: 10.18.154.171-ipv4
    A: fe80:0:0:0:250:56ff:feab:3872-ipv6

     

    thanks a lot for providing a hint due to which now i am able to retrive the required property

    Glad it worked out. I often forget about checking for the existence of a property, but it is a great way to handle a situation like this.