Escolar Documentos
Profissional Documentos
Cultura Documentos
Tecnologia de Redes
Tecnologia de Redes
Bernal (c)
Tecnologia de Redes
Protocolo ICMP
Internet Control Message Protocol
Volnys Borges Bernal
volnys@lsi.usp.br
http://www.lsi.usp.br/~volnys
Agenda
o
o
o
Protocolo ICMP
Programa Ping
Programa Traceroute
Objetivo
X Permitir o transporte de mensagens de controle e mensagens
de teste entre equipamentos da internet
Caractersticas
X As mensagens ICMP so transportadas dentro de um pacote IP
Camada de
Aplicao
Camada de
transporte
Camada
de redes
Camada
intra-rede
DNS
DNS HTTP
HTTP FTP
FTP Telnet
Telnet SMTP
SMTP POP
POP
RPC
RPC
UDP
UDP
SMB
SMB
NetBios
NetBios
TCP
TCP
IP
IP
ICMP
ICMP
ARP
RARP
ARP
RARP
Ethernet
Fast
Gigabit
PPP
Ethernet
Fast
Gigabit
PPP
Ethernet
Ethernet Ethernet
Ethernet
meio fsico
SLIP
SLIP
IGMP
IGMP
Frame
Frame
Relay
Relay
Pacote ICMP
X Transportado pelo Pacote IP
ICMP
IP
Cabealho IP
code
(8 bits)
Cabealho
ICMP
code
(8 bits)
Contedo
ICMP
Dados
Pacote ICMP
X Cabealho: fixo
X Carga: depende do tipo da mensagem ICMP
Cabealho
Carga
type
(8 bits)
code
(8 bits)
checksum do pacote
(16 bits)
contedo
Pacote ICMP
X Campos
Tipo:
u existem 15 tipos diferentes de mensagens
Cdigo:
u Alguns tipos de mensagens ICMP utilizam ainda um cdigo
para identificar uma condio mais especfica
Checksum:
u cdigo de verificao de consistncia
u engloba toda a mensagem
u utiliza o mesmo algoritmo do IP
Contedo
u depende do tipo e cdigo da mensagem
0
3
4
5
8
9
10
11
12
13
14
15
16
17
18
Network unreachable
Host unreachable
Protocol unreachable
Fragmentation need but dont fragment bit set
source route failed
destination network unknow
destination host unknow
destination network administratively prohibited
destination host administratively prohibited
network unreachable for TOS
host unreachable for TOS
communication administratively prohibited by filtering
host precedence violation
precedence cutoff effect
10
Mensagem
ICMP Time Stamp
11
12
0
checksum do pacote
(code)
originate timestamp
(32 bits)
receive timestamp
(32 bits)
transmit timestamp
(32 bits)
o
o
o
o
ICMP echo
13
14
ICMP echo
o
checksum do pacote
nmero de seencia
(16 bits)
Programa ping
# ping terra
PING terra (10.0.0.1): 56 data bytes
64 bytes from 10.0.0.1: icmp_seq=0 ttl=255 time=1,2 ms
64 bytes from 10.0.0.1: icmp_seq=1 ttl=255 time=1,8 ms
64 bytes from 10.0.0.1: icmp_seq=3 ttl=255 time=2.2 ms
64 bytes from 10.0.0.1: icmp_seq=4 ttl=255 time=1,0 ms
64 bytes from 10.0.0.1: icmp_seq=5 ttl=255 time=1,0 ms
^C
15
Programa ping
o
ping terra
16
Programa traceroute
# traceroute www.sun.com
17
18
Referncia principal
X TCP/IP Illustrated Volume 1: The Protocols.
STEVENS, W. RICHARD.
Addison-Wesley. 1994.
Refernicas complementares
X Redes de Computadores: das LANs MANs e WANs s Redes
ATM.
SOARES, LUIZ F. G.
Editora Campus. 1995
X Computer Networks.
TANENBAUM, ANDREW S.
3rd edition. Prentice Hall 1996.
19