Hi,
Is there a way we can get subnets info that are assigned to physical NIC on ESXi Host using POWRCLI.?
Not without querying the switch afaik.
ESXi only reports the subnets it sees passing on it's side.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Something like this?
Re: command to retrieve visible networks for each vmnic
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks LucD for the reply. not looking for "Observed IP ranges" info. I would like to see "Networks" info just like in the screenshot.
Isn't that the same as Observed IP Ranges (see column header)?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I took your script and ran it 1 ESXi server. Please find expected and actual output.
Expected Output -
10.136.0.133-10.136.0.133 ( VLAN300 ),10.138.128.1-10.138.143.254 ( VLAN750 ),10.138.0.1-10.138.3.254 ( VLAN700 ),
10.138.16.1-10.138.23.254 ( VLAN710 ),0.0.0.1-255.255.255.254 ( VLAN310 ),10.136.232.1-10.136.239.254 ( VLAN203 ),
10.136.120.1-10.136.127.254 ( VLAN204 ),10.136.128.1-10.136.128.254 ( VLAN450 ),10.137.8.1-10.137.9.254 ( VLAN760 ),0.0.0.1-255.255.255.254 ( VLAN457 )
Actual Output:
10.136.0.133-10.136.0.133 (VLAN 300),10.138.128.1-10.138.143.254 (VLAN750),10.138.0.1-10.138.3.254 (VLAN 700),
10.138.20.1-10.138.23.254 (VLAN 710), 10.136.22.164-10.136.22.165 (VLAN 310),10.136.232.1-10.136.239.254 (VLAN 203),
10.136.120.1-10.136.127.254 (VLAN 204),10.136.128.1-10.136.129.254 (VLAN 450),10.137.8.1-10.137.9.254 (VLAN 760),0.0.0.1-255.255.255.254 (VLAN 457)
These are observed IP ranges.
These addresses change depending on what the hypervisor sees coming through.
Perhaps try a refresh of the page.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I refreshed the page. but no changes in "Networks" info.
As you said Observed IP Ranges are addresses change depending on what the hypervisor sees coming through.
But "Networks" tab provides complete subnet visibility info in physical NIC side.
Is there a way could you please confirm from your network or share any VMware blogs regarding the same?
Have a look at How to find out what VLANs your ESX hosts can really see, especially Update 1
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You are right LucD. Networks tab and observed IP address tab is same.
Unfortunately, it is not solve my issue.
I'm looking for subnets attached to the physical NIC. Is there a way we can se that info from ESXi side instead physical switch side?
Not without querying the switch afaik.
ESXi only reports the subnets it sees passing on it's side.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
If the Switch is Cisco with VDP enabled, is it possible?
I'm afraid I have no practical experience with the Nexus, but afaik you would still need to query the VSI for more information (correct me if I'm wrong).
I don't think it would change anything on the ESXi side.
As I understand the VDP concept, the VDP will send initialisation info to the switches (DFA leaf) for a VM that is started.
Based on that info, the Cisco Leaf (switch) configures and attaches the required VLAN.
That info is regularly sent back to the Nexus, who will configure the packets from the VM accordingly.
My conclusion, not based on practical experience and I would love to get some feedback on this, again the switch will only "see" subnets that have active traffic going on.
Not the list of potential VLANs, and subnets, that could be traversing the switch.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes, that does make sense.
Thanks for sharing the knowledge here LucD I appreciate it.