Update: I found a new free method. Assuming you have Windows, run “ping xxx.xxx.xxx.255 -t” (or whatever the broadcast IP is for your subnet – try the online calculator if you’re not sure). The result is identical to the pay-for tool above. Note that the ping must be running when the host boots or when you run the “add nic” wizard for the fields to populate. I think the linux equiv is “ping -f -b xxx.xxx.xxx.255”
During the setup of a demo environment I realized it would be very useful to have the “Observed IP Range” be correct on my vSphere ESXi servers.
While searching for a low-cost way to get the ranges to populate I noticed a few interesting behaviors of the fields including the surprisingly short attention span and the times it appears to try to populate the table.
For starters, per KB article 1006744 the Observed IP range can be populated by CDP (or I assume LLDP though I don’t have a switch that does either to test with) or by handling broadcast packets. This is why your management NIC tends to be populated more often than say, the dedicated vMotion network.
I’ve noticed two times the ranges will become populated – during the host boot process and when you launch the Add Adapter Wizard (either from the switch properties or during the course of adding a new switch). Note that if you don’t have network connectivity, however briefly, during these periods the Observed Range for the disconnected NICs is wiped.
Thus if you plug your network cable into another network or switch VLAN configs the table will not update right away – or even apparently at all.
If you are building a demo environment like me or want your dedicated vMotion network to populate the Observed IP range – how can you manipulate the environment to achieve that? I tried several different methods from tweaking PINGs (doesn’t work in a Windows environment) to various obscure tools downloaded from questionable free sites.
I finally settled on a nifty tool from zti-telecom/ called LanTraffic. It even has a “script” environment for automation.
To test, I took a Windows VM and made sure it had a NIC connected to each of my virtual networks complete with correct manual IP address and then I installed LANTraffic plus Automation for LANTraffic.
Using the Automation tool I created a new Sender Part and told it to send 5-byte UDP packets to the broadcast address (.255 in my case) for each of my three networks.
The three lines look like this in the Automation tool before saving:
Note that my demo will run over and over again for short periods of time thus the “21 hour” run period. In the real world you could just fire this up as needed then open the “Add Adapter” wizard to update the tables.
I dropped a shortcut to the automation utility with the “-START:” parameter and full path to the saved automation configuration in the startup menu and set the Windows server to auto-login. Note that zti support (incidentally they’ve shown very fast support response) had to send me an updated version of the automation tool before it would auto-launch and actually start. Make sure you have 1.8 if the tool has a popup message instead of hands-free starting.
I started the “Add Network Adapter” wizard then canceled it before returning to the Network Adapters link and voila!
My enthusiasm has been dampened by noticing the ZTI tool is a 15-day trial and the full version costs $330 with no support and requires a USB license dongle… so I suppose in 2 weeks I’ll start looking for a new method, but until then my Observed IP Ranges look great!
(note this should work for vSphere 4 and VI3 just fine)
2 Responses to vSphere5: Setting the Observed IP Range