<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[IP/Mac Address lookup]]></title><description><![CDATA[<p dir="auto">Is it possible to do IP and Mac address lookups vi nxshell or other command line tools.  I would like to be able to use a script to query where a particular mac address is connected with out having to log in using the client .  I didnt see any options listed in the nxadm  or in the nxshell api  but I could have over looked something.</p>
<p dir="auto">Thanks</p>
]]></description><link>https://forum.netxms.org/topic/4103/ip-mac-address-lookup</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 19:45:26 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/4103.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 15 Nov 2015 18:01:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to IP/Mac Address lookup on Thu, 03 Dec 2015 18:42:03 GMT]]></title><description><![CDATA[<p dir="auto">Works like a charm ... Thanks</p>
]]></description><link>https://forum.netxms.org/post/18513</link><guid isPermaLink="true">https://forum.netxms.org/post/18513</guid><dc:creator><![CDATA[gmonk63]]></dc:creator><pubDate>Thu, 03 Dec 2015 18:42:03 GMT</pubDate></item><item><title><![CDATA[Reply to IP/Mac Address lookup on Thu, 03 Dec 2015 07:48:02 GMT]]></title><description><![CDATA[<p dir="auto">Try attached script.</p>
<hr />
<p dir="auto"><a href="/assets/uploads/files/smf/0000000002702-find_port.py">find_port.py</a></p>
]]></description><link>https://forum.netxms.org/post/18509</link><guid isPermaLink="true">https://forum.netxms.org/post/18509</guid><dc:creator><![CDATA[alk]]></dc:creator><pubDate>Thu, 03 Dec 2015 07:48:02 GMT</pubDate></item><item><title><![CDATA[Reply to IP/Mac Address lookup on Wed, 02 Dec 2015 22:47:16 GMT]]></title><description><![CDATA[<p dir="auto">Alex,</p>
<p dir="auto">what you provided is great ... However how would I tweak this tool to provide the same functionality as  Find Mac address tool in the managment console  which also provides the switch and port the mac is connected to..</p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000002694-2015-12-02_15_43_39-NetXMS_Management_Console.png" alt="2015-12-02 15_43_39-NetXMS Management Console.png" class="img-markdown  img-fluid" width="531" height="150" /></p>
]]></description><link>https://forum.netxms.org/post/18507</link><guid isPermaLink="true">https://forum.netxms.org/post/18507</guid><dc:creator><![CDATA[gmonk63]]></dc:creator><pubDate>Wed, 02 Dec 2015 22:47:16 GMT</pubDate></item><item><title><![CDATA[Reply to IP/Mac Address lookup on Tue, 01 Dec 2015 18:28:36 GMT]]></title><description><![CDATA[<p dir="auto">oh wow you saved me so much time ... Thank you so much</p>
]]></description><link>https://forum.netxms.org/post/18499</link><guid isPermaLink="true">https://forum.netxms.org/post/18499</guid><dc:creator><![CDATA[gmonk63]]></dc:creator><pubDate>Tue, 01 Dec 2015 18:28:36 GMT</pubDate></item><item><title><![CDATA[Reply to IP/Mac Address lookup on Tue, 01 Dec 2015 08:20:44 GMT]]></title><description><![CDATA[<p dir="auto">Yes, it's possible to do with nxshell. Some examples:</p>
<p dir="auto">find by mac:</p>
<pre><code>import sys
mac = sys.argv[1].upper()

for node in [o for o in s.getAllObjects() if isinstance(o, objects.Node)]:
    interfaces = node.getAllChilds(objects.GenericObject.OBJECT_INTERFACE)
    for interface in interfaces:
        if mac in interface.getMacAddress().toString().upper():
            print "%s(%d) - %s - %s" % (node.getObjectName(),
                                        node.getObjectId(),
                                        interface.getMacAddress(),
                                        interface.getIpAddressListAsString())
</code></pre>
<p dir="auto">find by ip:</p>
<pre><code>import sys
ip = sys.argv[1]

for node in [o for o in s.getAllObjects() if isinstance(o, objects.Node)]:
    interfaces = node.getAllChilds(objects.GenericObject.OBJECT_INTERFACE)
    for interface in interfaces:
        for interface_ip in interface.getIpAddressList():
            if ip in interface_ip.toString():
                print "%s(%d) - %s - %s" % (node.getObjectName(),
                                            node.getObjectId(),
                                            interface.getMacAddress(),
                                            interface.getIpAddressListAsString())
</code></pre>
<p dir="auto">Sample session:</p>
<pre><code>~/Development/netxms/src/java/nxshell/target (develop|…)% java -Dnetxms.server=127.0.0.1 -Dnetxms.login=admin -Dnetxms.password=netxms -jar nxshell-2.0-RC2.jar find_by_mac.py B2:00:1C:15:BC:E0
AirAlk.local(100) - B2:00:1C:15:BC:E0 - 0.0.0.0/0
~/Development/netxms/src/java/nxshell/target (develop|…)% java -Dnetxms.server=127.0.0.1 -Dnetxms.login=admin -Dnetxms.password=netxms -jar nxshell-2.0-RC2.jar find_by_ip.py 127
AirAlk.local(100) - 00:00:00:00:00:00 - 127.0.0.1/8
</code></pre>
]]></description><link>https://forum.netxms.org/post/18490</link><guid isPermaLink="true">https://forum.netxms.org/post/18490</guid><dc:creator><![CDATA[alk]]></dc:creator><pubDate>Tue, 01 Dec 2015 08:20:44 GMT</pubDate></item></channel></rss>