VMware Cloud Community
jesse_gardner
Enthusiast
Enthusiast
Jump to solution

View vmnic available networks from command line?

We use VLANs and tagging a lot in our environment. Our VMNics are trunked on the physical Cisco switches to 4 or 5 VLANs. I need to confirm that this is configured properly on the physical switch and that ESX can see the corrent IP ranges.

The interface in VIC isn't very good for viewing several networks, as it spills off the window and is difficult to adjust column sizes to see it all.

Is there a command in the service console that would list all the available networks that a vmnic can see?

Reply
0 Kudos
1 Solution

Accepted Solutions
esiebert7625
Immortal
Immortal
Jump to solution

Here's some info on network hints...

Why do network hint ranges for NIC’s using VLAN tagging keep changing - http://www.vmware.com/community/thread.jspa?messageID=678394 and http://www.vmware.com/community/thread.jspa?messageID=503421

How can I display what VLAN tags are configured on a physical switch that my ESX server connects to?

• You can see this in the VI client by clicking on the Configuration tab, and then Network Adapters. If you hover the mouse over the "Networks" field of any row in the table and your upstream switch is configured with VLAN tags you will see a whole list of VLAN tags that have been sniffed off of the network.

• A better more accurate way to do this via the Service Console is with the esxcfg-info command. The Vlans and networks are listed under the network hint for each adapter. You can type esxcfg-info -n | grep -E -i "_name|Hint" to see a list of all of the network hints for each adapter.

• If you want to display what is configured on the ESX vSwitch side you can type esxcfg-vswitch –l to display this.

View solution in original post

Reply
0 Kudos
8 Replies
admin
Immortal
Immortal
Jump to solution

Not sure if this is what you're looking for, but "esxcfg-vswitch -l" will list all of your vswitchs, port groups and VLAN IDs - plus which vmnic is used for uplink.

Reply
0 Kudos
waynegrow
Expert
Expert
Jump to solution

Would this give you the information you need?

esxcfg-vswitch -l

Reply
0 Kudos
jesse_gardner
Enthusiast
Enthusiast
Jump to solution

To reply to you both Smiley Happy

No, esxcfg-vswitch -l doesn't give me the information I'm looking for. I'm not looking for anything to do with how ESX vswitches are configured, I'm looking for underlying connectivity information about the NICs and what VLAN's are physically trunked to them.

The equivilent in VIC (which I don't like the interface for) is in a host Configuration tab, Network Adapters section, Networks column.

Reply
0 Kudos
Diego_Mora
Enthusiast
Enthusiast
Jump to solution

i havent any ESX to probe, but maybe esxcfg-vmnic is your command. Write as is to view a list of parameters.

Mensaje editado por:

Diego.Mora

Or esxcfg-nics, i dont remember. Sorry.

Type esxcfg- and press tab twice to view all esxcfg- commands.

null

jesse_gardner
Enthusiast
Enthusiast
Jump to solution

esxcfg-vmknic -l[/b] displays port group, IP, netmask, broadcast, MAC, MTU, and Enabled.

esxcfg-nics -l[/b] displays Name, PCI, Driver, Link, Speed, Duplex, and Description.

Neither displays what I'm looking for.

Reply
0 Kudos
jesse_gardner
Enthusiast
Enthusiast
Jump to solution

Answered my own question.

esxcfg-info --network | grep Hint[/b]

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

Ah I see you wanted the network hint that displays what subnets a NIC has seen. Be warned, this information is unreliable at best.

esiebert7625
Immortal
Immortal
Jump to solution

Here's some info on network hints...

Why do network hint ranges for NIC’s using VLAN tagging keep changing - http://www.vmware.com/community/thread.jspa?messageID=678394 and http://www.vmware.com/community/thread.jspa?messageID=503421

How can I display what VLAN tags are configured on a physical switch that my ESX server connects to?

• You can see this in the VI client by clicking on the Configuration tab, and then Network Adapters. If you hover the mouse over the "Networks" field of any row in the table and your upstream switch is configured with VLAN tags you will see a whole list of VLAN tags that have been sniffed off of the network.

• A better more accurate way to do this via the Service Console is with the esxcfg-info command. The Vlans and networks are listed under the network hint for each adapter. You can type esxcfg-info -n | grep -E -i "_name|Hint" to see a list of all of the network hints for each adapter.

• If you want to display what is configured on the ESX vSwitch side you can type esxcfg-vswitch –l to display this.

Reply
0 Kudos