Ch.9 Internet Protocol: Error And Control Messages (ICMP)

Similar documents
Chapter 10 User Datagram Protocol (UDP)

Ch.6 Mapping Internet Addresses to Physical Addresses (ARP)

Ch.7 Internet Protocol: Connectionless Datagram Delivery (IPv4, IPv6)

Ch. 22 Bootstrap And Autoconfiguration (DHCP, NDP or IPv6-ND)

CSF645 Mobile Computing 行動計算. IPv6. (Internetworking With TCP/IP vol Part 31) 吳俊興國立高雄大學資訊工程學系

Ch.5 Internet Addressing 吳俊興 國立高雄大學資訊工程學系

Internet Control Message Protocol (ICMP)

Internet Control Message Protocol (ICMP)

Part I: INTRODUCTION 吳俊興 國立高雄大學資訊工程學系. Fall 2006

Module 7 Internet And Internet Protocol Suite

Internet Protocol. Outline Introduction to Internet Protocol Header and address formats ICMP Tools CS 640 1

Each ICMP message contains three fields that define its purpose and provide a checksum. They are TYPE, CODE, and CHECKSUM fields.

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

Problems of IP. Unreliable connectionless service. Cannot acquire status information from routers and other hosts

MESSAGES error-reporting messages and query messages. problems processes IP packet specific information

Network Layer (4): ICMP

Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme. Auxiliary Protocols

Internet Control Message Protocol

CPSC 826 Internetworking. The Network Layer: Routing & Addressing Outline. The Network Layer

TSIN02 - Internetworking

Auxiliary Protocols. Internet Layer. Address Resolution Protocol. Delivery of IP Packets

Ref: A. Leon Garcia and I. Widjaja, Communication Networks, 2 nd Ed. McGraw Hill, 2006 Latest update of this lecture was on

CS 457 Lecture 11 More IP Networking. Fall 2011

Internet Protocols (chapter 18)

ICS 451: Today's plan

CS 356: Computer Network Architectures. Lecture 10: IP Fragmentation, ARP, and ICMP. Xiaowei Yang

Last time. Network layer. Introduction. Virtual circuit vs. datagram details. IP: the Internet Protocol. forwarding vs. routing

4. Basic IP Support Protocols

ICMP (Internet Control Message Protocol)

To make a difference between logical address (IP address), which is used at the network layer, and physical address (MAC address),which is used at

Lecture 3. The Network Layer (cont d) Network Layer 1-1

Introduction. IP Datagrams. Internet Service Paradigm. Routers and Routing Tables. Datagram Forwarding. Example Internet and Conceptual Routing Table

TSIN02 - Internetworking

Position of IP and other network-layer protocols in TCP/IP protocol suite

Network Layer: Internet Protocol

IP : Internet Protocol

Recap. Recap. Internetworking. First mile problem. Internet. End Users. Last mile problem. Direct link networks Packet switching.

Introduction to Internetworking

CS475 Networks Lecture 8 Chapter 3 Internetworking. Ethernet or Wi-Fi).

Veryx ATTEST TM. Sample Test cases Overview. Conformance Test Suite. Internet Protocol version 4 (IPv4) Part Number: T / TCLS IPv /1.

Network Layer. The Network Layer. Contents Connection-Oriented and Connectionless Service. Recall:

Network Layer. Recall: The network layer is responsible for the routing of packets The network layer is responsible for congestion control

Different Layers Lecture 20

(ICMP), RFC

ICS 351: Networking Protocols

INTERNET SYSTEM. Internet Protocol. Kent State University Dept. of Computer Science. CS 4/55231 Internet Engineering. Large Scale Networking

Lecture 8. Basic Internetworking (IP) Outline. Basic Internetworking (IP) Basic Internetworking (IP) Service Model

McGraw-Hill The McGraw-Hill Companies, Inc., 2000

Lecture 8. Reminder: Homework 3, Programming Project 2 due on Thursday. Questions? Tuesday, September 20 CS 475 Networks - Lecture 8 1

Using ICMP to Troubleshoot TCP/IP Networks

CHAPTER-2 IP CONCEPTS

Lecture 8. Network Layer (cont d) Network Layer 1-1

CCNA Exploration Network Fundamentals. Chapter 06 Addressing the Network IPv4

Network layer: Overview. Network layer functions IP Routing and forwarding NAT ARP IPv6 Routing

Internetworking/Internetteknik, Examination 2G1305 Date: August 18 th 2004 at 9:00 13:00 SOLUTIONS

ICMP (Internet Control Message Protocol)

Network layer: Overview. Network Layer Functions

Outline. SC/CSE 3213 Winter Sebastian Magierowski York University. ICMP ARP DHCP NAT (not a control protocol) L9: Control Protocols

CS 457 Networking and the Internet. Problems. Mechanisms 9/21/16. Fall 2016 Indrajit Ray

Internet Control Message Protocol (ICMP), RFC 792. Prof. Lin Weiguo Copyleft 2009~2017, School of Computing, CUC

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

TCP /IP Fundamentals Mr. Cantu

Topics for This Week

The Internet. The Internet is an interconnected collection of netw orks.

The Internet Protocol. IP Addresses Address Resolution Protocol: IP datagram format and forwarding: IP fragmentation and reassembly

Configuring IP Services

Master Course Computer Networks IN2097

Lecture 11: Fragmentation & Addressing. CSE 123: Computer Networks Stefan Savage

ET4254 Communications and Networking 1

Guide to Networking Essentials, 6 th Edition. Chapter 5: Network Protocols

Department of Computer Science and Engineering. COSC 4213: Computer Networks II (Fall 2005) Instructor: N. Vlajic Date: November 3, 2005

IP Protocols. ALTTC/Oct

Course Contents. The TCP/IP protocol Stack

Lecture 6. TCP/IP Network Layer (4)

Internetwork Protocols

SEN366 (SEN374) (Introduction to) Computer Networks

OSI Network Layer. Network Fundamentals Chapter 5. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1

The Internet Protocol (IP)

Prof. Shervin Shirmohammadi SITE, University of Ottawa. Internet Protocol (IP) Lecture 2: Prof. Shervin Shirmohammadi CEG

UNIT III. 3.1 Circuit switching vs. packet switching / Packet switched networks. Figure 3.1.1: Switching Techniques

CIS-331 Final Exam Spring 2016 Total of 120 Points. Version 1

Chapter 2 System Models

Chapter 5 OSI Network Layer

Computer Networks ICS 651. IP Routing RIP OSPF BGP MPLS Internet Control Message Protocol IP Path MTU Discovery

Operation Manual IP Addressing and IP Performance H3C S5500-SI Series Ethernet Switches. Table of Contents

CSEP 561 Internetworking. David Wetherall

Troubleshooting Tools

Chapter 1 Computer Networks and the Internet

Introduction to routing in the Internet

Router Architecture Overview

Internetworking Part 2

TCP/IP Networking. Part 4: Network and Transport Layer Protocols


On Distributed Communications, Rand Report RM-3420-PR, Paul Baran, August 1964

IPv6 Protocols and Networks Hadassah College Spring 2018 Wireless Dr. Martin Land

Information Network Systems The network layer. Stephan Sigg

Single Network: applications, client and server hosts, switches, access links, trunk links, frames, path. Review of TCP/IP Internetworking

internet technologies and standards

ICMPv6. Internet Control Message Protocol version 6. Mario Baldi. Politecnico di Torino. (Technical University of Turin)

Introduction to routing in the Internet

Transcription:

CSC521 Communication Protocols 網路通訊協定 Ch.9 Internet Protocol: Error And Control Messages (ICMP) 吳俊興國立高雄大學資訊工程學系 Internetworking With TCP/IP, Vol I: Sixth Edition, Douglas E. Comer

Outline 1 Introduction 2 The Internet Control Message Protocol 3 Error Reporting Vs. Error Correction 4 ICMP Message Delivery 5 Conceptual Layering 6 ICMP Message Format 7 Example ICMP Message Types Used With IPv4 And IPv6 8 Testing Destination Reachability And Status (Ping) 9 Echo Request And Reply Message Format 10 Checksum Computation And The IPv6 Pseudo-Header 11 Reports Of Unreachable Destinations 12 ICMP Error Reports Regarding Fragmentation 13 Route Change Requests From Routers 14 Detecting Circular Or Excessively Long Routes 15 Reporting Other Problems 16 Older ICMP Messages Used At Startup 17 Summary 2

Error Detection and Reporting Mechanisms Errors in Packet Switching Networks Temporary or permanent disconnection Hardware failures Router overrun Routing loops Need mechanisms to detect and correct Error handling IP header checksum to detect transmission errors Error reporting mechanism to distinguish between events such as lost datagrams and incorrect addresses Higher level protocols (i.e., TCP) must handle all other problems 3

Error Reporting Mechanism Internet Control Message Protocol (ICMP) Required and integral part of IP Used primarily by routers to report delivery or routing problems to original source Also includes informational (non-error) functionality Uses IP to carry control messages No error messages sent about error messages Purpose The Internet Control Message Protocol allows a router to send error or control messages to the source of a datagram, typically a host. ICMP provides communication between the Internet Protocol software on one machine and the Internet Protocol software on another. 4

Important Restrictions of ICMP ICMP only reports problems to original source Provide interaction between a router and the source of trouble Error Reporting vs. Error Correction: ICMP does not Maintain state information (each packet is handled independently) Thus: when a datagram causes an error, ICMP can only report the error condition back to the original source of the datagram; the source must relate the error to an individual application program or take other action to correct the problem 5

ICMP Encapsulation ICMP message travels in IP datagram ICMP message has header and data area Complete ICMP message is treated as data in IP datagram Complete IP datagram is treated as data in physical network frame 6

Two sets of ICMP messages a set for IPv4 a larger set for IPv6 In both versions of IP ICMP Message Format Each ICMP message has its own format All ICMP messages begin with the same three fields 7

Example ICMP Message Types Used With IPv4 8

Example ICMP Message Types Used With IPv6 9

ICMP Message Format Multiple message types Each message has its own format Messages Begin with 1-octet TYPE field that identifies which of the basic ICMP message types follows Some messages have a 1-octet CODE field that further classifies the message Example Encapsulation In Ethernet ICMP header follows IP header, and contains eight bytes ICMP type field specifies echo request message (08) TYPE specifies destination unreachable CODE specifies whether host or network was unreachable ICMP sequence number is zero 10

Example ICMP Message Example: ICMP Echo Request Sent by ping program to test destination reachability and status Request: Type=8 Reply: Type=0 11

Checksum Computation And The IPv6 Pseudo-Header Pseudo-header and the use of dashed lines is merely used for the checksum computation and is never placed in a packet 12

ICMP Echo Request Example 192.168.0.31 74.125.23.94 13

ICMP Echo Reply Example 192.168.0.31 74.125.23.94 14

Example ICMP Message Example: Destination Unreachable Used by a router to report that datagram could not be delivered Code specifies details 15

A router Reports Of Unreachable Destinations Drops (i.e., discards) the datagram whenever an error occurs in a datagram sends an ICMP destination unreachable message back to the source 16

ICMP Error Reports Regarding Fragmentation Both IPv4 and IPv6 allow a router to report an error when a datagram is too large for a network over which it must travel and cannot be fragmented Type=3: Destination Unreachable Code=4: Fragmentation Needed and DF Set 17

Example: Time Exceeded Example ICMP Message At least one fragment failed to arrive, or TTL field in IP header reached zero Code=0: Time-to-live count exceeded Code=1: Fragment reassembly time exceeded 18

ICMP Trick Include datagram that caused problem in the error message Efficient (sender must determine how to correct problem) Eliminates need to construct detailed message Problem: entire datagram may be too large Solution: send IP header plus 64 bits of data area (sufficient in most cases) 19

Route Change Requests From Routers Host s Forwarding table A host initializes its forwarding table at system startup System administrators seldom change the table during normal operation The host relies on routers to update its forwarding table as needed Router s Forwarding table Routers exchange routing information periodically A router only sends a redirect message if the host sends a datagram along a non-preferred route 20

Route Change Requests From Routers 21

Example: Redirect Example ICMP Message Used by a router to report incorrect route Suggesting the source host to redirect the attached IP datagram Code Meaning 0 Redirect datagrams for the Net (now obsolete) 1 Redirect datagrams for the Host 2 Redirect datagrams for the Type of Service and Net 3 Redirect datagrams for the Type of Service and Host 22

DHCP Older ICMP Messages Used At Startup Originally defined in a set of messages that a host used at startup to determine its IP address, the address of a router, and the address mask used on the network Router Discovery message At startup, an IPv6 host multicasts an ICMPv6 Router Discovery message to learn about routers on the local network Two conceptual differences between router discovery and DHCP With router discovery, there is never a third-party error; with DHCP, such errors are possible ICMP router discovery uses a soft state technique with timers to prevent hosts from retaining a forwarding table entry after a router crashes 23

ICMP Required part of IP Used to report errors to original source Reporting only: no interaction or error correction ICMP encapsulated in IP for delivery Several ICMP message types, each with its own format ICMP message begins with 1-octet TYPE field Examples Summary Echo Request/Reply, Destination Unreachable, Time Exceeded, Redirect, NDP/DHCP, etc. 24