Although TCP/IP protocol is widely used, its security was not prioritized during its development. This paper primarily examines the fundamental workings of ARP protocol and its security vulnerabilities. Through network simulation, we demonstrate the process of ARP spoofing and flooding attacks while using Wireshark packet capture tool to analyze data packets in order to gain a deeper understanding of these attacks. Finally, we propose corresponding preventive measures. Conducting simulation experiments is an economical and practical method for analyzing network protocol vulnerabilities as it can identify security issues at a low cost and provide solutions.