Test for the example router project
ggbbr opened this issue · comments
You need to configure a network with routes to and from your VM, which is a Qemu guest.
https://wiki.qemu.org/index.php/Documentation/Networking
I think you can do all the routing using regular linux commandline.
Thanks so much for your replying. But i am little confused, do you mind being more specific? I still dont have a clue to test the router project.
Well, routing is moving packets from one network device to another (or one vlan to another), essentially. So you need at least 2 network interfaces, and then you need to use a linux terminal to create routes for the interfaces. I honestly don't recommend using Qemu for routing anything. It uses tap devices which are crazy hard to work with for no particular reason. Just linux things. I would use something like VMware workstation which sets up interfaces for you, and you can configure the networks in a GUI.
The router object from the log you pasted is an abstraction for a routing table, so it contains routes. It says that packets destined to this address range goes to -> that interface (which has that gateway IP).
As for the router test, I didnt write it, so I dont really know what its supposed to do. But maybe it uses network namespaces to separate the networks properly, so that linux doesnt short-circuit the packets?
Thank you for your help. I took your advice, I created a Unikernel Web Serveice to answer the request from Linux via my router, and it works. Thank you again.