ESX Vmware networking - Linux bonding on guest os

Posted on 2009-02-18
Last Modified: 2012-05-06
Ok don't laugh but I was wondering if the following is possible:

I have two physical NICs on an ESX server (vmnic0 (192.168.120.x) and vmnic1 (192.168.121.x)) and vswif (192.168.120.x). I want to utilize the 192.168.120.x network as both the service console network and put traffic out onto that network from an application I am running.

I have two virtual switches vSwitch0 (service console) and vSwitch1 (Centos5).

What I want to do is add vmnic0 to vSwitch1 so I have two NICs (vmnic0 and vmnic1) on two different networks. Basically I want pump out the same data on both nics from the Guest OS.

If I can utilize vmnic0 I will take the two interfaces on the guest OS and "bind them" in broadcast mode (3) but that's a different issue.

So my questions are:

1 - Can I use vswif0 and vmnic0 independent of each other? I only have two NICs one connected to a private network and another that is connected to my LAN. The one that is connected to the LAN is the one I use for the service console.

2-Do I need to create two ipaddresses one for vswif0 and vmnic0 or is ESX smart enough to use both the vswif0 and vmnic0 as the same ipaddress?

3-If this is possible do you have any tips on how to remove vmnic0 from vswitch0 and then add vmnic0 to vswitch1. Or is is possible to have vmnic0 on both the switches?

- thanks
Question by:bayroot21
    LVL 21

    Accepted Solution

    Here is another question. Why can you not give your VM two nics with one bonded to  vSwitch0 and the other to vSwitch1. This will mean the VM is connected to both Networks. Will that not be the easier solution?
    LVL 21

    Expert Comment

    Here is another question. Why can you not give your VM two nics with one bonded to  vSwitch0 and the other to vSwitch1. This will mean the VM is connected to both Networks. Will that not be the easier solution?
    To answer your questions
    1) It is best practice to give your vswif interface a dedicated network card, but most people use just one network card on the their ESX machines for both Service Console and VM network traffic. It works without any issues
    2) You don't really assign an IP to your vmnic0(pnic i.e. physical nic) interfaces. That is normally only assigned to a vswif or vmknic interface that you create which you then bond to your vmnic(pnic)! So in a way ESX is smart enough to know what to do once you configure it as such.
    3) You could use the ESX commands (run from local root session on ESX server) to do the following
    esxcfg-vswitch -l (gives you a list of your vSwitches). There are commands you can use such as esxcfg-vswitch ? which will show you with the command parameters to use configure your vswitches, uplinks etc
    other commands you will need to use
    esxcfg-nics -l gives you a listing of physical nics (esxcfg-nics ? for all parameters)
    esxcfg-vswif -l give you a listing of vswif interfaces (esxcfg-vswif ? for all parameters)
    esxcfg-vmknic -l give you a listing of vmknic (vMotion/ Storage )interfaces (esxcfg-vmknic ? for all parameters)
    Hope this helps.
    LVL 21

    Expert Comment

    Forgive me ... like always missed the important bit - you are trying to aggregate your links in the VM itself ... looks like that would be complicated (well from a time/cost point of view) It is cheaper to buy a new NIC and add it to your ESX server and that bond that new NIC to your vSwitch1. - that's what I would do!
    LVL 7

    Expert Comment

    As recommended by VMware, its not a good security practice to allow both Service Console and VMs Traffic using a single network card.
    LVL 8

    Assisted Solution

    Just to reinforce best practice (as best practice has been mentioned a few times here) The service console should have a dedicated NIC which does not incure VMguest traffic.
    MANY seem to use the same NIC (or pair) for service console and VMotion traffic.
    If I understand what you are trying to achieve is having both physical NICs bound to the same vSwitch.., This would give you NIC redundancy and will work fine.
    You then want to pass both traffic from 192.168.120 and 192.168.121 over both NICs, again this is quite standard practice but you will need to bind another vSwitch to the teamed NIC's. This is called vLAN trunking. If your switches are vLANable and you have a router you can do it. (you could use vyatta as your router)
    Otherwise buy another NIC, it's a much simpler solution.

    Author Closing Comment

    used the service console and vnic0 for traffic on one subnet and used vmnic1 on the other. On the guest OS I bonded the two NICs using broadcast mode the data seems to be identical on both subnets so both clients are now getting the exact same data. thanks for the input.

    If I find having the service console and vmnic on the same pNIC i'll add a new one, but it seems to be working fine for now.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    In vSphere 4 1 and 5.0, you can enable both Remote SSH and the ESXi Shell for management of hosts from the vSphere Client and from the Direct Console User Interface. You may have noticed that on enabling both Remote SSH and the ESXi Shell for man…
    This Tutorial covers a very basic and common question asked on Experts Exchange, "How Do I Clone or Copy a virtual machine in VMware vSphere Hypervisor ESX/ESXi 4.x, ESXi 5.0?" Using the following method, no third party tools are required or need…
    Teach the user how to install vSphere Update Manager  Console to Windows system:  Install vSphere Update Manager: Configure vSphere Update Manager plug-in in vSphere Client: Verify vSphere Update Manager settings in vSphere Client:
    Teach the user how to configure vSphere clusters to support the VMware FT feature Open vSphere Web Client: Verify vSphere HA is enabled: Verify netowrking for vMotion and FT Logging is in place or create it: Turn On FT for a virtual machine: Verify …

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now