<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 ê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ère fenêtre (ou console virtuelle), tapez la commande</P> <P> <BLOCKQUOTE><CODE> <PRE> ppp-on &amp; </PRE> </CODE></BLOCKQUOTE> </P> <P></P> <P>(ou le nom que vous avez donné à la nouvelle version de votre /usr/sbin/ppp- on). Si vous ne mettez pas le script en tâche de fond en spécifiant & en fin de commande, vous ne récupé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être ou vous affichez votre journal système.</P> <P></P> <P>L'affichage devrait ressembler à ce qui suit (si vous avez spécifié l'option -vi a <CODE>chat</CODE> et -d à <CODE>pppd</CODE> )....c'est le déroulement du script <CODE>chat</CODE> et des réponses envoyées dans le fichier journal système suivi des informations de dé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 <--> /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ême chose si vous utilisez des adresses IP DYNAMIQUES.) Ainsi, le server nécessite une commande spécifique pour démarrer ppp à la fin.</P> <P></P> <P>Ca semble OK - alors testez comme avant avec des ping des adresses IP et des noms des hôtes.</P> <P></P> <P>Lancer votre navigateur web ou n'importe quoi d'autre et allez surfer - vous êtes connecté !</P> <P></P> <HR> <P> Chapitre <A HREF="PPP-HOWTO-17.html">suivant</A>, Chapitre <A HREF="PPP-HOWTO-15.html">Précédent</A> <P> Table des matières de <A HREF="PPP-HOWTO.html#toc16">ce chapitre</A>, <A HREF="PPP-HOWTO.html#toc">Table des matières</A> générale</P> <P> <A HREF="PPP-HOWTO.html">Début</A> du document, <A HREF="#0"> Début de ce chapitre</A></P> </BODY> </HTML>