Defining the Host Network Policies

When you configure host networks, you can define specific policies for the network. The HostNetworkPolicy data object type describes network policies for both virtual switches and port groups. If the settings are not specified for the port group explicitly, the port group inherits policy settings from the virtual switch with which it is associated.

The policies are defined by the following data objects available as properties of HostNetworkPolicy.

  • HostNicTeamingPolicy – Defines the connection to the physical network. This includes failure criteria, active and standby NICs, and failover and load balancing information. See NIC Teaming.
  • HostNetworkSecurityPolicy – Defines the security policies for the network. See the ESXi Configuration Guide.
  • HostNetworkTrafficShapingPolicy – Establishes parameters for three traffic characteristics: average bandwidth, peak bandwidth, and maximum burst size.

You can also specify the VLAN policy by assigning an integer to the HostPortgroupSpec.vlanid property. The VMkernel takes care of tagging and untagging the packets as they pass through the virtual switch. See the HostPortgroupSpec and HostNetworkPolicy data objects in the API Reference.