1 Reply Latest reply on Nov 19, 2019 2:35 AM by jburen

    How to get the observed IP range on the ESXi physical nic along with VLAN from cli

    jasmeetsinghsuri Novice

      How to get the observed IP range on the ESXi physical nic along with VLAN from cli

        • 1. Re: How to get the observed IP range on the ESXi physical nic along with VLAN from cli
          jburen Hot Shot
          vExpert

          You could use PowerCli to get this information.

           

          Get-VMHost | Where-Object {$_.State -eq "Connected"} |

          %{Get-View $_.ID} | %{$esxname = $_.Name; Get-View $_.ConfigManager.NetworkSystem} |

          %{foreach($physnic in $_.NetworkInfo.Pnic) {

          if ($physnic.Device -ne "vusb0") {

          $pnicInfo = $_.QueryNetworkHint($physnic.Device)

          foreach($hint in $pnicInfo) {

          Write-Host $esxname $physnic.Device": " -NoNewLine

          if ($hint.ConnectedSwitchPort) {

          Write-Host $hint.ConnectedSwitchPort.PortId -NoNewLine

          Write-Host " :" $hint.ConnectedSwitchPort.SystemName}

          else {Write-Host "No CDP information available."}

          }

          }

          }

          }

           

          Some code is specific for my environment but it should give you some info.