Multiple I/P Addresses of a NIC

Forums Desktop Info Multiple I/P Addresses of a NIC

Viewing 2 reply threads
  • Author
    Posts
    • #1560 Reply
      AvatarHajo

      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
      GlennGlenn
      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 year, 1 month ago by GlennGlenn.
      • This reply was modified 1 year, 1 month ago by GlennGlenn.
      0
    • #1566 Reply
      GlennGlenn
      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+
Viewing 2 reply threads
Reply To: Multiple I/P Addresses of a NIC
Your information:




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