VMware Cloud Community
Trajan2009
Contributor
Contributor
Jump to solution

How to create a vSwitch for seperate subnet

I have a vSwitch that is configured for management and my vm port groups. This vSwitch is on the 192.168.5.x subnet. I want to host a few vm's on a 172.16.30.x subnet. I created a second vSwitch for this and selected the port group vm option when creating the switch, however I was not able to assign an IP address to the NIC. I then deleted it and recreated the vSwitch using a VKernel option and it allowed me to add an IP address. Is this the correct way to do this?

I thought the vKernel was only for vMotion, Storage, Management  and Fault Tolerance. I am not using vlan's. What is the correct way to do the above?

Thanks

0 Kudos
1 Solution

Accepted Solutions
RanjnaAggarwal
VMware Employee
VMware Employee
Jump to solution

Create a New vSwitch with virtual machine port group and connect the uplink with vSwitch and assign the different subnet ip address to vm's and there is no need to assign the ip address to physical NIC. And one more thing even you can do this on the same old vSwitch also.

Regards, Ranjna Aggarwal

View solution in original post

0 Kudos
6 Replies
RanjnaAggarwal
VMware Employee
VMware Employee
Jump to solution

Create a New vSwitch with virtual machine port group and connect the uplink with vSwitch and assign the different subnet ip address to vm's and there is no need to assign the ip address to physical NIC. And one more thing even you can do this on the same old vSwitch also.

Regards, Ranjna Aggarwal
0 Kudos
rickardnobel
Champion
Champion
Jump to solution

Trajan2009 wrote:

I am not using vlan's. What is the correct way to do the above?

As Ranjna wrote above you should only put IP addresses inside the Virtual Machines. The ESXi vSwitch does not care or even know what IPs are in use.

However, you write that you do not have VLANs, how is your new vSwitch connected to the physical network?

My VMware blog: www.rickardnobel.se
0 Kudos
iw123
Commander
Commander
Jump to solution

Hi,

Yes, you dont assign an IP address to the vswitch for your VM traffic. You can crete a vswitch, attached to a physical nic that is patched into the desired subnet. You then create a port group then attach your vm to that portgroup, and give that VM an appropriate IP address - in this case 172.16.30.x

Alternatively, you would use vlans. In that case you would normally have one vswitch with many portgroups representing the required vlans, e.g. one for 172.16.30.x and one for 192.168.5.x

You can read more about vsphere networking concepts here: http://pubs.vmware.com/vsphere-50/topic/com.vmware.ICbase/PDF/vsphere-esxi-vcenter-server-50-network...

Thanks

*Please, don't forget the awarding points for "helpful" and/or "correct" answers
chriswahl
Virtuoso
Virtuoso
Jump to solution

Discussion moved from VMware ESXi 5 to VMware vSphere™ vNetwork

VCDX #104 (DCV, NV) ஃ WahlNetwork.com ஃ @ChrisWahl ஃ Author, Networking for VMware Administrators
0 Kudos
Trajan2009
Contributor
Contributor
Jump to solution

The uplink is etherchannel back to the lan switch. 

0 Kudos
LFC
Enthusiast
Enthusiast
Jump to solution

Configure your Port Channel as a dot1q trunk (if it isnt already) and allow VLANs for your two networks

Configure the individual ports in the PortChannel the same

Create a second Port Group on the same vSwitch

Tag each Port Group with the correct VLAN id

Use Load balance using IP Hash (if it is a Cisco Ether-channel using Mode ON) on the port groups

Hope this helps

0 Kudos