Inter and intra-network connectivity for different organizations have become a useful resource for accessibility and flexibility for data connectivity many apps, and online services are increasing day by day, and because everything is available online, it generates a huge amount of data, which is why cyber security revolves around it. Because of an increase in internet use and cyber-attacks, companies such as business continuity failure, credibility, and other aspects are frequent and affect them. In the continued development of the threat environment, cyber security teams must now deal with numerous threats. As multiple attacks on computer networks and systems are becoming more harmful, current security tools are often inadequate to resolve issues relating to unauthorized users, reliability, and reliable network security. To maintain a safe environment and Intrusion-Detection Mechanisms (IDS) that control device functions and detect intrusions should typically be used to supplement other protection strategies; conventional security methods are not adequate. Actual users expect their requested information to be processed in real-time, while malicious traffic needs to be mitigated just as quickly as possible. As traffic increases, this problem becomes more complex. This paper contributes a detailed analysis of network packets to find anomaly detection based on the UNSW NB 15 dataset and investigate the the difference between IP packet behavior for both malicious and legitimate packets. Besides we acquaint with new methodologies to illuminate and appraise the network attack in a very proficient way using different machine learning algorithms which will accomplish locating the malicious traffic in the least execution time with precision.