0
I got to understand how TUN/TAP works from the following illustration:
I'm at a loss how the loopback interface works. Can anyone explain a bit about how the loopback interface works, like in the illustration for TUN/TAP?
this question is very different from How does localhost 127.0.0.1 work?. the answers there is too simple, I want to know more details about the relation between the loopback interface and tcp/ip stack, socket, ect, as shown in the TUN/TAP illustration
@slhck, can you remove de-mark the
duplicate
? – misteryes – 2013-05-17T17:56:55.287What specifically do you need to know? Books have been written about that subject. Arguably TUN/TAP are a little more complex than a network interface that simply sends back everything you send to it on the same interface.
– slhck – 2013-05-17T18:03:32.970for example, when I create a TCP client with socket binding on
eth0
and a tcp server with socket binding onloopback
. what is the traversal route of the tcp packet? is it client process --> tcp/ip stack ---> loopback interface ---> tcp/ip stackc ---> server process. – misteryes – 2013-05-17T18:10:09.457I'm at a loss on this question http://superuser.com/questions/596816/if-there-are-2-nic-on-the-same-machine-can-a-tcp-client-on-one-nic-connect-to-a , so I think understanding loopback help me figure it out
– misteryes – 2013-05-17T18:11:00.100Well see, there we have the actual problem :) This is an XY Problem – you're trying to ask about your attempted solution rather than your real issue. But given you've asked this just one hour ago, give it time and you'll get an answer. If understanding of loopback interfaces is what you need to solve it, then someone will give you that solution. All that you need to know related to your original question should be there, so if you want you can edit it to clarify.
– slhck – 2013-05-17T18:26:56.090