Abstract. Optimal control is a possible approach to Internet traffic engineering, which aims to achieve QoS guarantees and efficiency in network resources use. The goal can be better achieved by using the MultiProtocol Label Switching technique (MPLS), which provides increased scalability, manageability and enhanced QoS functions in IP-based networks. In this context, this paper proposes a method to find the optimal capacity provisioning for a Label Switched Path (LSP) of a MPLS network. The optimal capacity allocation for a given time interval is computed with respect to a quadratic cost function including a switching cost and a management cost for the whole network. The unique optimal solution is analytically computed assuming the knowledge of the offered traffic for the whole control interval. Furthermore, a sub-optimal on line solution is proposed which only requires the knowledge of a narrow sliding window of the offered traffic. Optimal and sub-optimal solutions are compared with respect to a simulated case study, enlightening the simplicity and, at the same time, the effectiveness of the second one.