Objective 2.3 – Administer Advanced VMkernel Networking Configurations Print E-mail
Written by Matthijs van den Berg   
Friday, 23 January 2009 17:47

KNOWLEDGE

  • Define configuration options for VMkernel ports
    • Peer DNS
      I never used this one, and the internet is not really a big help.  If anyone can help me to explain what a peer DNS is, please use the comment system! Never the less I give it a try:

      When a peer DNS is configured name resolving will be done via a peer. Hostname will be set via DHCP?

      You can use the following command to configure a peer DNS server:
      esxcfg-vmknic  -P|--peerdns
      VMware explanation: Set peer dns. If set the system will use the HostName, HostIPAddress Domain returned by DHCP. Valid only for DHCP
    • MTU
      The Maximum Transmission Unit (MTU) of IP packets can be changed in VMware from the default (1500) to maximum 9000 (Jumbo Frames).  Note that MTU sizes must be changed throughout the network including switches. Also not all hardware supports a larger MTU size than the default 1500, check with your vendor (NIC, switches etc.).  The different MTU must be configured via the CLI in two staps,  the following example show a configuration for Jumbo Frames:
      • First configure the MTU on a existing vSwitch
        esxcfg-vswitch -m 9000 <vSwitchName>
        optionally check this with to see that the MTU for the switch = 9000 with:
        esxcfg-vswitch –l
        Secondly create a VMkernel interface with the following 
        Use the following command to add a VMkernel NIC to a newly created portgroup with Jumbo Frame support:
        esxcfg-vmknic -a -i  -n  -m 9000  
        This created the portgroup with the supplied IP settings and MTU size (in this case 9000). You can check if the MTU settings for the NICs are correct with:
        esxcfg-nics –l
        Check the end-to-end configuration (including the switches and NICs) using a ping with a large payload:
        vmkping -s 9000 <IPofNASwithJumbo or IPofESXwithJumbo>
    • TSO
      TCP Segmentation Offload (TSO)
      TSO is enabled on the VMkernel interface by default, but must be enabled at the virtual machine level. TSO support through the Enhanced vmxnet network adapter is available for virtual machines running the following guest operating systems:
      - Microsoft Windows 2003 Enterprise Edition with Service Pack 2 (32-bit and 64-bit)
      - Red Hat Enterprise Linux 4 (64-bit)
      To enable TSO for a VM you must add a new NIC to the VM (possible replacing the exisiting one) if the current NIC is not a Enhanced vmxnet NIC. A new NIC comes with a new MAC address. Optionally you can lookup the existing MAC and use this for the new NIC.
      You can disable the Off-load function when creating a vmknic with the –t option in the esxcfg-vmknic command:
      esxcfg-vmknic -a -i <IPaddress> -n <netmask> -t <port group name>
  • Understand VMkernel routing
    Well, since the Kerel does not actually route traffic I think they mean that you can configure the default gateway for routing and additional IP routes here. VMware allows a default gateway for iSCSI, VMkernel and VMotion (when separated on different networks) but does not require one.  You can set the VMkernel default gateway / gateway of last resort with the command:
    esxcfg-route  
    You can add additional or specific routes with the following command:
    esxcfg-route -a default <Subnet> <GatewayIP>
  • Troubleshoot VMkernel configuration issues
    You can troubleshoot the VMkernel in several ways. First most likely errors will show up in the logfile. All warnings are logged in the vmkwarnings log file. 
    You can also lookup many VMkernel setting using : esxcfg-advcfg (source: http://www.b2v.co.uk/)
    Example:
    esxcfg-advcfg -g /Misc/BlueScreenTimeout
    The question is, how much is configurable? To figure out what is configurable, we recommend that you look in the directory /proc/vmware/config which you will find in the service console command line and then you will see the following directories:
    • BufferCache
    • Cpu
    • Disk
    • FileSystem
    • Irq
    • LVM
    • Mem
    • Migrate
    • Misc
    • Net
    • NFSNuma
    • Scsi
    • User
    • VMFS3
  • From these directories and the files within, you can work out the paths to be supplied to the esxcfg-advcfg command as parameters. Alternatively, you could also use the command
    esxcfg-info –o
    to list the advanced options.

SKILLS AND ABILITIES

  • Add and remove VMkernel ports
    Add a port:
    esxcfg –a <options>
    Delete a port:
    esxcfg-vmknic -d <portname>
  • Enable/Disable VMkernel ports
    Use the following options to enable or disable a port after de esxcfg-vmknic command:
    -e|--enable               Enable the given NIC if disabled.  
    -D|--disable              Disable the given NIC if enabled.
  • Example:
    esxcfg –a <options>
  • Configure the VMkernel routing table
    See the bullet “Understand VMkernel routing”.
 

TOOLS

  • CLI
    • esxcfg-vmknic
    • esxcfg-route
  • VI client