[ofw] enable/disable device changes IPoIB physical address??

Jan Bottorff jbottorff at xsigo.com
Wed Aug 1 16:33:31 PDT 2007


You should be able to use the Win32_NetworkAdapter WMI class. The
PnPDeviceId field should be stable across device enable/disable and I
believe even device install/uninstall, and can be used to find the
current MAC address. One you have the current MAC address you can find
things like IP address by querying for the WMI
Win32_NetworkAdapterConfiguration record with a matching Mac address.
The EnableStatic method on this WMI class will let you set the IP
addresses. You might also be able to associate these two WMI record on
the InterfaceIndex field instead of the MAC address. 

This will all take a few dozen lines of code in a scripting language
that has high quality COM automation support (like VBScript). The IB
stack unfortunately doesn't support any WMI data queries, so you may
have to run command line utilities like vstat (on the machine you are
querying) and parse the output text to get things like the IB port
GUID's. Rich WMI support would be a nice future feature in the IB stack.

The PnP instance id will be in the form IBA\IPOIB\<IB port guid in big
endian hex format>.

The reference doc for Win32_NetworkAdapter is at
http://msdn2.microsoft.com/en-us/library/aa394216.aspx

Jan

-----Original Message-----
From: ofw-bounces at lists.openfabrics.org
[mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Jeremy Enos
Sent: Wednesday, August 01, 2007 2:02 PM
To: ofw at lists.openfabrics.org; David A. Norris
Subject: Re: [ofw] enable/disable device changes IPoIB physical
address??

Perhaps a faster way for me to get a solution to my problem is to ask 
the direct question of what I'm after...

I want to reliably identify the network connection (Local Area 
Connection X) associated w/ a given port on the HCA, so I can set it's 
IP.  How can I reliably make that identification?
thx-

    Jeremy

Jeremy Enos wrote:
> Hi-
> We're attempting to create some automated scripts to change IP 
> settings w/ IPoIB adapters, and running into some strange issues.  
> Thus far, we've been trying to identify the correct NIC/port by the 
> physical address, which seems to be the same on all hosts.  This is 
> fine, as we were looking for a reliable way to identify the port each 
> time.  However, it's *not* reliable.  For some reason, disabling and 
> re-enabling the device actually changes the physical address that 
> ipconfig reports each time.  Only a reboot of the host resets it to 
> the initial address (02-00-00-00-00-01).  We're also guessing that the

> phys addy that gets assigned on each re-enabling of the device is 
> based on some timestamp, as the disparity between them increases when 
> there is more time between the re-enabling.  Why is this address ever 
> changing in the first place?
>
> Environment:
> OS: Win2003 x64
> HCA:  MT25208
>
> Another explanation I'm seeking is why setting static IP info via the 
> GUI doesn't seem to take.  No errors when I hit "Ok", but when I go 
> back to the tcp/ip settings again, it's all reset to dhcp.  Even when 
> command line utilities like netsh are used to change the IP from the 
> cmd line, the GUI does not reflect it.  Anyone else see this?
>
> thx-
>
>    Jeremy Enos
>    NCSA
>
> _______________________________________________
> ofw mailing list
> ofw at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
_______________________________________________
ofw mailing list
ofw at lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw



More information about the ofw mailing list