Aiming at better resource utilization, an important requirement of future optical transport networks is the capability to accommodate subwavelength client flows efficiently. This can be put into action thanks to the enhanced traffic engineering (TE) protocols provided within the generalized multiprotocol label switching (GMPLS) standardization. The present paper concentrates on the design and implementation of a GMPLS-controlled grooming-capable transport infrastructure, namely, the automatically switched optical network (ASON)/GMPLS CARISMA test bed. Through the paper, the operation of a GMPLS-controlled multilayer network architecture is introduced, subsequently highlighting implementation issues that come to light. Special attention is devoted to a centralized flow reallocation module deployed in the CARISMA test bed to minimize the overall network cost. In this context, an integer linear programming (ILP) formulation to obtain its optimal cost is derived and low-weighted metaheuristics providing a nearly optimal solution are additionally proposed. All contributions in the paper are supported by illustrative experimental results.