Link to home
Start Free TrialLog in
Avatar of bayroot21
bayroot21

asked on

ESX Vmware networking - Linux bonding on guest os

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
ASKER CERTIFIED SOLUTION
Avatar of za_mkh
za_mkh
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
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!
 
As recommended by VMware, its not a good security practice to allow both Service Console and VMs Traffic using a single network card.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bayroot21
bayroot21

ASKER

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.