9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Charles Forsyth <forsyth@terzarima.net>
To: nikils@gmail.com, 9fans@cse.psu.edu
Subject: Re: [9fans] ip masquerading
Date: Wed,  8 Sep 2004 11:23:08 +0100	[thread overview]
Message-ID: <ff9058bbffc1730209802b3b25ea0ea7@terzarima.net> (raw)
In-Reply-To: <de0199910409080308331204f2@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1363 bytes --]

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.

[-- Attachment #2: Type: message/rfc822, Size: 3045 bytes --]

From: Nikhil S <nikils@gmail.com>
To: 9fans <9fans@cse.psu.edu>
Subject: Re: [9fans] ip masquerading
Date: Wed, 8 Sep 2004 15:38:38 +0530
Message-ID: <de0199910409080308331204f2@mail.gmail.com>

When you import gateway's outside ip stack as /net.alt and try to ping
/net.alt/<outside ipaddress> 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

  reply	other threads:[~2004-09-08 10:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-08  6:44 Nikhil S
2004-09-08  8:49 ` geoff
     [not found] ` <497b48e52d028c9cd68b5283a6a78927@collyer.net>
2004-09-08  9:10   ` Nikhil S
2004-09-08  9:14     ` geoff
2004-09-08  9:34     ` Charles Forsyth
     [not found]     ` <10978f9511a2be00107237fc8117c104@terzarima.net>
2004-09-08 10:08       ` Nikhil S
2004-09-08 10:23         ` Charles Forsyth [this message]
2004-09-08 12:59         ` Russ Cox
2004-09-08  9:17 bmaroshe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ff9058bbffc1730209802b3b25ea0ea7@terzarima.net \
    --to=forsyth@terzarima.net \
    --cc=9fans@cse.psu.edu \
    --cc=nikils@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).