1. For a network controller, a method comprising: identifying a data compute node for operation on a host machine, the host machine comprising a managed forwarding element (MFE) having a plurality of tunnel endpoints, the data compute node belonging to a particular logical network; identifying a plurality of other data compute nodes belonging to the particular logical network; and distributing, to the MFE, (i) a mapping of each data compute node of the plurality of other data compute nodes to a identifier for a group of tunnel endpoints associated with the data compute node and (ii) a mapping of each of the identifiers to a list of tunnel endpoints, wherein the MFE uses the mappings to encapsulate packets sent from the data compute node for transmission to other MFEs.