[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] TunTap vs PACKET sockets



On 19 November 2015 at 13:09, Robert N. M. Watson
<robert.watson@xxxxxxxxxxxx> wrote:
> One important difference between (packet sockets, BPF, libpcap, BSD divert 
> sockets) and (tun, tap) is how you integrate with the host network stack. In 
> the former, sending via one of those mechanisms enters the host stack via the 
> output path, and receiving occurs via the input path. The latter mechanisms 
> introduce synthetic network interfaces in the host stack, so when you send on 
> a tap/tun device, it enters the input side of the host network stack, and you 
> receive via its output path.
>
> There are implications to either choice. For example, if you send via BPF, 
> your packets may not make it back to the host stackâs input path
>

"may" not make it?
Is it possible to configure so they do, or is this actually undefined
behaviour? :)

>  â so you can talk to other hosts on the network, but not the one that hosts 
> your application â you should view this as âborrowingâ the host stackâs 
> network interface. If you use tap/tun, youâll need to set up IP forwarding or 
> link-layer bridging for your packets to reach other hosts â but theyâll enter 
> the normal stack input paths without a problem. You should view this as 
> âtalking to the host network stack as though you are a remote machineâ.
>

Aha!  That is very helpful, thanks!

If I understand correctly then, it sounds like tun/tap is probably the
right thing to do if we want to host multiple MirageOS unikernels that
can talk to each other on the same host-- right?

-- 
Richard Mortier
richard.mortier@xxxxxxxxxxxx

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.