Multiple I/P Addresses of a NIC

Forums Desktop Info Multiple I/P Addresses of a NIC

This topic contains 2 replies, has 2 voices, and was last updated by Glenn Glenn 1 month ago.

  • Author
    Posts
  • #1560 Reply
    Avatar
    Hajo

    Hi Glenn,

    DTI 1.14

    we use a NIC having two IP addresses, e.g. 192.168.1.1 /24 and 192.168.20.1 /24

    ALLIPADDRESSES shows two lines but in both lines is the same IP address (192.168.1.1 …).
    NETWORKINTERFACES shows only the second IP address (192.168.20.1 …)

    ALLIPADDRESS=active:1,interval:60,multirow:1,activeonly:1,display:%1 %2
    NETWORKINTERFACES=active:1,interval:60,operstatus:1,iftype:6,display:%3 | ip address:%8 %9 | mac address:%4

    Many thanks in advance
    Hajo

    0
  • #1561 Reply
    Glenn
    Glenn
    Keymaster

    I’ll check it out. I presume the nic has 2 ports and each is connected to a different network?

    • This reply was modified 1 month ago by Glenn Glenn.
    • This reply was modified 1 month ago by Glenn Glenn.
    0
  • #1566 Reply
    Glenn
    Glenn
    Keymaster

    ALLIPADDRESSES is fixed. The NETWORKINTERFACES is a little more tricky. The item returns one row per interface but there may be more than one IP per interface. How to return that raw data and provide correct display formatting is the thing (%8 %9 %10 %11 %13).

    Perhaps a single string listing all IPs, should this be comma delimited or LF delimited, should it include the mask and/or prefix length. It all breaks the principle of the user defined display formatting.

    Perhaps a new return value that contains all IPs while the current ones show just the first IP. For example:

    %8 = the first IP on the interface

    %22 = list of all IPs on the interface. eg: xxx.xxx.xxx.xxx, yyy.yyy.yyy.yyy
    %23 = as per %22 with prefix length. eg: xxx.xxx.xxx.xxx/pp, yyy.yyy.yyy.yyy/pp

    maybe add an option called “delimiter” which defines what should be used to separate the strings in the list. eg: delimiter:\, or delimiter:|

    1+
Reply To: Multiple I/P Addresses of a NIC
Your information:




Do NOT follow this link or you will be banned from the site!