Multiple-path routing protocols allow data source node to distribute the total traffic among available paths. We consider the problem of jamming-aware source routing in which the source node performs traffic allocation based on empirical jamming statistics at individual network nodes. We formulate this traffic allocation as a lossy network flow optimization problem using portfolio selection theory. This centralized optimization problem can be solved using a distributed algorithm based on decomposition in NUM. Along with this Network based attacks have become a serious threat to the critical information infrastructure. There are many security attacks in MANET e.g. DDOS. The effect of DDOS leads to routing load, packet drop rate, end to end delay in network. So considering these parameters we build secure IDS to detect such attack and block it. Identifying the source of the attackers is necessary to correlate the incoming and outgoing flows or connections. To resist attempts at correlation, the attacker may encrypt or otherwise manipulate the connection traffic. Timing based correlation approaches are subject to timing perturbations that may be deliberately introduced by the attacker at stepping stones. So watermark-based correlation scheme is proposed which is designed specifically to be robust against timing perturbations. Unlike most previous timing based correlation approaches, our watermark-.based approach is active in that it embeds a unique watermark into the encrypted flows by slightly adjusting the timing of selected packets.