0% found this document useful (0 votes)
27 views54 pages

Unit III Part III

The document discusses the Internet Control Message Protocol (ICMP), which addresses the lack of error-reporting and query mechanisms in the IP protocol. It outlines the types of ICMP messages, including error-reporting and query messages, and details the message format and error handling processes. Additionally, it covers debugging tools like ping and traceroute that utilize ICMP for diagnosing network issues.

Uploaded by

shreyanshi singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views54 pages

Unit III Part III

The document discusses the Internet Control Message Protocol (ICMP), which addresses the lack of error-reporting and query mechanisms in the IP protocol. It outlines the types of ICMP messages, including error-reporting and query messages, and details the message format and error handling processes. Additionally, it covers debugging tools like ping and traceroute that utilize ICMP for diagnosing network issues.

Uploaded by

shreyanshi singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Department of Applied Computational Science & Engg

Course Code :(KCS- 603) Course Name:Computer Networks

Error Reporting,
and Multicasting

Subject: Computer Networks


Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks
21-2 ICMP

The IP protocol has no error-reporting or


error-correcting mechanism. The IP protocol also
lacks a mechanism for host and management queries.
The Internet Control Message Protocol (ICMP) has
been designed to compensate for the above two
deficiencies. It is a companion to the IP protocol.
Topics discussed in this section:
Types of Messages
Message Format
Error Reporting and Query
Debugging Tools

Subject: Computer Networks


Types of Messages
Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks
• ICMP messages are divided into two broad categories: error-reporting messages
and query messages.
• The error-reporting messages report problems that a router or a host
(destination) may encounter when it processes an IP packet.
• The query messages, which occur in pairs, help a host or a network manager get
specific information from a router or another host.
• For example, nodes can discover their neighbors. Also, hosts can discover and
learn about routers on their network, and routers can help a node redirect its
messages.
Message Format
• An ICMP message has an 8-byte header and a variable-size data section.
• Although the general format of the header is different for each message type,
the first 4 bytes are common to all.
• As Figure 21.8 shows, the first field, ICMP type, defines the type of the
message. The code field specifies the reason for the particular message type.
• The last common field is the checksum field. The rest of the header is specific
for each message type.
• The data section in error messages carries information for finding the
original packet that had the error. In query messages, the data section carries
extra information based on the type of the query.
Subject: Computer Networks
Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks

Figure 21.8 General format of ICMP messages

Subject: Computer Networks


Error Reporting
Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks
• One of the main responsibilities of ICMP is to report errors.
• Although technology has produced increasingly reliable transmission
media, errors still exist and must be handled.
• IP is an unreliable protocol. This means that error checking and error
control are not a concern of IP.
• ICMP was designed, in part, to compensate for this shortcoming.
• However, ICMP does not correct errors-it simply reports them.
• Error correction is left to the higher-level protocols.
• Error messages are always sent to the original source because the only
information available in the datagram about the route is the source and
destination IP addresses.
• ICMP uses the source IP address to send the error message to the source
(originator) of the datagram.
• Five types of errors are handled: destination unreachable, source quench,
time exceeded, parameter problems, and redirection (see Figure 21.9).

Subject: Computer Networks


Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks

Note

ICMP always reports error messages to


the original source.

Subject: Computer Networks


Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks

Figure 21.9 Error-reporting messages

Subject: Computer Networks


Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks

Note

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
127.0.0.0 or 0.0.0.0.

Subject: Computer Networks


Department of Applied Computational Science & Engg
• Note thatCourse Codemessages
all error :(KCS- 603)contain
Course Name:Computer
a data sectionNetworks
that includes
the IP
header of the original datagram plus the first 8 bytes of data in that
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, as on UDP and TCP protocols, the
first 8 bytes provide information about the port numbers (UDP and TCP)
and sequence number (TCP).
• This information is needed so the source can inform the protocols (TCP or
UDP) about the error.
• ICMP forms an error packet, which is then encapsulated in an IP datagram
(see Figure 21.10).
1. Destination Unreachable
• When a router cannot route a datagram or a host cannot deliver a datagram,
the datagram is discarded and the router or the host sends a
destination-unreachable message back to the source host that initiated the
datagram.
• Note that destination-unreachable messages can be created by either a router
or the destination host.
Subject: Computer Networks
Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks

Figure 21.10 Contents of data field for the error messages

Subject: Computer Networks


2. Source Quench
Department of Applied Computational Science & Engg
Course Code
• The IP protocol is a :(KCS- 603) Courseprotocol.
connectionless Name:Computer Networks

• There is no communication between the source host, which produces the


datagram, the routers, which forward it, and the destination host, which
processes it.
• One of the ramifications of this absence of communication is the lack of
flow control.
• IP does not have a flow control mechanism embedded in the protocol.
• The lack of flow control can create a major problem in the operation of IP:
congestion.
• The source host never knows if the routers or the destination host has been
overwhelmed with datagrams.
• The source host never knows if it is producing datagrams faster than can be
forwarded by routers or processed by the destination host.

• The lack of flow control can create congestion in routers or the destination
host.
• A router or a host has a limited-size queue (buffer) for incoming datagrams
waiting to be forwarded (in the case of a router) or to be processed (in the
case of a host).
• If the datagrams are received much faster than they can be forwarded or
processed,
Subject: the queue
Computer may overflow.
Networks
Department of Applied Computational Science & Engg
• In this Course
case, Code :(KCS-
the router 603)
or the Course
host hasName:Computer
no choice butNetworks
to discard
some of the
datagrams.
• The source-quench message in ICMP was designed to add a kind of flow
control to the IP.
• When a router or host discards a datagram due to congestion, it sends a
source-quench message to the sender of the datagram.
• This message has two purposes.
• First, it informs the source that the datagram has been discarded.
• Second, it warns the source that there is congestion somewhere in the path
and that the source should slow down (quench) the sending process.
3. Time Exceeded
• The time-exceeded message is generated in two cases: routers use routing
tables to find the next hop (next router) that must receive the packet.
• If there are errors in one or more routing tables, a packet can travel in a loop
or a cycle, going from one router to the next or visiting a series of routers
endlessly.
• Each datagram contains a field called time to live that controls this situation.
• When a datagram visits a router, the value of this field is decremented by 1.

Subject: Computer Networks


Department of Applied Computational Science & Engg
• When theCourse
time-to-live value
Code :(KCS- reaches
603) 0, after decrementing,
Course Name:Computer Networks the router
discards the datagram.
• However, when the datagram is discarded, a time-exceeded message must be
sent by the router to the original source.
• Second, a time-exceeded message is also generated when not all fragments
that make up a message arrive at the destination host within a certain time
limit.
4. Parameter Problem
• Any ambiguity in the header part of a datagram can create serious problems
as the datagram travels through the Internet.
• If 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.
5. Redirection
• When a router needs to send a packet destined for another network, it must
know the IP address of the next appropriate router.
• The same is true if the sender is a host. Both routers and hosts must have a
routing table to find the address of the router or the next router.
• Routers take part in the routing update process, and are supposed to be
updated
Subject: constantly.
Computer Routing is dynamic.
Networks
Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks

Figure 21.11 Redirection concept

Subject: Computer Networks


Department of Applied Computational Science & Engg
• However, Course
for efficiency, hosts
Code :(KCS- 603) do notName:Computer
Course take part in the routing
update process
Networks
because there are many more hosts in an internet than routers.
• Updating the routing tables of hosts dynamically produces unacceptable
traffic.
• The hosts usually use static routing.
• When a host comes up, its routing table has a limited number of entries.
• It usually knows the IP address of only one router, the default router.
• For this reason, the host may send a datagram, which is destined for
another network, to the wrong router.
• In this case, the router that receives the datagram will forward the
datagram to the correct router.
• However, to update the routing table of the host, it sends a redirection
message to the host.
• This concept of redirection is shown in Figure 21.11. Host A wants to send
a datagram to host B.
• Router R2 is obviously the most efficient routing choice, but host A did not
choose router R2.
• The datagram goes to R1 instead. Router R1, after consulting its table,
finds that the packet should have gone to R2.
• It sends the packet to R2 and, at the same time, sends a redirection message
to host A. Host A's routing table can now be updated.
Subject: Computer Networks
Query Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks
• In addition to error reporting, ICMP can diagnose some network problems.
• This is accomplished through the query messages, a group of four different
pairs of messages, as shown in Figure 21.12.
• In this type of ICMP message, a node sends a message that is answered in a
specific format by the destination node.
• A query message is encapsulated in an IP packet, which in turn is
encapsulated in a data link layer frame.
• However, in this case, no bytes of the original IP are included in the
message, as shown in Figure 21.13.
1. 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.
• The echo-request and echo-reply messages can be used to determine if there is
communication at the IP level.
Subject: Computer Networks
Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks

Figure 21.12 Query messages

Subject: Computer Networks


Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks

Figure 21.13 Encapsulation of ICMP query messages

Subject: Computer Networks


Department of Applied Computational Science & Engg
• Because ICMP
Coursemessages
Code :(KCS-are
603)encapsulated in IP datagrams,
Course Name:Computer the receipt of an
Networks
echo-reply message by the machine that sent the echo request is proof that the
IP protocols in the sender and receiver are communicating with each other
using the IP datagram.
• Also, it is proof that the intermediate routers are receiving, processing, and
forwarding IP datagrams.
• Today, most systems provide a version of the ping command that can create a
series (instead of just one) of echo-request and echo-reply messages,
providing statistical information.
2. 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.
• It can also be used to synchronize the clocks in two machines.
3. Address-Mask Request and Reply
• A host may know its IP address, but it may not know the corresponding mask.
• For example, a host may know its IP address as 159.31.17.24, but it may not
know that the corresponding mask is /24.
• To obtain its mask, a host sends an address-mask-request message to a router
on theComputer
Subject: LAN. Networks
Department of Applied Computational Science & Engg
• If the hostCourse
knowsCode
the:(KCS-
address
603)of the router,
Course it sendsNetworks
Name:Computer the request directly to the
router.
• If it does not know, it broadcasts the message.
• The router receiving the address-mask-request message responds with an
address-mask-reply message, providing the necessary mask for the host.
• This can be applied to its full IP address to get its subnet address.
4. Router Solicitation and Advertisement
• As we discussed in the redirection message section, a host that wants to send
data to a host on another network needs to know the address of routers
connected to its own network.
• Also, the host must know if the routers are alive and functioning. The
router-solicitation and router-advertisement messages can help in this
situation.
• A host can broadcast (or multicast) a router-solicitation message.
• The router or routers that receive the solicitation message broadcast their
routing information using the router-advertisement message.
• A router can also periodically send router-advertisement messages even if no
host has solicited.
• Note that when a router sends out an advertisement, it announces not only
its own presence but also the presence of all routers on the network of which
it is aware.
Subject: Computer Networks
Debugging Tools
Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks
There are several tools that can be used in the Internet for debugging. We can
determine the viability of a host or router. We can trace the route of a packet.
We introduce two tools that use ICMP for debugging: ping and traceroute.
Ping
• We can use the ping program to find if a host is alive and responding.
• We use ping here to see how it uses ICMP packets.
• 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 echo-reply
message and stands the sequence number from 0; this number is incremented
by 1 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).

Subject: Computer Networks


Department of Applied Computational Science & Engg
Example 21.3
Course Code :(KCS- 603) Course Name:Computer Networks

We use the ping program to test the server fhda.edu. The


result is shown on the next slide. The ping program sends
messages with sequence numbers starting from 0. For
each probe it gives us the RTT time. The TTL (time to
live) field in the IP datagram that encapsulates an ICMP
message has been set to 62. At the beginning, ping defines
the number of data bytes as 56 and the total number of
bytes as 84. It is obvious that if we add 8 bytes of ICMP
header and 20 bytes of IP header to 56, the result is 84.
However, note that in each probe ping defines the number
of bytes as 64. This is the total number of bytes in the
ICMP packet (56 + 8).

Subject: Computer Networks


Department of Applied Computational Science & Engg
Example 21.3 (continued)
Course Code :(KCS- 603) Course Name:Computer Networks
means the packet cannot travel mare than 62 hops

tells us the number of packets sent, the number of packets received, the total time, and
Subject: Computer
the RTT minimum, Networks
maximum, and average.
Traceroute Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks
• 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.
• We have seen an application of the traceroute program to simulate the loose
source route and strict source route options of an IP datagram.
• We use this program in conjunction with ICMP packets.
• The program elegantly uses two ICMP messages, time exceeded and
destination unreachable, to find the route of a packet.
• This is a program at the application level that uses the services of UDP.
• Let us show the idea of the traceroute program by using Figure 21.15.
Figure 21.15 The traceroute program operation

Subject: Computer Networks


Department of Applied Computational Science & Engg
Given the topology, we know
Course Code :(KCS-that
603)aCourse
packet from host ANetworks
Name:Computer to host B
travels through
routers Rl and R2. However, most of the time, we are not aware of this topology.
There could be several routes from A to B. The traceroute program uses the
ICMP message and the TTL (time to live) field in the IP packet to find the
route.
1. The traceroute program uses the following steps to find the address of the
router R1 and the round-trip time between host A and router R1.
a. The traceroute application at host A sends a packet to destination B
using UDP; the message is encapsulated in an IP packet with a TTL
value of 1. The program notes the time the packet is sent.
b. Router R1 receives the packet and decrements the value of TTL to O. It
then discards the packet (because TTL is 0). The router, however,
sends a time-exceeded ICMP message (type: 11, code: 0) to show that
the TTL value is 0 and the packet was discarded.
c. The traceroute program receives the ICMP messages and uses the
destination address of the IP packet encapsulating ICMP to find the IP
address of router R1. The program also makes note of the time the
packet has arrived. The difference between this time and the time at
step a is the round-trip time.

Subject: Computer Networks


Department of Applied Computational Science & Engg
The tracerouteCourse
program repeats steps a to c three times to get a better average
Code :(KCS- 603) Course Name:Computer Networks
round-trip time. The first trip time may be much longer than the second or third
because it takes time for the ARP program to find the physical address of router
R1. For the second and third trips, ARP has the address in its cache.
2. The traceroute program repeats the previous steps to find the address of router
R2 and the round-trip time between host A and router R2. However, in this
step, the value of TTL is set to 2. So router R1 forwards the message, while
router R2 discards it and sends a time-exceeded ICMP message.
3. The traceroute program repeats step 2 to find the address of host B and the
round-trip time between host A and host B. When host B receives the packet, it
decrements the value of TTL, but it does not discard the message since it has
reached its final destination.
How can an ICMP message be sent back to host A?
The traceroute program uses a different strategy here. The destination port of
the UDP packet is set to one that is not supported by the UDP protocol. When
host B receives the packet, it cannot find an application program to accept the
delivery. It discards the packet and sends an ICMP destination-unreachable
message (type: 3, code: 3) to host A. Note that this situation does not happen at
router R1 or R2 because a router does not check the UDP header. The
traceroute program records the destination address of the arrived IP datagram
and makes note of the round-trip time. Receiving the destination unreachable
message with a code value 3 is an indication that the whole route has been
Subject:
foundComputer
and there is Networks
no need to send more packets.
Department of Applied Computational Science & Engg
Example 21.4
Course Code :(KCS- 603) Course Name:Computer Networks

We use the traceroute program to find the route from the


computer voyager.deanza.edu to the server fhda.edu. The
following shows the result:

The unnumbered line after the command shows that the


destination is 153.18.8.1. The packet contains 38 bytes: 20
bytes of IP header, 8 bytes of UDP header, and 10 bytes of
application data. The application data are used by
traceroute to keep track of the packets.
Subject: Computer Networks
Department of Applied Computational Science & Engg
Example 21.4 (continued)
Course Code :(KCS- 603) Course Name:Computer Networks

The first line shows the first router visited. The router is
named Dcore.fhda.edu with IP address 153.18.31.254.
The first round-trip time was 0.995 ms, the second was
0.899 ms, and the third was 0.878 ms. The second line
shows the second router visited. The router is named
Dbackup.fhda.edu with IP address 153.18.251.4. The
three round-trip times are also shown. The third line
shows the destination host. We know that this is the
destination host because there are no more lines. The
destination host is the server fhda.edu, but it is named
tiptoe.fhda.edu with the IP address 153.18.8.1. The three
round-trip times are also shown.
Subject: Computer Networks
Department of Applied Computational Science & Engg
Example 21.5
Course Code :(KCS- 603) Course Name:Computer Networks

In this example, we trace a longer route, the route to


xerox.com (see next slide). Here there are 17 hops
between source and destination. Note that some
round-trip times look unusual. It could be that a router
was too busy to process the packet immediately.

Subject: Computer Networks


Department of Applied Computational Science & Engg
Example 21.5 (continued)
Course Code :(KCS- 603) Course Name:Computer Networks

Subject: Computer Networks


Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks
21-3 IGMP

The IP protocol can be involved in two types of


communication: unicasting and multicasting. The
Internet Group Management Protocol (IGMP) is one
of the necessary, but not sufficient, protocols that is
involved in multicasting. IGMP is a companion to the
IP protocol.
Topics discussed in this section:
Group Management
IGMP Messages and IGMP Operation
Encapsulation
Netstat Utility
Subject: Computer Networks
Department of Applied Computational Science & Engg
Group ManagementCourse Code :(KCS- 603) Course Name:Computer Networks

• For multicasting in the Internet we need routers that are able to route
multicast packets.
• The routing tables of these routers must be updated by using one of the
multicasting routing protocols.

• IGMP is not a multicasting routing protocol; it is a protocol that manages


group membership.
• In any network, there are one or more multicast routers that distribute
multicast packets to hosts or other routers.
• The IGMP protocol gives the multicast routers information about the
membership status of hosts (routers) connected to the network.

• A multicast router may receive thousands of multicast packets every day for
different groups.
• If a router has no knowledge about the membership status of the hosts, it
must broadcast all these packets.
• This creates a lot of traffic and consumes bandwidth.
• A better solution is to keep a list of groups in the network for which there is at
least one loyal member.
Subject:
• IGMP Computer Networks
helps the multicast router create and update this list.
Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks

Figure 21.16 IGMP message types

The current version. ICMPv2 has three types of messages: the query, the
membership report, and the leave report.

There are two types of query messages: general and special (see Figure 21.16).

Subject: Computer Networks


Message Format
Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks
1. Type. This 8-bit field defines the type of message, as shown in Table 21.1. The
value of the type is shown in both hexadecimal and binary notation.
2. Maximum Response Time. This 8-bit field defines the amount of time in
which a query must be answered. The value is in tenths of a second; for
example, if the value is 100, it means 10 s.
3. Checksum. This is a 16-bit field carrying the checksum. The checksum is
calculated over the 8-byte message.
4. Group address. The value of this field is 0 for a general query message. The
value defines the groupid (multicast address of the group) in the special
query, the membership report, and the leave report messages.

Figure 21.17 IGMP message format Table 21.1 IGMP type field

Subject: Computer Networks


IGMP Operation
Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks
• IGMP operates locally. A multicast router connected to a network has a list of
multicast addresses of the groups with at least one loyal member in that network (see
Figure 21.18).
• For each group, there is one router that has the duty of distributing the multicast
packets destined for that group.
• This means that if there are three multicast routers connected to a network, their lists
of groupids are mutually exclusive.
• For example, in Figure 21.18 only router R distributes packets with the multicast
address of 225.70.8.20.

• A host or multicast router can have membership in a group.


• When a host has membership, it means that one of its processes (an application
program) receives multicast packets from some group.
• When a router has membership, it means that a network connected to one of its other
interfaces receives these multicast packets.
• In both cases, the host and the router keep a list of groupids and relay their interest to
the distributing router.

• For example, in Figure 21.18, router R is the distributing router.


• There are two other multicast routers (R1 and R2) that, depending on the group list
maintained by router R, could be the recipients of router R in this network.
• Routers RI and R2 may be distributors for some of these groups in other networks,
Subject:
but notComputer Networks
on this network.
Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks

Figure 21.18 IGMP operation

Subject: Computer Networks


1. Joining aDepartment
Groupof Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks
• A host or a router can join a group. A host maintains a list of processes that
have membership in a group.
• When a process wants to join a new group, it sends its request to the host.
• The host adds the name of the process and the name of the requested group to
its list.
• If this is the first entry for this particular group, the host sends a membership
report message.
• If this is not the first entry, there is no need to send the membership report
since the host is already a member of the group; it already receives multicast
packets for this group.
• The protocol requires that the membership report be sent twice, one after the
other within a few moments.
• In this way, if the first one is lost or damaged, the second one replaces it.
2. Leaving a Group
• When a host sees that no process is interested in a specific group, it sends a
leave report.
• Similarly, when a router sees that none of the networks connected to its
interfaces is interested in a specific group, it sends a leave report about that
group.
Subject: Computer Networks
Department of Applied Computational Science & Engg
• However, when a Code
Course multicast
:(KCS- router receives
603) Course a leave report,
Name:Computer it cannot
Networks
immediately purge that group from its list because the report comes from just
one host or router; there may be other hosts or routers that are still interested
in that group.
• To make sure, the router sends a special query message and inserts the
groupid, or multicast address, related to the group.
• The router allows a specified time for any host or router to respond.
• If, during this time, no interest (membership report) is received, the router
assumes that there are no loyal members in the network and purges the group
from its list.
3. Monitoring Membership
• A host or router can join a group by sending a membership report message.
• It can leave a group by sending a leave report message. However, sending these
two types of reports is not enough.
• Consider the situation in which there is only one host interested in a group, but
the host is shut down or removed from the system.
• The multicast router will never receive a leave report. How is this handled?
• The multicast router is responsible for monitoring all the hosts or routers in a
LAN to see if they want to continue their membership in a group.

Subject: Computer Networks


Department of Applied Computational Science & Engg
• The router periodically
Course (by603)
Code :(KCS- default,
Courseevery 125 s) sends
Name:Computer a general
Networks query
message.
• In this message, the group address field is set to 0.0.0.0.
• This means the query for membership continuation is for all groups in
which a host is involved, not just one.
• The router expects an answer for each group in its group list; even new
groups may respond.

• The query message has a maximum response time of 10 s (the value of the
field is actually 100, but this is in tenths of a second).
• When a host or router receives the general query message, it responds with
a membership report if it is interested in a group.
• However, if there is a common interest (two hosts, for example, are
interested in the same group), only one response is sent for that group to
prevent unnecessary traffic. This is called a delayed response.
• Note that the query message must be sent by only one router (normally
called the query router), also to prevent unnecessary traffic.

Subject: Computer Networks


Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks

Note

In IGMP, a membership report is sent


twice, one after the other.

Subject: Computer Networks


Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks

Note

The general query message does not


define a particular group.

Subject: Computer Networks


4. Delayed Response
Department of Applied Computational Science & Engg
Course Code :(KCS-
• To prevent unnecessary 603)
traffic, Courseuses
IGMP Name:Computer Networks strategy.
a delayed response
• When a host or router receives a query message, it does not respond immediately;
it delays the response.
• Each host or router uses a random number to create a timer, which expires
between 1 and 10 s.
• The expiration time can be in steps of 1 s or less.
• A timer is set for each group in the list.
• For example, the timer for the first group may expire in 2 s, but the timer for the
third group may expire in 5 s.
• Each host or router waits until its timer has expired before sending a membership
report message.
• During this waiting time, if the timer of another host or router, for the same
group, expires earlier, that host or router sends a membership report.
• Because, as we will see shortly, the report is broadcast, the waiting host or router
receives the report and knows that there is no need to send a duplicate report for
this group; thus, the waiting station cancels its corresponding timer.

Query Router
• Query messages may create a lot of responses. To prevent unnecessary traffic,
IGMP designates one router as the query router for each network.
• Only this designated router sends the query message, and the other routers are
Subject: Computer
passive (they receiveNetworks
responses and update their lists).
Department of Applied Computational Science & Engg
Example 21.6
Course Code :(KCS- 603) Course Name:Computer Networks

Imagine there are three hosts in a network, as shown in


Figure 21.19. A query message was received at time 0; the
random delay time (in tenths of seconds) for each group
is shown next to the group address. Show the sequence of
report messages.

Solution
The events occur in this sequence:
a. Time 12: The timer for 228.42.0.0 in host A expires,
and a membership report is sent, which is received by
the router and every host including host B which
cancels its timer for 228.42.0.0.
Subject: Computer Networks
Department of Applied Computational Science & Engg
Example 21.6 (continued)
Course Code :(KCS- 603) Course Name:Computer Networks

b. Time 30: The timer for 225.14.0.0 in host A expires, and


a membership report is sent which is received by the
router and every host including host C which cancels its
timer for 225.14.0.0.
c. Time 50: The timer for 238.71.0.0 in host B expires,
and a membership report is sent, which is received by
the router and every host.
d. Time 70: The timer for 230.43.0.0 in host C expires,
and a membership report is sent, which is received by
the router and every host including host A which
cancels its timer for 230.43.0.0.
Subject: Computer Networks
Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks

Figure 21.19 Example 21.6

Subject: Computer Networks


Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks

Table 21.2 Destination IP addresses

Subject: Computer Networks


Department of Applied Computational Science & Engg
Example 21.7
Course Code :(KCS- 603) Course Name:Computer Networks

Change the multicast IP address 230.43.14.7 to an


Ethernet multicast physical address.

Solution
We can do this in two steps:
a. We write the rightmost 23 bits of the IP address in
hexadecimal. This can be done by changing the
rightmost 3 bytes to hexadecimal and then subtracting
8 from the leftmost digit if it is greater than or equal to
8. In our example, the result is 2B:0E:07.

Subject: Computer Networks


Department of Applied Computational Science & Engg
Example 21.7 (continued)
Course Code :(KCS- 603) Course Name:Computer Networks

b. We add the result of part a to the starting Ethernet


multicast address, which is 01:00:5E:00:00:00. The
result is

Subject: Computer Networks


Department of Applied Computational Science & Engg
Example 21.8
Course Code :(KCS- 603) Course Name:Computer Networks

Change the multicast IP address 238.212.24.9 to an


Ethernet multicast address.
Solution
a. The rightmost 3 bytes in hexadecimal is D4:18:09. We
need to subtract 8 from the leftmost digit, resulting in
54:18:09.
b. We add the result of part a to the Ethernet multicast
starting address. The result is

Subject: Computer Networks


Department of Applied Computational Science & Engg
Example 21.9
Course Code :(KCS- 603) Course Name:Computer Networks

We use netstat (see next slide) with three options: -n, -r,
and -a. The -n option gives the numeric versions of IP
addresses, the -r option gives the routing table, and the -a
option gives all addresses (unicast and multicast). Note
that we show only the fields relative to our discussion.
“Gateway” defines the router, “Iface” defines the
interface.

Note that the multicast address is shown in color. Any


packet with a multicast address from 224.0.0.0 to
239.255.255.255 is masked and delivered to the Ethernet
interface.
Subject: Computer Networks
Department of Applied Computational Science & Engg
Example 21.9 (continued)
Course Code :(KCS- 603) Course Name:Computer Networks

Subject: Computer Networks


Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks

Figure 21.23 Comparison of network layers in version 4 and version 6

Subject: Computer Networks


Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks

Table 21.3 Comparison of error-reporting messages in ICMPv4 and ICMPv6

Subject: Computer Networks


Department of Applied Computational Science & Engg
Course Code :(KCS- 603) Course Name:Computer Networks

Table 21.4 Comparison of query messages in ICMPv4 and ICMPv6

Subject: Computer Networks

You might also like