Due to real time applications, wireless sensor network is latest research field in computer network. WSN consist of tiny, autonomous low cost, power sensor nodes with sensing and wireless communication capabilities. The design of routing protocols for WSN is influenced by challenging factors like energy consumption, scalability, fault tolerance, quality of service. In this paper, a survey of different routing protocols of WSN is discussed and comparative study is presented.  The classification of routing protocols discussed is: location based protocols, layered and in network processing protocols, data centric protocols and mobility based protocols.