CSE313
-
Upload
dhiraj-kapila -
Category
Documents
-
view
15 -
download
3
description
Transcript of CSE313
Internet Control Message Protocol (ICMP) and
Super-Net & Sub-Net Address Extension
Tarun Bhalla*, Dhiraj Kapila
**,Anchal Nayyar
***
* Assistant Professor, Anand College of Engineering & Management, Kapurthala ** Assistant Professor, DAV Institute of Engineering & Technology, Jalandhar
***Lecturer, Doaba Group of Colleges, Rahon
Abstract: This paper specifies the concept and the
message format of the Internet Control Message
Protocol (ICMP) to enable hosts attached to multicast
or broadcast networks to discover the IP addresses of
their neighboring routers. Also, we represent the super-
net addressing and subnet addressing with its
implementation of subnets with mask representation.
We are also discussed the motivation, purpose,
restrictions and the encapsulation of ICMP.
Keywords:-Introduction, ICMP message format,
Motivation, Purpose, Restrictions and Encapsulation of
ICMP, super-net and subnet addressing, Implementation
of subnets with masks representation, conclusion.
1. Introduction
ICMP is used for error messages, and other messages
intended for the TCP/IP software itself, rather than any
particular user program. For example, if you attempt to
connect to a host, your system may get back an ICMP
message saying "host unreachable". ICMP can also be
used to find out some information about the network.
ICMP is similar to UDP, in that it handles messages that
fit in one datagram. However it is even simpler than
UDP. It doesn't even have port numbers in its header.
Since all ICMP messages are interpreted by the network
software itself, no port numbers are needed to say
where a ICMP message is supposed to go. [1]
Before a host can send IP datagrams beyond its directly-
attached subnet, it must discover the address of at least
one operational router on that subnet. Typically, this is
accomplished by reading a list of one or more router
addresses from a (possibly remote) configuration file at
startup time. On multicast links, some hosts also
discover router addresses by listening to routing
protocol traffic. Both of these methods have serious
drawbacks: configuration files must be maintained
manually -- a significant administrative burden – and
are unable to track dynamic changes in router
availability; eavesdropping on routing traffic requires
that hosts recognize the particular routing protocols in
use, which vary from subnet to subnet and which are
subject to change at any time. This document specifies
an alternative router discovery method using a pair of
ICMP messages, for use on multicast links. It eliminates
the need for manual configuration of router addresses
and is independent of any specific routing protocol. [2] 2. ICMP Message Format
ICMP Messages
The Common ICMP header
Each ICMP message has its own format, they
all begin with the same three fields
TYPE (8-bit): identifies the message
CODE (8-bit): provides further information
about the message type
CHECKSUM (16-bit):
In addition, ICMP messages that report errors
always include the header and the first 64 data
bits of the datagram causing the problem.[3]
Fig: ICMP Encapsulation [3]
Fig: ICMP message format [3]
Echo request and reply message
Used to test reachability
An echo request can also contain optional data
(the content does not matter)
An echo reply always returns exactly the same
data as was received in the request
Sent by ping program [4]
Host Unreachable
When a router cannot forward or deliver an IP
datagram, it sends a destination unreachable
message back to the original source
The CODE field specifies details
0: network unreachable
1: host unreachable
2: protocol unreachable
3: port unreachable
4: fragmentation needed and DF
(don’t fragment) set
5:source route failed
Source Quench
To deal with congestion and datagram flow
control
When routers are overrun with traffic, it is
called congestion.
A machine uses ICMP source quench
messages to report congestion to the original
source
There is no ICMP message to reverse the effect
of a source quench. Usually the host gradually
increases the rate when no further source
quench requests are received.[4]
Route Redirect
Routers exchange routing information
periodically to accommodate network changes
and keep their routes up-to-date.
A general rule:-
Routers are assumed to know correct routes;
hosts begin with minimal routing information
and learn new routes from routers.
When a router detects a host using a non-
optimal route, it sends the host an ICMP
redirect message, requesting that the host
change its rout.
Limited to interactions between a router and a
host on a directly connected network.
Time Exceeded
The sending operating system (or application)
sets the time to live field in the IP header to a
value that represents the maximum time the
datagram is allowed to travel on the Internet.
The field value is decreased at each point that
the Internet header (IP Header) is being
processed.
The field value is measured in units of
seconds.
The datagram must be discarded if this field
value equals zero - before reaching its
destination.[4]
Parameter Problem
ICMP Parameter Problem message is sent
when a router (must generate this message) or
a host (should generate this message) process a
datagram and finds a problem with the IP
header parameters.
It is only sent if the error caused the datagram
to be discarded.
Timestamp Request and Timestamp Reply
The ICMP Time Stamp Request and Reply
allows a node to query another for the current
time.
This allows a sender to determine the amount
of latency that a particular network is
experiencing.
The sender initializes the identifier (used to
identify Timestamp requests aimed at different
destination hosts) and sequence number (if
multiple Timestamp requests are sent to the
same destination host), sets the originate time
stamp and sends it to the recipient.
The receiving host fills in the receive and
transmit time stamps, change the type of the
message to time stamp reply and returns it to
the recipient. [4]
Information Request and Reply
The ICMP Information Request/Reply pair
was intended to support self-configuring
systems such as diskless workstations at boot
time, to allow them to discover their network
address.
The sender (a host) fills in the request with the
Destination IP address in the IP Header set to
zero (meaning this network).
The request may be sent with both Source IP
Address and Destination IP Address set to
zero.
The sender initializes the identifier and the
sequence number, both used to match the
replies with the requests, and sends out the
request.[4]
Address Mask Request and Reply
The ICMP Address Mask Request (and Reply)
is intended for diskless systems to obtain its
subnet mask in use on the local network at
bootstrap time.
Address Mask request is also used when a
node wants to know the address mask of an
interface. The reply (if any) contains the mask
of that interface.
Once a host has obtained an IP address, it
could than send an Address Mask request
message to the broadcast address of the
network they reside on (255.255.255.255).[4]
Motivation
IP may fail to deliver datagrams because
the destination is not available
the time-to-live counter expires
routers become congested
We need to let the sender know what has
happened
ICMP is a required part of IP
Purpose
ICMP allows routers (and hosts) to send error
or control messages to other routers or hosts
ICMP provides communication between the
Internet Protocol software on one machine and
the Internet Protocol software on another
Restrictions
ICMP messages are not generated for errors
that result from datagrams carrying ICMP error
messages. Why? ICMP is only sent to the original source. Why?
ICMP Encapsulation
ICMP is encapsulated in an IP packet, but is
considered part of the IP or Internet layer.[3]
3. Super-net Addressing A super-net is an Internet Protocol (IP) network that is
formed from the combination of two or more networks
(or subnets) with a common Classless Inter-Domain
Routing (CIDR) routing prefix. The new routing prefix
for the combined network aggregates the prefixes of the
constituent networks. It must not contain other prefixes
of networks that do not lie in the same routing path. The
process of forming a super-net is often called super-
netting, route aggregation, or route summarization.
Step 1:
A method by which an organization may use a block of
class C addresses rather than a Class B address. The
block: large enough to provide an individual class C
address to every possible network, likely to be
connected to the Internet. [5]
Routing: Instead of one entry per organization, this may
require multiple entries.
Classless Inter Domain routing (CIDR):
CIDR collapses a block of contiguous (class C)
addresses into a single entry (network address, count)
where
- Network address: the smallest address in the block
- Count: the total number of network addresses in the
block.
Thus (211.15.136.0, 8) can be used to specify 8
addresses from
EXAMPLE: 211.15.136.0 to 211.15.143.0
In practice CIDR does not restrict itself to only class C
addresses. [5]
The only requirement is that count should be 2n.
The bit mask is used to specify the total network part of
the 32 bit IP address of the lowest net address. Since
136 is 10001000, the mask will have 16+5 bit set to 1.
ie., the mask will be 255.255.248.0 in the given
example
Super netting requires unconventional router software
for all internal routers of the organization to understand
the Range of addresses.
Particularly suitable for ISPs where for each ISP's own
Routers, the routing table contains the address of each
subscriber. But for other ISPs, the table has one entry
each for each of the other ISP. [5]
Step 2:
The block may be written as (211.15.136.0, 8) OR
211.15.136.0, 2048
Where 2048 is the block of host addresses OR
211.15.136.0, 255.255.248.0 where 255.255.248.0 is
the mask.
This reduces the number of entries from 8 (for standard
class C mask of 255.255.255.0) to only 1 with the new
mask. [5]
INPUT OUTPUT
Any address b/w
211.15.136.0 to
211.15.143.0
211.15.136.0
211.15.135.0 211.15.128.0
211.15.144.0 211.15.144.0
NEED OF ISPs:-
Steps 3:
GENERALIZATION: CIDR
- No need to restrict to class C (32 – m)
- The block of (host) addresses = 2
Where m is the number of leading bits in the
address, which specify the network part of the
address. [5]
- Uses a bit mask to identify the size of the block
CIDR Notation / Slash notation: CIDR block may be
represented by the (lowest) addresses and the no of bits
which are 1 in the mask) Thus for the example
211.15.136.0/21 defines the block in the above
example.
If this were to be generalized as x. y. z. w/m where
1<= m <= 32, one gets blocks of addresses of a large
no. of sizes [5]
CIDR
NOTATION
MASK Block of
addresses
/1 128.0.0.0 2,147,484,448
/2 192.0.0.0 1,073,742,224
.
.
/8 255.0.0.0 16,777,216
/9 255.128.0.0 8,388,608
.
.
/15 255.254.0.0 131,072
/16 255.255.0.0 65,536
/17 255.255.128.0 32,768
.
/23
255.255.254.0
512
/24 255.255.255.0 256
/25 255.255.255.128 128
.
.
.
/29 255.255.255.248 8
/30 255.255.255.252 4
/31 255.255.255.254 2
/32 255.255.255.255 1
4. SUBNET Addressing
A subnet-work, or subnet, is a logically visible
subdivision of an IP network. All computers that belong
to a subnet are addressed with a common, identical,
most-significant bit-group in their IP address. This
results in the logical division of an IP address into two
fields, a network or routing prefix and the rest field. The
rest field is a specific identifier for the computer or the
network interface.
Some basic points about subnet addressing as follows:
In the original IP addressing scheme, each
physical network is assigned a unique network
address.
Individual sites can have the freedom to
modify addresses and routes as long as the
modifications remain invisible to other sites.
Conceptual interpretation of a 32-bit IP
address[6]
Hierarchical addressing, hierarchical routing.
E.g., telephone system
Subdivides the host suffix into a pair of fields
for physical network and host.
Allows an organization to use a single network
prefix for multiple physical networks.[6]
Interpreted only by routers and hosts at the
site; treated like normal address elsewhere
Both physical networks share prefix 128.10.
Router R uses third octet of address to choose
physical net
Address Mask: Each physical network is
assigned 32-bit address mask (also called subnet
mask)[6]
Flexibility in Subnet Address Assignment
To allow maximum flexibility in choosing how to
partition subnet address, the TCP/IP subnet standard
permits subnet interpretation to be chosen
independently for each physical network. Once a subnet
partition has been selected, all machines on that
network must honor it.[6]
5. Implementation of Subnet with marks
representation
A site using subnet addressing must choose a 32-
bit subnet mask for each network.
Example:-
11111111 11111111 11111111 00000000
11111111 11111111 00011000 01000000
Subnet mask representation
Dotted decimal notation
e.g. 255.255.255.0
{<network number>, <subnet number>, <host
number>}
e.g.) { 128.10, 1, 0 } [6]
CONCLUSION
We have concluded that ICMP is widely used in the
internet for message transmission. It is a connectionless
and non-reliable protocol. We have discussed message
format of ICMP and its details which give brief
information how the ICMP (internet control message
protocol) works. A super-net is an Internet Protocol (IP)
network that is formed from the combination of two or
more networks (or subnets) with a common Classless
Inter-Domain Routing (CIDR) routing prefix. A subnet
work, or subnet, is a logically visible subdivision of
an IP network. All computers that belong to a subnet are
addressed with a common, identical, most-significant
bit-group in their IP address.
REFERENCES
[1]
http://www.doc.ic.ac.uk/~ih/doc/pc_conn/tcpip/intro/int
ro4.html
[2]
http://www.javvin.com/protocol/rfc1256.pdf
[3]
http://www.cis.syr.edu/~wedu/Teaching/cis758/Lecture
Notes/ICMP.pdf
[4]
http://althing.cs.dartmouth.edu/local/ICMP_Scanning_v
3.0.pdf
[5]
http://web2.uwindsor.ca/courses/cs/aggarwal/cs60375/n
otes/chap10.doc
[6]
http://mmlab.snu.ac.kr/courses/2006_computer_networ
ks/prev/lecture2004/5_subnettin
Tarun Bhalla received his B.Tech
degree in Computer Science from Punjab
Technical University. He is currently
working as Assistant Professor in Anand
College of Engineering and Management,
Kapurthala. His research interest area
includes Database, Network Security Mobile
Computing and adhoc network.
Dhiraj Kapila received his B.Tech
degree in Computer Science from DAV
Institute of Engg & Technoly. He is
working as Assistant Professor in
DAVIET, Jaladhar. His research areas
include image processing, computer
networks and Network Security.
Anchal Nayyar received her B.Tech
and degree in Computer Science from
Punjab Technical University. She is
working as a Lecturer in Doaba Group
of Colleges Rahon. Her research
interest area includes Mobile
Computing and adhoc network.