• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2244
  • Last Modified:

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
0
bayroot21
Asked:
bayroot21
2 Solutions
 
za_mkhCommented:
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?
0
 
za_mkhCommented:
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.
0
 
za_mkhCommented:
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!
 
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
kumarnirmalCommented:
As recommended by VMware, its not a good security practice to allow both Service Console and VMs Traffic using a single network card.
0
 
markzzCommented:
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.
0
 
bayroot21Author Commented:
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.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now