Sensor networks are a kind of wireless self-organized network while routing protocol is an important part to ensure its sruooth running and effective information transmission.This paper simulates flooding protocol and directed diffusion protocol through NS-2 simulation software.Compared with flooding protocol,directed diffusion protocol have better performance with power consumption and delay,which is much fitter for sensor networks environment.