This paper describes a framework for software-based networking in smart factories (SF) that enables them to easily adapt the communication network to changing requirements. Similar to cloud-based systems, such SFs could be seen as production clusters that could be rented and configured as needed. The SF network utilizes software-defined networking (SDN) combined with network functions virtualization (NFV) in order to achieve the required flexibility. This paper presents and discusses our vision of a network architecture for SFs based on SDN and network virtualization in order to support smart services especially for Industrie 4.0. Despite the fact that the technology is nowadays not yet ready for deployment in today's manufacturing networks, we present a framework for software-defined factory networks and discuss possible challenges and benefits.