Você está na página 1de 3

Protocole ICMP

Le protocole de niveau 4, Internet Control Message Protocol sert à analyser


et à diagnostiquer
les erreurs de datagrammes sur IP. (voir RFC 792)

1 ICMP and the TCPVIP Reference Model

Telnet FTP DNS TSTP

TCP UDP ICMP

IP

2 Quand utiliser ICMP ?

· Pour déterminer pourquoi un Datagramme ne peut atteindre sa


destination
· Pour savoir pourquoi une destination ne prends pas tous les
Datagrammes envoyés.
· Pour recueillir des informations sur la validité d'une route.

3 ICMP Base Message Format

Type (0-7) Code (8-15) Checksum (16-13)

. Type: Defines Message Type


· Code: fourni des infos supplémentaires.
· Checksum: le CRC sur 16-bit.

11 Core ICMP Messages

· Echo Reply (0)


· Destination Unreachable (3) ; Destination non-atteignable
· Source Quench (4) ; Tarir la Source
· Redirect (5) ; Redirection
· Echo Request (8)
· Time Exceeded (11) ;Temps dépassé
· Parameter Problem (12) ; Paramètre IP inintelligible
· Timestamp Request (13) ; Etiquetage temporel
· Timestamp Reply (14) ; Etiquetage temporel
· Information Request (15) ; Demande d'info
· Information Reply (16) ; réponse d'info
· (17);Demande masque d'adresse
· (18) ;Réponse masque d'adresse

Destination Unreachable (3)


· Gateway-to-host
· Network unreachable
· Host unreachable

"Don't fragment" (DF) flag set in IP header, but fragmentation is needed

Source route failed

Host-to-host

protocol unavailable

port unavailable

Code indicates "error type"

Time Exceeded (11) and Parameter Problem (12)

Time Exceeded

Code indicates:

Gateway-to-host: time-to-live exceeded in packet transit

Host-to-host: fragment reassembly time exceeded (possibly due to missing


fragments)

· Parameter Problem

Gateway-to-host or host-to-host

Indicates problem with field in IP header of original message

Only sent if original message had to bc discarded

Echo Request (8) and Echo Reply (0)

Host-to-host or host-to-gateway

Includes identifier, sequence number, and small amount of data

Data should bc "echoed" back


Basis of ping utility

Timestamp Request (13) and Timestamp Reply (14)

Host-to-host or gateway-to-host

Source includes "origination" timestamp

Recipient replies with "receipt" and "sent" timestamp Described as


early Internet time service, by David Mills, architect of Network Time
Protocol (NTP)

4 ICMP Utilities: ping (note RFC 2151)

ping "Packet INtemetwork Groper"

Use ICMP echo request and reply messages

Determine if a host is active and the round-


trip delay of a packet

Available on many platforms

Exemple de ping:

ping ds.internic.net

Pinging ds.internic.net [204.179.186.65] with 32 bytes of


data:
Reply from 204.179.186.65: bytes=32 time=100ms TTL=243
Reply from 204.179.186.65: bytes=32 time=291ms TTL=243
Reply from 204.179.186.65: bytes=32 time=70ms TTL=243

ICMP Utilities: traceroute (note RFC 2151)

traceroute

Use UDP packets with incrementing time-to-live (TTL) field


Reseive multiple ICMP Time Exceeded messages
messages describe route from source to destination

Você também pode gostar