In the traditional network architecture, must rely on network administrator to manually set up complex network parameters for a variety of QoS. Software-Defined Networking (SDN) divides networks into a three-tier architecture. The application layer that provides a centrally managed interface, the control layer that allows users to manage controller with software; and the controller sends command to the infrastructure layer, which runs a new network with settings to achieve the purpose of a centralized network control. This paper proposes a QoS mechanism that can determine the optimal traffic allocation based on network service requirements and adjust the overall network traffic allocation in real time to achieve the smooth operation of services. The experimental result showed that the proposed mechanism can be defined by the user to customize the required network services, and provides network resources to match requirements according to different priorities as well as dynamically adjusts the network parameters.