Add a new translated section.
This commit is contained in:
parent
3cdb4e6b0d
commit
9c57d60819
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=18813
1 changed files with 492 additions and 3 deletions
|
@ -121,8 +121,497 @@
|
|||
</sect1>
|
||||
|
||||
<sect1 id="ppp">
|
||||
<title>Using Kernel PPP ** Traduction en Cours **</title>
|
||||
<para></para>
|
||||
<sect1info>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Gennady B.</firstname>
|
||||
<surname>Sorokopud</surname>
|
||||
<contrib>Contribution originale de </contrib>
|
||||
</author>
|
||||
<author>
|
||||
<firstname>Robert</firstname>
|
||||
<surname>Huff</surname>
|
||||
</author>
|
||||
</authorgroup>
|
||||
</sect1info>
|
||||
|
||||
<title>Utiliser PPP intégré au noyau</title>
|
||||
|
||||
<sect2>
|
||||
<title>Configurer PPP intégré au noyau</title>
|
||||
<indexterm><primary>PPP</primary><secondary>PPP intégré au noyau</secondary></indexterm>
|
||||
|
||||
<para>Avant de configurer PPP sur votre machine, vérifiez
|
||||
que <command>pppd</command> est bien dans le répertoire
|
||||
<filename role="directory">/usr/sbin</filename> et que le
|
||||
répertoire <filename
|
||||
role="directory">/etc/ppp</filename> existe.</para>
|
||||
|
||||
<para>La commande <command>pppd</command> peut fonctionner selon
|
||||
deux modes:</para>
|
||||
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Comme “client” — si vous
|
||||
désirez connecter votre machine au monde
|
||||
extérieur via une liaison PPP série ou un
|
||||
modem.</para>
|
||||
</listitem>
|
||||
|
||||
<indexterm><primary>PPP</primary><secondary>serveur</secondary></indexterm>
|
||||
<listitem>
|
||||
<para>Comme “serveur” — si votre machine
|
||||
est sur le réseau, et sert à y connecter
|
||||
d'autres ordinateurs avec PPP.</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
||||
<para>Dans les deux cas, vous devrez renseigner un fichier
|
||||
d'options (<filename>/etc/ppp/options</filename> ou
|
||||
<filename>~/.ppprc</filename> si vous avez plus d'un
|
||||
utilisateur sur votre machine utilisant PPP).</para>
|
||||
|
||||
<para>Vous aurez également besoin d'un logiciel
|
||||
“modem/série” (de préférence
|
||||
<filename role="package">comms/kermit</filename>), pour
|
||||
appeler et établir la connexion avec la machine
|
||||
distante.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<sect2info>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Trev</firstname>
|
||||
<surname>Roydhouse</surname>
|
||||
<contrib>Basé sur des informations fournies
|
||||
par </contrib>
|
||||
<!-- Trev.Roydhouse@f401.n711.z3.fidonet.org -->
|
||||
</author>
|
||||
</authorgroup>
|
||||
</sect2info>
|
||||
|
||||
<title>Utiliser <command>pppd</command> comme client</title>
|
||||
<indexterm><primary>PPP</primary><secondary>client</secondary></indexterm>
|
||||
<indexterm><primary>Cisco</primary></indexterm>
|
||||
<para>Le fichier <filename>/etc/ppp/options</filename> suivant
|
||||
pourrait être utilisé pour se connecter à la
|
||||
liaison PPP d'un concentrateur Cisco:</para>
|
||||
|
||||
<programlisting>crtscts # enable hardware flow control
|
||||
modem # modem control line
|
||||
noipdefault # remote PPP server must supply your IP address.
|
||||
# if the remote host does not send your IP during IPCP
|
||||
# negotiation, remove this option
|
||||
passive # wait for LCP packets
|
||||
domain ppp.foo.com # put your domain name here
|
||||
|
||||
:<remote_ip> # put the IP of remote PPP host here
|
||||
# it will be used to route packets via PPP link
|
||||
# if you didn't specified the noipdefault option
|
||||
# change this line to <local_ip>:<remote_ip>
|
||||
|
||||
defaultroute # put this if you want that PPP server will be your
|
||||
# default router</programlisting>
|
||||
|
||||
<para>Pour se connecter:</para>
|
||||
|
||||
<indexterm><primary>kermit</primary></indexterm>
|
||||
<indexterm><primary>modem</primary></indexterm>
|
||||
<procedure>
|
||||
<step>
|
||||
<para>Appelez la machine distante en utilisant
|
||||
<application>kermit</application> (ou un autre programme
|
||||
pour modem), puis entrez votre nom d'utilisateur et mot de
|
||||
passe (ou ce qu'il faut pour activer PPP sur la machine
|
||||
distante).</para>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
<para>Quittez <application>kermit</application> (sans
|
||||
raccrocher la ligne).</para>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
<para>Entrez la commande suivante:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>/usr/src/usr.sbin/pppd.new/pppd <replaceable>/dev/tty01</replaceable> <replaceable>19200</replaceable></userinput></screen>
|
||||
|
||||
<para>Assurez-vous d'utiliser la vitesse et le nom de
|
||||
périphérique adéquats.</para>
|
||||
</step>
|
||||
</procedure>
|
||||
|
||||
<para>Votre ordinateur est maintenant connecté via PPP.
|
||||
Si la connection échoue, vous pouvez ajouter l'option
|
||||
<option>debug</option> au fichier
|
||||
<filename>/etc/ppp/options</filename>, et consulter les
|
||||
messages sur la console pour tracer le problème.</para>
|
||||
|
||||
<para>La procédure <filename>/etc/ppp/pppup</filename>
|
||||
ci-dessous effectuera automatiquement ces trois
|
||||
étapes:</para>
|
||||
|
||||
<programlisting>#!/bin/sh
|
||||
ps ax |grep pppd |grep -v grep
|
||||
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
||||
if [ "X${pid}" != "X" ] ; then
|
||||
echo 'killing pppd, PID=' ${pid}
|
||||
kill ${pid}
|
||||
fi
|
||||
ps ax |grep kermit |grep -v grep
|
||||
pid=`ps ax |grep kermit |grep -v grep|awk '{print $1;}'`
|
||||
if [ "X${pid}" != "X" ] ; then
|
||||
echo 'killing kermit, PID=' ${pid}
|
||||
kill -9 ${pid}
|
||||
fi
|
||||
|
||||
ifconfig ppp0 down
|
||||
ifconfig ppp0 delete
|
||||
|
||||
kermit -y /etc/ppp/kermit.dial
|
||||
pppd /dev/tty01 19200</programlisting>
|
||||
|
||||
<indexterm><primary>kermit</primary></indexterm>
|
||||
<para><filename>/etc/ppp/kermit.dial</filename> est une
|
||||
procédure <application>kermit</application> qui appelle
|
||||
et fournit toutes les informations d'authentification
|
||||
nécessaires à la machine distante (un exemple
|
||||
d'une telle procédure est donné à la fin de
|
||||
ce document).</para>
|
||||
|
||||
<para>Utilisez la procédure
|
||||
<filename>/etc/ppp/pppdown</filename> suivante pour terminer
|
||||
la session PPP et vous déconnecter:</para>
|
||||
|
||||
<programlisting>#!/bin/sh
|
||||
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
||||
if [ X${pid} != "X" ] ; then
|
||||
echo 'killing pppd, PID=' ${pid}
|
||||
kill -TERM ${pid}
|
||||
fi
|
||||
|
||||
ps ax |grep kermit |grep -v grep
|
||||
pid=`ps ax |grep kermit |grep -v grep|awk '{print $1;}'`
|
||||
if [ "X${pid}" != "X" ] ; then
|
||||
echo 'killing kermit, PID=' ${pid}
|
||||
kill -9 ${pid}
|
||||
fi
|
||||
|
||||
/sbin/ifconfig ppp0 down
|
||||
/sbin/ifconfig ppp0 delete
|
||||
kermit -y /etc/ppp/kermit.hup
|
||||
/etc/ppp/ppptest</programlisting>
|
||||
|
||||
<para>Vérifiez si <command>pppd</command> tourne toujours
|
||||
en lançant la procédure
|
||||
<filename>/usr/etc/ppp/ppptest</filename>, qui devrait
|
||||
ressembler à ceci:</para>
|
||||
|
||||
<programlisting>#!/bin/sh
|
||||
pid=`ps ax| grep pppd |grep -v grep|awk '{print $1;}'`
|
||||
if [ X${pid} != "X" ] ; then
|
||||
echo 'pppd running: PID=' ${pid-NONE}
|
||||
else
|
||||
echo 'No pppd running.'
|
||||
fi
|
||||
set -x
|
||||
netstat -n -I ppp0
|
||||
ifconfig ppp0</programlisting>
|
||||
|
||||
<para>Pour racccrocher la ligne, exécutez
|
||||
<filename>/etc/ppp/kermit.hup</filename>, qui devrait
|
||||
contenir:</para>
|
||||
|
||||
<programlisting>set line /dev/tty01 ; put your modem device here
|
||||
set speed 19200
|
||||
set file type binary
|
||||
set file names literal
|
||||
set win 8
|
||||
set rec pack 1024
|
||||
set send pack 1024
|
||||
set block 3
|
||||
set term bytesize 8
|
||||
set command bytesize 8
|
||||
set flow none
|
||||
|
||||
pau 1
|
||||
out +++
|
||||
inp 5 OK
|
||||
out ATH0\13
|
||||
echo \13
|
||||
exit</programlisting>
|
||||
|
||||
<para>Voici une autre méthode qui utilise
|
||||
<command>chat</command> au lieu de
|
||||
<command>kermit</command>.</para>
|
||||
|
||||
<para>Les deux fichiers suivants suffisent à
|
||||
établir une connexion avec
|
||||
<command>pppd</command>.</para>
|
||||
|
||||
<para><filename>/etc/ppp/options</filename>:</para>
|
||||
|
||||
<programlisting>/dev/cuaa1 115200
|
||||
|
||||
crtscts # enable hardware flow control
|
||||
modem # modem control line
|
||||
connect "/usr/bin/chat -f /etc/ppp/login.chat.script"
|
||||
noipdefault # remote PPP serve must supply your IP address.
|
||||
# if the remote host doesn't send your IP during
|
||||
# IPCP negotiation, remove this option
|
||||
passive # wait for LCP packets
|
||||
domain <your.domain> # put your domain name here
|
||||
|
||||
: # put the IP of remote PPP host here
|
||||
# it will be used to route packets via PPP link
|
||||
# if you didn't specified the noipdefault option
|
||||
# change this line to <local_ip>:<remote_ip>
|
||||
|
||||
defaultroute # put this if you want that PPP server will be
|
||||
# your default router</programlisting>
|
||||
|
||||
<para><filename>/etc/ppp/login.chat.script</filename>:</para>
|
||||
|
||||
<note>
|
||||
<para>Ce qui suit doit être tapé sur une seule
|
||||
ligne.</para>
|
||||
</note>
|
||||
|
||||
<programlisting>ABORT BUSY ABORT 'NO CARRIER' "" AT OK ATDT<phone.number>
|
||||
CONNECT "" TIMEOUT 10 ogin:-\\r-ogin: <login-id>
|
||||
TIMEOUT 5 sword: <password></programlisting>
|
||||
|
||||
<para>Une fois que ces fichiers sont installés et
|
||||
correctement modifiés, tout ce dont vous avez besoin de
|
||||
faire est de lancer <command>pppd</command>, comme
|
||||
suit:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>pppd</userinput></screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Utiliser <command>pppd</command> comme serveur</title>
|
||||
|
||||
<para>Le contenu du fichier
|
||||
<filename>/etc/ppp/options</filename> devrait être
|
||||
semblable à ce qui suit:</para>
|
||||
|
||||
<programlisting>crtscts # Hardware flow control
|
||||
netmask 255.255.255.0 # netmask ( not required )
|
||||
192.114.208.20:192.114.208.165 # ip's of local and remote hosts
|
||||
# local ip must be different from one
|
||||
# you assigned to the ethernet ( or other )
|
||||
# interface on your machine.
|
||||
# remote IP is ip address that will be
|
||||
# assigned to the remote machine
|
||||
domain ppp.foo.com # your domain
|
||||
passive # wait for LCP
|
||||
modem # modem line</programlisting>
|
||||
|
||||
<para>La procédure <filename>/etc/ppp/pppserv</filename>
|
||||
ci-dessous demandera à <application>pppd</application>
|
||||
de se comporter comme un serveur:</para>
|
||||
|
||||
<programlisting>#!/bin/sh
|
||||
ps ax |grep pppd |grep -v grep
|
||||
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
||||
if [ "X${pid}" != "X" ] ; then
|
||||
echo 'killing pppd, PID=' ${pid}
|
||||
kill ${pid}
|
||||
fi
|
||||
ps ax |grep kermit |grep -v grep
|
||||
pid=`ps ax |grep kermit |grep -v grep|awk '{print $1;}'`
|
||||
if [ "X${pid}" != "X" ] ; then
|
||||
echo 'killing kermit, PID=' ${pid}
|
||||
kill -9 ${pid}
|
||||
fi
|
||||
|
||||
# reset ppp interface
|
||||
ifconfig ppp0 down
|
||||
ifconfig ppp0 delete
|
||||
|
||||
# enable autoanswer mode
|
||||
kermit -y /etc/ppp/kermit.ans
|
||||
|
||||
# run ppp
|
||||
pppd /dev/tty01 19200</programlisting>
|
||||
|
||||
<para>Utilisez cette procédure
|
||||
<filename>/etc/ppp/pppservdown</filename> pour arrêter
|
||||
le serveur:</para>
|
||||
|
||||
<programlisting>#!/bin/sh
|
||||
ps ax |grep pppd |grep -v grep
|
||||
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
|
||||
if [ "X${pid}" != "X" ] ; then
|
||||
echo 'killing pppd, PID=' ${pid}
|
||||
kill ${pid}
|
||||
fi
|
||||
ps ax |grep kermit |grep -v grep
|
||||
pid=`ps ax |grep kermit |grep -v grep|awk '{print $1;}'`
|
||||
if [ "X${pid}" != "X" ] ; then
|
||||
echo 'killing kermit, PID=' ${pid}
|
||||
kill -9 ${pid}
|
||||
fi
|
||||
ifconfig ppp0 down
|
||||
ifconfig ppp0 delete
|
||||
|
||||
kermit -y /etc/ppp/kermit.noans</programlisting>
|
||||
|
||||
<para>La procédure <application>kermit</application>
|
||||
ci-dessous (<filename>/etc/ppp/kermit.ans</filename>) activera
|
||||
ou désactivera le mode réponse automatique de
|
||||
votre modem:</para>
|
||||
|
||||
<programlisting>set line /dev/tty01
|
||||
set speed 19200
|
||||
set file type binary
|
||||
set file names literal
|
||||
set win 8
|
||||
set rec pack 1024
|
||||
set send pack 1024
|
||||
set block 3
|
||||
set term bytesize 8
|
||||
set command bytesize 8
|
||||
set flow none
|
||||
|
||||
pau 1
|
||||
out +++
|
||||
inp 5 OK
|
||||
out ATH0\13
|
||||
inp 5 OK
|
||||
echo \13
|
||||
out ATS0=1\13 ; change this to out ATS0=0\13 if you want to disable
|
||||
; autoanswer mod
|
||||
inp 5 OK
|
||||
echo \13
|
||||
exit</programlisting>
|
||||
|
||||
<para>Une procédure nommée
|
||||
<filename>/etc/ppp/kermit.dial</filename> est utilisée
|
||||
pour appeler et s'authentifier sur la machine distante. Vous
|
||||
devrez l'adapter à vos besoins. Mettez-y votre nom
|
||||
d'utilisateur et votre mot de passe; vous devrez
|
||||
également modifier les entrées en fonctions des
|
||||
réponses que vous envoient votre modem et la machine
|
||||
distante.</para>
|
||||
|
||||
<programlisting>;
|
||||
; put the com line attached to the modem here:
|
||||
;
|
||||
set line /dev/tty01
|
||||
;
|
||||
; put the modem speed here:
|
||||
;
|
||||
set speed 19200
|
||||
set file type binary ; full 8 bit file xfer
|
||||
set file names literal
|
||||
set win 8
|
||||
set rec pack 1024
|
||||
set send pack 1024
|
||||
set block 3
|
||||
set term bytesize 8
|
||||
set command bytesize 8
|
||||
set flow none
|
||||
set modem hayes
|
||||
set dial hangup off
|
||||
set carrier auto ; Then SET CARRIER if necessary,
|
||||
set dial display on ; Then SET DIAL if necessary,
|
||||
set input echo on
|
||||
set input timeout proceed
|
||||
set input case ignore
|
||||
def \%x 0 ; login prompt counter
|
||||
goto slhup
|
||||
|
||||
:slcmd ; put the modem in command mode
|
||||
echo Put the modem in command mode.
|
||||
clear ; Clear unread characters from input buffer
|
||||
pause 1
|
||||
output +++ ; hayes escape sequence
|
||||
input 1 OK\13\10 ; wait for OK
|
||||
if success goto slhup
|
||||
output \13
|
||||
pause 1
|
||||
output at\13
|
||||
input 1 OK\13\10
|
||||
if fail goto slcmd ; if modem doesn't answer OK, try again
|
||||
|
||||
:slhup ; hang up the phone
|
||||
clear ; Clear unread characters from input buffer
|
||||
pause 1
|
||||
echo Hanging up the phone.
|
||||
output ath0\13 ; hayes command for on hook
|
||||
input 2 OK\13\10
|
||||
if fail goto slcmd ; if no OK answer, put modem in command mode
|
||||
|
||||
:sldial ; dial the number
|
||||
pause 1
|
||||
echo Dialing.
|
||||
output atdt9,550311\13\10 ; put phone number here
|
||||
assign \%x 0 ; zero the time counter
|
||||
|
||||
:look
|
||||
clear ; Clear unread characters from input buffer
|
||||
increment \%x ; Count the seconds
|
||||
input 1 {CONNECT }
|
||||
if success goto sllogin
|
||||
reinput 1 {NO CARRIER\13\10}
|
||||
if success goto sldial
|
||||
reinput 1 {NO DIALTONE\13\10}
|
||||
if success goto slnodial
|
||||
reinput 1 {\255}
|
||||
if success goto slhup
|
||||
reinput 1 {\127}
|
||||
if success goto slhup
|
||||
if < \%x 60 goto look
|
||||
else goto slhup
|
||||
|
||||
:sllogin ; login
|
||||
assign \%x 0 ; zero the time counter
|
||||
pause 1
|
||||
echo Looking for login prompt.
|
||||
|
||||
:slloop
|
||||
increment \%x ; Count the seconds
|
||||
clear ; Clear unread characters from input buffer
|
||||
output \13
|
||||
;
|
||||
; put your expected login prompt here:
|
||||
;
|
||||
input 1 {Username: }
|
||||
if success goto sluid
|
||||
reinput 1 {\255}
|
||||
if success goto slhup
|
||||
reinput 1 {\127}
|
||||
if success goto slhup
|
||||
if < \%x 10 goto slloop ; try 10 times to get a login prompt
|
||||
else goto slhup ; hang up and start again if 10 failures
|
||||
|
||||
:sluid
|
||||
;
|
||||
; put your userid here:
|
||||
;
|
||||
output ppp-login\13
|
||||
input 1 {Password: }
|
||||
;
|
||||
; put your password here:
|
||||
;
|
||||
output ppp-password\13
|
||||
input 1 {Entering SLIP mode.}
|
||||
echo
|
||||
quit
|
||||
|
||||
:slnodial
|
||||
echo \7No dialtone. Check the telephone line!\7
|
||||
exit 1
|
||||
|
||||
; local variables:
|
||||
; mode: csh
|
||||
; comment-start: "; "
|
||||
; comment-start-skip: "; "
|
||||
; end:</programlisting>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="pppoe">
|
||||
|
@ -195,7 +684,7 @@ nom_du_fournisseur_d'accès:
|
|||
|
||||
<programlisting>ppp_enable="YES"
|
||||
ppp_mode="ddial"
|
||||
ppp_nat="YES" # si vous voulez activer NAT pour votre réseau local, sinon NO
|
||||
ppp_nat="YES" # si vous voulez activer NAT pour votre réseau local, sinon NO
|
||||
ppp_profile="nom_du_fournisseur_d'accès"</programlisting>
|
||||
</sect2>
|
||||
|
||||
|
|
Loading…
Reference in a new issue