Abstract A possible approach to cope with the diversity of future networks is to set up multiple isolated virtual networks on top of a single shared physical substrate, and each virtual network is customized to some specific purposes. However, in the current realization of virtualized infrastructure, the OpenStack infrastructure as a service (IaaS) cloud, whose isolation and programmability are limited in terms of scalability and performance. To overcome these limitations, we propose a solution based on software defined networking (SDN) which is composed of a centralized server and distributed agents. The server has complete view of the whole network substrate, and is responsible for the installation and management of virtual network through the distributed agents. Each agent has the local view of the substrate node. They can manage the local resources, dispatch and filter the inner- programmable virtual network (PVN) traffic based on MAC isolation which is more scalable than virtual local area network (VLAN) and more efficient than GRE. Our prototype implementation shows that this architecture is feasible and provides a better compromise between flexibility and performance than the solo centralized and distributed solutions.