VMware Cloud Community
shanrid
Contributor
Contributor
Jump to solution

Command for enabling IP Hash on host

I need the command to check and enable the IP Hash on the switch. We are getting a mismatch even though it said it is enabled in the console.

0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager
Jump to solution

To enable IP Hash on a given vSwitch, you can use the following vimsh (vmware-vim-cmd)

vmware-vim-cmd hostsvc/net/vswitch_setpolicy --nicteaming-policy=loadbalance_ip vSwitch0

To check your vSwitch configs, you can use the following:

vmware-vim-cmd hostsvc/net/vswitch_info

Here is a vSphere SDK for Perl script which can do the same that does not require to run within the Service Console -

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

View solution in original post

0 Kudos
1 Reply
lamw
Community Manager
Community Manager
Jump to solution

To enable IP Hash on a given vSwitch, you can use the following vimsh (vmware-vim-cmd)

vmware-vim-cmd hostsvc/net/vswitch_setpolicy --nicteaming-policy=loadbalance_ip vSwitch0

To check your vSwitch configs, you can use the following:

vmware-vim-cmd hostsvc/net/vswitch_info

Here is a vSphere SDK for Perl script which can do the same that does not require to run within the Service Console -

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos