TCPIP-Module II - Part 3
TCPIP-Module II - Part 3
Network Layer
Text Book:
1. Douglas E Comer, “Internetworking with TCP/IP Principles, Protocol, and Architecture” ,
Volume I, 6th Edition, Pearson Education, 2013
2. Andrew S. Tanenbaum, “Computer Networks”, Prentice Hall. 5th Edition.
3. James F Kurose, Keith W Ross, Computer Networking: A top Down Approach featuring
Krishnaprasad P.K
the Internet, Pearson Education, 3rd Edition
[Link]
Contents/Syllabus
Internet Protocol: Connectionless Datagram Delivery (IPv4,IPv6)
Introduction, Connectionless Delivery System Characteristics
Purpose And Importance Of The Internet Protocol
The IP Datagram
Datagram Type Of Service And Differentiated Services
Datagram Encapsulation
Datagram Size, Network MTU and Fragmentation
Datagram Reassembly
Header Fields Used For Datagram Reassembly,
Time To Live (IPv4) And Hop Limit (IPv6)
Optional IP Items
Options Processing During Fragmentation
Internet Protocol: Error And Control Messages (ICMP)
Introduction
The Internet Control Message Protocol
Error Reporting Vs. Error Correction
ICMP Message Delivery
Conceptual Layering
ICMP Message Format Slide 2- 2
Internet Architecture And Philosophy
Conceptually, a TCP/IP internet provides three sets of services.
At the lowest level, a connectionless delivery service provides a
foundation on which everything rests.
The connectionless service runs over arbitrary network hardware
At the next level, a reliable transport service provides a higher-level
platform on which applications depend.
At the highest level, application services provides wide varieties of
services for the hosts/users, depends on the requirement.
Slide 1- 5
Network layer in the Internet
Switching at the network layer in the Internet uses the datagram approach
to packet switching.
Communication at the network layer in the Internet is connectionless.
Slide 2- 10
IPv4 Datagram format
Total Length. This 16-bit field defines the total length (header plus data)
of the IP datagram in bytes.
A 16-bit number can define a total length of up to 65,535
Length of data = total length − (HLEN) × 4
Total length field is helpful to determine how much is really data and how
much is padding.
Identification, Flags, and Fragmentation Offset. These three fields are
related to the fragmentation of the IP datagram when the size of the
datagram is larger than the underlying network can carry.
Time-to-live. (TTL) field is used to control the maximum number of hops
(routers) visited by the datagram.
When a source host sends the datagram, it stores a number in this field.
Each router that processes the datagram decrements this number by one. If
this value, after being decremented, is zero, the router discards the datagram
Slide 2- 17
IPv4 Datagram format –
Fragmentation
The 13-bit fragmentation offset field shows the relative position of this
fragment with respect to the whole datagram.
It is the offset of the data in the original datagram in units of 8 bytes
Figure shows a datagram with a data size of 4000 bytes fragmented into
three fragments.
The bytes in the original datagram are numbered 0 to 3999.
The first fragment carries bytes 0 to 1399. The offset for this datagram is
0/8 = 0.
The second fragment carries bytes 1400 to 2799; the offset value for this
fragment is 1400/8 = 175.
Finally, the third fragment carries bytes 2800 to 3999. The offset value for
this fragment is 2800/8 = 350.
Slide 2- 19
IPv4 Options
IPV4 options can be a maximum of 40 bytes (in multiples of 4-bytes)
Options, as the name implies, are not required for a datagram. They can
be used for network testing and debugging.
Options are divided into two broad categories: single-byte options and
multiple-byte options.
Each option starts with a single octet option code that identifies the
option. An option code may be followed by a single octet length and a set
of data octets for that option.
Single-Byte Options
There are two single-byte options.
No Operation: A no-operation option is a 1-byte option used as a filler
between options.
End of Option: An end-of-option option is a 1-byte option used for
padding at the end of the option field. It, however, can only be used as the
last option.
Slide 2- 20
IPv4 Options
Multliple-Byte Options
There are four multiple-byte options
Record Route Fig: 2-10 Taxonomy of options in IPv4
A record route option is used to record the Internet routers that handle the
datagram.
It can list up to nine router addresses. It can be used for debugging and
management purposes.
Strict Source Route
A strict source route option is used by the source to predetermine a route
for the datagram, as it travels through the Internet.
Dictation of a route by the source can be useful for several purposes.
The sender can choose a route with a specific type of service, such as
minimum delay or maximum throughput.
It may choose a route that is safer or more reliable for the sender’s purpose,
datagram does not travel through a competitor’s network. Slide 2- 21
IPv4 Options
Fig: 2-11 Dotted-decimal notation and binary notation for an IPv4 address Slide 2- 24
IPv4 Addresses
Find the error, if any, in the following IPv4 addresses.
a) [Link] a) There must be no leading zero (045).
Table: 2-4 Number of blocks and block size in classful IPv4 addressing Slide 1- 27
IPv4 Addresses - Classful Addressing
Classful addressing: a large part of the available addresses were wasted
Class A addresses were designed for large organizations with a large
number of attached hosts or routers.
A block in class A address is too large for almost any organization.
This means most of the addresses in class A were wasted and were not used.
Class B addresses were designed for midsize organizations with tens of
thousands of attached hosts or routers.
A block in class B is also very large.
Class C addresses were designed for small organizations with a small
number of attached hosts or routers.
A block in class C is probably too small for many organizations.
Class D addresses were designed for multicasting.
Each address in this class is used to define one group of hosts on the Internet
The Internet authorities wrongly predicted a need for 268,435,456 groups.
Class E addresses were reserved for future use; Slide 1- 28
IPv4 Addresses - Classful Addressing
The length of the netid and hostid is predetermined in classful addressing,
We can use a mask (also called the default mask), a 32-bit number made of
contiguous 1s followed by contiguous 0s.
The masks for classes A, B, and C are shown in Table 2-5. The concept
does not apply to classes D and E.
The mask can help us to find the netid and the hostid.
The last column of Table 2-5 shows the mask in the form /n where n can
be 8, 16, or 24 in classful addressing.
This notation is also called slash notation or Classless Interdomain
Routing (CIDR) notation.
The last address in the block can be found by setting the rightmost 32 - n
bits to 1s. [OR]
The last address in the block = (Any address in the block) OR [(NOT
(mask)].
The number of addresses in the block can be found by using the formula
232- n.
The number of addresses in the block N = (NOT (mask))decimal + 1.
Slide 2- 32
Classless Addressing
A block of addresses is granted to a small organization. We know that one of the
addresses is [Link]/28. a) What is the first address in the block?, b) Find
the last address for the block? c) Find the number of addresses ?
The binary representation of the given address is
11001101 00010000 00100101 00100111
a) If we set 32−28 rightmost bits to 0, we get
11001101 00010000 00100101 00100000 or [Link].
Slide 1- 33
Classless Addressing
A block of addresses is granted to a small organization. We know that one of the
addresses is [Link]/27 (a) What is the first address in the block?, (b)
Find the last address for the block? (c)Find the number of addresses ?
Slide 2- 38
Classless Addressing
An organization is granted a block of addresses with the beginning
address [Link]/24. The organization needs to have 3 subblocks of
addresses to use in its three subnets: one subblock of 10 addresses, one
subblock of 60 addresses, and one subblock of 120 addresses. Design
the subblocks.
Slide 2- 39
Classless Addressing
Address Allocation
The ultimate responsibility of address allocation is given to a global
authority called the Internet Corporation for Assigned Names and
Addresses (ICANN).
However, ICANN does not normally allocate addresses to individual
organizations.
It assigns a large block of addresses to an ISP.
Each ISP, in turn, divides its assigned block into smaller subblocks and
grants the subblocks to its customers.
In other words, an ISP receives one large block to be distributed to its
Internet users.
This is called address aggregation: many blocks of addresses are
aggregated in one block and granted to one ISP.
Slide 2- 40
Classless Addressing
An ISP is granted a block of addresses starting with [Link]/16 (65,536
addresses). The ISP needs to distribute these addresses to three groups of
customers as follows: Design the subblocks and find out how many addresses are
still available after these allocations.
The first group has 64 customers; each needs 256 addresses.
The second group has 128 customers; each needs 128 addresses.
The third group has 128 customers; each needs 64 addresses.
Slide 2- 41
Network Address Translation (NAT).
Private Addresses: Any organization can use an address out of this set
without permission from the Internet authorities.
They are unique inside the organization, but they are not unique globally.
No router will forward a packet that has one of these addresses as the
destination address.
If a packet containing one of the private addresses is accidentally forwarded
onto the global Internet, a router will detect the problem and discard the
packet.
The site must have only one single connection to the global Internet
through a router that runs the NAT software.
Slide 2- 46
IPv6, Header format, Extension headers
Flow label. The flow label is a 20-bit field that is designed to provide
special handling for a particular flow of data.
Payload length. The 2-byte payload length field defines the length of the
IP datagram excluding the base header.
Next header. The next header is an 8-bit field defining the header that
follows the base header in the datagram. (Similar to protocol field in IPv4)
The next header is either one of the optional extension headers used by
IP or the header of an encapsulated packet such as UDP or TCP
Each extension header also contains this field.
Hop limit. This 8-bit hop limit field serves the same purpose as the TTL
field in IPv4.
Source address: The source address field is a 16-byte (128-bit) Internet
address that identifies the original source of the datagram.
Destination address: The destination address field is a 16-byte (128-bit)
Internet address that identifies the final destination of the datagram.
Slide 2- 47
IPv6, Header format, Extension headers
Payload. Compared to IPv4, the payload field in IPv6 has a different
format and meaning, as shown in below diagram.
Each extension header has two mandatory fields, next header and the
length followed by information related to the particular option.
Note that each next header field value (code) defines the type of the next
header (hop-by-hop option, source routing option, . . .);
The last next header field defines the protocol (UDP, TCP, . . .) that is
carried by the datagram.
Table 2-7: Comparison between IPv4 and IPv6 packet header Slide 2- 51
IPv6 Optional Extensions (Extension Header)
IPv6 uses the mechanism of extension headers in place of IPv4 options.
IPV6 base header can be followed by up to six extension headers.
Slide 2- 55
IPv6 Fragmentation & Path MTU Discovery(PMTUD)
PMTUD mechanism consists of sending an IPv6 datagram that fits in the
MTU of the directly-connected network.
If a network along the path has a smaller MTU, a router will send an ICMP
error message to the original source that specifies the smaller MTU.
The host fragments datagrams according to the new path MTU and tries
again. If a later network along the path has an MTU that is even smaller,
another router will send an error message.
By repeatedly probing, a host will eventually find the smallest MTU along
the path.
If the source does not use a Path MTU Discovery technique, it fragments
the datagram to a size of 1280 bytes or smaller.
This is the minimum size of MTU required for each network connected to
the Internet.
IPv6 base header does not include fields to specify fragmentation.
Slide 2- 56
IPv6 Fragmentation & Path MTU Discovery(PMTUD)
When it fragments an IPv6 datagram, a source inserts a Fragment
Extension Header into each fragment. Figure illustrates the format.
As the figure shows, the extension header includes the required NEXT
HEADER field.
It also includes two fields that are reserved for future use.
The remaining three fields have the same meaning as IPv4 fragmentation
control fields.
A 13-bit FRAGMENT OFFSET field specifies where in the original
datagram this fragment belongs,
The M bits is a more fragments bit that specifies whether a fragment is
the final (rightmost) fragment of the original datagram.
The IDENTIFICATION field contains a unique datagram ID that is shared
by all the fragments of a datagram
Slide 2- 57
Datagram Reassembly
Where should fragments be reassembled ?
Should a datagram be reassembled when it reaches a network with a
larger MTU or should the datagram remain fragmented and the fragments
be transported to the ultimate destination. ?
If only one network along the path has a small MTU, sending small
fragments over the other networks is inefficient.
If any fragments are lost, the datagram can not be reassembled. The
mechanism used to handle fragment loss consists of a reassembly
timer.
The ultimate destination starts a timer when a fragment arrives for a given
datagram. If the timer expires before all fragments arrive, the receiving
machine discards the surviving fragments.
The source must retransmit the entire datagram
Despite the minor disadvantages, performing reassembly at the ultimate
destination works well. (Routers do not need to store fragments or keep
other information about packets.) Slide 2- 58
IPv6, Header format, Extension headers
Extension Headers
Table 2-8: Comparison between IPv4 options and IPv6 extension headers Slide 2- 59
IPv6 Datagram Format
Instead of trying to specify all details in a single header, IPv6 uses an
extension capability.
The general form of an IPv6 datagram with a base header followed by
optional extension headers.
Each IPv6 header contains a NEXT HEADER field that specifies the type
of the header that follows. The final header uses the NEXT HEADER
field to specify the type of the payload.
Slide 2- 60
Fig: 2-23. Illustration of the NEXT HEADER fields in IPv6 datagrams with (a) only a base header, (b)
a base header and one extension (c) a base header and two extension headers.
IPv6 Datagram Format
Fixed fields in the datagram header for all mechanisms like fragmentation,
source routing and authentication, is inefficient because most datagrams
do not use all mechanisms; (so we are using extension headers)
Some of the extension headers are intended for processing by the
ultimate destination and some of the extension headers are used by
intermediate routers along the path.
Observe that the use of NEXT HEADER fields means extensions are
processed sequentially.
To speed processing, IPv6 requires extension headers that are used by
intermediate routers to precede extension headers used by the final
destination.
We use the term hop-by-hop header to refer to an extension header that
an intermediate router must process. Thus, hop-by-hop headers precede
end-to-end headers.
Slide 2- 61
Options Processing During Fragmentation
Both IPv4 and IPv6 use the same conceptual approach to handle options
during fragmentation.
When creating fragments, the IP code examines each of the options in
the original datagram.
If an option must be processed by intermediate routers, the option is
copied into each fragment.
However, if the option is only used at the ultimate destination, the option
is copied into the header of the first fragment but not the rest.
Omitting unnecessary options from later fragments reduces the total
number of bits transmitted.
Slide 2- 62
IPv4 Processing Options During Fragmentation
In IPv4, each option begins with a code octet.
Each code octet contains a copy bit that specifies whether the option
should be replicated in all fragments or in only one fragment.
As an example, consider the record route option.
Because each fragment is treated as an independent datagram, there is no
guarantee that all fragments follow the same path to the destination.
It may be interesting to learn a set of paths that each of the fragments took
But the designers decided that a destination will have no way to arbitrate
among multiple paths.
Therefore, the IP standard specifies that the record route option should
only be copied into one of the fragments.
Source route options provide an example of options that must be copied
into each fragment.
If the datagram is fragmented at some point along the path, all fragments
should follow the remainder of the path that the sender specified,
Slide 2- 63
IPv6 Processing Options During Fragmentation
IPv6 divides a datagram into two conceptual pieces: an initial piece that is
classified as unfragmentable and the remainder, which is classified as
fragmentable.
The base header lies in the unfragmentable piece and the payload lies in
the fragmentable piece.
As with IPv4, extension headers that are only processed by the ultimate
destination do not need to be present in each fragment.
The Hop-By-Hop Header and Route Header are not fragmentable; other
extension headers are fragmentable.
Therefore, the fragmentable part of the datagram begins after the non-
fragmentable extension headers.
IPv6 treats the fragmentable piece of the datagram as an array of octets
to be divided into fragments
Slide 2- 64
IPv6 Processing Options During Fragmentation
Figure, which illustrates the fragmentation of an IPv6 datagram that has a
base header, four extension headers, and 1400 octets of payload.
Following the unfragmentable piece, a fragment has a Fragment Header
labeled F in the figure.
Fig: 2-24 IPv6 fragmentation with (a) an IPv6 datagram with extension headers divided into
fragmentable and unfragmentable pieces, and (b) a set of fragments. Slide 2- 65
Network Byte Order
NOT all computers store 32-bit integers in the same way.
On some (called little endian), the lowest memory address contains the low-
order byte of the integer.
On others (called big endian), the lowest memory address holds the high-
order byte of the integer.
Thus, direct copying of bytes from one machine to another may change the
value of the integer.
To keep internetworking independent of any particular vendor’s machine
architecture or network hardware, we must specify a standard
representation for data.
The payload field in a packet is exempt from the byte-order standard
because the TCP/IP protocols do not know what data is being carried.
The Internet protocols define network byte order to be big endian.
A sender must convert all integer fields in packet headers to network byte
order before sending a packet, and a receiver must convert all integer
fields in packet headers to local byte order before processing a packet.
Slide 2- 66
IPv6, Header format, Extension headers
An IPv6 address is 128 bits (16 bytes) long.
IPv6 specifies hexadecimal colon notation, address consists of 32
hexadecimal digits, with every four digits separated by a colon
The leading zeros of a section (4 digits between two colons) can be omitted
Slide 2- 68
IPv6, Header format, Extension headers
Multicast Address
In multicasting each member of the group receives a copy.
IPv6 has designated a block for multicasting from which the same
address is assigned to the members of the group. IPv6 does not define
broadcasting.
Anycast Address
Defines a group of computers that all share a single address
A packet with an anycast address is delivered to only one member of the
group, the most reachable one.
For example, when there are several servers that can respond to an inquiry.
The request is sent to the one that is most reachable
The hardware and software generate only one copy of the request; the copy
reaches only one of the servers.
IPv6 does not designate a block for anycasting; the addresses are
assigned from the unicast block.
Slide 2- 69
IPv6, Header format, Extension headers
IPv6 permits a multi-level hierarchy or multiple hierarchies.
Like IPv4, the address space of IPv6 is divided into several blocks of
varying size and each block is allocated for a special purpose.
Most of the blocks are still unassigned and have been set aside for future
use. (IETF will assign the blocks)
The first 8 bits of an address are sufficient to identify the basic types.
The last column shows the fraction each block occupies in the whole address.
The highorder octet of an address distinguishes between multicast (all 1 bits)
and unicast (a mixture of 0’s and 1’s).
Block prefix CIDR Block Assignment Fraction
Special addresses
0000 0000 0000::/8 (IPv4 compatibility) 1/256
001 2000::/3 Global unicast 1/8
1111 110 FC00::/7 Unique local unicast 1/128
1111 1110 10 FE80::/10 Link local addresses 1/1024
1111 1111 FF00::/8 Multicast addresses 1/256
Table 2-9: Prefixes for assigned IPv6 addresses Slide 2- 70
IPv6, Header format, Extension headers
Global unicast: A routable address in the IPv6 Internet, similar to a
public IPv4 address.
An address in this block is divided into three parts: global routing prefix (n
bits), subnet identifier (m bits), and interface identifier (q bits)
Unique local: Similar to a private address in IPv4 and not intended to be
routable in the IPv6 Internet.
Link-local: Used only to communicate with devices on the same local link
(subnet) and do not need to be unique beyond the link.
Therefore, routers do not forward packets with a link-local address
Unspecified / Special address: Used only as a source address and
indicates the absence of an IPv6 address.
The unspecified address is a subblock containing only one address, which is
used during bootstrap when a host does not know its own address and wants
to send an inquiry to find it.
Loopback: An address not assigned to any physical interface that can be
used for a host to send an IPv6 packet to itself.
0000::1/128 or ::1 Slide 2- 71
Internet Control Message Protocol (ICMP),
The IP protocol has no error-reporting or error-correcting mechanism.
Slide 2- 72
The IP protocol also lacks a mechanism for host and management
queries. E.g: A host needs to determine if a router or another host is alive.
ICMP has been designed to compensate for the above two deficiencies.
ICMP messages are divided into error-reporting and query messages.
The error-reporting messages report problems that a router or a host
(destination) may encounter.
The query messages get specific information from a router or another host.
Slide 2- 75
ICMP Messages - Error Reporting Messages
Note that all error messages contain a data section that includes the IP
header of the original datagram plus the first 8 bytes of data in datagram.
The original datagram header is added to give the original source, which
receives the error message, information about the datagram itself.
The 8 bytes of data are included because the first 8 bytes provide
information about the port numbers (UDP &TCP) sequence no. (TCP).
This information is needed so the source can inform the higher layer
protocols (TCP or UDP) about the error.
The following are important points about ICMP error 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 [Link] or [Link]. Slide 2- 76
ICMP Messages - Error Reporting Messages
Destination Unreachable
When a router cannot route a datagram or a host cannot deliver a
datagram, the datagram is discarded and they send a destination-
unreachable message back to the source host. (ICMP Type: 3. )
E.g: Unable to route the packet due to DF bit set in IP Header.
E.g: Tried to access a web page, but the server is down.
Source Quench
Another error message is called the source quench (type 4) message,
which informs the sender that the network has encountered congestion
and the datagram has been dropped;
The source needs to slow down sending more datagrams.
ICMP adds a kind of congestion control mechanism to the IP
Slide 2- 77
Parameter Problem
A parameter problem message (type 12) can be sent when either there is
a problem in the header of a datagram (code 0) or some options are
missing or cannot be interpreted (code 1). E.g: Invalid no. in protocol field
ICMP Messages - Error
Reporting Messages
Time-exceeded message
When the TTL value becomes 0, the datagram is dropped by the visiting
router and a time exceeded message (type 11) with code 0 is sent to the
source to inform it about the situation.
The time-exceeded message (with code 1) can also be sent when not all
fragments of a datagram arrive within a predefined period of time.
Slide 2- 78
ICMP Messages – ICMP Packet
IP Header IP Data
Query Messages Fig: 2-30 Encapsulation of ICMP query messages
Query messages are used to probe or test the liveliness of hosts or
routers in the Internet. Query messages come in pairs: request and reply.
A query message is encapsulated in an IP packet, which in tum is
encapsulated in a data link layer frame.
No bytes of the original IP are included in the message.
The echo request & the echo reply pair of messages are used by a host
or a router to test the liveliness of another host or router.
A host or router sends an echo request message to another host or
router; if the latter is alive, it responds with an echo reply message.
The applications of this pair used in two debugging tools: ping and traceroute.
• IDENTIFIER - identifies an application and SEQUENCE
NUMBER to number successive requests sent by the application
Slide 2- 84
Internet Control Message Protocol version 6
(ICMPv6).
Destination Unreachable, Time Exceeded, Parameter Problem and
Redirection messages are similar to ICMPv4
Slide 2- 85
Internet Control Message Protocol version 6
(ICMPv6).
In addition to error reporting, ICMP can diagnose some network problems
This is accomplished through the query messages.
Four different groups of messages have been defined:
Fig: 2-38 ICMPv6 Query messages
Slide 2- 87
Internet Control Message Protocol version 6
(ICMPv6).
The idea behind Echo Request and Reply & Router Solicitation and
Advertisement messages is the same as in version 4.
Slide 2- 88
ICMP
The ICMP mechanism is considered a required part of IP and must be
included in every IP implementation.
ICMP messages are not usually delivered to applications.
ICMP providies communication between an ICMP module on one
machine and an ICMP module on another.
ICMP may take further action in response to the incoming message.
For example, ICMP might inform an application or a higher-level protocol
about an incoming message.
ICMP is not restricted exclusively to routers, host can also communicate with
ICMP.
Why restrict ICMP to communication with the original source ?
A datagram only contains fields that specify the original source and the
ultimate destination;
It does not contain a complete record of its trip through the internet
If the router detects a problem, IP cannot know the set of intermediate
machines that processed the datagram, so it cannot inform them of the
problem. Slide 2- 89
Conceptual Layering
ICMP messages cannot be delivered by a Layer 2 transport
alone. ?
Each ICMP message is encapsulated in an IP datagram,
ICMP is not considered a higher-level protocol.
Instead, ICMP is a required part of IP, which means ICMP is classified as
a Layer 3 (network-layer) protocol.
We can think of the encapsulation as using the existing IP-based
forwarding scheme
Rather than creating a parallel forwarding mechanism for ICMP messages.
ICMP must send error reports to the original source, so an ICMP
message must travel across multiple underlying networks to reach its final
destination.
Slide 2- 90
Testing Destination Reachability & Status (Ping)
We introduce two tools that use ICMP for debugging: ping and traceroute.
We can use the ping program to find if a host is alive and responding.
The source host sends ICMP echo-request messages; the destination, if
alive, responds with ICMP echo-reply messages.
The ping program sets the identifier field in the echo-request and echo-
reply message and starts the sequence number from 0;
This number is incremented by 1 each time a new message is sent.
Echo request and associated reply can be used to test whether a
destination is reachable and responding.
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).
Because both the request and reply travel in IP datagrams
Slide 2- 91
Testing Destination Reachability & Status (Ping)
Most versions of ping also allow a user to specify the amount of data
being sent in each request.
Receiving a reply from a remote machine verifies that major pieces of the
IP transport system are working correctly.
1) IP software on the source computer must have an entry in its forwarding
table for the destination.
2) The source computer has created a correct datagram.
3) The source was able to reach a router, which means ARP (IPv4) or
Neighbor Discovery (IPv6) is working.
4) Intermediate routers between the source and destination must be
operating, and must forward datagrams correctly in both directions
between the source and destination.
5) The destination machine must be running, the device driver must be
able to receive and send packets, and both ICMP and IP software
modules must be working.
Slide 2- 92
Testing Destination Reachability & Status (Ping)
If ping sends a series of requests, it displays statistics about message
loss. The advantage of sending a continuous series of requests arises
from an ability to discover intermittent problems.
Sending a large ping packet is useful for testing fragmentation and
reassembly.
Large packets also force IPv6 to engage in path MTU discovery.
C:\Users\Administrator>ping [Link]
Pinging [Link] [[Link]] with 32 bytes of data:
Reply from [Link]: bytes=32 time=588ms TTL=53
Reply from [Link]: bytes=32 time=638ms TTL=53
Reply from [Link]: bytes=32 time=340ms TTL=53
Reply from [Link]: bytes=32 time=300ms TTL=53
Ping statistics for [Link]:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 300ms, Maximum = 638ms, Average = 466ms Slide 2- 93
Traceroute or Tracert
The traceroute program in UNIX or tracert in Windows can be used to
trace the path of a packet from a source to the destination.
It can find the IP addresses of all the routers that are visited along the
path. The program is usually set to check for the maximum of 30 hops
(routers) to be visited.
The traceroute program gets help from two error-reporting messages:
time-exceeded and destination-unreachable. (The ping program gets help
from two query messages)
Slide 2- 94
Traceroute or Tracert
C:\Users\Administrator>tracert [Link]
Tracing route to [Link] [[Link]]
over a maximum of 30 hops:
1 12 ms 1 ms 1 ms [Link]
2 * * * Request timed out.
3 417 ms 977 ms 386 ms [Link]
4 739 ms 90 ms 85 ms [Link]
5 86 ms 80 ms 92 ms [Link]
6 90 ms 82 ms 203 ms [Link]
7 124 ms 65 ms 111 ms [Link]
8 * * * Request timed out.
9 397 ms 396 ms 467 ms [Link]
10 876 ms 707 ms 501 ms [Link]
11 695 ms 107 ms 102 ms [Link]
12 188 ms 210 ms 183 ms [Link]
13 98 ms 120 ms 103 ms [Link] [[Link]]
Trace complete.
Slide 2- 95
Older ICMP Messages Used At Startup
Originally, ICMP defined 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.
Eventually, a protocol known as DHCP was introduced that provides an IPv4
host with all the necessary information in a single exchange.
In addition, ICMP defined messages that a host or router could use to
obtain the current time.
Protocols to exchange time information have also been devised, making the
ICMP version obsolete.
As a consequence, IPv4 no longer uses ICMP messages that were
designed to obtain information at start up.
At startup, an IPv6 host multicasts an ICMPv6 Router Discovery message
to learn about routers on the local network.
Slide 2- 96
Older ICMP Messages Used At Startup
There are two conceptual differences between router discovery and
DHCP that make it attractive for IPv6.
First, because the information is obtained directly from the router itself,
there is never a third-party error.
With DHCP, such errors are possible because a DHCP server must be
configured with information to hand out.
If a network manager fails to update the DHCP configuration after a network
changes, hosts may be given out-of-date information.
Second, ICMP router discovery uses a soft state technique with timers to
prevent hosts from retaining a forwarding table entry.
After a router crashes — routers advertise their information periodically, and a
host discards a route if the timer for the route expires.
Slide 2- 97