ICMP The Internet Control Message Protocol ICMP is

  • Slides: 35
Download presentation
ICMP � The Internet Control Message Protocol (ICMP) is one of the core protocols

ICMP � The Internet Control Message Protocol (ICMP) is one of the core protocols of the Internet protocol suite. It is chiefly used by networked computers' operating systems to send error messages—indicating, for instance, that a requested service is not available or that a host or router could not be reached. � ICMP differs in purpose from TCP and UDP in that it is usually not used directly by user network applications. � One exception is the ping tool, which sends ICMP Echo Request messages (and receives Echo Response messages) to determine whether a host is reachable and how long packets take to get to and from that host.

ICMP (Internet Control Message Protocol) �RFC 792 (get it and study it) �ICMP message

ICMP (Internet Control Message Protocol) �RFC 792 (get it and study it) �ICMP message is constructed and then passed down to IP layer, usually from a normal IP datagram that has generated an ICMP response. �ICMP provides a means for transferring messages from routers and other host to a host. �E. g when a datagram cannot reach its destination, when the router does not have the buffering capacity to forward a datagram, and when the router can direct the station to send traffic on a shorter route

ICMP Header �An ICMP message starts with a 64 -bit header consisting of the

ICMP Header �An ICMP message starts with a 64 -bit header consisting of the following: �Type (8 bits): Specifies the type of ICMP message �Code (8 bits): used to specify parameters of the message that can be encoded in one or a few bits �Checksum: (16 bits): checksum of the entire ICMP message. This is the same checksum algorithm used for IP �Parameters (32 bits): used to specify more lengthy parameters

ICMP message Formats �Destination unreachable A router may return this message if it does

ICMP message Formats �Destination unreachable A router may return this message if it does not know how to reach the destination network �Time exceeded Message if the lifetime of the datagram expires, a host it cannot complete reassembly within the time limit �Parameter problem A semantic error in an IP header �Source quench Message provides a rudimentary form of flow control

ICMP message Formats �Redirect A message to a host on a directly connected router

ICMP message Formats �Redirect A message to a host on a directly connected router to advise the host of a better route to a particular destination �Echo and echo reply Messages provide a mechanism for testing that communication is possible between entities �Timestamp and timestamp reply Messages provide a mechanism for sampling the delay characteristic of the internet �Address reply mask request and address mask The address mask request and reply messages allow a host to learn the address mask for the LAN to which it connects

ICMP Message Formats

ICMP Message Formats

IP v 6 - Version Number �IP �IP v 1 -3 defined and replaced

IP v 6 - Version Number �IP �IP v 1 -3 defined and replaced v 4 - current version v 5 - streams protocol v 6 - replacement for IP v 4 During development it was called IPng Next Generation

IPv 4 - Problems �The decision to standardize on a 32 bit address space

IPv 4 - Problems �The decision to standardize on a 32 bit address space meant that there were only 232 (4, 294, 967, 296) IPv 4 addresses available. �During the early days of the Internet, the seemingly unlimited address space allowed IP addresses to be allocated based on requests rather than its actual need. �Over the next few years, conventional computers will be joined by Personal Digital Assistants, Mobile Phones with data processing capability, smart set-up boxes with integrated web browsers, and from copy machines to kitchen appliances.

IPv 4 - Problems �Class �In the C, which supports 254 hosts, is too

IPv 4 - Problems �Class �In the C, which supports 254 hosts, is too small. B, which supports 65534 hosts is too large. past, sites with several hundred hosts have been assigned as single Class B address rather than couple of Class C addresses. �Unfortunately, this has resulted in a premature depletion of the Class B network address space.

Subnetting �Subnetting In 1985, RFC 950 defined a standard procedure to support the subnetting,

Subnetting �Subnetting In 1985, RFC 950 defined a standard procedure to support the subnetting, or division, of a single Class A, B, or C network number into smaller pieces.

Subnetting �Internet routers use only the network-prefix of the address to route traffic to

Subnetting �Internet routers use only the network-prefix of the address to route traffic to a subnetted environment. �Routers within the subnetted environment use the extended-network-prefix to route traffic between the individual subnet.

Classless Inter-Domain Routing �CIDR was officially documented in September 1993 in RFC 1517, 1518,

Classless Inter-Domain Routing �CIDR was officially documented in September 1993 in RFC 1517, 1518, 1519, 1520 �Eliminates the traditional concept of Class A, B and C networks and replaces it with concept of “network prefix” �CIDR supports the deployment of arbitrary size networks rather than the standard 8 -bit, 16 -bit, or 24 bit network numbers associated with classful addressing.

IPv 4 Problems �Good News - CIDR is working. �Bad News - Recent growth

IPv 4 Problems �Good News - CIDR is working. �Bad News - Recent growth trends indicate that the number of Internet routes is beginning to increase at an exponential rate.

IPv 6 RFCs � 1752 - Recommendations for the IP Next Generation Protocol �

IPv 6 RFCs � 1752 - Recommendations for the IP Next Generation Protocol � 2460 - Overall specification � 2373 - addressing structure �others (find them) �www. rfc-editor. org

IPv 6 Enhancements (1) �Expanded address space 128 bit addresses instead of 32 -bit

IPv 6 Enhancements (1) �Expanded address space 128 bit addresses instead of 32 -bit addresses of IPv 4. This is an increase of address space by a factor of 296. This allows on the order of 6 x 1023 unique addresses per square meter of the surface of the earth. �Improved option mechanism Separate optional headers between IPv 6 header and transport layer header Most are not examined by intermediate routes ▪ Improved speed and simplified router processing ▪ Easier to additional options �Address autoconfiguration This capability provides for dynamic assignment of IPv 6 addresses

IPv 6 Enhancements (2) �Increased addressing flexibility Anycast - delivered to one of a

IPv 6 Enhancements (2) �Increased addressing flexibility Anycast - delivered to one of a set of nodes Improved scalability of multicast addresses �Support for resource allocation Replaces type of service field in IPv 4 Labeling of packets to particular traffic flow Sender requests special handling e. g. real time video

IPv 6 PDU (Packet) Structure

IPv 6 PDU (Packet) Structure

IP v 6 Header

IP v 6 Header

Notations of IPv 6 Addresses � 128 bit is represented as: 8 integers (16

Notations of IPv 6 Addresses � 128 bit is represented as: 8 integers (16 -bit) separated by colons ▪ each integer is represented by 4 hex digits Example: FEDC: BA 98: 7654: 3210: FEDC: BA 98: 7664: 3210

Simplifications �Skip leading zeros Example: 1080: 0000: 0008: 0800: 200 C: 417 A is

Simplifications �Skip leading zeros Example: 1080: 0000: 0008: 0800: 200 C: 417 A is reduced to: 1080: 0: 8: 800: 200 C: 417 A �A set of consecutive nulls is replaced by : : (at most one : : inside an address) the above address is reduced to: ▪ 1080: : 8: 800: 200 C: 417 A

IPv 6 Address � 128 bits long �Three types of address Unicast addresses: An

IPv 6 Address � 128 bits long �Three types of address Unicast addresses: An identifier for a single interface. A packet sent to a unicast address is delivered to the interface identified by that address Anycast addresses: An identifier for a set of interfaces (typically belonging to different nodes). A packet sent to an anycast address is delivered to one of the interfaces (the “nearest” one) identified by that address

IPv 6 Address Multicast: An identifier for a set of interfaces (typically belonging to

IPv 6 Address Multicast: An identifier for a set of interfaces (typically belonging to different nodes). A packet sent to mulitcast address is delivered to all interfaces identified by that address.

Comparison of Headers � V 6: 6 fields + 2 addr � V 4:

Comparison of Headers � V 6: 6 fields + 2 addr � V 4: 10 fields + 2 addr + options � Deleted: ▪ Header length ▪ type of service ▪ identification, flags, fragment offset ▪ Header Checksum � Added: ▪ Priority ▪ Flow label � Renamed: ▪ length -> Payload length ▪ Protocol -> Next header ▪ time to live -> Hop Limit � Redefined: Option mechanism

Extension Headers �Hop-by-Hop Options Require processing at each router �Routing Similar to v 4

Extension Headers �Hop-by-Hop Options Require processing at each router �Routing Similar to v 4 source routing �Fragment �Authentication �Encapsulating security �Destination options For destination node payload

IP v 6 Header

IP v 6 Header

IP v 6 Header Fields (1) � Version (4 bits): Internet protocol version number;

IP v 6 Header Fields (1) � Version (4 bits): Internet protocol version number; the value is 6. � DS/ECN (8 bits): used by originating nodes and/or forwarding routers for differentiated services and congestion functions, see IPv 4 DS/ECN field. � Flow Label (20 bits): used by a host to label those packets for which it is requesting special handling by routers within a network. � Payload Length (16 bits): Length of the remainder of the IPv 6 packet following the header, in octets. In other words, this is the total length of all of the extension headers plus the transportlevel PDU. � Next Header (8 bits): Identifies the type of header immediately following the IPv 6 header; this will either be an IPv 6 extension header or a higher-layer header, such as TCP or UDP.

IP v 6 Header Fields (2) � Hop Limit (8 bits): The remaining number

IP v 6 Header Fields (2) � Hop Limit (8 bits): The remaining number of allowable hops for this packet. The hop limit is set to some desired maximum value by the source and decremented by 1 by each node that forwards the packet. The packet is discarded if Hop Limit is decremented to zero. � Source Address (128 bits): address of originator of the packet. � Destination Address (128 bits): address of intended recipient of the packet. � Although the IPv 6 header is longer than the mandatory portion of the IPv 4 header (40 octets versus 20 octets), it contains fewer fields (8 versus 12). Thus, routers have less processing to do per header, which should speed up routing.

IPv 6 Extension Headers

IPv 6 Extension Headers

Hop-by-Hop Options �Next header Identifies the type of header immediately following this header �Header

Hop-by-Hop Options �Next header Identifies the type of header immediately following this header �Header extension length Length of this header in 64 -bit units �Options A variable length field consisting of one or more option definitions

Fragmentation Header �Fragmentation only allowed at source �No fragmentation at intermediate routers �Node must

Fragmentation Header �Fragmentation only allowed at source �No fragmentation at intermediate routers �Node must perform path discovery to find smallest MTU of intermediate networks �Source fragments to match MTU �Otherwise source limit all packets to 1280 octets which is the minimum MTU that must be supported by each network

Fragmentation Header Fields �Next Header (8 bits) Identifies the type of header immediately following

Fragmentation Header Fields �Next Header (8 bits) Identifies the type of header immediately following this header �Reserved (8 bits) for future use �Fragmentation offset (13 bits) Indicates where in the original packets the payload of this fragment belongs �Reserved (2 bits) �More flag (1 bit) reserved for future use 1= more fragments, 0= last fragment �Identification(32 bits)

Routing Header �List of one or more intermediate nodes to be visited �Next Header

Routing Header �List of one or more intermediate nodes to be visited �Next Header Identifies the type of header immediately following this header �Header extension length Length of this header in 64 -bit units �Routing type Identifies a particular routing header variant. If a router does not recognize the routing type value, it must discard the packet �Segments left i. e. number of route segments remaining, nodes still to be visited

Destination Options �carries optional info for destination node �Same format as Hop-by-Hop options header

Destination Options �carries optional info for destination node �Same format as Hop-by-Hop options header

Required Reading �Stallings chapter 18 �All RFCs mentioned plus any others connected with these

Required Reading �Stallings chapter 18 �All RFCs mentioned plus any others connected with these topics www. rfc-editor. org �Loads of Web sites on TCP/IP and IP version 6

Summary �basic protocol functions �internetworking principles �connectionless internetworking �IP �ICMP �IPv 6

Summary �basic protocol functions �internetworking principles �connectionless internetworking �IP �ICMP �IPv 6