Difference between revisions of "view ESXi arp cache"

From thelinuxwiki
Jump to: navigation, search
(Created page with "ESXi version 6.5.0 to discover if IPs are in use or not... ssh to esxi host (if enabled), ping range with script like... admin@localhost:`")
 
Line 4: Line 4:
  
 
ssh to esxi host (if enabled), ping range with script like...
 
ssh to esxi host (if enabled), ping range with script like...
  admin@localhost:`
+
  [admin@localhost:~] '''for i in `seq 254`; do ping 192.168.0.$i -c 1 -W 1 | grep "1 packets received, 0% packet
 +
loss" &> /dev/null; if [ "$?" == "0" ]; then echo "192.168.0.$i is USED!!!!"; fi; done'''
 +
192.168.0.1 is USED!!!!
 +
1 packets transmitted, 1 packets received, 0% packet loss
 +
192.168.0.4 is USED!!!!
 +
 
 +
view arp cache with command...
 +
 
 +
[admin@@localhost:~] '''esxcli network ip neighbor list'''
 +
Neighbor      Mac Address        Vmknic    Expiry  State  Type
 +
------------  -----------------  ------  --------  -----  -------
 +
192.168.0.1  00:12:ef:34:cd:67  vmk0      -4 sec        Unknown
 +
192.168.0.2  (incomplete)      vmk0      -2 sec        Unknown
 +
192.168.0.3  (incomplete)      vmk0      -2 sec        Unknown
 +
192.168.0.4  b4:05:43:03:41:fc  vmk0      -2 sec        Unknown
 +
 
 +
[[category:vmware]]

Revision as of 18:38, 22 October 2025

ESXi version 6.5.0

to discover if IPs are in use or not...

ssh to esxi host (if enabled), ping range with script like...

[admin@localhost:~] for i in `seq 254`; do ping 192.168.0.$i -c 1 -W 1 | grep "1 packets received, 0% packet

loss" &> /dev/null; if [ "$?" == "0" ]; then echo "192.168.0.$i is USED!!!!"; fi; done

192.168.0.1 is USED!!!!

1 packets transmitted, 1 packets received, 0% packet loss

192.168.0.4 is USED!!!!

view arp cache with command...

[admin@@localhost:~] esxcli network ip neighbor list
Neighbor      Mac Address        Vmknic    Expiry  State  Type
------------  -----------------  ------  --------  -----  -------
192.168.0.1  00:12:ef:34:cd:67  vmk0      -4 sec         Unknown
192.168.0.2  (incomplete)       vmk0      -2 sec         Unknown
192.168.0.3  (incomplete)       vmk0      -2 sec         Unknown
192.168.0.4  b4:05:43:03:41:fc  vmk0      -2 sec         Unknown