Et3003 sem2-1314-8 network layers v (icmpv4)

31
Network Layer Part V Computer Networks Tutun Juhana Telecommunication Engineering School of Electrical Engineering & Informatics Institut Teknologi Bandung 8

description

ICMPv4

Transcript of Et3003 sem2-1314-8 network layers v (icmpv4)

Page 1: Et3003 sem2-1314-8 network layers v (icmpv4)

Network Layer Part V

Computer Networks

Tutun JuhanaTelecommunication EngineeringSchool of Electrical Engineering & InformaticsInstitut Teknologi Bandung

8

Page 2: Et3003 sem2-1314-8 network layers v (icmpv4)

INTERNET CONTROL MESSAGE PROTOCOL VERSION 4 (ICMPV4)

Page 3: Et3003 sem2-1314-8 network layers v (icmpv4)

3

The value of the protocol field in the IP datagram is 1 to indicate that the IP data is an ICMP message

Page 4: Et3003 sem2-1314-8 network layers v (icmpv4)

4

Messages

includes the IP header ofthe original datagram + the first 8 bytes of data in that datagram

Page 5: Et3003 sem2-1314-8 network layers v (icmpv4)

5

Provides port numbers (UDP and TCP) and sequence number (TCP).

Page 6: Et3003 sem2-1314-8 network layers v (icmpv4)

6

ERROR REPORTING MESSAGES

Page 7: Et3003 sem2-1314-8 network layers v (icmpv4)

7

Error Reporting Messages

• No ICMP error message will be generated in response to a datagram carrying an ICMP error message.

• No ICMP error message will be generated for a fragmented datagram that is not the first fragment.

• No ICMP error message will be generated for a datagram having a multicast address.

• No ICMP error message will be generated for a datagram having a special address such as 127.0.0.0 or 0.0.0.0

Page 8: Et3003 sem2-1314-8 network layers v (icmpv4)

8

Destination Unreachable

Note: For codes, please refer to Forouzan’s

Page 9: Et3003 sem2-1314-8 network layers v (icmpv4)

9

Source Quench

Page 10: Et3003 sem2-1314-8 network layers v (icmpv4)

10

Time Exceeded

Page 11: Et3003 sem2-1314-8 network layers v (icmpv4)

11

Page 12: Et3003 sem2-1314-8 network layers v (icmpv4)

12

Parameter ProblemIf a router or the destination host discovers an ambiguous or missing value in any field of the datagram, it discards the datagram and sends a parameter-problem message back to the source

Page 13: Et3003 sem2-1314-8 network layers v (icmpv4)

13

Redirection

Page 14: Et3003 sem2-1314-8 network layers v (icmpv4)

14

QUERY MESSAGES

Page 15: Et3003 sem2-1314-8 network layers v (icmpv4)

15

Query Messages

• ICMP can also diagnose some network problems accomplished through the query messages

Page 16: Et3003 sem2-1314-8 network layers v (icmpv4)

16

Echo Request and Reply• The echo-request and echo-reply messages are

designed for diagnostic purposes• Network managers and users utilize this pair of

messages to identify network problems.• The combination of echo-request and echo-reply

messages determines whether two systems (hosts or routers) can communicate with each other.

Page 17: Et3003 sem2-1314-8 network layers v (icmpv4)

17

Page 18: Et3003 sem2-1314-8 network layers v (icmpv4)

18

Timestamp Request and Reply

• Two machines (hosts or routers) can use the timestamp-request and timestamp-reply messages to: –determine the round-trip time needed for

an IP datagram to travel between them–synchronize the clocks in two machines

Page 19: Et3003 sem2-1314-8 network layers v (icmpv4)

19

Page 20: Et3003 sem2-1314-8 network layers v (icmpv4)

20

Page 21: Et3003 sem2-1314-8 network layers v (icmpv4)

21

Page 22: Et3003 sem2-1314-8 network layers v (icmpv4)

22

Page 23: Et3003 sem2-1314-8 network layers v (icmpv4)

23

CHECKSUM

Page 24: Et3003 sem2-1314-8 network layers v (icmpv4)

24

• In ICMP the checksum is calculated over the entire message (header and data)

Page 25: Et3003 sem2-1314-8 network layers v (icmpv4)

25

Page 26: Et3003 sem2-1314-8 network layers v (icmpv4)

26

Page 27: Et3003 sem2-1314-8 network layers v (icmpv4)

27

DEBUGGING TOOLS

Page 28: Et3003 sem2-1314-8 network layers v (icmpv4)

28

Ping• We can use the ping program to find if a host is alive and

responding• The source host sends ICMP echo request messages

(type: 8, code: 0); the destination, if alive, responds with ICMP echo reply messages

• The ping program sets the identifier field in the echo request and reply message and starts the sequence number from 0; this number is incremented by one each time a new message is sent

• Note that ping can calculate the round-trip time. It inserts the sending time in the data section of the message. When the packet arrives it subtracts the arrival time from the departure time to get the round-trip time (RTT).

Page 29: Et3003 sem2-1314-8 network layers v (icmpv4)

29

Page 30: Et3003 sem2-1314-8 network layers v (icmpv4)

30

Traceroute

• The traceroute program in UNIX or tracert in Windows can be used to trace the route of a packet from the source to the destination

Page 31: Et3003 sem2-1314-8 network layers v (icmpv4)

31