{"id":16332797,"url":"https://github.com/kevinbird61/virtual-router","last_synced_at":"2025-03-22T23:31:55.712Z","repository":{"id":83111908,"uuid":"247202398","full_name":"kevinbird61/virtual-router","owner":"kevinbird61","description":"Using tuntap to simulate router port, implement software router and related network functions with C.","archived":false,"fork":false,"pushed_at":"2020-09-27T05:14:17.000Z","size":127,"stargazers_count":14,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-18T15:43:27.558Z","etag":null,"topics":["c","router","tuntap","virtualization"],"latest_commit_sha":null,"homepage":"https://hackmd.io/@scyu/HyGwpzGL8","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kevinbird61.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-14T03:09:44.000Z","updated_at":"2024-10-01T16:02:17.000Z","dependencies_parsed_at":"2023-03-01T19:30:30.825Z","dependency_job_id":null,"html_url":"https://github.com/kevinbird61/virtual-router","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinbird61%2Fvirtual-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinbird61%2Fvirtual-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinbird61%2Fvirtual-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinbird61%2Fvirtual-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevinbird61","download_url":"https://codeload.github.com/kevinbird61/virtual-router/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245036111,"owners_count":20550661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","router","tuntap","virtualization"],"created_at":"2024-10-10T23:33:01.008Z","updated_at":"2025-03-22T23:31:55.692Z","avatar_url":"https://github.com/kevinbird61.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Virtual router\n\nUsing tuntap to simulate router port, and C to implement software router and related network functions.\n\n![](doc/virtual-router-topo.png)\n\nWe demostrate this virtual router with 2 router ports for simplicity. All environment can be run on single computer with linux network virtualization support.\n1. Using namespace to simulate host machine.\n2. Using `tuntap` client to simulate router's port.\n3. Using virtual link (`veth`) to connect namespace with our ports in `bridge`.\n\n## How to use\n\n* Build demo topology\n    * `./.scripts/create_topo.sh`\n* Build and run virtual router\n    * `make`\n    * `./router.exe -i tap0 tap1`\n* Run the traffic\n    * ping \n        * h1 to h2: `ip netns exec h1 ping 10.0.1.1`\n        * h1 to port0: `ip netns exec h1 ping 10.0.0.2`\n        * h2 to h1: `ip netns exec h2 ping 10.0.0.1`\n        * h2 to port1: `ip netns exec h2 ping 10.0.1.2`\n\n## Contact\n* Kevin Cyu, kevinbird61@gmail.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinbird61%2Fvirtual-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevinbird61%2Fvirtual-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinbird61%2Fvirtual-router/lists"}