In case of Wireless Sensor Networks (WSN), normally attack occurs during communication. The attacks can be DoS, DDoS, black hole etc. The previous work is done in static routing but this paper presents the work on dynamic routing. To reduce the delay in the network, an approach is required that provides end to end guarantees by maintaining a desired delivery speed. Such approach is used by SPEED protocol. SPEED also contains a congestion control mechanism and performs dynamically. Many problems arise when the network meets some kind of attacks; performance of the network further degrades.