<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Discovering all Devices in a subnet using ESXCLI in ESXi Discussions</title>
    <link>https://communities.vmware.com/t5/ESXi-Discussions/Discovering-all-Devices-in-a-subnet-using-ESXCLI/m-p/405690#M28369</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is possible to ping using a specific interface with ESXCLI, but not sure how you would loop this through every IP address.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;~ # esxcli network diag ping --help&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;Usage: esxcli network diag ping [cmd options]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;Description:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; ping&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Send ICMP echo requests to network hosts.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;Cmd options:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; -c|--count=&amp;lt;long&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specify the number of packets to send.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; -D|--debug&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VMKPing debug mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; -d|--df&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set DF bit on IPv4 packets.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; -H|--host=&amp;lt;str&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specify the host to send packets to. (required)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; -I|--interface=&amp;lt;str&amp;gt;&amp;nbsp; Specify the outgoing interface.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; -i|--interval=&amp;lt;str&amp;gt;&amp;nbsp;&amp;nbsp; Set the interval for sending packets in seconds.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; -4|--ipv4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ping with ICMPv4 echo requests.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; -6|--ipv6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ping with ICMPv6 echo requests.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; --netstack=&amp;lt;str&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specify the TCP/IP netstack which the interface resides on&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; -N|--nexthop=&amp;lt;str&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Override the system's default route selection, in dotted quad notation. (IPv4 only. Requires interface option)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; -s|--size=&amp;lt;long&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set the payload size of the packets to send.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; -t|--ttl=&amp;lt;long&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set IPv4 Time To Live or IPv6 Hop Limit&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; -W|--wait=&amp;lt;str&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set the timeout to wait if no responses are received in seconds.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;~ #&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why don't you write a PowerShell script to do this as you will have a lot more flexibility, and can still use ESXCLI with the Get-Exscli cmdlet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Jon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Mar 2014 20:19:59 GMT</pubDate>
    <dc:creator>jrmunday</dc:creator>
    <dc:date>2014-03-06T20:19:59Z</dc:date>
    <item>
      <title>Discovering all Devices in a subnet using ESXCLI</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/Discovering-all-Devices-in-a-subnet-using-ESXCLI/m-p/405689#M28368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd like to run a ping command using ESXCLI that does the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Utilizes a specific vmkernel port to run on so I can test the functionality using that vmkernel port.&lt;/P&gt;&lt;P&gt;Pings every host in a given subnet to determine what IPs are online in that subnet.&lt;/P&gt;&lt;P&gt;How can I do this with ESXCLI?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 17:27:39 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/Discovering-all-Devices-in-a-subnet-using-ESXCLI/m-p/405689#M28368</guid>
      <dc:creator>TheVMinator</dc:creator>
      <dc:date>2014-03-06T17:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Discovering all Devices in a subnet using ESXCLI</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/Discovering-all-Devices-in-a-subnet-using-ESXCLI/m-p/405690#M28369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is possible to ping using a specific interface with ESXCLI, but not sure how you would loop this through every IP address.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;~ # esxcli network diag ping --help&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;Usage: esxcli network diag ping [cmd options]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;Description:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; ping&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Send ICMP echo requests to network hosts.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;Cmd options:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; -c|--count=&amp;lt;long&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specify the number of packets to send.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; -D|--debug&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VMKPing debug mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; -d|--df&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set DF bit on IPv4 packets.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; -H|--host=&amp;lt;str&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specify the host to send packets to. (required)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; -I|--interface=&amp;lt;str&amp;gt;&amp;nbsp; Specify the outgoing interface.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; -i|--interval=&amp;lt;str&amp;gt;&amp;nbsp;&amp;nbsp; Set the interval for sending packets in seconds.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; -4|--ipv4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ping with ICMPv4 echo requests.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; -6|--ipv6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ping with ICMPv6 echo requests.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; --netstack=&amp;lt;str&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specify the TCP/IP netstack which the interface resides on&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; -N|--nexthop=&amp;lt;str&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Override the system's default route selection, in dotted quad notation. (IPv4 only. Requires interface option)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; -s|--size=&amp;lt;long&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set the payload size of the packets to send.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; -t|--ttl=&amp;lt;long&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set IPv4 Time To Live or IPv6 Hop Limit&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; -W|--wait=&amp;lt;str&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set the timeout to wait if no responses are received in seconds.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;~ #&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why don't you write a PowerShell script to do this as you will have a lot more flexibility, and can still use ESXCLI with the Get-Exscli cmdlet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Jon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 20:19:59 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/Discovering-all-Devices-in-a-subnet-using-ESXCLI/m-p/405690#M28369</guid>
      <dc:creator>jrmunday</dc:creator>
      <dc:date>2014-03-06T20:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Discovering all Devices in a subnet using ESXCLI</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/Discovering-all-Devices-in-a-subnet-using-ESXCLI/m-p/405691#M28370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;Pings every host in a given subnet to determine what IPs are online in that subnet.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;I would doubt that logic would work, since the ips which reply can also be a gateway, dns, or other workstations,&amp;nbsp; neways, you could come with a simple script like&lt;/P&gt;&lt;P&gt;&lt;EM&gt;for i in `seq 255`; do for j in `seq 255`; do echo 192.168.$i.$j; esxcli network diag ping -H 192.168.$i.$j -I vmk0 -c 1 | grep -i Recieved | awk '{if($2 == 1) {print "Alive"} else print "Dead"}'; done; done&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 09:33:04 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/Discovering-all-Devices-in-a-subnet-using-ESXCLI/m-p/405691#M28370</guid>
      <dc:creator>zXi_Gamer</dc:creator>
      <dc:date>2014-03-07T09:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Discovering all Devices in a subnet using ESXCLI</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/Discovering-all-Devices-in-a-subnet-using-ESXCLI/m-p/405692#M28371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok thanks.&amp;nbsp; PowerCLI won't work in this case as I need to use this on new hosts that haven't been joined to vcenter server yet and are in a new subnet.&amp;nbsp; Also, is there anyway to write that script to a file, and then download the file to my pc, given that I can't connect yet with putty but only through the esxi shell since the networking is still not configured yet when I'm doing this research?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 16:08:51 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/Discovering-all-Devices-in-a-subnet-using-ESXCLI/m-p/405692#M28371</guid>
      <dc:creator>TheVMinator</dc:creator>
      <dc:date>2014-03-14T16:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Discovering all Devices in a subnet using ESXCLI</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/Discovering-all-Devices-in-a-subnet-using-ESXCLI/m-p/405693#M28372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you mean you want the output to a file, then&lt;/P&gt;&lt;P&gt;&lt;EM&gt;for i in `seq 255`; do for j in `seq 255`; do echo 192.168.$i.$j; esxcli network diag ping -H 192.168.$i.$j -I vmk0 -c 1 | grep -i Recieved | awk '{if($2 == 1) {print "Alive"} else print "Dead"}' &lt;STRONG&gt;&amp;gt;&amp;gt; Discovery.txt&lt;/STRONG&gt;; done; done&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2014 06:38:47 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/Discovering-all-Devices-in-a-subnet-using-ESXCLI/m-p/405693#M28372</guid>
      <dc:creator>zXi_Gamer</dc:creator>
      <dc:date>2014-03-17T06:38:47Z</dc:date>
    </item>
  </channel>
</rss>

