Patent attributes
Some embodiments of the invention provide a method for implementing a logical network with one or more logical forwarding elements (LFEs), each with multiple logical ports. Each LFE in some embodiments is implemented by several physical forwarding elements (PFEs) operating on several devices. On a host computer executing a particular machine connected to a PFE implementing a particular LFE, the method identifies an address discovery message associating a particular network address (e.g., a layer 2 (L2) address or media access control (MAC) address) of the particular machine with a another network address (e.g., a layer 3 (L3) or an Internet Protocol (IP) address) of the particular machine. The method identifies an LFE logical port associated with the particular machine, stores in an encapsulation header an identifier that identifies this port, encapsulates the address discovery data message with this encapsulation header, and then forwards the encapsulated message to a set of one or more devices implementing the LFE. Each device in the set of devices extracts the logical port identifier from the encapsulation header and stores this logical port identifier for use in processing data messages associated with the particular machine.