  For optimal placement and orchestration of network services, it is crucial
that their structure and semantics are specified clearly and comprehensively
and are available to an orchestrator. Existing specification approaches are
either ambiguous or miss important aspects regarding the behavior of virtual
network functions (VNFs) forming a service. We propose to formally and
unambiguously specify the behavior of these functions and services using
Queuing Petri Nets (QPNs). QPNs are an established method that allows to
express queuing, synchronization, stochastically distributed processing delays,
and changing traffic volume and characteristics at each VNF. With QPNs,
multiple VNFs can be connected to complete network services in any structure,
even specifying bidirectional network services containing loops.
  We propose a tool-based workflow that supports the specification of network
services and the automatic generation of corresponding simulation code to
enable an in-depth analysis of their behavior and performance. In a case study,
we show how developers can benefit from analysis insights, e.g., to anticipate
the impact of different service configurations. We also discuss how management
and orchestration systems can benefit from our clear and comprehensive
specification approach and its extensive analysis possibilities, leading to
better placement of VNFs and improved Quality of Service.
