Sophie

Sophie

distrib > Mandriva > 9.0 > i586 > by-pkgid > 0d5cd12c82d627a82c59047e1ba7b8a9 > files > 1038

howto-html-fr-9.0-0.2mdk.noarch.rpm

<HTML>
<HEAD>
<TITLE>Testez votre script de connexion</TITLE>
</HEAD>
<BODY>
<H1>16. <A NAME="s16"></A>Testez votre script de connexion</H1>
<P>
<A HREF="PPP-HOWTO.html#toc16">Contenu de cette section</A></P>

<P>Ouvrez un nouveau Xterm <B>root</B> (si vous &ecirc;tes sous X) ou ouvrez une nouvelle 
console virtuelle et connectez vous comme <B>root</B>.</P>
<P></P>
<P>Dans cette nouvelle session, tapez la commande</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
tail -f /var/log/messages
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P></P>
<P>(ou l'endroit exact ou se trouve le fichier log).</P>
<P></P>
<P>Dans la premi&egrave;re fen&ecirc;tre (ou console virtuelle), tapez la commande</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
ppp-on &amp;amp;
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P></P>
<P>(ou le nom que vous avez donn&eacute; &agrave; la nouvelle version de votre  /usr/sbin/ppp-
on). Si vous ne mettez pas le script en t&acirc;che de fond en sp&eacute;cifiant &amp; en
fin de commande, vous ne r&eacute;cup&eacute;rerez pas le prompt de votre terminal avant
que ppp se termine (ou que la liaison se termine).</P>
<P></P>
<P>Maintenant revenez dans la fen&ecirc;tre ou vous affichez votre journal syst&egrave;me.</P>
<P></P>
<P>L'affichage devrait ressembler &agrave; ce qui suit (si vous avez sp&eacute;cifi&eacute; l'option -vi
a <CODE>chat</CODE> et -d &agrave; <CODE>pppd</CODE> )....c'est le d&eacute;roulement du script <CODE>chat</CODE> et 
des r&eacute;ponses envoy&eacute;es dans le fichier journal syst&egrave;me suivi des informations 
de d&eacute;marrage de <CODE>pppd</CODE> :</P>
<P>
<HR>
<PRE>
Oct 21 16:09:58 hwin chat[19868]: abort on (NO CARRIER)
Oct 21 16:09:59 hwin chat[19868]: abort on (BUSY)
Oct 21 16:09:59 hwin chat[19868]: send (ATZ^M)
Oct 21 16:09:59 hwin chat[19868]: expect (OK)
Oct 21 16:10:00 hwin chat[19868]: ATZ^M^M
Oct 21 16:10:00 hwin chat[19868]: OK -- got it
Oct 21 16:10:00 hwin chat[19868]: send (ATDT722298^M)
Oct 21 16:10:00 hwin chat[19868]: expect (CONNECT)
Oct 21 16:10:00 hwin chat[19868]: ^M
Oct 21 16:10:22 hwin chat[19868]: ATDT722298^M^M
Oct 21 16:10:22 hwin chat[19868]: CONNECT -- got it
Oct 21 16:10:22 hwin chat[19868]: send (^M)
Oct 21 16:10:22 hwin chat[19868]: expect (ogin:)
Oct 21 16:10:23 hwin chat[19868]: kepler login: -- got it
Oct 21 16:10:23 hwin chat[19868]: send (hartr^M)
Oct 21 16:10:23 hwin chat[19868]: expect (ssword:)
Oct 21 16:10:23 hwin chat[19868]:  hartr^M
Oct 21 16:10:23 hwin chat[19868]: Password: -- got it
Oct 21 16:10:23 hwin chat[19868]: send (??????^M)
Oct 21 16:10:23 hwin chat[19868]: expect (hartr)
Oct 21 16:10:24 hwin chat[19868]: [hartr -- got it
Oct 21 16:10:24 hwin chat[19868]: send (ppp^M)
Oct 21 16:10:27 hwin pppd[19872]: pppd 2.1.2 started by root, uid 0
Oct 21 16:10:27 hwin pppd[19873]: Using interface ppp0
Oct 21 16:10:27 hwin pppd[19873]: Connect: ppp0 &lt;--&gt; /dev/cua1
Oct 21 16:10:27 hwin pppd[19873]: fsm_sdata(LCP): Sent code 1, id 1.
Oct 21 16:10:27 hwin pppd[19873]: LCP: sending Configure-Request, id 1
Oct 21 16:10:27 hwin pppd[19873]: fsm_rconfreq(LCP): Rcvd id 1.
Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd MRU
Oct 21 16:10:27 hwin pppd[19873]: (1500)
Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd ASYNCMAP
Oct 21 16:10:27 hwin pppd[19873]: (0)
Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd MAGICNUMBER
Oct 21 16:10:27 hwin pppd[19873]: (a098b898)
Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd PCOMPRESSION
Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd ACCOMPRESSION
Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: returning CONFACK.
Oct 21 16:10:27 hwin pppd[19873]: fsm_sdata(LCP): Sent code 2, id 1.
Oct 21 16:10:27 hwin pppd[19873]: fsm_rconfack(LCP): Rcvd id 1.
Oct 21 16:10:27 hwin pppd[19873]: fsm_sdata(IPCP): Sent code 1, id 1.
Oct 21 16:10:27 hwin pppd[19873]: IPCP: sending Configure-Request, id 1
Oct 21 16:10:27 hwin pppd[19873]: fsm_rconfreq(IPCP): Rcvd id 1.
Oct 21 16:10:27 hwin pppd[19873]: ipcp: received ADDR
Oct 21 16:10:27 hwin pppd[19873]: (10.144.153.51)
Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
Oct 21 16:10:27 hwin pppd[19873]: ipcp: received COMPRESSTYPE
Oct 21 16:10:27 hwin pppd[19873]: (45)
Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
Oct 21 16:10:27 hwin pppd[19873]: ipcp: returning Configure-ACK
Oct 21 16:10:28 hwin pppd[19873]: fsm_sdata(IPCP): Sent code 2, id 1.
Oct 21 16:10:30 hwin pppd[19873]: fsm_sdata(IPCP): Sent code 1, id 1.
Oct 21 16:10:30 hwin pppd[19873]: IPCP: sending Configure-Request, id 1
Oct 21 16:10:30 hwin pppd[19873]: fsm_rconfreq(IPCP): Rcvd id 255.
Oct 21 16:10:31 hwin pppd[19873]: ipcp: received ADDR
Oct 21 16:10:31 hwin pppd[19873]: (10.144.153.51)
Oct 21 16:10:31 hwin pppd[19873]:  (ACK)
Oct 21 16:10:31 hwin pppd[19873]: ipcp: received COMPRESSTYPE
Oct 21 16:10:31 hwin pppd[19873]: (45)
Oct 21 16:10:31 hwin pppd[19873]:  (ACK)
Oct 21 16:10:31 hwin pppd[19873]: ipcp: returning Configure-ACK
Oct 21 16:10:31 hwin pppd[19873]: fsm_sdata(IPCP): Sent code 2, id 255.
Oct 21 16:10:31 hwin pppd[19873]: fsm_rconfack(IPCP): Rcvd id 1.
Oct 21 16:10:31 hwin pppd[19873]: ipcp: up
Oct 21 16:10:31 hwin pppd[19873]: local  IP address 10.144.153.104
Oct 21 16:10:31 hwin pppd[19873]: remote IP address 10.144.153.51
</PRE>
<HR>
</P>
<P></P>
<P>(Remarque - j'utilise les adresses IP STATIQUES - ma machine l'envoie au 
serveur PPP - vous ne verrez pas la m&ecirc;me chose si vous utilisez des adresses IP
DYNAMIQUES.) Ainsi, le server n&eacute;cessite une commande sp&eacute;cifique pour d&eacute;marrer
ppp &agrave; la fin.</P>
<P></P>
<P>Ca semble OK - alors testez comme avant avec des ping des adresses IP et des
noms des h&ocirc;tes.</P>
<P></P>
<P>Lancer votre navigateur web ou n'importe quoi d'autre et allez surfer -
vous &ecirc;tes connect&eacute; !</P>
<P></P>
<HR>
<P>
Chapitre <A HREF="PPP-HOWTO-17.html">suivant</A>,
Chapitre <A HREF="PPP-HOWTO-15.html">Pr&eacute;c&eacute;dent</A>
<P>
Table des mati&egrave;res de <A HREF="PPP-HOWTO.html#toc16">ce chapitre</A>,
 <A HREF="PPP-HOWTO.html#toc">Table des mati&egrave;res</A> g&eacute;n&eacute;rale</P>
<P>
<A HREF="PPP-HOWTO.html">D&eacute;but</A> du document,
 <A HREF="#0"> D&eacute;but de ce chapitre</A></P>
</BODY>
</HTML>