net

Section: Maintenance Commands (8)
Index Return to Main Contents

BSD mandoc
VMware ESX 4.0  

NAME

net - VMware ESX network interface management  

COPYRIGHT

VMware ESX is Copyright 1998-2009 VMware, Inc. All rights reserved.  

INTRODUCTION

VMware ESX allows system administrators to allow or disallow promiscuous mode on network interfaces and to print out network statistics. Promiscuous mode can be allowed or disallowed on a per-interface basis or on a per-VM basis. Likewise, statistics can be printed on a per-interface basis or on a per-VM basis.  

PROMISCUOUS MODE

Promiscuous mode can be controlled and queried on a per-interface basis by accessing the file /proc/vmware/net/NIC-NAME/config where NIC-NAME is the name of the network interface that is of interest. To find out the status of the interface you would do

    cat /proc/vmware/net/NIC-NAME/config

To enable promiscuous mode on this interface you would do

    echo "PromiscuousAllowed Yes" >> /proc/vmware/net/NIC-NAME/config

To disable promiscuous mode on this interface you would do

    echo "PromiscuousAllowed No" >> /proc/vmware/net/NIC-NAME/config

Once promiscuous mode is allowed on an interface, by default all virtual machines that use that interface will be allowed to put the interface in promiscuous mode. If you want to control which particular VMs are allowed to put an interface in promiscuous mode, you can do this through the proc interface as well. For each virtual NIC on each VM that is attached to a particular interface, there will be a file under the /proc/vmware/net/NIC-NAME directory whose name will be the MAC address of the virtual NIC.

To find out the status of a particular virtual NIC you would do


    cat /proc/vmware/net/NIC-NAME/MAC-ADDR

To enable promiscuous mode on this virtual NIC you would do

    echo "PromiscuousAllowed Yes" >> /proc/vmware/net/NIC-NAME/MAC-ADDR

To disable promiscuous mode on this interface you would do

    echo "PromiscuousAllowed No" >> /proc/vmware/net/NIC-NAME/MAC-ADDR

 

STATISTICS

Statistics can be printed out on a per-interface basis by printing out the file /proc/vmware/net/NIC-NAME/stats


    cat /proc/vmware/net/NIC-NAME/stats

Statistics can be printed out for each virtual NIC instance by printing out the file /proc/vmware/net/NIC-NAME/MAC-ADDR


    cat /proc/vmware/net/NIC-NAME/MAC-ADDR  

EXAMPLES

Suppose you have one interface named "vmnic0" and it is being used by two virtual machines. The MAC addresses for the virtual machine's NICs are 00:50:56:f5:09:54 and 00:50:56:f5:09:1f. If you want to figure out the status of promiscuous mode on this interface we would simply cat the config file

    % cat /proc/vmware/net/vmnic0/config

To turn promiscuous mode on for the interface you would just do the command

   % echo "PromiscuousAllowed Yes" >> /proc/vmware/net/vmnic0/config

To check out the status of the virtual NIC with MAC address 00:50:56:f5:09:54 you would simply cat the file with the same name

    % cat /proc/vmware/net/vmnic0/00:50:56:f5:09:54

To turn promiscuous mode off for this virtual NIC you just do the command

    % echo "PromiscuousAllowed No" >> /proc/vmware/net/vmnic0/00:50:56:f5:09:54


 

Index

NAME
COPYRIGHT
INTRODUCTION
PROMISCUOUS MODE
STATISTICS
EXAMPLES

This document was created by man2html, using the manual pages. Brought to you by Bouke Groenescheij, www.jume.nl
Time: 15:25:08 GMT, May 26, 2009