*aham* ... was this a really stupid question? Maybe I just wrote too many words. In simple terms, once a new route has been added to the routing table, all traffic should consider the new route right? So, is the ppp interface treated differently when it comes to routing in OpenBSD?
--patrick On Sun, Jun 14, 2009 at 9:21 AM, patrick keshishian<[email protected]> wrote: > Hello, > > I ran into an interesting problem trying to port some code to linux > and thinking about it a bit, I am not sure which has the more > desirable behavior: linux or openbsd. > > Say host "h1" starts exchanging some packets with host "h2", which is > on a remote network ("n2"). As this is going on, "h1" establishes a > ppp connection where "h3" is the remote end point (and also in network > "n2"). There is a route added for "n2" with gateway "h3". so from this > point on, any traffic to any host within "n2" will/should go through > the ppp interface. right? > > netstat -rnfinet shows: > ... > 1x8.18x.200/23 B B 1x8.18x.201.136 B B UGS B B B B 0 B B B B 0 B B - B B 8 ppp0 > 1x8.18x.201.136 B B 1x8.18x.201.132 B B UH B B B B 1 B B B B 0 B B - B B 4 ppp0 > ... > > Where 1x8.18x.201.132 is the local ip assigned to "h1" via ppp and > 1x8.18x.201.136 is the remote host ("h3") ip (and gateway for "n2"). > > > Sending further packets, using the same socket descriptor, from "h1" > to "h2" should go through which interface? the ppp interface or the > real physical interface which was being used prior to the ppp > connection (xl0, etc.)? > > openbsd and linux seem to behave differently (a shocker, I am sure). > in linux, any further traffic between "h1" and "h2" is now routed > through the ppp interface. however, in openbsd the packets continue > being sent over the same initial interface. > > to solve the (my?) "problem" on linux, i have to add a static route to > "h2" specifying the default gateway for "h1's" network (not "h3"). > > --patrick

