Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Apr 1998 11:46:04 +1000
From:      John Saunders <john.saunders@scitec.com.au>
To:        freebsd-isp@FreeBSD.ORG
Cc:        Sasha Egan <wildcard@dax.belen.k12.nm.us>
Subject:   Re: Mgetty/AUTO_PPP/and ISP services.
Message-ID:  <35219C5C.91DFFF4A@scitec.com.au>
References:  <Pine.BSF.3.96.980331151333.26764A-100000@altrox.atipa.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Atipa wrote:
> mgetty is evil.

I wouldn't say that. I've been using it on an ISP for almost 2 years
with great success. You just have to know how to configure it.

> > All the things I have tried have ended in failure.
> > When I uncomment the AUTO_PPP line in login.config my modem answers,
> > handshakes, then carrier drops and resets.

It sounds very much like your problem is either mgetty can't find
your pppd program due to PATH problems. Or you haven't passed pppd
sufficient options to make it work properly.

Create a line like so on login.config...

/AutoPPP/ -     ppp     /usr/sbin/ppplogin

Then create a shell script (or C or perl if you like) called
ppplogin that ends up running pppd with the following options...

/usr/sbin/pppd auth refuse-chap require-pap login <host-ip>:<dialin-ip>
\
    file /etc/ppp/options.dialup idle 3600 ms-dns <dns-server-ip>

The "idle 3600" is optional depending on what you require. The host-ip
and dns-server-ip are fixed, however you need some scripting to allocate
a dialin-ip. The best bet is a simple case statement that maps a
specific
IP to a specific port.

case `tty` in
/dev/ttyc00)	IP=a.b.c.d
		;;
/dev/ttyc01)	IP=a.b.c.d
		;;
*)		echo "port not configured" ; exit 1
		;;
esac

And the /etc/ppp/options.dialup file contains...

nodetach
crtscts
modem
proxyarp
lcp-restart 8
lcp-max-configure 10
lcp-max-failure 4
ipcp-restart 8
ipcp-max-configure 10
ipcp-max-failure 4

One problem I had with mgetty is that it doesn't disable echo once
it detects a PPP packet. This means that if your system is slow starting
pppd then the client's PPP may detect what it thinks is a looped back
line and hang up. I hacked the mgetty code to disable echo when it
detects the PPP packet.

Cheers.
--        +------------------------------------------------------------+
      .   | John Saunders   mailto:John.Saunders@scitec.com.au  (Work) |
  ,--_|\  |                 mailto:john@nlc.net.au              (Home) |
 /  Oz  \ |                 http://www.nlc.net.au/~john/               |
 \_,--\_/ | SCITEC LIMITED  Phone +61 2 9428 9563  Fax +61 2 9428 9933 |
       v  |    "By the time you make ends meet, they move the ends."   |
          +------------------------------------------------------------+

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?35219C5C.91DFFF4A>