Discussion:
Question about source routing
(too old to reply)
임영빈
2007-10-24 13:12:18 UTC
Permalink
Hello

Is there any possible way to do source routing(policy routing) in netBSD?
As I know, there's no internal command in netBSD which one can set a
path for a specific destination.
Or can I do that by using routing protocol commands such as Zebra, or
using netfilter-like programs which can set TCP option?
Please, let me know any method related with source routing in netBSD.

And one more question, if policy routing is not implemented in netBSD,
then how does the netBSD process a packet which has a source routing
option?

Regards.
--
- �ӿ��� �帲 -
��םj�h��"q�eɼ�����w���{�jٮqמ
Steven M. Bellovin
2007-10-24 18:31:29 UTC
Permalink
On Wed, 24 Oct 2007 22:12:18 +0900
Post by 임영빈
Hello
Is there any possible way to do source routing(policy routing) in
netBSD? As I know, there's no internal command in netBSD which one
can set a path for a specific destination.
Or can I do that by using routing protocol commands such as Zebra, or
using netfilter-like programs which can set TCP option?
Please, let me know any method related with source routing in netBSD.
And one more question, if policy routing is not implemented in netBSD,
then how does the netBSD process a packet which has a source routing
option?
Source routing can, I believe, be set on a per-socket basis with
setsockopt. On received source-routed packets, the reply is (I'm
fairly certain) sent back along the same path, per the RFC.


--Steve Bellovin, http://www.cs.columbia.edu/~smb

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Alan Barrett
2007-10-24 19:25:11 UTC
Permalink
Post by 임영빈
Is there any possible way to do source routing(policy routing) in netBSD?
No really easy way. You can do it using pf(4) or ipf(4), with rules to
match the packets you care about and force their next hop.
Post by 임영빈
And one more question, if policy routing is not implemented in netBSD,
then how does the netBSD process a packet which has a source routing
option?
See sysctl net.inet.ip.forwsrcrt, net.inet.ip.allowsrcrt. Source
routes in IPv6 are ignored (they used to be honoured unconditionally,
then for a short time they were honoured or not according to sysctl
net.inet6.ip6.rht0, but now they are ignored unconditionally).

--apb (Alan Barrett)

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
der Mouse
2007-10-24 19:32:45 UTC
Permalink
Post by Alan Barrett
Post by 임영빈
Is there any possible way to do source routing(policy routing) in netBSD?
No really easy way. You can do it using pf(4) or ipf(4), with rules
to match the packets you care about and force their next hop.
I've written a pseudo-interface designed for making routing decisiions
based on ip_src, which is what I understand this to be asking for.

There's a version of it in ftp.rodents.montreal.qc.ca:/mouse/misc/srt/;
I'm not sure which version of NetBSD it's for. It's definitely more
recent than 1.4T, since it talks about patching sys/conf/majors, but I
don't find anything obvious indicating whether it's for 2.0, 3.0, or
3.1 (it's unlikely but possible it's for -current, but, if so, it's for
-current a year or so old - check the files' dates).

/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML ***@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...