Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 May 1997 11:49:58 -0600 (MDT)
From:      Wes Peters <softweyr@xmission.com>
To:        Ian Wynne <ianw@lyear.com.au>
Cc:        questions@freebsd.org
Subject:   ppp auto mode
Message-ID:  <199705241749.LAA21413@obie.softweyr.ml.org>
In-Reply-To: <199705240443.VAA06119@hub.freebsd.org>
References:  <199705240443.VAA06119@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Ian Wynne writes:
 > I'm using FreeBSD 2.1.6R. My question is with iijppp ppp, ie user mode ppp.
 > 
 > When I envoke ppp in the "-auto" mode, where is supposed to dial out
 > when it detects a packet on the out going interface, it only seems to
 > dial when there is an out going UDP packet such as a routed
 > packet. Telnet and ping don't seem to initiate dialling.
 > 
 > Have I set something up wrongly, or have other people experienced the same
 > thing? Does the version in "current" display the same behavior?

It's a simple configuration problem.  I'm working on an article for FSJ
(and the FreeBSD Journal, of course) that will address this issue.  The
problem you are experiencing is that you do not have a default route
through the PPP interface when you first run PPP.  In fact, you probably
don't have a default route at all.  When you try to send a TCP packet
off site, the IP router cannot find a route to send the packet to, so it
just drops the packet without ever giving it to PPP.

To solve this, you need to add a default route via the PPP interface
when you first bring it up, even though the link isn't really up yet.
To do this, you must first pick an IP address for both ends of the PPP
link.  Don't worry if you have dynamically assigned addresses -- they
don't have to be exaclty right.  The best way to do this
is to look in your logs and use an addresses that you have actually
gotten before.  Use the /bits-to-modify notation to inform PPP it is
acceptable to change the addresses when the link comes up.

In my ppp.conf, I have the following entry for my dialup to Xmission:
    
    #
    # Xmission PPP/PAP dial-up
    #
    xmission:
     set authname softweyr
     set authkey xxxxxx
     accept pap
     set openmode active
     disable pap
     deny chap
     disable chap
     deny pred1
     disable pred1
     deny lqr
     disable lqr
     set phone 9900900
     set ifaddr 199.104.124.49/0 198.60.22.8/0
    #
    # Add a default route through the interface we just created so all
    # off-site packets are forced through it.
    #
     add 0 0 198.60.22.8
    
Note the last line, and the comments preceding it.  This adds a default
route through the "phantom" 198.60.22.8 interface on the set ifaddr
line.  This route will direct all IP packets not bound for your LAN to
the PPP interface, allowing iijppp to demand-dial at startup.  Once your
link has been established, the following entry in /etc/ppp/ppp.linkup
will delete the existing default route and add a new default route via
the new interface address:
    
        #
        # Add his address as the default gateway.  This has the added
        # benefit of making *any* packet routed off our network redial
        # the link.  Of course, this makes casual name lookups
        # expensive.
        #
        MYADDR:
         delete 0 0
         add 0 0 HISADDR
    
The "delete 0 0" line deletes the existing default route, avoid error
messages when the new route is added on the next line.

This should get you up and demand-dialing.  Let me know if you have any
additional problems.

-- 
          "Where am I, and what am I doing in this handbasket?"

Wes Peters                                                       Softweyr LLC
http://www.xmission.com/~softweyr                       softweyr@xmission.com






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