* [9fans] Plan 9 IPv4 router
@ 2011-07-30 19:53 smiley
2011-07-30 20:52 ` Sergey Zhilkin
2011-07-31 13:21 ` erik quanstrom
0 siblings, 2 replies; 11+ messages in thread
From: smiley @ 2011-07-30 19:53 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Hi, all,
Does anybody know if it's possible to use Plan 9 as an IPv4 router? I
know you can export the /net file system to other Plan 9 boxen, but I'm
wondering about using Plan 9 to create a network appliance/router. I'm
envisioning using Plan 9 to do things that Linux iptables does... route
packets, NAT, rate limiting, etc. Could you, for example, stick
Unix/Window$ boxen on a LAN and use a Plan 9 box as a gateway? Is there
currently any way to do such a thing?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] Plan 9 IPv4 router
2011-07-30 19:53 [9fans] Plan 9 IPv4 router smiley
@ 2011-07-30 20:52 ` Sergey Zhilkin
2011-07-30 20:57 ` Lyndon Nerenberg (VE6BBM/VE7TFX)
2011-07-31 13:21 ` erik quanstrom
1 sibling, 1 reply; 11+ messages in thread
From: Sergey Zhilkin @ 2011-07-30 20:52 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Hi !
Answer is simple - no.
But this doesn't mean that you can't use plan9 as a core technology
for router os ;)
Current IP stack doesn't support NAT (dirty hack was made by some
plan9 geek), rate limits and other useless features of lunix router.
Currently lunix router on a ugly and messy MIPSel platform makes his
job done well :)
And, I think, than in the era of IPv6 nobody will be interested in
something like NAT.
And, YES, Plan9 CAN route IP ! :)
2011/7/30 <smiley@icebubble.org>:
> Hi, all,
>
> Does anybody know if it's possible to use Plan 9 as an IPv4 router? I
> know you can export the /net file system to other Plan 9 boxen, but I'm
> wondering about using Plan 9 to create a network appliance/router. I'm
> envisioning using Plan 9 to do things that Linux iptables does... route
> packets, NAT, rate limiting, etc. Could you, for example, stick
> Unix/Window$ boxen on a LAN and use a Plan 9 box as a gateway? Is there
> currently any way to do such a thing?
>
>
--
С наилучшими пожеланиями
Жилкин Сергей
With best regards
Zhilkin Sergey
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] Plan 9 IPv4 router
2011-07-30 20:52 ` Sergey Zhilkin
@ 2011-07-30 20:57 ` Lyndon Nerenberg (VE6BBM/VE7TFX)
2011-07-30 21:03 ` Sergey Zhilkin
0 siblings, 1 reply; 11+ messages in thread
From: Lyndon Nerenberg (VE6BBM/VE7TFX) @ 2011-07-30 20:57 UTC (permalink / raw)
To: 9fans
> Answer is simple - no.
> And, YES, Plan9 CAN route IP ! :)
You only get to choose one of the above.
Routing does not imply NAT.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] Plan 9 IPv4 router
2011-07-30 20:57 ` Lyndon Nerenberg (VE6BBM/VE7TFX)
@ 2011-07-30 21:03 ` Sergey Zhilkin
2011-07-30 22:06 ` David du Colombier
0 siblings, 1 reply; 11+ messages in thread
From: Sergey Zhilkin @ 2011-07-30 21:03 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
> Routing does not imply NAT.
Hi ! I know that :) Routing != NATing :)
As far, as I know, there was some NAT work in Plan9. But I can't
remember... Sources of this work is on my work laptop :)
2011/7/31 Lyndon Nerenberg (VE6BBM/VE7TFX) <lyndon@orthanc.ca>:
>> Answer is simple - no.
>
>> And, YES, Plan9 CAN route IP ! :)
>
> You only get to choose one of the above.
>
> Routing does not imply NAT.
>
>
>
--
С наилучшими пожеланиями
Жилкин Сергей
With best regards
Zhilkin Sergey
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] Plan 9 IPv4 router
2011-07-30 21:03 ` Sergey Zhilkin
@ 2011-07-30 22:06 ` David du Colombier
2011-07-31 18:34 ` David du Colombier
0 siblings, 1 reply; 11+ messages in thread
From: David du Colombier @ 2011-07-30 22:06 UTC (permalink / raw)
To: 9fans
> As far, as I know, there was some NAT work in Plan9. But I can't
> remember... Sources of this work is on my work laptop :)
https://hg.9grid.fr/plan9-nat/
I did a NAT implementation some times ago. It's working, but it's
still an early work and I haven't worked on it for few months.
It is implemented in ipifc, directly in the kernel IP stack.
I attempted different implementations as kernel devices or user
process, but I haven't achieved a satisfactory result yet.
This URL is the development repository and I should probably
extract a proper patch from it.
See the README file for more details.
I hope to have more time in the future to work on it.
--
David du Colombier
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] Plan 9 IPv4 router
2011-07-30 19:53 [9fans] Plan 9 IPv4 router smiley
2011-07-30 20:52 ` Sergey Zhilkin
@ 2011-07-31 13:21 ` erik quanstrom
2011-07-31 14:26 ` Alexander Sychev
2011-07-31 16:54 ` smiley
1 sibling, 2 replies; 11+ messages in thread
From: erik quanstrom @ 2011-07-31 13:21 UTC (permalink / raw)
To: 9fans
> Does anybody know if it's possible to use Plan 9 as an IPv4 router?
plan 9 does a fine job of routing ip4 packets. i used plan 9
to do that for a 4 months recently during a network renumbering.
if you do this, make sure you've made this revert to ip.c. the
sources version has both lines, which is harmless but redundant.
minooka; diff -c /n/dump/2010/0930/sys/src/9/ip/ip.c /n/dump/2010/0820/sys/src/9/ip/ip.c
/n/dump/2010/0930/sys/src/9/ip/ip.c:463,469 - /n/dump/2010/0820/sys/src/9/ip/ip.c:463,469
}
/* don't forward to source's network */
- memset(&conv, 0, sizeof conv);
+ conv.r = nil;
r = v4lookup(f, h->dst, &conv);
if(r == nil || r->ifc == ifc){
ip->stats[OutDiscards]++;
- erik
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] Plan 9 IPv4 router
2011-07-31 13:21 ` erik quanstrom
@ 2011-07-31 14:26 ` Alexander Sychev
2011-07-31 16:54 ` smiley
1 sibling, 0 replies; 11+ messages in thread
From: Alexander Sychev @ 2011-07-31 14:26 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
[-- Attachment #1: Type: text/plain, Size: 725 bytes --]
On Sun, Jul 31, 2011 at 5:21 PM, erik quanstrom <quanstro@quanstro.net>wrote:
> > Does anybody know if it's possible to use Plan 9 as an IPv4 router?
>
> plan 9 does a fine job of routing ip4 packets. i used plan 9
> to do that for a 4 months recently during a network renumbering.
>
> if you do this, make sure you've made this revert to ip.c. the
> sources version has both lines, which is harmless but redundant.
>
- My car is broken, can you fix it?
- Pay me $100, I will kick your car and it will be fixed...
- Do you think I'm going to pay $100 for one kick?
- No, you will pay only $1 for the kick, but $99 for a knowledge, where
exactly I should kick the car
:-)
--
Best regards,
santucco
[-- Attachment #2: Type: text/html, Size: 1118 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] Plan 9 IPv4 router
2011-07-31 13:21 ` erik quanstrom
2011-07-31 14:26 ` Alexander Sychev
@ 2011-07-31 16:54 ` smiley
2011-07-31 17:52 ` David du Colombier
1 sibling, 1 reply; 11+ messages in thread
From: smiley @ 2011-07-31 16:54 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
erik quanstrom <quanstro@quanstro.net> writes:
>> Does anybody know if it's possible to use Plan 9 as an IPv4 router?
>
> plan 9 does a fine job of routing ip4 packets. i used plan 9
> to do that for a 4 months recently during a network renumbering.
>
> if you do this, make sure you've made this revert to ip.c. the
<snip>
OK, cool. How is packet forwarding turned on/off? (Or is it always
"on"?)
How do you specify the routing rules? Somewhere in the NDB?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] Plan 9 IPv4 router
2011-07-31 16:54 ` smiley
@ 2011-07-31 17:52 ` David du Colombier
2011-07-31 20:34 ` erik quanstrom
0 siblings, 1 reply; 11+ messages in thread
From: David du Colombier @ 2011-07-31 17:52 UTC (permalink / raw)
To: 9fans
> OK, cool. How is packet forwarding turned on/off? (Or is it always
> "on"?)
echo iprouting >/net/ipifc/clone
> How do you specify the routing rules? Somewhere in the NDB?
For example, to route to network 192.168.1.0/24 via 192.168.0.1:
echo add 192.168.1.0 255.255.255.0 192.168.0.1 >/net/iproute
See ip(3) for more details.
--
David du Colombier
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] Plan 9 IPv4 router
2011-07-30 22:06 ` David du Colombier
@ 2011-07-31 18:34 ` David du Colombier
0 siblings, 0 replies; 11+ messages in thread
From: David du Colombier @ 2011-07-31 18:34 UTC (permalink / raw)
To: 9fans
> This URL is the development repository and I should probably
> extract a proper patch from it.
I put the patches in /n/sources/contrib/djc/nat.
It doesn't need IL, but IL is supported. That's why
the IL patches are included. You can remove the IL
parts if not needed.
--
David du Colombier
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] Plan 9 IPv4 router
2011-07-31 17:52 ` David du Colombier
@ 2011-07-31 20:34 ` erik quanstrom
0 siblings, 0 replies; 11+ messages in thread
From: erik quanstrom @ 2011-07-31 20:34 UTC (permalink / raw)
To: 9fans
On Sun Jul 31 13:53:48 EDT 2011, 0intro@gmail.com wrote:
> > OK, cool. How is packet forwarding turned on/off? (Or is it always
> > "on"?)
>
> echo iprouting >/net/ipifc/clone
>
> > How do you specify the routing rules? Somewhere in the NDB?
>
> For example, to route to network 192.168.1.0/24 via 192.168.0.1:
>
> echo add 192.168.1.0 255.255.255.0 192.168.0.1 >/net/iproute
>
> See ip(3) for more details.
see also ipconfig(8).
- erik
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-07-31 20:34 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-30 19:53 [9fans] Plan 9 IPv4 router smiley
2011-07-30 20:52 ` Sergey Zhilkin
2011-07-30 20:57 ` Lyndon Nerenberg (VE6BBM/VE7TFX)
2011-07-30 21:03 ` Sergey Zhilkin
2011-07-30 22:06 ` David du Colombier
2011-07-31 18:34 ` David du Colombier
2011-07-31 13:21 ` erik quanstrom
2011-07-31 14:26 ` Alexander Sychev
2011-07-31 16:54 ` smiley
2011-07-31 17:52 ` David du Colombier
2011-07-31 20:34 ` erik quanstrom
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).