0 Replies Latest reply on Feb 15, 2011 5:18 PM by Michael Ekkert

    blquery for net_interface_name

      Hi All,

       

      I have the following code that I am executing to locate an adapter on a Windows server based on their IP. 

       

      for NBNET in "10.8.109.*" "10.8.110.*" "10.7.201.*" "10.8.111.*" "10.9.2.*" "10.9.3.*" "10.9.4.*"

      do

      NBNET1="net_interface_name('IP = \"$NBNET\"')"

      echo "NBNET1 = $NBNET1"

      NBNETRES1=$(blquery -h ${SERVERNAME} -e ${NBNET1})

      if test "$NBNETRES1" != "-1"

      then

        echo "NetBackup Adapter Name = $NBNETRES1"

        break 1

      fi

      done

      for NBFUNC in "net_ip_address" "net_subnet_mask"

      do

      BL4="$NBFUNC('NAME = \"$NBNETRES1\"')"

      echo "BL4 = $BL4"

      INT2=$(blquery -h ${SERVERNAME} -e ${BL4})

      echo "$NBFUNC = $INT2"

      done

       

      When I run my script I get the following results

       

      Info Feb 15, 2011 5:13:18 PM NBNET1 = net_interface_name('IP = "10.8.109.*"')

      Info Feb 15, 2011 5:13:19 PM NBNET1 = net_interface_name('IP = "10.8.110.*"')

      Info Feb 15, 2011 5:13:19 PM NBNET1 = net_interface_name('IP = "10.7.201.*"')

      Info Feb 15, 2011 5:13:20 PM NetBackup Adapter Name = HP NC7771 Gigabit Server Adapter

      Info Feb 15, 2011 5:13:20 PM BL4 = net_ip_address('NAME = "HP NC7771 Gigabit Server Adapter"')

      Info Feb 15, 2011 5:13:21 PM net_ip_address = -1

      Info Feb 15, 2011 5:13:21 PM BL4 = net_subnet_mask('NAME = "HP NC7771 Gigabit Server Adapter"')

      Info Feb 15, 2011 5:13:22 PM net_subnet_mask = -1

       

      I would have expected to have the adapter name respond something like "Local Area Connection" (the Windows name) or the like but what I get back is the Windows adapter description "HP NC7781 Gigabit Server Adapter".  Given that I got the "correct" adapter name I would have expected net_ip_address to come back with 10.70.20.53 and net_subnet_mask to be 255.255.255.252

       

      Any thoughts?

       

      Thanks.