Patent attributes
Some embodiments provide a method for forwarding data messages at multiple edge nodes of a logical network that process data messages between a logical network and an external network. At a particular one of the edge nodes, the method receives a data message sent from a source machine in the logical network. The method performs network address translation to translate a source network address of the data message corresponding to the source machine into an anycast network address that is shared among the edge nodes. The method sends the data message with the anycast network address as a source network address to the external network. Each edge node receives data messages from source machines in the logical network and translates the source addresses of the data messages into the same anycast public network address prior to sending the data messages to the external network.