Subject: ppp routing difficulties
To: None <netbsd-help@netbsd.org>
From: None <kpneal@pobox.com>
List: netbsd-help
Date: 02/05/2002 21:05:40
I'm having a bit of trouble getting the routing correct for
my ppp connection. 

I have a network in my house that is private. I also have a
network that is visible on the Internet. At the border is a
NetBSD/alpha 1.5.2 box with a ppp connection. 

I am able to send data /through/ the gateway with no problems.
The issue is that I cannot send data /from/ the gateway to the
Internet. IE, on the gateway from ping www.netbsd.org I get the error 
"ping: sendto: No route to host". 

As an added complication, the data sent from the gateway machine
to the internet needs to come from a different address than the
address of the ppp0 interface. The gateway data sent to the 'net
needs to come from 209.42.217.34. 

I am using the defaultroute option in my pppd config file. 

I'm positive this can be done with some routing trickery, so I'm
not interested in things like ipf/ipnat or the like. I've tried
all sorts of combinations of route with the -interface keyword
with no luck. 

Any suggestions? I'd much appreciate it. 

My interfaces: (trimmed a bit)

ne0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	address: 00:e0:29:17:52:f7
	media: Ethernet autoselect (10baseT)
	inet 209.42.217.34 netmask 0xfffffff0 broadcast 209.42.217.47
	inet alias 192.168.192.3 netmask 0xffffff00 broadcast 192.168.192.255
	inet6 fe80::2e0:29ff:fe17:52f7%ne0 prefixlen 64 scopeid 0x1
lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 33192
	inet 127.0.0.1 netmask 0xff000000
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
	inet6 ::1 prefixlen 128
ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1524
	inet 209.42.217.10 -> 209.42.217.9 netmask 0xfffffffc
	inet6 fe80::2e0:29ff:fe17:52f7%ppp0 -> :: prefixlen 64 scopeid 0x7

Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use    Mtu  Interface
default            209.42.217.9       UGS         1      934   1524  ppp0
127                127.0.0.1          UGRS        0        0  33192  lo0
127.0.0.1          127.0.0.1          UH          5      108  33192  lo0
192.168.192        link#1             UC          2        0   1500  ne0
192.168.192.9      00:00:f8:23:5c:7b  UHLc        2     1334   1500  ne0
192.168.192.255    link#1             UHLc        1       16   1500  ne0
209.42.217.9       209.42.217.10      UGHS        0        4   1524  ppp0
209.42.217.32/28   link#1             UC         14        0   1500  ne0
209.42.217.33      00:00:f8:23:5c:7b  UHLc        0      869   1500  ne0
209.42.217.39      link#1             UHLc        1        2   1500  ne0
209.42.217.47      link#1             UHLc        0        1   1500  ne0
-- 
Kevin P. Neal                                http://www.pobox.com/~kpn/

"Nonbelievers found it difficult to defend their position in \ 
    the presense of a working computer." -- a DEC Jensen paper