9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] first ping
@ 2007-05-16  0:08 ron minnich
  2007-05-16  7:46 ` Charles Forsyth
  0 siblings, 1 reply; 3+ messages in thread
From: ron minnich @ 2007-05-16  0:08 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

1/log:1: rtt 0 µs, avg rtt 0 µs, ttl = 255


on node 2:
bind -a '#:' /dev
echo bind treenet /dev/vc0 ip 12.0.0.2 255.255.255.255 > /net/ipifc/clone
echo add 12.0.0.2 255.255.255.255 12.0.0.1 > /net/ipifc/1/ctl

on node 1:
bind -a '#:' /dev
echo bind treenet /dev/vc0 ip 12.0.0.1 255.255.255.0 > /net/ipifc/clone
echo add 12.0.0.1 255.255.255.255 12.0.0.2 > /net/ipifc/1/ctl

note that the mask on the bind seems meaningless. I am going to try io node now

I keep having my head handed back to me every time I think I
understand IP routing in plan 9. Seems so simple, but ... I just screw
it up each time.

So I am adding host links for now, but I feel I ought to be able to do
this via commands to /net/iproute.

ron


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] first ping
  2007-05-16  0:08 [9fans] first ping ron minnich
@ 2007-05-16  7:46 ` Charles Forsyth
  2007-05-16 14:49   ` Eric Van Hensbergen
  0 siblings, 1 reply; 3+ messages in thread
From: Charles Forsyth @ 2007-05-16  7:46 UTC (permalink / raw)
  To: 9fans

>echo bind treenet /dev/vc0 ip 12.0.0.2 255.255.255.255 > /net/ipifc/clone
>echo add 12.0.0.2 255.255.255.255 12.0.0.1 > /net/ipifc/1/ctl

yes, sorry, it turns out for my funny device i'd been using something closer to
	{echo bind medium device; echo add ip-parameters...} >/net/ipifc/clone
which explains why the text "ip" ... things didn't produce an error earlier;
as jmk says they are interpreted by the medium's bind.  makes sense.

> So I am adding host links for now, but I feel I ought to be able to do
> this via commands to /net/iproute.

adding the addresses to the interface by writing to the ctl file for the ipifc interface is right.

routes (shared by all interfaces on the stack) are added by writing to /net/iproute

	echo add target mask gateway >/net/iproute
so
	echo add 0 0 1.2.3.4 >/net/iproute
sets the default route ipgw to 1.2.3.4

in order for incoming packets not for the current node
to be forwarded by a given interface you would use
	echo iprouting 1 >/net/ipifc/NNN/ctl

BUT in this case, since every node is receiving every packet, you probably
don't really want to do that, and probably don't need it.  without it,
packets not for the current node are discarded, which seems right.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] first ping
  2007-05-16  7:46 ` Charles Forsyth
@ 2007-05-16 14:49   ` Eric Van Hensbergen
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Van Hensbergen @ 2007-05-16 14:49 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 5/16/07, Charles Forsyth <forsyth@terzarima.net> wrote:
>
> in order for incoming packets not for the current node
> to be forwarded by a given interface you would use
>         echo iprouting 1 >/net/ipifc/NNN/ctl
>
> BUT in this case, since every node is receiving every packet, you probably
> don't really want to do that, and probably don't need it.  without it,
> packets not for the current node are discarded, which seems right.
>

That probably won't always be the case though right?  We may want to
use the tree and torus as alternate routes for each other to route
around bad bits (primarily thinking of problems within the tree here)
- but I suppose it all depends on how we are using the various
networks.

           -eric


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-05-16 14:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-16  0:08 [9fans] first ping ron minnich
2007-05-16  7:46 ` Charles Forsyth
2007-05-16 14:49   ` Eric Van Hensbergen

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).