Subject: Re: Managing remote connection routing
To: Al Urbaitis <aurbaiti@servecom.picker.com>
From: Frederick Bruckman <fredb@immanent.net>
List: netbsd-help
Date: 07/21/2001 13:55:32
On Sat, 21 Jul 2001, Al Urbaitis wrote:

> I am not too clear on how pppd handles "user" and "name" options.
> In order to connect to a remote site I specified both "user" and "name"
> user fred
> name fred

You don't need the "user" line.

> I had to add the hostname fred and the ip issued to me by the ppp connection
> to my hosts table.

Why? What happens if you don't do that?

> How should I manage this for the 40 or so connections I need to make.
>
> 2. What I wish
> Normally my box is connected to a highspeed connection.
> It derives its configuration via dhcp.
>
> When I connect to a remote site I can't seem to go anywhere
> unless I flush the routing table first and let pppd add a default route.
> Of course this makes it so I can't access other subnets on my
> high speed connection.
>
> I'm not sure how to go about arranging a routing table that would allow me
> to keep my original default route but still be able to access machines
> on the dial-up connection.

So don't use "default"! Add your routes in "/etc/ppp/ip-up". For
example, for a couple of hosts, "<host1>", "<host2>" ("<hostN>" should
be either IP addresses, or resolvable domain names),

  route add -host <host1> $4 -interface
  route add -host <host2> $4 -interface

or for an entire network "<net>" with netmask "<netmask>",

  route add -net <net> -netmask <netmask> $4 -interface

The "$4" is substituted for the number of the ppp0 interface in the
ip-{up,down} scripts. (See the man page for "pppd"). Whatever you use,
put the same thing in "/etc/ppp/ip-down", but with "delete" for "add".

With that, traffic for the hosts you've specified will go over the ppp
link; everything else, including DNS traffic, goes over the fast link.


Frederick