# 關於 Virtual Router ###### tags: `virtual-router` [TOC] > Source code: https://github.com/kevinbird61/virtual-router > Wiki: https://github.com/kevinbird61/virtual-router/wiki ## 開發 Virtual router 的原因 * 從實際的網路流量操作當中學習各層網路協定的運作行為,並以 router 的角度來處理各式的流量 * 透過 C 語言實作,增加對該語言的掌握度 * 訓練設計整個程式架構: * 程式可維護性、易讀性 * 擴充功能的容易度 * 設計資料收集的方式 (statistics) ## 程式架構 * `Worker thread`: 讀取 tuntap client 來模擬 router port * 封包的處理 * 流量資訊的收集 (e.g. 處理多少 ICMP packets) * `Main thread`: 初始化 router 後,進入 router CLI 來做操控 * 以 CLI 控制各個 router port、並且可秀出 port 資訊以及上頭所收集的流量資訊。 ![](https://i.imgur.com/Vy7eH0H.png) ## 貢獻 * 可以提交程式碼修改到上面 source code 的 github repository * 聯繫我: kevinbird61@gmail.com