Section 5.3. Physical and Virtual NICS


5.3. Physical and Virtual NICS

Within a virtual environment physical NICs belong to your ESX server and can be bound to virtual switches or the service console. There are also virtual NICs which attaché virtual machines to virtual switches.

5.3.1. Physical NICs

Your ESX Server should have a minimum of two physical NICs. During the ESX Server installation process, one of the physical NICs will be allocated exclusively to the ESX console. It is through this ESX Server Service Console NIC that all connections to the MUI are made, as well as SCP, SSH, or any other tool to access the ESX Server's file system. The other physical NIC will be dedicated to your virtual machines. Figure 5.12 depicts this simple configuration.

Figure 5-12. The Configuration of an ESX Server with Two NICs


Figure 5.12 depicts an ESX server with two NICs: one dedicated to the ESX Server's Service Console and the other dedicated to the virtual machines on the ESX Server itself. How ESX Server sees and names these NICs from the operating system perspective is important to understand.

When you install ESX Server, the first NIC in the first PCI bus/slot that ESX detects will be the one it assigns to the ESX console. Physical NICs that are not allocated to the Service Console but are for use by the VMkernel and the virtual machines are labeled vmnic0 and incremented from there as vmnic1, vmnic2, and so on. The name of the NIC will be derived from the PCI bus/slot location. If your ESX Server has different physical NICs, say Broadcom and Intel, the name of your physical NICs will depend on which NIC driver is loaded first. If you have a multifunction card, say a dual- or quad-port NIC, then the function is also numbered. For instance:

1 one port NIC might be named bus1. slot.1 function1
1 dual port NIC might be enumerated with the following names:
 bus1.slot1.function0 bus1.slot1.function1 

The multifunction card has the same bus and slot number and the function descriptor is incremented. To check out the naming of one of your physical NICs, go to the command line of your ESX Server, and type in the following: cat/etc/vmware/devnames.conf.

The output may look something like Figure 5.13

Figure 5-13. Names of the Physical NICs


Listed in this file are the names of your physical NICs. In this example, the ESX Server has eight physical NICs.

Besides listing the names of your physical NICs, you can also adjust the speed at which they're set. To do this, log in to the MUI. Go to the Options tab and then double-click the Network Connections link (see Figure 5.14).

Figure 5-14. Selecting the Options Tab of the MUI


Once the Network Connections page loads, click the Physical Adapters tab. You'll notice on the left of this window that the physical adapters are labeled Outbound Adapter 0, Outbound Adapter 1, and so on. Outbound Adapter 0 equals vmnic0, which equals 007:04.1. It can be a bit confusing.

On the far right of the window, click Edit (see Figure 5.15).

Figure 5-15. Loading the Network Connections Page


Once you click Edit on one of your physical adapters, the properties of that NIC appear in a new window. From here, you can change the speed of your NIC (see Figure 5.16).

Figure 5-16. Changing the Speed of a NIC


Once you set the NIC to its desired speed, click OK to save the changes. According to VMware documentation, a reboot must occur for this change to take effect.


Note: It's always a best practice to hard-set the speed of your physical NICs. Make sure they're plugged into a managed switch and that both the switch port and the physical NIC are set to the same speed.
5.3.1.1. The Service Console NIC

The service console NIC is the first NIC that ESX detects during the installation process. The detection process occurs initially during installation. You'll see a window similar to the one in Figure 5.17

Figure 5-17. Device Allocation


From this figure, you can see that the installation process detected two NICs, both AMD 79c970s. It assigned the PCI Bus:Device. Function 0:17.0 to the Service Console, which is the first NIC it found. It's highly recommended by the authors to always, we repeat always, allocate at least one physical NIC exclusively to the Service Console. It's through this NIC that you'll access the MUI, backup agents should run, and Virtual Center, if you use it (again, highly recommended), can manage your virtual machines. There are ways to share NICs between the Service Console and your virtual machines, but we don't recommend it.


Note: ESX Server 2.5 supports up to 8-Gigabit Ethernet or 16 10/100 adapters.

At the time of this writing you could find out which NICs are supported at www.vmware.com/pdf/esx_io_guide.pdf.

5.3.2. Virtual NICs

Virtual NICs are what you assign to your virtual machines. Each virtual machine can have four virtual NICs. Like any physical NIC, a virtual NIC can have one or more IP addresses and a MAC address. Virtual NICs are assigned. Two NIC drivers are available:

  • vlance

  • vmxnet

vlance virtual NICs are what are given to your virtual machines by default when you create the configuration file (see Chapter 3). According to VMware documentation, these NICs require more processor overhead and provide less bandwidth. The vlance virtual NIC runs and its driver loaded by default. Figure 5.18 depicts a default configuration of a Windows 2003 virtual machine as you would see it in the MUI.

Figure 5-18. A Default Configuration of a Windows 2003 Virtual Machine


Note the Network Adapter at the bottom left of Figure 5.18 Starting from the top, you can see that the virtual NIC is Connected and is set to Connect At Power On. Next, the Network Connection that the virtual NIC is plugged into is the virtual switch labeled LabSwitch2. Finally, the virtual device (virtual NIC) driver is the vlance driver.

The same setup would look like this if you were to open the configuration file for this virtual machine (see Figure 5.19).

Figure 5-19. The Configuration File for a Virtual Server


Figure 5.19 shows what the same virtual server's configuration file would look like. Becoming familiar with the configuration files of your virtual machines will benefit you greatly in understanding and being able to troubleshoot virtual machine issues as well as create advanced virtual machine configurations.

The other virtual NIC driver is the vmxnet. The vmxnet virtual NIC is the more advanced network driver and is reported to have better bandwidth than the vlance, especially if they are used in conjunction with virtual switches bound to Gigabit Ethernet physical NIC (see Figure 5.20).

Figure 5-20. The vmxnet Virtual NIC Driver


Figure 5.20 depicts a virtual machine with a single vmxnet virtual NIC. The virtual NIC is plugged into a virtual switch, which is bound to a physical Gigabit Ethernet adapter on ESX Server 1 itself.

vmxnet virtual NICs can be utilized only after you install the VMware tools onto your virtual machine.


Note: When you change a vlance virtual NIC to a vmxnet virtual NIC, it's like physically removing a network card from a computer and replacing it with another. You'll need to reapply all of your IP address properties if your virtual machine has static IP information set.

To add additional virtual NICs to your virtual machines (see Chapter 3).

5.3.3. Bonded NICs

As mentioned earlier, you can bond two physical NICs together for fault tolerance or load balancing. This is very similar to "teaming" NICs. NIC teaming allows you to bind a minimum of two, or a maximum of 10 (10 10/100MB NICs since there's a maximum of eight Gigabit NIC ESX Server supports), physical NICs into a single logical NIC. It's recommended that you bind identical physical NICs, although you can mix, say, one Gigabit NIC with one 100MB NIC in a bond. Figure 5.21 depicts a bond of three physical NICs.

Figure 5-21. A Bond of Three Physical NICs


Notice in Figure 5.21 that Bond0 is now associated with the virtual switch. So traffic from VM1 knows nothing of the teamed NICs and thus requires no additional NIC teaming drivers as a physical server might. ESX Server handles the physical teaming and provides a virtual interfacein this example, Bond0to your virtual machines.

A bond of teamed NICs can provide fault tolerance. If one of your physical NICs in the bond fails or is unplugged, this failure will be detected by ESX Server and network traffic will be redirected to the working NICs. This provides fault tolerance by preventing a single point of failure

A bond can also provide load balancing. ESX handles the load balancing of outgoing network traffic automatically. Incoming traffic is handled by your 802.3ad supported switches, which ESX server has no control over.

For more information on Bonds and NIC teaming, read the following VMware white paper at www.vmware.com/pdf/esx2_NIC_Teaming.pdf.


Note: For NIC teaming to work in your physical production network, you need to have physical switches that support IEEE 802.3ad static link aggregation.



Virtualization With VMware ESX Server
Configuring VMware ESX Server 2.5 (Vol 1)
ISBN: 1597490199
EAN: 2147483647
Year: 2005
Pages: 173

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net