From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: nikils@gmail.com, 9fans@cse.psu.edu Subject: Re: [9fans] ip masquerading From: Charles Forsyth Date: Wed, 8 Sep 2004 11:23:08 +0100 In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-thgfsvguvozaomdufifvtmmslm" Cc: Topicbox-Message-UUID: e0449218-eacd-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-thgfsvguvozaomdufifvtmmslm Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit it goes back to the port that sent it, which is always on the gateway machine, which corresponds to a file in /net/icmp/ on the gateway but if another node has imported that, and that node did the ping, it's something like this: node imports /net from gateway (import(4) dials exportfs(4) service on gateway) gateway starts a gateway.exportfs serving 9P ... node opens imported /net/icmp/clone 9P: Topen -> gateway.exportfs exportfs opens appropriate file on gateway Ropen <- gateway.exportfs node writes to the opened file Twrite -> gateway.exportfs gateway.exportfs does the write to the file on gateway gateway.IPstack -> ICMP packet on net on port P Rwrite <- gateway.exportfs gateway.IPstack <- ICMP responses, queued for port P's file ... node reads opened file Tread -> gateway.exportfs gateway.exportfs does the read of file on gateway Rread <- gateway.exportfs (with data for port P's file) ... where the T- and R-messages are 9P messages on the channel set up by import(4) between node and the exportfs(4) on the gateway, assuming the gateway provides that service (see listen(8)). the kernel doesn't do anything special, which is indeed the point, so reading the kernel code wouldn't be particularly helpful. man 4 import, man 4 exportfs, and man 3 ip would be more helpful. --upas-thgfsvguvozaomdufifvtmmslm Content-Type: message/rfc822 Content-Disposition: inline Received: from mail.cse.psu.edu ([130.203.4.6]) by lavoro; Wed Sep 8 11:06:38 BST 2004 Received: from psuvax1.cse.psu.edu (localhost [127.0.0.1]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 1917A18263 for ; Wed, 8 Sep 2004 06:08:58 -0400 (EDT) X-Original-To: 9fans@cse.psu.edu Delivered-To: 9fans@cse.psu.edu Received: from localhost (localhost [127.0.0.1]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id DF82918258 for <9fans@cse.psu.edu>; Wed, 8 Sep 2004 06:08:40 -0400 (EDT) Received: from mail.cse.psu.edu ([127.0.0.1]) by localhost (psuvax1 [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12105-01-19 for <9fans@cse.psu.edu>; Wed, 8 Sep 2004 06:08:39 -0400 (EDT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.205]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id A7DC718252 for <9fans@cse.psu.edu>; Wed, 8 Sep 2004 06:08:39 -0400 (EDT) Received: by mproxy.gmail.com with SMTP id 74so325606rnl for <9fans@cse.psu.edu>; Wed, 08 Sep 2004 03:08:39 -0700 (PDT) Received: by 10.38.24.70 with SMTP id 70mr2625343rnx; Wed, 08 Sep 2004 03:08:38 -0700 (PDT) Received: by 10.38.165.40 with HTTP; Wed, 8 Sep 2004 03:08:38 -0700 (PDT) Message-ID: Date: Wed, 8 Sep 2004 15:38:38 +0530 From: Nikhil S To: 9fans <9fans@cse.psu.edu> Subject: Re: [9fans] ip masquerading In-Reply-To: <10978f9511a2be00107237fc8117c104@terzarima.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <10978f9511a2be00107237fc8117c104@terzarima.net> X-Virus-Scanned: by amavisd-new at cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Nikhil S , Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: 9fans-bounces+forsyth=terzarima.net@cse.psu.edu Errors-To: 9fans-bounces+forsyth=terzarima.net@cse.psu.edu When you import gateway's outside ip stack as /net.alt and try to ping /net.alt/ i can understand that the ping packet is sent from gateway's outside ip stack using its outside ipaddress etc. what happens when the ping response comes back. will that packet be forwarded to both gateway and inside machine ? or only to inside machine ? how does this internally work. i mean when you import /net.alt the ippacket with header is forwarded or without header ? i havent seen kernel code. just curious --upas-thgfsvguvozaomdufifvtmmslm--