A fundamental problem that confronts peer-to-peer (P2P) applications is to construct an efficient system which can support flexible search. This paper presents CTL-P2P, a cluster-based two-layered P2P architecture model that addresses this problem. CTL-P2P is a combination of structured topology and unstructured topology. It utilizes semantic-based interest and behavioural peer clustering to form clusters. Each cluster is an unstructured topology, and uses heterogeneity to select super-peers as local servers of clusters. Super peers constitute the high-level structured topology. Results from theoretical analysis and simulations show that CTL-P2P is scalable, with low maintenance cost, high search efficiency and stable network traffic.