[Users] ipoib to lid

Hal Rosenstock hal.rosenstock at gmail.com
Wed May 17 10:22:30 PDT 2017


It's not a single command.

IPoIB link layer address is comprised of QPN + GID not LID.

Assuming IPoIB subnet does not span IB subnets, then the process to obtain
the LID is as follows:

Ensure remote IP address is in ARP cache

Use GUID or GID for remote IP to perform SA query

So in Linux, if IPoIB is on netdev ib0 and local IPoIB address on that
interface is 192.168.0.20, and we are interested in 192.168.0.17,

ip neighbor show dev ib0

If remote IP doesn't show up there, do:

ping 192.168.0.17

then neighbors will show:
192.168.0.17 lladdr
80:00:00:68:fe:80:00:00:00:00:00:00:24:8a:07:03:00:8f:9f:9c REACHABLE

GID starts with fe:80
GUID is last 8 bytes (24:8a:07:03:00:8f:9f:9c or 0x248a0703008f9f9c

This can be used to query SA in many ways (saquery or smpquery with -G
option).

So for example,
smpquery pi -G 0x248a0703008f9f9c 1
# Port info: Lid 5 port 1
Mkey:............................<not displayed>
GidPrefix:.......................0xfe80000000000000
Lid:.............................5
SMLid:...........................41

That can be double checked as follows:

smpquery ni 5
# Node info: Lid 5
BaseVers:........................1
ClassVers:.......................1
NodeType:........................Channel Adapter
NumPorts:........................1
SystemGuid:......................0x248a0703008f9f9c
Guid:............................0x248a0703008f9f9c
PortGuid:........................0x248a0703008f9f9c

This could also be done with saquery PR but the GIDs need to be put into
IPv6 format.

-- Hal


On Wed, May 17, 2017 at 12:45 PM, Michael Di Domenico <
mdidomenico4 at gmail.com> wrote:

> is there any command included with openib that would give me a remote
> lid given it's ipoib address?
> _______________________________________________
> Users mailing list
> Users at lists.openfabrics.org
> http://lists.openfabrics.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/users/attachments/20170517/fc3a84f4/attachment.html>


More information about the Users mailing list