Patent ID: 7613809

Claim:
A method for allocating one or more ephemeral ports to one or more virtual machines instantiated on a physical device, each virtual machine having an operating system controlling instruction executions within the virtual machine, each virtual machine further having a network stack facilitating communication with a network for the virtual machine, the network being coupled to the physical device, the method comprising: receiving, by an ephemeral port manager of the physical device, a request for an allocation of one or more ephemeral ports from a pool of ephemeral ports associated with a physical device, for a first virtual machine of the physical device; allocating, by the ephemeral port manager, up to the one or more ephemeral ports requested from the pool of ephemeral ports, if up to the one or more ephemeral ports are available for allocation from the pool of ephemeral ports; marking, by the ephemeral port manager, the allocated one or more ephemeral ports as unavailable to meet an ephemeral port allocation request of any other virtual machine of the physical device; and notifying a routing module of the physical device, by the ephemeral port manager, of the allocation of the one or more ephemeral ports allocated to the first virtual machine, the notification facilitating the routing module in routing one or more packets received by the physical device, and addressed to a first port of the up to one or more ephemeral ports, to the first virtual machine which has been allocated the first port.