Manipulation de protocoles de couche II

Manipulation de protocoles de couche 2

Etude des échanges sur la jonction

Pour communiquer avec le modem (qui jouera le rôle d’ETCD dans le circuit de données), le jeu de commandes Hayes (cf annexe 1) permet d’interroger sur sa configuration et éventuellement de modifier cette configuration (qui sera bien entendu limitée par les caractéristiques matérielle du modem). Dans ce cadre, l’ordinateur joue le rôle de terminal pour offrir une interface utilisateur à la communication avec le modem. L’utilitaire KPPP émule un terminal (bouton Configuration, onglet Modem, bouton Terminal) pour permettre d’échanger des commandes Hayes avec le modem.

Manipulations

M1. Activer la fonction Echo pour que le caractère envoyé par le clavier du terminal apparaisse sur l’écran du terminal (émulé par la fenêtre ouverte par KPPP). Aidez-vous de la table de commandes Hayes fournie en annexe. Consigner le dialogue dans votre rapport. Dessiner le train de bit qui est envoyé sur la jonction au cours de cette échange.
M2. Essayer d’autres commandes Hayes, observer les réponses obtenues et expliquez.
M3. Quel est la différence entre le contrôle de flux XON/XOFF et CTS/RTS (voir annexe 2). Pourquoi la configuration propose par défaut un mode XON/XOFF ?
M4. Etablissez une liaison PPP avec un de vos comptes disponibles chez un FAI accessible par le réseau RTC (vous devez impérativement venir avec les paramètres de connexion fourni par le FAI)
M5. Observez la trace obtenue en reniflant la connexion. Aidez-vous de l’annexe 3 (Le protocole PPP) pour relever la trame transportant le mode d’authentification ainsi que la trame fournissant l’adresse IP de l’ETTD.

Rappel sur le contrôle de flux

As DTE to DCE speed is a few times faster than DCE to DCE speed, the PC can send data to your modem at a rate of 115,200 BPS. In this connection sooner or later the data may be lost because of the buffers overflow, so the control of data flow should be realized. Data flow control has two main variants: Hardware or Software.

Software controls the data flow sometimes described as Xon/Xoff; it is connected with the fact that two characters Xon and Xoff are used. Xon is usually a 17 character, and Xoff is a 19 character . The modem will only have a small buffer as when the computer fills it, the modem sends a Xoff character to inform the computer about data transfer termination. As soon as the modem empties the most of the memory for data, it will send the Xon character to the computer and the latter starts the data transfer. This type of data flow control has the following advantages: it doesn’t need any other wires as the characters are sent via TD/RD lines. But if the connection is slow, every character needs 10 bits, which can reduce the connection speed.

Hardware flow control is also known as RTS/CTS flow control. To realize this control two additional wires in the sequential cable are used. This results in increasing the data transmisssion rate, as no time is spent for Xon-Xoff characters transmission. The transmission mechanism is reduced to activation of the Request to Send line when the computer is ready to send data .If the modem has a free bucket for this data, it activates the Clear to Send line in respponse and the computer starts sending data. If the modem lacks free memory, it won’t activate the Clear to Send line.

Problems running pppd

 pppd says that version 0.0.0 is out of date

There are several reasons which will generate this message.

  • You are attempting to run the 2.1 version of pppd with the 2.2 kernel drivers.

This may occur if you are using the 2.x series kernels and did not see the notice in the Changes file that you need the 2.2.0 version of pppd.

It may also occur if you are using a script which has a fixed location for the pppd process. The 2.1 version of pppd was stored in the default location of /usr/lib/ppp/pppd. The 2.2 version moved to the more \standard\ location of /usr/sbin/pppd. If you have a script which is using the /usr/lib/pppd then it is probable that you are actually using the wrong version of pppd.

This may also require that you re-compile front end programs such as dip or diald. These programs have the location of pppd embedded within them.

  • You are attempting to run the pppd process from an account other than the root user and the process is not secured setuid to root.

What happens is that the pppd process attempts to issue a request to find the version of the driver in the kernel. This request is only acceptable if the calling process is the root account. Since you are not running as the root user and have not secured the program to be setuid to root, then the request fails. Since the request to fetch the driver version fails, the default value is 0.0.0. This is the wrong version and the message is generated.Additional information is in the next question.

 pppd says that that the kernel is not configured for PPP. I know that I enabled the option and built the kernel.

Make sure that you did rebuild the kernel and that you are running it.

Make sure that you don’t have an old copy of pppd on your disk and you are running that version. The previous version of pppd was stored on /usr/lib/ppp. Many people objected to this location. The 2.2 code has moved the pppd, chat, and pppstats to the /usr/sbin directory. If your scripts still reference /usr/lib/ppp then you will probably run the old code.

 pppd wont run unless you are root

The pppd process needs to make changes to the networking system and this can only be done if you are the root user. If you wish to run pppd from other than the root user then the pppd program needs to be secured \suid to root\.chown root /usr/sbin/pppdchmod 4755 /usr/sbin/pppdIf you wish to control the pppd access to a select group of people, then make the pppd process owned by the group and do not permit all others to run the program.

Cours gratuitTélécharger le cours complet

Télécharger aussi :

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *