PPP
From Hackepedia
Point to Point protocol, defined in RFC 1661, was the protocol spoken with analog modems calling into an ISP as a successor to SLIP and today is most commonly used as PPPoE (Over Ethernet).
Various implementations of PPP
Kernel Synchronous PPP
also known as sppp was written in 1994 at Cronyx Ltd. in Russia by Serge Vakulenko <vak@cronyx.ru> and rewritten to conform to RFC 1661 by Joerg Wunsch of FreeBSD. It is entirely in-kernel (is therefore speedy) and is controlled from
userland with ioctls. In NetBSD and OpenBSD a
kernel PPPoE implementation written by Martin Husemann <martin@NetBSD.org> uses this driver which is very speedy.
In OpenBSD the connection via PPPoE is configured in the /etc/hostname.pppoe0 file, mine looks like this:
pppoedev rl0
!/sbin/ifconfig rl0 up
!/usr/sbin/spppcontrol \$if myauthproto=pap myauthname=pbug myauthkey=secret
!/sbin/ifconfig \$if inet 0.0.0.0 0.0.0.1 netmask 0xffffffff
!/sbin/route add default 0.0.0.1
up
Upon boot the connection is set up.
Kernel Asynchronous PPP
modified extensively by Paul Mackeras <paulus@cs.anu.edu.au> uses the pppd
userland daemon. Apple Mac OS X uses this implementation for its PPPoE implementation. This PPP implementation has it's own Network interface called "ppp" starting with ppp0, ppp1 and so on.
Userland PPP
Also known as iijppp, is a PPP implementation entirely in
userland written by Toshiharu OHNO <tony-o@iij.ad.jp> and was extensively modified by Brian Somers
who now maintains the program. In FreeBSD this program has extensive hooks into the kernel in order to make use of the PPPoE protocol. In OpenBSD there is a userland pppoe program that does PPPoE by means of bpf access to the OSI data link (somewhat slow and prone to packet loss). User-ppp uses the "tun" Network interface to connect the PPP implementation to the Kernel IP stack.
Here is a sample /etc/ppp/ppp.conf from FreeBSD 5.4-RELEASE. As always replace the variables:
default:
set log Phase Chat IPCP CCP tun command
set device PPPoE:$sis0
set mru 1492
set mtu 1452
add! default HISADDR
test:
set authname test@test
set authkey test
set dial
set login
myisp:
set authname $ISP_userid
set authkey $ISP_Password
set dial
set login
enable dns
"default" above identifies variables that will be shared across your various ppp connections. It is possible to have multiple, the author of this has 2 PPPoE sDSL connections for example. I left "test" above as many Redbacks allow this username/password combo for testing.
# ppp
ppp> ddial test
if all three letters in your prompt turn capitalized, it's working. At that stage you can try
# ppp -ddial myisp
and then check ifconfig and your ppp.log which is usually found in /var/log.
EA-700 Heritage DSL modem
EA-700> adsl show perf
Downstream :
Capacity Occupation : 36 %
Noise Margin : 15 dB
Attenuation : 56 dB
Output Power : 18.5 dBm
Upstream :
Capacity Occupation : 34 %
Noise Margin : 24 dB
Attenuation : 31.5 dB
Output Power : 12 dBm
EA-700> adsl show error
Downstream :
FEC : 8
CRC : 0
HEC : 0
Upstream :
FEC : 0
CRC : 0
HEC : 0
EA-700>
Point to Point Protokoll (Punkt zu Punkt), ist definiert in RFC 1661, war
das Protokoll das mit analogen Modems die ein ISP angerufen haben. Das PPP
protokoll ergänzt das SLIP protokoll und ist heute noch oft benutzt mit
dem PPPoE (PPP über Ethernet) Protokoll.
Verschiedene designs von PPP
Kernel Synchronous PPP
auch besser bekannt als sppp, war geschrieben in 1994 bei Cronyx Ltd. in
Russland von Serge Vakulenko <vak@cronyx.ru> und war aufgeputscht
auf RFC1661 spezifikation von Jörg Wunsch von FreeBSD. Es ist ganz
im kernel und deswegen schnell und ist kontrolliert im User-land mit
ioctls. In NetBSD und OpenBSD eine kernel PPPoE implementation war
geschrieben von Martin Husemann <martin@NetBSD.org> benutzt diesen
treiber was sehr flott vor sich geht. In OpenBSD die verbindung zu
PPPoE ist konfiguriert in der /etc/hostname.pppoe0 datei. Meine sieht
so aus:
pppoedev rl0
!/sbin/ifconfig rl0 up
!/usr/sbin/spppcontrol \$if myauthproto=pap myauthname=pbug myauthkey=secret
!/sbin/ifconfig \$if inet 0.0.0.0 0.0.0.1 netmask 0xffffffff
!/sbin/route add default 0.0.0.1
up
Die Verbindung geht an jedes mal wenn neu gebootet wird.
Kernel Asynchronous PPP
war sehr modifiziert von Paul Mackeras <paulus@cs.anu.edu.au> benutzt
den pppd userland daemon. Apple Mac OS X benutzt diese implementation. Diese
PPP implementation hat seine eigene Netzwerk Schnittstelle die "ppp" genannt
wird also ppp0, ppp1, und so weiter.
Userland PPP
Auch besser bekannt als ijppp, ist eine PPP implementation, die nur im
userland sitzt. Geschrieben von Toshiharu OHNO <tony-o@iij.ad.jp> und
war sehr modifiziert von Brian Somers wer nun der BSD maintainer für dieses
Programm ist. In FreeBSD diese Programm hat viele schnittstellen ins Kernel
um mit dem PPPoE Protokoll umzugehen. In OpenBSD das ist ein userland
pppoe programm das PPPoE macht mit bpf schnüffelei auf die Datalink (OSI 2)
Schicht (etwas langsamer und kann Pakete verlieren). User-ppp benutzt die
"tun" Netzwerk schnittstelle um das kernel mit dem PPP zu verbinden. Hier
ist ein beispiel /etc/ppp/ppp.conf von FreeBSD 5.4-RELEASE.
default:
set log Phase Chat IPCP CCP tun command
set device PPPoE:$sis0
set mru 1492
set mtu 1452
add! default HISADDR
test:
set authname test@test
set authkey test
set dial
set login
myisp:
set authname $ISP_userid
set authkey $ISP_Password
set dial
set login
enable dns
"default" oben identifiziert variablen die geteilt werden bei allen ppp
verbindungen (wie myisp). Es ist möglich mehrere zu haben, der autor
dieses Hackepedia eintrags hat 2 PPPoE SDSL verbindungen zum beispiel. Ich
habe "test" gelassen da viele Redbacks diese username/passwort kombo erlauben
für testzwecke.
# ppp
ppp> ddial test
wenn alle drei buchstaben in "ppp" grossgeschrieben sind dann funktionierts.
Man kann auch immer,
# ppp -ddial myisp
versuchen und dann ifconfig lesen und ppp.log was in /var/log zu finden ist.