This paper describes the hardware architecture and performance of a 5-Tb/s frame-based (FB) ATM switching system OPTIMA-2 (OPTically Interconnected Distributed Multi-stage TB/s-ATM switching Network Architecture -2). First, we describe the switch architecture, which is a non-blocking 3-stage switch using optical wavelength division multiplexing (WDM) and dynamic bandwidth sharing technique. Variable-length FB-ATM cells, which can encapsulate IP packets, can be switched while keeping throughput fairness. Second, we propose a scheduling technique for variable-length packets used in the WDM system which selects packets from the eight wavelengths. We show that the scheduling technique can keep fairness and a small delay for variable-length packets. A pipelined-scheduling technique for variable-length packets is also proposed for a high-speed and large-capacity switching system.