數位分身(DT)是一種先進的模擬技術,通過創建物理實體的虛擬分身,使我們能夠在虛擬環境中實時模擬和分析實體的運行狀態。這一技術不僅能夠提高系統的可視化和監控能力,而且也被廣泛應用於各種行業中,包括製造業、醫療、城市規劃以及網路技術,並在這些領域中帶來許多顯著的改變和創新。 在本論文中,我們探索了數位分身技術在網路拓樸異常流量監測中的應用,通過兩台虛擬機(VM)來模擬和分析網路異常狀態對於網路拓樸的影響。第一台虛擬機(VM1)代表實體網路,而第二台虛擬機(VM2)則作為虛擬環境,兩者均安裝了Mininet並運行相同的拓樸腳本以保持網路拓樸的一致性。 在VM1上,我們利用Scapy工具捕捉並過濾出ICMP流量的來源和目的地地址,將這些數據轉換成JSON格式後,通過Socket技術傳送到VM2。接收到數據後,VM2在其虛擬拓樸上重播這些流量,以此來模擬實體網路的行為。此外,VM1會持續運行正常的網路使用流量,而VM2除了同步正常流量數據外,還額外執行異常流量模擬。 透過這一設定,我們能夠在虛擬環境中重現實體網路的運行狀態,並對比正常與異常流量下的網路行為。這不僅增進了我們對網路異常影響的理解,也驗證了數位分身技術在網路安全監測和管理中的實用性。本論文的成果顯示,利用數位分身技術可以有效地在沒有干擾實體網路運作的情況下,充分利用實時數據對網路異常進行模擬與分析,這對於設計更為安全與穩定的網路系統具有重要意義,包括在虛擬環境中重現各種異常情境,使網路管理者能夠提前制定應對策略,提高實際運行中的應變能力;通過虛擬環境中的模擬與測試,避免在實體網路上進行實驗,從而減少因測試引起的停機時間;根據模擬結果對網路資源進行更為合理的配置,優化網路性能,提升整體運營效率。;Digital Twin (DT) technology is an advanced simulation technique that creates virtual replicas of physical entities, enabling real-time simulation and analysis of their operational states within a virtual environment. This technology enhances system visualization and monitoring capabilities and is applied across diverse industries including manufacturing, healthcare, urban planning, and network technology, where it drives significant innovations and changes. In this thesis, we explore the application of DT technology in monitoring anomaly traffic within network topologies. We employ two virtual machines (VMs): VM1, which represents the physical network, and VM2, which acts as the virtual environment. Both VMs are equipped with Mininet and execute identical topology scripts to ensure consistent network topology across both environments. On VM1, the Scapy tool is used to capture and filter the source and destination addresses of Internet Control Message Protocol (ICMP) traffic. This data is converted into JavaScript Object Notation (JSON) format and transmitted to VM2 using Socket technology. VM2 then replays this traffic on its virtual topology to simulate the behavior of the physical network. Through this setup, we replicate physical network operations in a virtual environment to compare normal and abnormal traffic behaviors. This enhances our understanding of network anomalies and validates digital twin technology for network security monitoring. Our findings show that digital twins can simulate and analyze network anomalies in real-time without disrupting physical operations. This is crucial for designing secure and stable networks, allowing administrators to anticipate and respond to anomalies, improve resilience, reduce downtime, and optimize performance.