Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Aug 1997 09:19:05 +0930 (CST)
From:      Greg Lehey <grog@lemis.com>
To:        dparks@taurus.srccomp.com (Dave Parks)
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Question: ppp -auto
Message-ID:  <199708062349.JAA01409@freebie.lemis.com>
In-Reply-To: <199708062232.QAA02111@phantom.srccomp.com> from Dave Parks at "Aug 6, 97 04:32:44 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Dave Parks writes:
> Hi,
>
> I am having difficulty getting the -auto option for ppp to work (as I
> understand it to).
>
> Here is the background:
>
> I tried setting up ppp to autoconnect to our server.  I start ppp with:
>
>         ppp     -auto src
>
> Where 'src' is an entry in my ppp.conf file (ppp src without -auto works).
>
> Now, this is where I maybe missing something.  From reading the documentation,
> my understanding is that -auto will automatically connect the ppp link whenever
> there is outgoing traffic.  I cannot get it to work .... *but* if I first start
> ppp manually, then quit (disconnecting the connection), then restart ppp with
> -auto, everything works fine (it remains inactive while there isn't any
> connection, and then automatically dials/connects to the server when there is
> outgoing traffic).
>
> Do anyone have any idea why I have to first start ppp manually and then restart
> ppp -auto?  Is there a setting/configuration problem that I'm missing (I'm
> running the 2.2.2 release of FreeBSD from Walnut Creek).

In order for ppp -auto to detect outgoing packets, it first has to
receive them.  For this to happen, there must be a route which points
to the ppp interface.  This means that you need to know at least the
IP address which will be assigned to the interface (in other words,
this won't work with a dynamically allocated address).  When you start
the system, you need to issue at least the following commands:

  ifconfig tun0 my-ip-address his-ip-address
  route add default his-ip-address

Normally, you'd do this in sysconfig:

  network_interfaces="....  tun0"	# include tun0 in the list of
                                        # network interfaces
  ifconfig_tun0="my-ip-address his-ip-address"  # see above
  static_routes="route_tun0"	# add route_tun0 to anything else you
				# might have here
  route_tun0="default his-ip-address"  # see above

Greg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708062349.JAA01409>