Automation

 View Only
Expand all | Collapse all

How to get subnets info assigned to physical NIC on ESXi Host?

  • 1.  How to get subnets info assigned to physical NIC on ESXi Host?

    Posted Feb 15, 2018 04:06 PM

    Hi,

    Is there a way we can get subnets info that are assigned to physical NIC on ESXi Host using POWRCLI.?



  • 2.  RE: How to get subnets info assigned to physical NIC on ESXi Host?

    Posted Feb 15, 2018 05:00 PM


  • 3.  RE: How to get subnets info assigned to physical NIC on ESXi Host?

    Posted Feb 15, 2018 06:27 PM

    Thanks LucD for the reply. not looking for  "Observed IP ranges" info. I would like to see "Networks" info just like in the screenshot.



  • 4.  RE: How to get subnets info assigned to physical NIC on ESXi Host?

    Posted Feb 15, 2018 07:04 PM

    Isn't that the same as Observed IP Ranges (see column header)?



  • 5.  RE: How to get subnets info assigned to physical NIC on ESXi Host?

    Posted Feb 15, 2018 07:27 PM

    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?



  • 6.  RE: How to get subnets info assigned to physical NIC on ESXi Host?
    Best Answer

    Posted Feb 15, 2018 08:37 PM

    Not without querying the switch afaik.

    ESXi only reports the subnets it sees passing on it's side.



  • 7.  RE: How to get subnets info assigned to physical NIC on ESXi Host?

    Posted Feb 16, 2018 06:06 AM

    If the Switch is Cisco with VDP enabled, is it possible?



  • 8.  RE: How to get subnets info assigned to physical NIC on ESXi Host?

    Posted Feb 16, 2018 06:27 AM

    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.



  • 9.  RE: How to get subnets info assigned to physical NIC on ESXi Host?

    Posted Feb 16, 2018 06:51 AM

    Yes, that does make sense.

    Thanks for sharing the knowledge here LucD​ I appreciate it.



  • 10.  RE: How to get subnets info assigned to physical NIC on ESXi Host?

    Posted Feb 15, 2018 07:08 PM

    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)  



  • 11.  RE: How to get subnets info assigned to physical NIC on ESXi Host?

    Posted Feb 15, 2018 07:12 PM

    These are observed IP ranges.
    These addresses change depending on what the hypervisor sees coming through.

    Perhaps try a refresh of the page.



  • 12.  RE: How to get subnets info assigned to physical NIC on ESXi Host?

    Posted Feb 15, 2018 07:20 PM

    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?



  • 13.  RE: How to get subnets info assigned to physical NIC on ESXi Host?

    Posted Feb 15, 2018 07:24 PM

    Have a look at How to find out what VLANs your ESX hosts can really see, especially Update 1