컴퓨터과학

[컴퓨터 네트워크] ICMP

마잡개 2024. 3. 12. 03:23

Network Layer

ICMP

 

Internet Control Message

ICMP is used for communicating with hosts and router.

 

There are two types of usage.

  • error report
  • query message for dianosing network problems

 

Error report

 

  • discard packet
    • destination is not in routing table
    • time exceeded; TTL is equal 1
    • source quench
    • parameter issue
  • redirection

 

Content

 

  • 8bytes is transport layer header
  • IP header following ICMP header is datagram received by router

 

prior IP packet

  • IP header + data(8bytes + rest)

add ICMP header

  • ICMP header + IP header + data(8bytes + rest)

and then, add IP header

  • IP header + ICMP header + IP header + data(8bytes + rest)

 

Query message

 

  • echo request and reply; Ex> ping command
  • etc..

 

ICMP type and code table

There are two application, ping and traceroute using ICMP packet.