The topology of a network has close connections with the performance of routing algorithms based on it. In this paper, we propose an evolving model named SNCS to characterize both scale-free property and community property of many communication networks simultaneously. Then, we build a traffic model based on SNCS and use a simple routing strategy to investigate the impact of community structure on traffic flow on SNCS. In order to maximize the throughput of a network, we put forward several routing strategies that take advantage of the knowledge of topological information of a network such as the degree of a node and the community structure of the network. Experimental results show that the modified routing algorithms are able to find more efficient routes to deliver packets and thus improve the efficiency of the network considerably as the strength of the community structure is increased.