VMware Cloud Community
khaliqamar
Enthusiast
Enthusiast
Jump to solution

NFS question

I have one vswitch which has management,vmotion and virtual machine networking. this switch i am running under nic teaming.

is it possible by any way that I can put NFS also inside the same vswitch ?

Reply
0 Kudos
1 Solution

Accepted Solutions
HawkieMan
Enthusiast
Enthusiast
Jump to solution

Just like jballack replies, it is best practice to keep those types of traffic separated. It is fully possible to let the NFS share reside within the same vlan as you use for vmotion, but best performance and traffic separation is done using separate vlans. I do assume your switch is able to use vlans.

Another good reason to keep traffic separated in different vlans is that you on most switches can then use a MTU size of 9000 instead of default 1500 for vmotion, and this is much better for large file transfers, but still keeping MTU size 1500 for other traffic.

A quick tip on the same side, i have experienced on some switches, Cisco in particular that if you put all traffic on a single port, and have regular traffic untagged (native vlan) then you can have hickups and drops, but if you set native vlan to something else (a non used VLAN) then you can let the "regular" VLAN be tagged as well, and this is in my experience the best way to do it.

This is a sample lab config I have used for some mini labs (all IPs are samples):

Esx1:

Nic Team1:

Native vlan on switch set to 999 (not used really), Trunked port on switch.

Vmk port With Vlan 1 (10.0.0.10) for administrative traffic (managment)

Vmk port With vlan 2 (10.0.2.10) for NFS Storage

Vmk port With vlan 3 (10.0.3.10) for vmotion, MTU set to 9000

Standard ports for VM traffic With vlans 4-10

Esx2:

Nic Team1:

Native vlan on switch set to 999, trunked port on switch

Vmk port With vlan 1 (10.0.0.11) for managment

Vmk port With vlan 2 (10.0.2.11) for NFS Storage

Vmk port With vlan 3 (10.0.3.11) for vmotion, MTU set to 9000

Standard ports for VM traffic With vlans 4-10

Storage server:

Nic 1:

Managment on untagged vlan 1 (10.0.0.12) for managment

Tagged vlan 2 (10.0.2.12) for NFS shares

With this setup i had best traffic separation and good troughput. NIC teaming is the available for all types of traffic as well

View solution in original post

Reply
0 Kudos
9 Replies
HawkieMan
Enthusiast
Enthusiast
Jump to solution

Yes, as long as it is a vmkernel port With an IP address (and it should be if it is vmotion on it) and the NFS share resides on the same vlan that you can reach from there.

khaliqamar
Enthusiast
Enthusiast
Jump to solution

thanks HawkieMan,

so what you suggest?

is it compulsory to have a similar Gateway across all the vswtiches ?

when i try to change the gateway, i lost every connection on host.


Regards,

Reply
0 Kudos
vfk
Expert
Expert
Jump to solution

The gateway is for the management vmkernel vmk0 interface, you can only have one gateway.  As above, the vmkernal and NFS share are on the same vlan then you should be able to add your storage without changing the gateway.

--- If you found this or any other answer helpful, please consider the use of the Helpful or Correct buttons to award points. vfk Systems Manager / Technical Architect VCP5-DCV, VCAP5-DCA, vExpert, ITILv3, CCNA, MCP
Reply
0 Kudos
jrmunday
Commander
Commander
Jump to solution

It's generally best practice to have a dedicated L2 (ie. no routing) VLAN for NFS traffic, so you wouldn't have to worry about a NFS gateway. The traffic is not encrypted, so you don't really want it routed across your network.

Take a look at the best practice guide or some additional background information;

http://www.vmware.com/files/pdf/techpaper/VMware-NFS-BestPractices-WP-EN.pdf

Depending on your physical setup, you could implement all services on a single vSwitch wihtout any issues. Are you using standard or distributed switches and how many uplinks do you have?

Cheers,

Jon

vExpert 2014 - 2022 | VCP6-DCV | http://www.jonmunday.net | @JonMunday77
Reply
0 Kudos
khaliqamar
Enthusiast
Enthusiast
Jump to solution

I have two uplinks and all the traffic (MGNT, VMOTION, VM)  is going through them. esxi is not able to get a second Gateway on vswitch.

is it possible to have two gateways on two vmkernel port groups ( for mangement and for nfs) in one vswitch?

Reply
0 Kudos
HawkieMan
Enthusiast
Enthusiast
Jump to solution

Yes it is as long as they are not on the same vlan/IP range.

I do know there in some cases might be issues With that if this resides on a dvswitch.

Reply
0 Kudos
jballack
Contributor
Contributor
Jump to solution

It is possible, but it is recommended to separate the different types of traffic in VLANs. Here you have a guide on how to do that:

http://vmware-esxi.com/configuring-vlans/

HawkieMan
Enthusiast
Enthusiast
Jump to solution

Just like jballack replies, it is best practice to keep those types of traffic separated. It is fully possible to let the NFS share reside within the same vlan as you use for vmotion, but best performance and traffic separation is done using separate vlans. I do assume your switch is able to use vlans.

Another good reason to keep traffic separated in different vlans is that you on most switches can then use a MTU size of 9000 instead of default 1500 for vmotion, and this is much better for large file transfers, but still keeping MTU size 1500 for other traffic.

A quick tip on the same side, i have experienced on some switches, Cisco in particular that if you put all traffic on a single port, and have regular traffic untagged (native vlan) then you can have hickups and drops, but if you set native vlan to something else (a non used VLAN) then you can let the "regular" VLAN be tagged as well, and this is in my experience the best way to do it.

This is a sample lab config I have used for some mini labs (all IPs are samples):

Esx1:

Nic Team1:

Native vlan on switch set to 999 (not used really), Trunked port on switch.

Vmk port With Vlan 1 (10.0.0.10) for administrative traffic (managment)

Vmk port With vlan 2 (10.0.2.10) for NFS Storage

Vmk port With vlan 3 (10.0.3.10) for vmotion, MTU set to 9000

Standard ports for VM traffic With vlans 4-10

Esx2:

Nic Team1:

Native vlan on switch set to 999, trunked port on switch

Vmk port With vlan 1 (10.0.0.11) for managment

Vmk port With vlan 2 (10.0.2.11) for NFS Storage

Vmk port With vlan 3 (10.0.3.11) for vmotion, MTU set to 9000

Standard ports for VM traffic With vlans 4-10

Storage server:

Nic 1:

Managment on untagged vlan 1 (10.0.0.12) for managment

Tagged vlan 2 (10.0.2.12) for NFS shares

With this setup i had best traffic separation and good troughput. NIC teaming is the available for all types of traffic as well

Reply
0 Kudos
khaliqamar
Enthusiast
Enthusiast
Jump to solution

Thank you guys for guidance

Reply
0 Kudos