Outils pour utilisateurs

Outils du site


Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
999-archives:140-pppoe:050_sniffs [le 20/06/2025 à 14:47] – supprimée - modification externe (Date inconnue) 127.0.0.1999-archives:140-pppoe:050_sniffs [le 20/06/2025 à 14:47] (Version actuelle) – ↷ Page déplacée de 140pppoe:050_sniffs à 999-archives:140-pppoe:050_sniffs prof
Ligne 1: Ligne 1:
 +====== Reniflons un peu... ======
  
 +
 +===== Un échange ICMP vu de près =====
 +
 +La manip qui suit est destinée à éclaircir un peu les idées sur l'empilement des protocoles.
 +
 +Elle est effectuée sur une machine Linux connectée en PPPoE sur un modem SpeedTouch Home (Accès ADSL).
 +
 +  * L'interface Ethernet connectée au Modem est eth1. le client rp-pppoe assure la connexion ppp au dessus. Ceci fait apparaître une interface supplémentaire: ppp0\\  Autrement dit, ppp0 est une interface PPP qui fonctionne au dessus de eth1\\  Voici un extrait de ce que donne « ifconfig » :
 +
 +  [root@gw root]# ifconfig
 +  ...
 +  eth1 Lien encap:Ethernet HWaddr 00:60:8C:50:F0:DF
 +  inet adr:10.0.0.10 Bcast:10.0.0.255 Masque:255.255.255.0
 +  UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
 +  ...
 +  ppp0 Lien encap:Protocole Point-à-Point
 +  inet adr:217.128.147.4 P-t-P:217.128.147.1 Masque:255.255.255.255
 +  UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
 +  ...
 +
 +Notez que si eth1 dispose de l'adresse IP 10.0.0.10, c'est uniquement pour pouvoir accéder au miniserveur http situé dans le SpeedTouch, qui permet de visualiser l'état du modem. Ce n'est absolument pas nécessaire, répétons-le, au bon fonctionnement de PPoE.
 +
 +  * Deux « sniffers », l'un sur eth1 (couche Ethernet), l'autre sur ppp0 (couche PPPoE), vont observer simultanément un « ping » sur l'habituel ftp.oleane.net.
 +
 +Voici ce que l'on obtient:
 +
 +^  Sur Ethernet (Eth1)  ^  Sur PPPoE (ppp0)  |
 +|<html><pre class="code">Frame 4 (106 on wire, 106 captured)
 +...
 +<span class="hly">Ethernet II
 +   Destination: 00:02:3b:00:4f:7d
 +                (Redback_00:4f:7d)
 +   Source: 00:60:8c:50:f0:df
 +           (3Com_50:f0:df)
 +   Type: PPPoE Session (0x8864)
 +PPP-over-Ethernet Session
 +   Version: 1
 +   Type: 1
 +   Code: Session Data
 +   Session ID: 218c
 +   Payload Length: 86
 +Point-to-Point Protocol
 +   Protocol: IP (0x0021)</span>
 +Internet Protocol, Src Addr: 217.128.147.4
 +                   Dst Addr: 195.25.12.28
 +   Version: 4
 +   Header length: 20 bytes
 +   Differentiated Services Field: 0x00
 +                (DSCP 0x00: Default; ECN: 0)
 +   0000 00..=Differentiated Services
 +             Codepoint:Default (0)
 +   .... ..0.=ECN-Capable Transport (ECT): 0
 +   .... ...0=ECN-CE: 0
 +   Total Length: 84
 +   Identification: 0x0000
 +   Flags: 0x04
 +       .1.. = Don't fragment: Set
 +       ..0. = More fragments: Not set
 +   Fragment offset: 0
 +   Time to live: 64
 +   Protocol: ICMP (0x01)
 +   Header checksum: 0xfeee (correct)
 +   Source: 217.128.147.4
 +   Destination: 195.25.12.28
 +Internet Control Message Protocol
 +   Type: 8 (Echo (ping) request)
 +   Code: 0
 +   Checksum: 0xf320 (correct)
 +   Identifier: 0x0e10
 +   Sequence number: 00:00
 +   Data (56 bytes)
 +...</pre></html>|<html><pre class="code">
 +Frame 1 (84 on wire, 84 captured)
 +...
 +<span class="hly">Raw packet data
 +   No link information available
 +<i>**
 +**
 +** Au niveau ppp, ce qu'il se passe dessous
 +** interpréter, le renifleur sait pas faire,
 +** il se croit sur un « vrai » lien PPP
 +** parce qu'il écoute sur une interface PPP.
 +** Mais en regardant au niveau Ethernet
 +**
 +**
 +** Nous trouvons les informations relatives 
 +** au protocole PPPoE
 +**</i></span>
 +Internet Protocol, Src Addr: 217.128.147.4
 +                   Dst Addr: 195.25.12.28
 +   Version: 4
 +   Header length: 20 bytes
 +   Differentiated Services Field: 0x00
 +                 (DSCP 0x00: Default; ECN:0)
 +   0000 00..=Differentiated Services
 +             Codepoint: Default (0)
 +   .... ..0.=ECN-Capable Transport (ECT): 0
 +   .... ...0=ECN-CE: 0
 +   Total Length: 84
 +   Identification: 0x0000
 +   Flags: 0x04
 +       .1.. = Don't fragment: Set
 +       ..0. = More fragments: Not set
 +   Fragment offset: 0
 +   Time to live: 64
 +   Protocol: ICMP (0x01)
 +   Header checksum: 0xfeee (correct)
 +   Source: 217.128.147.4 (217.128.147.4)
 +   Destination: 195.25.12.28 (195.25.12.28)
 +Internet Control Message Protocol
 +   Type: 8 (Echo (ping) request)
 +   Code: 0
 +   Checksum: 0xf320 (correct)
 +   Identifier: 0x0e10
 +   Sequence number: 00:00
 +   Data (56 bytes)
 +...</pre></html>|
 +|<html><pre class="code">
 +Frame 5 (106 on wire, 106 captured)
 +...
 +<span class="hly">Ethernet II
 +   Destination: 00:60:8c:50:f0:df
 +                (3Com_50:f0:df)
 +   Source: 00:02:3b:00:4f:7d
 +           (Redback_00:4f:7d)
 +   Type: PPPoE Session (0x8864)
 +PPP-over-Ethernet Session
 +   Version: 1
 +   Type: 1
 +   Code: Session Data
 +   Session ID: 218c
 +   Payload Length: 86
 +Point-to-Point Protocol
 +   Protocol: IP (0x0021)</span>
 +Internet Protocol, Src Addr: 195.25.12.28
 +                 Dst Addr: 217.128.147.4
 +   Version: 4
 +   Header length: 20 bytes
 +   Differentiated Services Field: 0x00
 +               (DSCP 0x00: Default; ECN: 0)
 +   0000 00..=Differentiated Services
 +             Codepoint:Default (0)
 +   .... ..0.=ECN-Capable Transport (ECT): 0
 +   .... ...0=ECN-CE: 0
 +   Total Length: 84
 +   Identification: 0xf960
 +   Flags: 0x00
 +       .0.. = Don't fragment: Not set
 +       ..0. = More fragments: Not set
 +   Fragment offset: 0
 +   Time to live: 248
 +   Protocol: ICMP (0x01)
 +   Header checksum: 0x8d8d (correct)
 +   Source: 195.25.12.28 (195.25.12.28)
 +   Destination: 217.128.147.4 (217.128.147.4)
 +Internet Control Message Protocol
 +   Type: 0 (Echo (ping) reply)
 +   Code: 0        Checksum: 0xfb20 (correct)
 +   Identifier: 0x0e10
 +   Sequence number: 00:00
 +   Data (56 bytes)
 +...
 +</pre></html>|<html><pre class="code">
 +Frame 2 (84 on wire, 84 captured)
 +...
 +<span class="hly">Raw packet data
 +   No link information available
 +<i>**
 +**
 +**
 +**
 +**
 +** Et pour la réponse
 +** c'est la même chose
 +**
 +**
 +**
 +**
 +**</i></span>
 +Internet Protocol, Src Addr: 195.25.12.28
 +                   Dst Addr: 217.128.147.4
 +   Version: 4
 +   Header length: 20 bytes
 +   Differentiated Services Field: 0x00
 +               (DSCP 0x00: Default; ECN: 0)
 +   0000 00..=Differentiated Services
 +             Codepoint:Default (0)
 +   .... ..0.=ECN-Capable Transport (ECT): 0
 +   .... ...0=ECN-CE: 0
 +   Total Length: 84
 +   Identification: 0xf960
 +   Flags: 0x00
 +       .0.. = Don't fragment: Not set
 +       ..0. = More fragments: Not set
 +   Fragment offset: 0
 +   Time to live: 248
 +   Protocol: ICMP (0x01)
 +   Header checksum: 0x8d8d (correct)
 +   Source: 195.25.12.28
 +   Destination: 217.128.147.4
 +Internet Control Message Protocol
 +   Type: 0 (Echo (ping) reply)
 +   Code: 0
 +   Checksum: 0xfb20 (correct)
 +   Identifier: 0x0e10
 +   Sequence number: 00:00
 +   Data (56 bytes)
 +...</pre></html> |
 +
 +Comme il est facile de le constater, on a bien de l'IP qui est transporté au dessus de PPP, lui même au dessus d'Ethernet. Si ce n'est la couche supplémentaire introduite par ce protocole, tout reste identique à ce que l'on observerait sur un réseau Ethernet « classique ».
Reniflons un peu...: Dernière modification le: 01/01/1970 à 00:00 par