Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Nov 2000 09:36:27 -0500
From:      "Wei Hua Ni" <whni@mie.utoronto.ca>
To:        <questions@FreeBSD.ORG>
Subject:   question about set up modem and ppp
Message-ID:  <000901c05948$98f90d70$6e306480@jardine3>

next in thread | raw e-mail | index | archive | help
Hello,

    I have a Logicode's 28,8000bps V.34 internal FAX modem, it

works fine under Windows 98 on my computer. Recently I tried to setup

this modem under FreeBSD 3.1, my computer is dual bootable, but can't

get success. I don't know what's the syntex to specify the

modem's speed rate in the kernel configuration and what's the sequence

to make the device nodes, I mean what's the nodes name sio? or cuaa?,

after the kernel compiled and installed. I even read the book called

"The Complete FreeBSD", the FreeBSD Handbook and the manual pages but
I

still don't get it. I want to configure to COM3 and irq4 with my modem

because I see this configuration works fine under Windows 98 on my

computer.

    Another question is how to configure ppp, I tried something

but I don't know whether it is going to work or not. The
authentication

of my ISP uses is login, dytamic addressing is used.

The following are some output from execution of some cammands and

some configurations, if you need more infomation please let me know.

Thanks in advance,

Wei-hua Ni



1 the version of ppp

2 output of dmesg

3 the kernel configuration file(/sys/i386/conf/NOV2000)

4 the result of dialing out

5 output of stty -f /dev/cuaa0 -a

6 output of stty -f /dev/cuaa1 -a

7 output of netstat -r

8 the ppp configuration file(/etc/ppp/ppp.conf)

9 the ppp.linkup file (/etc/ppp/ppp.linkup)

------------------------------------------------------

17 /usr/X11R6/bin> ppp

Working in interactive mode

Using interface: tun0

ppp ON walter> show version

PPP Version 2.0 - $Date: 1998/12/14 01:15:34 $

ppp ON walter>

--------------------------

the output of dmesg as following:

------------------------------------------------------

6 /root> dmesg

Copyright (c) 1992-1999 FreeBSD Inc.

Copyright (c) 1982, 1986, 1989, 1991, 1993

The Regents of the University of California. All rights reserved.

FreeBSD 3.1-RELEASE #10: Wed Nov 22 18:43:26 EST 2000

root@walter.at.home:/usr/src/sys/compile/NOV2000

Timecounter "i8254" frequency 1193182 Hz

CPU: AMD-K6tm w/ multimedia extensions (233.03-MHz 586-class CPU)

Origin = "AuthenticAMD" Id = 0x562 Stepping=2

Features=0x8001bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,MMX>

real memory = 67108864 (65536K bytes)

avail memory = 61952000 (60500K bytes)

Bad DMI table checksum!

Preloaded elf kernel "kernel" at 0xf0338000.

Probing for devices on PCI bus 0:

chip0: <VIA 82C585 (Apollo VP1/VPX) system controller> rev 0x23 on
pci0.0.0

chip1: <VIA 82C586 PCI-ISA bridge> rev 0x27 on pci0.7.0

ide_pci0: <VIA 82C586x (Apollo) Bus-master IDE controller> rev 0x06 on
pci0.7.1

vga0: <S3 ViRGE DX/GX graphics accelerator> rev 0x01 int a irq 11 on
pci0.9.0

Probing for devices on the ISA bus:

sc0 on isa

sc0: VGA color <16 virtual consoles, flags=0x0>

ed0 not found at 0x280

fe0 not found at 0x300

atkbdc0 at 0x60-0x6f on motherboard

atkbd0 irq 1 on isa

sio0: configured irq 4 not in bitmap of probed irqs 0

sio0 at 0x3f8-0x3ff irq 4 flags 0x10 on isa

sio0: type 8250

sio1 at 0x2f8-0x2ff irq 3 on isa

sio1: type 16550A

sio2: configured irq 5 not in bitmap of probed irqs 0x10

sio2 at 0x3e8-0x3ef irq 5 on isa

sio2: type 16550A

fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa

fdc0: FIFO enabled, 8 bytes threshold

fd0: 1.44MB 3.5in

wdc0 at 0x1f0-0x1f7 irq 14 on isa

wdc0: unit 0 (wd0): <FUJITSU MPD3084AT>

wd0: 8063MB (16514064 sectors), 16383 cyls, 16 heads, 63 S/T, 512 B/S

wdc1 at 0x170-0x177 irq 15 on isa

wdc1: unit 0 (wd2): <FUJITSU MPB3032ATU E>

wd2: 3093MB (6335280 sectors), 6704 cyls, 15 heads, 63 S/T, 512 B/S

wdc1: unit 1 (atapi): <MATSHITA CR-585/ZM50>, removable, accel, dma,
iordis

acd0: drive speed 4125KB/sec, 128KB cache

acd0: supported read types: CD-R, CD-RW, CD-DA

acd0: Audio: play, 256 volume levels

acd0: Mechanism: ejectable tray

acd0: Medium: CD-ROM 120mm data disc loaded, unlocked

wt0 not found at 0x300

mcd0 not found at 0x300

matcdc0 not found at 0x230

scd0 not found at 0x230

ppc0 at 0x378 irq 7 on isa

ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode

nlpt0: <generic printer> on ppbus 0

nlpt0: Interrupt-driven port

ppi0: <generic parallel i/o> on ppbus 0

plip0: <PLIP network interface> on ppbus 0

ie0: unknown board_id: f000

ie0 not found at 0x300

ep0 not found at 0x300

ex0 not found

le0 not found at 0x300

lnc0 not found at 0x280

ze0 not found at 0x300

zp0 not found at 0x300

cs0 not found at 0x300

adv0 not found at 0x330

bt0 not found at 0x134

aha0 not found at 0x134

vga0 at 0x3b0-0x3df maddr 0xa0000 msize 131072 on isa

npx0 on motherboard

npx0: INT 16 interface

changing root device to wd0s2a

WARNING: / was not properly dismounted

7 /root>

------------------------------------------------------

my configuration file as following:

#START the configuarion

#

# NOV2000 -- My configuration file, it's copied from GENERIC at the
same dir..

# GENERIC -- Generic machine with WD/AHx/NCR/BTx family disks

#

# For more information read the handbook part System Administration ->

# Configuring the FreeBSD Kernel -> The Configuration File.

# The handbook is available in /usr/share/doc/handbook or online as

# latest version from the FreeBSD World Wide Web server

# <URL:http://www.FreeBSD.ORG/>;

#

# An exhaustive list of options and more detailed explanations of the

# device lines is present in the ./LINT configuration file. If you are

# in doubt as to the purpose or necessity of a line, check first in
LINT.

#

# $Id: NOV2000,v 1.143.2.2 1999/02/15 02:50:07 des Exp $

machine "i386"

cpu "I586_CPU"

ident "NOV2000"

maxusers 5

options "CPU_WT_ALLOC"

options "NO_MEMORY_HOLE"

#options MATH_EMULATE #Support for x87 emulation. Book Pg.254

options INET #InterNETworking. Book Pg. 256

options FFS #Berkeley Fast Filesystem. Book Pg.267

options FFS_ROOT #FFS usable as root device [keep this!]

options MFS #Memory Filesystem. Book Pg. 268

options MFS_ROOT #MFS usable as root device, "MFS" req'ed

options NFS #Network Filesystem

options NFS_ROOT #NFS usable as root device, "NFS" req'ed

options MSDOSFS #MSDOS Filesystem. Book Pg. 267

options "CD9660" #ISO 9660 Filesystem. Book Pg. 268

options "CD9660_ROOT" #CD-ROM usable as root. "CD9660" req'ed

options PROCFS #Process filesystem. Book Pg. 268

options "COMPAT_43" #Compatible with BSD 4.3 [KEEP THIS!]. Pg.254

options SCSI_DELAY=15000 #Be pessimistic about Joe SCSI device

options UCONSOLE #Allow users to grab the console. Book Pg. 255

options FAILSAFE #Be conservative

options USERCONFIG #boot -c editor. Book Pg. 254

options VISUAL_USERCONFIG #visual boot -c editor. Book Pg. 254

config kernel root on wd0

# To make an SMP kernel, the next two are needed

#options SMP # Symmetric MultiProcessor Kernel

#options APIC_IO # Symmetric (APIC) I/O

# Optionally these may need tweaked, (defaults shown):

#options NCPU=2 # number of CPUs

#options NBUS=4 # number of busses

#options NAPIC=1 # number of IO APICs

#options NINTR=24 # number of INTs

# Basic Controllers and Devisces. Book Pg. 261

controller isa0

controller eisa0

controller pci0

# Disk controllers. Book Pg. 263

controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2

disk fd0 at fdc0 drive 0

# by ni disk fd1 at fdc0 drive 1

options "CMD640" # work around CMD640 chip deficiency

# controller wdc0. Book Pg. 263

controller wdc0 at isa? port "IO_WD1" bio irq 14

disk wd0 at wdc0 drive 0

disk wd1 at wdc0 drive 1

controller wdc1 at isa? port "IO_WD2" bio irq 15

disk wd2 at wdc1 drive 0

disk wd3 at wdc1 drive 1

options ATAPI #Enable ATAPI support for IDE bus

options ATAPI_STATIC #Don't do it as an LKM

device acd0 #IDE CD-ROM

device wfd0 #IDE Floppy (e.g. LS-120)

# A single entry for any of these controllers (ncr, ahb, ahc) is

# sufficient for any number of installed devices.

controller ncr0

controller ahb0

controller ahc0

controller isp0

# This controller offers a number of configuration options, too many
to

# document here - see the LINT file in this directory and look up the

# dpt0 entry there for much fuller documentation on this.

controller dpt0

###controller adv0 at isa? port ? cam irq ?

controller adw0

###controller bt0 at isa? port ? cam irq ?

###controller aha0 at isa? port ? cam irq ?

#controller aic0 at isa? port 0x340 bio irq 11

controller scbus0

device da0

device sa0

###device pass0

device cd0 #Only need one of these, the code dynamically grows

device wt0 at isa? port 0x300 bio irq 5 drq 1

device mcd0 at isa? port 0x300 bio irq 10

controller matcd0 at isa? port 0x230 bio

device scd0 at isa? port 0x230 bio

# atkbdc0 controlls both the keyboard and the PS/2 mouse

controller atkbdc0 at isa? port IO_KBD tty

device atkbd0 at isa? tty irq 1

##device psm0 at isa? tty irq 12

##device mse0 at isa? port 0x23c tty irq 5

device vga0 at isa? port ? conflicts

# splash screen/screen saver

pseudo-device splash

# syscons is the default console driver, resembling an SCO console

device sc0 at isa? tty

# Enable this and PCVT_FREEBSD for pcvt vt220 compatible console
driver

#device vt0 at isa? tty

#options XSERVER # support for X server

#options FAT_CURSOR # start with block cursor

# If you have a ThinkPAD, uncomment this along with the rest of the
PCVT lines

#options PCVT_SCANSET=2 # IBM keyboards are non-std

device npx0 at isa? port IO_NPX irq 13

#

# Laptop support (see LINT for more options)

#

device apm0 at isa? disable flags 0x31 # Advanced Power Management

# PCCARD (PCMCIA) support

#controller card0

#device pcic0 at card?

#device pcic1 at card?

##device sio0 at isa? port "IO_COM1" flags 0x10 tty irq 4

##device sio1 at isa? port "IO_COM2" tty irq 3

##device sio2 at isa? disable port "IO_COM3" tty irq 5

##device sio3 at isa? disable port "IO_COM4" tty irq 9

device sio0 at isa? port "IO_COM3" tty irq 4

device sio1 at isa? port "IO_COM2" tty irq 3

device sio2 at isa? disable port "IO_COM3" tty irq 5

device sio3 at isa? disable port "IO_COM4" tty irq 9

###device sio0 at isa? port "IO_COM3" flags 0x10 tty irq 4

###device sio1 at isa? port "IO_COM2" tty irq 3

###device sio2 at isa? disable port "IO_COM3" tty irq 5

###device sio3 at isa? disable port "IO_COM4" tty irq 9

###device sio0 at isa? port "IO_COM1" flags 0x10 tty irq 4

###device sio1 at isa? port "IO_COM2" tty irq 3

###device sio2 at isa? disable port "IO_COM3" tty irq 5

###device sio3 at isa? disable port "IO_COM4" tty irq 9

###device sio0 at isa? port "IO_COM1" flags 0x10 tty irq 4

###device sio1 at isa? port "IO_COM2" tty irq 5

###device sio2 at isa? disable port "IO_COM3" tty irq 5

###device sio3 at isa? disable port "IO_COM4" tty irq 9



# Parallel port

device ppc0 at isa? port? net irq 7

controller ppbus0

device nlpt0 at ppbus?

device plip0 at ppbus?

device ppi0 at ppbus?

#controller vpo0 at ppbus?

# Order is important here due to intrusive probes, do *not*
alphabetize

# this list of network interfaces until the probes have been fixed.

# Right now it appears that the ie0 must be probed before ep0. See

# revision 1.20 of this file.

device ax0

device de0

device fxp0

device mx0

device pn0

device rl0

device tl0

device tx0

device vr0

device vx0

device wb0

device xl0

device ed0 at isa? port 0x280 net irq 10 iomem 0xd8000

###device ie0 at isa? port 0x300 net irq 10 iomem 0xd0000

###device ep0 at isa? port 0x300 net irq 10

###device ex0 at isa? port? net irq?

device fe0 at isa? port 0x300 net irq ?

###device le0 at isa? port 0x300 net irq 5 iomem 0xd0000

###device lnc0 at isa? port 0x280 net irq 10 drq 0

###device ze0 at isa? port 0x300 net irq 10 iomem 0xd8000

###device zp0 at isa? port 0x300 net irq 10 iomem 0xd8000

###device cs0 at isa? port 0x300 net irq ?

pseudo-device loop

pseudo-device ether

pseudo-device sl 1

pseudo-device ppp 1

pseudo-device tun 1

pseudo-device pty 16

pseudo-device gzip # Exec gzipped a.out's

# KTRACE enables the system-call tracing facility ktrace(2).

# This adds 4 KB bloat to your kernel, and slightly increases

# the costs of each syscall.

options KTRACE #kernel tracing

# This provides support for System V shared memory and message queues.

#

options SYSVSHM

options SYSVMSG

#

# Audio drivers: `snd', `sb', `pas', `gus', `pca'

#

# snd: Voxware sound support code

# sb: SoundBlaster PCM - SoundBlaster, SB Pro, SB16, ProAudioSpectrum

# sbxvi: SoundBlaster 16

# sbmidi: SoundBlaster 16 MIDI interface

# pas: ProAudioSpectrum PCM and MIDI

# gus: Gravis Ultrasound - Ultrasound, Ultrasound 16, Ultrasound MAX

# gusxvi: Gravis Ultrasound 16-bit PCM (do not use)

# mss: Microsoft Sound System

# css: Crystal Sound System (CSS 423x PnP)

# sscape: Ensoniq Soundscape MIDI interface

# sscape_mss: Ensoniq Soundscape PCM (requires sscape)

# opl: Yamaha OPL-2 and OPL-3 FM - SB, SB Pro, SB 16, ProAudioSpectrum

# uart: stand-alone 6850 UART for MIDI

# mpu: Roland MPU-401 stand-alone card

#

# Beware! The addresses specified below are also hard-coded in

# i386/isa/sound/sound_config.h. If you change the values here, you

# must also change the values in the include file.

#

# pcm: PCM audio through various sound cards.

#

# This has support for a large number of new audio cards, based on

# CS423x, OPTi931, Yamaha OPL-SAx, and also for SB16, GusPnP.

# For more information about this driver and supported cards,

# see the pcm.4 man page and /sys/i386/isa/snd/CARDS.

#

# The flags of the device tells the device a bit more info about the

# device that normally is obtained through the PnP interface.

# bit 2..0 secondary DMA channel;

# bit 4 set if the board uses two dma channels;

# bit 15..8 board type, overrides autodetection; leave it

# zero if don't know what to put in (and you don't,

# since this is unsupported at the moment...).

#

# This driver will use the new PnP code if it's available.

#

# pca: PCM audio through your PC speaker

#

# If you have a GUS-MAX card and want to use the CS4231 codec on the

# card the drqs for the gus max must be 8 bit (1, 2, or 3).

#

# If you would like to use the full duplex option on the gus, then
define

# flags to be the ``read dma channel''.

#

# options BROKEN_BUS_CLOCK #PAS-16 isn't working and OPTI chipset

# options SYMPHONY_PAS #PAS-16 isn't working and SYMPHONY chipset

# options EXCLUDE_SBPRO #PAS-16

# options SBC_IRQ=5 #PAS-16. Must match irq on sb0 line.

# PAS16: The order of the pas0/sb0/opl0 is important since the

# sb emulation is enabled in the pas-16 attach.

#

# To overide the GUS defaults use:

# options GUS_DMA2

# options GUS_DMA

# options GUS_IRQ

#

# The i386/isa/sound/sound.doc has more information.

# Controls all "VOXWARE" driver sound devices. See Luigi's driver

# below for an alternate which may work better for some cards.

#

controller snd0

device pas0 at isa? port 0x388 irq 10 drq 6

###device sb0 at isa? port 0x220 irq 5 drq 1

###device sbxvi0 at isa? drq 5

device sbmidi0 at isa? port 0x330

device awe0 at isa? port 0x620

###device gus0 at isa? port 0x220 irq 12 drq 1

#device gus0 at isa? port 0x220 irq 12 drq 1 flags 0x3

###device mss0 at isa? port 0x530 irq 10 drq 1

###device css0 at isa? port 0x534 irq 5 drq 1 flags 0x08

###device sscape0 at isa? port 0x330 irq 9 drq 0

###device trix0 at isa? port 0x330 irq 6 drq 0

device sscape_mss0 at isa? port 0x534 irq 5 drq 1

device opl0 at isa? port 0x388

###device mpu0 at isa? port 0x330 irq 6 drq 0

###device uart0 at isa? port 0x330 irq 5

# Luigi's snd code (use INSTEAD of snd0 and all VOXWARE drivers!).

# You may also wish to enable the pnp controller with this, for pnp

# sound cards.

#

#device pcm0 at isa? port ? tty irq 10 drq 1 flags 0x0

# Not controlled by `snd'

device pca0 at isa? port "IO_TIMER1" tty

# The `bpfilter' pseudo-device enables the Berkeley Packet Filter. Be

# aware of the legal and administrative consequences of enabling this

# option. The number of devices determines the maximum number of

# simultaneous BPF clients programs runnable.

#pseudo-device bpfilter 4 #Berkeley packet filter



# USB support

#controller uhci0

#controller ohci0

#controller usb0

#

# for the moment we have to specify the priorities of the device

# drivers explicitly by the ordering in the list below. This will

# be changed in the future.

#

#device ums0

#device ukbd0

#device ulpt0

#device uhub0

#device ucom0

#device umodem0

#device hid0

#device ugen0

#

#options USB_DEBUG

#options USBVERBOSE

##END the configuarion

-----------------------------

6 /root> ppp

Working in interactive mode

Using interface: tun0

ppp ON walter> dial uoft

ppp ON walter> Warning: Chat script failed

ppp ON walter> q

---------------------------------

22 /root> stty -f /dev/cuaa0 -a

speed 9600 baud; 0 rows; 0 columns;

lflags: -icanon -isig -iexten -echo -echoe -echok -echoke -echonl

-echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin

-nokerninfo -extproc

iflags: -istrip -icrnl -inlcr -igncr -ixon -ixoff -ixany -imaxbel -ign
brk

-brkint -inpck -ignpar -parmrk

oflags: -opost -onlcr -oxtabs

cflags: cread cs8 -parenb -parodd
hupcl -clocal -cstopb -crtscts -dsrflow

-dtrflow -mdmbuf

cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;

eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;

min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T;

stop = ^S; susp = ^Z; time = 0; werase = ^W;

23 /root>

-----------------------------

23 /root> stty -f /dev/cuaa1 -a

speed 1200 baud; 0 rows; 0 columns;

lflags: -icanon -isig -iexten -echo -echoe -echok -echoke -echonl

-echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin

-nokerninfo -extproc

iflags: -istrip -icrnl -inlcr -igncr -ixon -ixoff -ixany -imaxbel
ignbrk

-brkint -inpck ignpar -parmrk

oflags: -opost -onlcr -oxtabs

cflags: cread cs7 -parenb -parodd hupcl
clocal -cstopb -crtscts -dsrflow

-dtrflow -mdmbuf

cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;

eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;

min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T;

stop = ^S; susp = ^Z; time = 0; werase = ^W;

24 /root>

----------------------

24 /root>netstat -r

Routing tables

Internet:

Destination Gateway Flags Refs Use Netif Expire

localhost localhost UH 3 8 lo0

25 /root>

--------------------------

the following is my ppp configuration:

#################################################################

#

# PPP Sample Configuration File

#

# Originally written by Toshiharu OHNO

#

# $Id: ppp.conf.sample,v 1.33 1998/10/03 13:12:14 brian Exp $

#

#################################################################

# This file is separated into sections. Each section is named with

# a label starting in column 0 and followed directly by a ``:''. The

# section continues until the next section. Blank lines and lines

# beginning with ``#'' are ignored.

#

# Lines beginning with "!include" will ``include'' another file. You

# may want to ``!include ~/.ppp.conf'' for backwards compatibility.

#

# Default setup. Always executed when PPP is invoked.

# This section is *not* loaded by the ``load'' or ``dial'' commands.

#

# This is the best place to specify your modem device, it's DTR rate,

# and any logging specification. Logging specs should be done first

# so that subsequent commands are logged.

#

#default:

# set log Phase Chat LCP IPCP CCP tun command

# set device /dev/cuaa1

# set speed 115200

# set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" AT OK-AT-OK
ATE1Q0 OK# \\dATDT\\T TIMEOUT 40 CONNECT"

default:

set device /dev/cuaa1

## set speed 57600

set speed 28800

set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" AT OK-AT-OK
ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"

## set log -command +tcp/ip

## set reconnect 3 20

# Client side PPP

#

# Although the PPP protocol is a peer to peer protocol, we normally

# consider the side that makes the connection as the client and the

# side that receives the connection as the server. Authentication

# is required by the server either using a unix-style login proceedure

# or by demanding PAP or CHAP authentication from the client.

#

# An on demand example where we have dynamic IP addresses:

# If the peer assigns us an arbitrary IP (most ISPs do this) and we

# can't predict what their IP will be either, take a wild guess at

# some IPs that you can't currently route to.

#

# The /0 bit in "set ifaddr" says that we insist on 0 bits of the

# specified IP actually being correct, therefore, the other side can
assign

# any IP numbers.

#

# The forth arg to "set ifaddr" makes us send "0.0.0.0" as our
requested

# IP number, forcing the peer to make the decision.

#

# This entry also works with static IP numbers or when not in -auto
mode.

# The ``add'' line adds a `sticky' default route that will be updated
if

# and when any of the IP numbers are changed in IPCP negotiations.

# The "set ifaddr" is required in -auto mode.

#

# Finally, the ``enable dns'' bit tells ppp to ask the peer for the

# nameserver addresses that should be used. This isn't always
supported

# by the other side, but if it is, /etc/resolv.conf will automatically
be

# updated.

#

#pmdemand:

# set phone 1234567

# set login "ABORT NO\\sCARRIER TIMEOUT 5 ogin:--ogin: ppp word: ppp"

# set timeout 120

# set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0

# add default HISADDR

# enable dns

uoft:

set phone 1234567

set login "TIMEOUT 3 login:-\\r-login: ppp word: qqq"

set timeout 120

set ifaddr 0 0

add 0 0 HISADDR

disable chap

disable pap

# When we want to use PAP or CHAP instead of using a unix-style login

# proceedure, we do the following. Note, the peer suggests whether we

# should send PAP or CHAP. By default, we send whatever we're asked
for.

#

##PAPorCHAPpmdemand:

## set phone 1234567

## set login

## set authname MyName

## set authkey MyKey

## set timeout 120

## set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0

## add default HISADDR

## enable dns

# On demand dialup example with static IP addresses:

# Here, the local side uses 192.244.185.226 and the remote side

# uses 192.244.176.44.

#

# # ppp -auto ondemand

#

# With static IP numbers, our setup is similar to dynamic:

# Remember, ppp.linkup is searched for a "192.244.176.44" label, then

# a "ondemand" label, and finally the "MYADDR" label.

#

##ondemand:

## set phone 1234567

## set login "ABORT NO\\sCARRIER TIMEOUT 5 ogin:--ogin: ppp word: ppp"

## set timeout 120

## set ifaddr 192.244.185.226 192.244.176.44

## add default HISADDR

## enable dns

# Example segments

#

# The following lines may be included as part of your configuration

# section and aren't themselves complete. They're provided as examples

# of how to achieve different things.

##examples:

# Multi-phone example. Numbers separated by a : are used sequentially.

# Numbers separated by a | are used if the previous dial or login
script

# failed. Usually, you will prefer to use only one of | or :, but both

# are allowed.

#

## set phone 12345678|12345679:12345670|12345671

#

# Ppp can accept control instructions from the ``pppctl'' program.

# First, you must set up your control socket. It's safest to use

# a UNIX domain socket, and watch the permissions:

#

## set server /var/tmp/internet MySecretPassword 0177

#

# Although a TCP port may be used if you want to allow control

# connections from other machines:

#

## set server 6670 MySecretpassword

#

# If you don't like ppp's builtin chat, use an external one:

#

## set login "\"!chat \\\\-f /etc/ppp/ppp.dev.chat\""

#

# If we have a ``strange'' modem that must be re-initialized when we

# hangup:

#

## set hangup "\"\" AT OK-AT-OK ATZ OK"

#

# To adjust logging withouth blasting the setting in default:

#

## set log -command +tcp/ip

#

# To see log messages on the screen in interactive mode:

#

## set log local LCP IPCP CCP

#

# If you're seeing a lot of magic number problems and failed
connections,

# try this (see the man page):

#

## set openmode active 5

#

# For noisy lines, we may want to reconnect (up to 20 times) after
loss

# of carrier, with 3 second delays between each attempt:

#

## set reconnect 3 20

#

# When playing server for M$ clients, tell them who our NetBIOS name

# servers are:

#

## set nbns 10.0.0.1 10.0.0.2

#

# Inform the client if they ask for our DNS IP numbers:

#

## enable dns

#

# If you don't want to tell them what's in your /etc/resolf.conf file

# with `enable dns', override the values:

#

## set dns 10.0.0.1 10.0.0.2

#

# If we're using the -alias switch, redirect ftp and http to an
internal

# machine:

#

## alias port 10.0.0.2:ftp ftp

## alias port 10.0.0.2:http http

#

# or don't trust the outside at all

#

## alias deny_incoming yes

#

# I trust user brian to run ppp, so this goes in the `default'
section:

#

## allow user brian

#

# But label `internet' contains passwords that even brian can't have,
so

# I empty out the user access list in that section so that only root
can

# have access:

#

## allow users

#

# I also may wish to set up my ppp login script so that it asks the
client

# for the label they wish to use. I may only want user ``dodgy'' to
access

# their own label in direct mode:

#

##dodgy:

## allow user dodgy

## allow mode direct

#

# If we don't want ICMP and DNS packets to keep the connection alive:

#

## set filter alive 0 deny icmp

## set filter alive 1 deny udp src eq 53

## set filter alive 2 deny udp dst eq 53

## set filter alive 3 permit 0 0

#

# And we don't want ICMPs to cause a dialup:

#

## set filter dial 0 deny icmp

## set filter dial 1 permit 0 0

#

# or any TCP SYN or RST packets (badly closed TCP channels):

#

## set filter dial 2 deny 0 0 tcp syn finrst

#

# Once the line's up, allow connections for ident (113), telnet (23),

# ftp (20 & 21), DNS (53), my place of work (192.244.191.0/24),

# ICMP (ping) and traceroute (>33433).

#

# Anything else is blocked by default

#

## set filter in 0 permit tcp dst eq 113

## set filter out 0 permit tcp src eq 113

## set filter in 1 permit tcp src eq 23 estab

## set filter out 1 permit tcp dst eq 23

## set filter in 2 permit tcp src eq 21 estab

## set filter out 2 permit tcp dst eq 21

## set filter in 3 permit tcp src eq 20 dst gt 1023

## set filter out 3 permit tcp dst eq 20

## set filter in 4 permit udp src eq 53

## set filter out 4 permit udp dst eq 53

## set filter in 5 permit 192.244.191.0/24 0/0

## set filter out 5 permit 0/0 192.244.191.0/24

## set filter in 6 permit icmp

## set filter out 6 permit icmp

## set filter in 7 permit udp dst gt 33433

## set filter out 7 permit udp dst gt 33433



# Server side PPP

# If you want the remote system to authenticate itself, you insist

# that the peer uses CHAP (or PAP) with the "enable" keyword. Both
CHAP and

# PAP are disabled by default (we usually only "enable" one of them if
the

# other side is dialing into our server).

# When the peer authenticates itself, we use ppp.secret for
verification.

#

# Ppp is launched with:

# # ppp -direct CHAPserver

#

# Note: We can supply a third field in ppp.secret specifying the IP
address

# for that user. We can even specify a forth field to specify the

# ppp.link{up,down} label to use.

#

##CHAPserver:

## enable chap

## enable proxy

## set ifaddr 192.244.176.44 292.244.184.31

## accept dns

# If we wish to act as a server, allowing PAP access according to

# accounts in /etc/passwd, we do this (Without `enable passwdauth',

# you may still enter ``*'' as the users password in ppp.secret and

# ppp will look it up in the passwd database. This is useful if you

# need to assign a special label or IP number or range):

#

##PAPServerwithPASSWD:

## enable pap

## enable passwdauth

## enable proxy

## set ifaddr 192.244.176.44 292.244.184.31

## accept dns



# Example to connect using a null-modem cable:

# The important thing here is to allow the lqr packets on both sides.

# Without them enabled, we can't tell if the line's dropped - there

# should always be carrier on a direct connection.

# Here, the server sends lqr's every 10 seconds and quits if five in a

# row fail.

#

# Make sure you don't have "deny lqr" in your default: on the client !

# If the peer denies LQR, we still send ECHO LQR packets at the given

# lqrperiod interval (ppp-style-pings).

#

##direct-client:

## set dial ""

## set line /dev/cuaa0

## set sp 115200

## set timeout 900

## set lqrperiod 10

## set log Phase Chat LQM

## set login "ABORT NO\\sCARRIER TIMEOUT 5 ogin:--ogin: ppp word: ppp
HELLO"

## set ifaddr 10.0.4.2 10.0.4.1

## enable lqr

## accept lqr


##direct-server:

## set timeout 0

## set lqrperiod 10

## set log Phase LQM

## set ifaddr 10.0.4.1 10.0.4.2

## enable lqr

## accept lqr



# Example to connect via compuserve (who insist on 7 bits even parity

# during the chat phase).

#

##compuserve:

## set phone 1234567

## set parity even

## set login "TIMEOUT 10 \"\" \"\" Name: CIS ID:
99999,9999/go:pppconnect \

## word: XXXXXXXX"

## set timeout 300

## set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0

## delete ALL

## add default HISADDR



# Example for PPP over TCP.

# We assume that inetd on tcpsrv.mynet has been

# configured to run "ppp -direct tcp-server" when it gets a connection
on

# port 1234. Read the man page for further details

#

# Note, we assume we're using a binary-clean connection. If something

# such as `rlogin' is involved, you may need to ``set escape 0xff''

#

##tcp-client:

## set device tcpsrv.mynet:1234

## set dial

## set login

## set ifaddr 10.0.5.1 10.0.4.1 255.255.255.0

##tcp-server:

## set ifaddr 10.0.4.1 10.0.5.1 255.255.255.0

# If you want to test ppp, do it through a loopback:

#

# Requires a line in /etc/services:

# ppploop 6671/tcp # loopback ppp daemon

#

# and a line in /etc/inetd.conf:

# ppploop stream tcp nowait root /usr/sbin/ppp ppp -direct loop-in

#

##loop:

## set timeout 0

## set log phase chat connect lcp ipcp command

## set device localhost:ppploop

## set dial

## set login

## set ifaddr 127.0.0.2 127.0.0.3

## set server /var/tmp/loop "" 0177


##loop-in:

## set timeout 0

## set log phase lcp ipcp command

## allow mode direct

# If you're going to create a tunnel through a public network, your
VPN

# should be set up something like this:

#

# /etc/ppp/secure (which should be executable) says:

# #! /bin/sh

# exec ssh whatevermachine /usr/sbin/ppp -direct loop-in

#

##sloop:

## load loop

## set device !/etc/ppp/secure

# If you wish to connect to a server that will dial back *without*
using

# the ppp callback facility (rfc1570), take advantage of the fact that

# ppp doesn't look for carrier 'till `set login' is complete:

#

# Here, we expect the server to say DIALBACK then disconnect after

# we've authenticated ourselves. When this has happened, we wait

# 60 seconds for a RING.

#

##dialback:

## set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATZ
OK-ATZ-OK \

## ATDT\\T TIMEOUT 60 CONNECT"

## set login "TIMEOUT 5 ogin:--ogin: ppp word: ppp TIMEOUT 15 DIALBACK
\

## \"\" NO\\sCARRIER \"\" TIMEOUT 60 RING ATA CONNECT"

# Alternatively, if the peer is using the PPP callback protocol, use

# normal dial and login scripts and add

#

## set callback auth cbcp e.164 1234567

## set cbcp 1234567

# If we're running a ppp server that wants to only call back microsoft

# clients on numbers configured in /etc/ppp/ppp.secret (the 5th
field):

#

## set callback cbcp

## set cbcp

## set log +cbcp

## set redial 3 1

## set device /dev/cuaa0

## set speed 115200

## set dial "TIMEOUT 10 \"\" AT OK-AT-OK ATDT\\T CONNECT"

# Or if we want to allow authenticated clients to specify their own

# callback number, use this ``set cbcp'' line instead:

#

## set cbcp *

# Multilink mode is available (rfc1990).

# To enable multilink capabilities, you must specify a MRRU. 1500 is

# a reasonable value. To create new links, use the ``clone'' command

# to duplicate an existing link. If you already have more than one

# link, you must specify which link you wish to run the command on via

# the ``link'' command.

#

# You can now ``dial'' specific links, or even dial all links at the

# same time. The `dial' command may also be prefixed with a specific

# link that should do the dialing.

#

##mloop:

## load loop

## set mode interactive

## set mrru 1500

## clone 1 2 3

## link deflink remove

# dial

# link 2 dial

# link 3 dial

##mloop-in:

## set timeout 0

## set log tun phase

## allow mode direct

## set mrru 1500

-------------------------------

######################################################################
###

#

# Example of ppp.linkup file

#

# This file is checked when ppp establishes a connection.

# ppp searches the labels in this file as follows:

#

# 1) The label that matches the IP number assigned to our side.

#

# 2) The label specified on the command line to ppp.

#

# 3) If no label has been found, use MYADDR if it exists.

#

#

# $Id: ppp.linkup.sample,v 1.14 1998/05/21 21:45:47 brian Exp $

#

######################################################################
###

# It is no longer necessary to re-add the default route here as our

# ppp.conf route is `sticky' (see the man page).

# If you're into sound effects when the link comes up, you can run

# ``auplay'' (assuming NAS is installed and configured).

#

MYADDR:

## !bg /usr/X11R6/bin/auplay /etc/ppp/linkup.au

delete ALL

add 0 0 HISDDR

# If we've got 192.244.176.32 as our address, then regard peer as a
gateway

# to 192.244.176.0 network. This may also be done in ppp.conf instead.

#

##192.244.176.32:

## add 192.244.176.0 0 HISADDR

#You may want to execute a script after connecting. This script can do

# nice things such as kick off "sendmail -q", "popclient my.isp" and

# "slurp -d news". It can be passed MYADDR, HISADDR and INTERFACE

# as arguments too - useful for informing a DNS of your assigned IP.

#

# You may also want some sound effects....

#

pmdemand:

!bg /etc/ppp/ppp.etherup.pmdemand

! sh -c "cat /etc/ppp/linkup.au >/dev/audio"

# If your minimum call charge is 5 minutes, you may as well stay on

# the line for that amount of time. If we want a 60 second subsequent

# timeout, set your timeout to 300 in ppp.conf and then do this:

#

min5minutes:

!bg sh -c "sleep 240; pppctl -p mypassword 3000 set timeout 60"

------------------------------------------------------






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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000901c05948$98f90d70$6e306480>