Intrusion detection system(IDS) plays an important role in the cyberspace security. With the rapid development of Internet today, the network traffics to be processed by IDS has many redundant and irrelevant characteristics. Meanwhile, the amount of the network traffics to be processed is very large, which will affect the identification effect of IDS. This paper presents a method which integrates clustering algorithm with support vector machine to improve the accuracy and recognition rate of IDS. Firstly, the pre-processed data is processed by clustering algorithm and divided into several subsets, and then machine learning algorithm is used to model each subset. We compared our method with other state-of-the-art algorithms, and the experimental results showed that our method greatly reduced the training time of the model, and effectively improved the performance of the model.