32226993-ipv4
TRANSCRIPT
8/8/2019 32226993-IPV4
http://slidepdf.com/reader/full/32226993-ipv4 1/16
IPV4 Address Classes (32-Bit)
Multi Cast:
Multicast addressing is a network technology for the delivery of information to a group of
destinations simultaneously using the most efficient strategy to deliver the messages over each
link of the network only once, creating copies only when the links to the multiple destinationssplit.
The word "multicast" is typically used to refer to IP Multicast, which is often employed for
streaming media and Internet television applications. In IP Multicast the implementation of themulticast concept occurs at the IP routing level, where routers create optimal distribution paths
for datagrams sent to a multicast destination address spanning tree in real-time. At the Data Link
Layer , Multicast is also used to describe one-to-many distribution such as Ethernet multicast addressing, Asynchronous Transfer Mode (ATM) point-to-multipoint virtual circuits or
Infiniband multicast.
Technical description
IP Multicast is a technique for one to many communication over an IP infrastructure. It scales to
a larger receiver population by not requiring prior knowledge of who or how many receiversthere are. Multicast uses network infrastructure efficiently by requiring the source to send a
packet only once, even if it needs to be delivered to a large number of receivers. The nodes in the
network take care of replicating the packet to reach multiple receivers only when necessary. Themost common low-level protocol to use multicast addressing is UDP. By its nature, UDP is not
CLASS RANGE FIRST
BIT
USAGE SUBNET
MASK
NETWORK
BITS
HOST
BITS
PRIVATE
ADDRESS
A 1-126 0 Commercially
available
255.0.0.0 8 24 10.0.0.0/8
B 128-191 10 on the 255.255.0.0 16 16 172.16.0.0
2
C 192-223 110 internet 255.255.255.
0
24 8 192.168.0.
16
D 224-239 1110 Multicasting X X X
E 240-255 11110 Testing/Resea
rch
X X X
8/8/2019 32226993-IPV4
http://slidepdf.com/reader/full/32226993-ipv4 2/16
reliable - messages can be lost or delivered out of order. Reliable multicast protocols such as
PGM have been developed to add loss detection and retransmission on top of IP Multicast.
Key concepts in IP Multicast include an IP Multicast group address, a multicast distribution treeand receiver driven tree creation.
An IP Multicast group address is used by sources and the receivers to send and receive content.
Sources use the group address as the IP destination address in their data packets. Receivers use
this group address to inform the network that they are interested in receiving packets sent to thatgroup. For example, if some content is associated with group 239.1.1.1, the source will send data
packets destined to 239.1.1.1. Receivers for that content will inform the network that they are
interested in receiving data packets sent to the group 239.1.1.1. The receiver "joins" 239.1.1.1.
The protocol used by receivers to join a group is called the Internet Group Management Protocol or IGMP.
Once the receivers join a particular IP Multicast group, a multicast distribution tree is
constructed for that group. The protocol most widely used for this is Protocol Independent Multicast or PIM. It sets up multicast distribution trees such that data packets from senders to a
multicast group reach all receivers which have "joined" the group. E.g. all data packets sent to
the group 239.1.1.1 are received by receivers who joined 239.1.1.1. There are many different
flavors of PIM: Sparse Mode (SM), Dense Mode (DM), Source Specific Mode (SSM) andBidirectional Mode (Bidir) [Also commonly known as Sparse-Dense Mode (SDM)]. Of these
PIM-SM is the most widely deployed as of 2006; SSM and Bidir are simpler and more scalable
variations developed more recently and gaining in popularity.
IP Multicast does not require a source sending to a given group to know about the receivers of the group. The multicast tree construction is initiated by network nodes which are close to the
receivers or is receiver driven. This allows it to scale to a large receiver population. The IPMulticast model has been described by Internet architect Dave Clark as "You put packets in atone end, and the network conspires to deliver them to anyone who asks."
Multicast (top) compared with unicast broadcasting (bottom). Orange circles represent endpoints,
and green circles represent routing points.
IP Multicast creates state information ("state") per multicast distribution tree in the network, i.e.,
current IP Multicast routing protocols do not aggregate state corresponding to multiple
distribution trees. So if a router is part of 1000 multicast trees, it has 1000 multicast routing and
forwarding entries. As a result there are worries about scaling multicast to large numbers of distribution trees. However, because multicast state exists only along the distribution tree it is
unlikely that any single router in the Internet maintains state for all multicast trees. This is a
common misunderstanding compared to unicast. A unicast router needs to know how to reach allother unicast addresses in the Internet, even if it does this using just a default route. For this
reason, aggregation is key to scaling unicast routing. Also, there are core routers that carry routes
in the hundreds of thousands because they contain the Internet routing table. On the other hand, amulticast router does NOT need to know how to reach all other multicast trees in the Internet. It
8/8/2019 32226993-IPV4
http://slidepdf.com/reader/full/32226993-ipv4 3/16
only needs to know about multicast trees for which it has receivers downstream of it. This is key
to scaling multicast. It is very unlikely that core Internet routers would need to keep state for all
multicast distribution trees, they only need to keep state for trees with downstream membership.When this type of router joins a shared forwarding tree it is referred to as a graft and when it is
removed it is called a prune.
IP Multicast is widely deployed in enterprises, commercial stock exchanges and multimedia
content delivery networks. A common enterprise use of IP Multicast is for IPTV applicationssuch as distance learning and televised company meetings.
Other multicast technologies
As of 2006, most efforts at scaling multicast up to large networks have concentrated on the
simpler case of single-source multicast, which seems to be more computationally tractable. [citation
needed ]
Still, the large state requirements in routers make applications using a large number of treesunworkable using IP Multicast. Take presence information as an example where each person
needs to keep at least one tree of its subscribers if not several. No mechanism has yet beendemonstrated that would allow the IP Multicast model to scale to millions of senders and
millions of multicast groups and, thus, it is not yet possible to make fully-general multicast
applications practical. For these reasons, and also reasons of economics, IP Multicast is not ingeneral use in the commercial Internet.
Explicit Multi-Unicast (XCAST) is an alternate multicast strategy to IP Multicast that provides
reception addresses of all destinations with each packet. As such, since the IP packet size is
limited in general, XCAST cannot be used for multicast groups of large number of destinations.
The XCAST model generally assumes that the stations participating in the communication areknown ahead of time, so that distribution trees can be generated and resources allocated by
network elements in advance of actual data traffic.
Other multicast technologies not based on IP Multicast are more widely used. Notably theInternet Relay Chat (IRC), which is more pragmatic and scales better for large numbers of small
groups. IRC implements a single spanning tree across its overlay network for all conference
groups. This leads to suboptimal routing for some of these groups however. Additionally IRCkeeps a large amount of distributed state, which limits growth of an IRC network, leading to
fractioning into several non-interconnected networks.[1] The lesser known PSYC technology uses
custom multicast strategies per conference.[2] Also some peer-to-peer technologies employ the
multicast concept when distributing content to multiple recipients.
Internet Protocol version 4 (IPv4):
Internet Protocol version 4 (IPv4) is the fourth revision in the development of the Internet
Protocol (IP) and it is the first version of the protocol to be widely deployed. Together with IPv6,
it is at the core of standards-based internetworking methods of the Internet, and is still by far the
most widely deployed Internet Layer protocol.
8/8/2019 32226993-IPV4
http://slidepdf.com/reader/full/32226993-ipv4 4/16
It is described in IETF publication RFC 791 (September 1981) which rendered obsolete RFC 760
(January 1980). The United States Department of Defense also standardized it as MIL-STD-
1777.
IPv4 is a data-oriented protocol to be used on a packet switched internetwork (e.g., Ethernet). It
is a best effort delivery protocol in that it does not guarantee delivery, nor does it assure proper sequencing, or avoid duplicate delivery. These aspects are addressed by an upper layer protocol
(e.g. TCP, and partly by UDP). IPv4 does, however, provide data integrity protection through theuse of packet checksums.
The Internet Protocol Suite
Application Layer
BGP · DHCP · DNS · FTP · GTP · HTTP ·
IMAP · IRC · Megaco · MGCP · NNTP ·NTP · POP · RIP · RPC · RTP · RTSP ·
SDP · SIP · SMTP · SNMP · SOAP · SSH ·
Telnet · TLS/SSL · XMPP · (more)
Transport Layer
TCP · UDP · DCCP · SCTP · RSVP · ECN ·
(more)
Internet Layer
IP (IPv4, IPv6) · ICMP · ICMPv6 · IGMP ·
IPsec · (more)
Link Layer
ARP · RARP · NDP · OSPF ·
Tunnels (L2TP) · PPP · Media Access
Control (Ethernet, MPLS, DSL, ISDN,
FDDI) · Device Drivers · (more)
This box: view • talk • edit
Addressing:
8/8/2019 32226993-IPV4
http://slidepdf.com/reader/full/32226993-ipv4 5/16
IPv4 uses 32- bit (four- byte) addresses, which limits the address space to 4,294,967,296 (232)
possible unique addresses. However, some are reserved for special purposes such as private
networks (~18 million addresses) or multicast addresses (~16 million addresses). This reducesthe number of addresses that can be allocated as public Internet addresses. As the number of
addresses available are consumed, an IPv4 address shortage appears to be inevitable, however
network address translation (NAT) has significantly delayed this inevitability.
This limitation has helped stimulate the push towards IPv6, which is currently in the early stagesof deployment and the only contender to replace IPv4.
Address representations
IPv4 addresses are usually written in dot-decimal notation, which consists of the four octets of the address expressed in decimal and separated by periods. This is the base format used in the
conversion in the following table:
Notation Value Conversion from dot-decimal
Dot-decimal
notation192.0.2.235 N/A
Dotted
Hexadecimal0xC0.0x00.0x02.0xEB
Each octet is individually converted to
hexadecimal form
Dotted Octal 0300.0000.0002.0353 Each octet is individually converted into octal
Hexadecimal 0xC00002EBConcatenation of the octets from the dotted
hexadecimal
Decimal 3221226219 The 32-bit number expressed in decimal
Octal 030000001353 The 32-bit number expressed in octal
Most of these formats should work in all browsers. Additionally, in dotted format, each octet can
be of any of the different bases. For example, 192.0x00.0002.235 is a valid (though
unconventional) equivalent to the above addresses.
A final form is not really a notation since it is rarely written in an ASCII string notation. That
form is a binary form of the hexadecimal notation in binary. This difference is merely the
representational difference between the string "0xCF8E83EB" and the 32-bit integer value0xCF8E83EB. This form is used for assigning the source and destination fields in a software
program.
Allocation
Originally, an IP address was divided into two parts:
8/8/2019 32226993-IPV4
http://slidepdf.com/reader/full/32226993-ipv4 6/16
• Network ID: first octet• Host ID: last three octets
This created an upper limit of 256 networks. As the networks began to be allocated, this wassoon seen to be inadequate.
To overcome this limit, different classes of network were defined, in a system which later
became known as classful networking. Five classes were created (A, B, C, D, and E), three of which (A, B, and C) had different lengths for the network field. The rest of an address was used
to identify a host within a network, which meant that each network class had a different
maximum number of hosts. Thus there were a few networks with each having many host
addresses and numerous networks with each only having a few host addresses. Class D was for multicast addresses and Class E was reserved.
Around 1993, these classes were replaced with a Classless Inter-Domain Routing (CIDR)
scheme, and the previous scheme was dubbed "classful", by contrast. CIDR's primary advantage
is to allow re-division of Class-A, -B and -C networks so that smaller (or larger) blocks of addresses may be allocated to various entities (such as Internet service providers, or their
customers) or local area networks.
The actual assignment of an address is not arbitrary. The fundamental principle of routing is thatthe address of a device encodes information about the device's location within a network. This
implies that an address assigned to one part of a network will not function in another part of the
network. A hierarchical structure, created by CIDR and overseen by the Internet Assigned
Numbers Authority (IANA) and its Regional Internet Registries (RIRs), manages the assignmentof Internet addresses worldwide. Each RIR maintains a publicly-searchable WHOIS database
that provides information about IP address assignments; information from these databases plays
a central role in numerous tools that attempt to locate IP addresses geographically.
Reserved address blocks
CIDR address
block Description
Referen
ce
0.0.0.0/8 Current network (only valid as source address)RFC
1700
10.0.0.0/8 Private networkRFC
1918
14.0.0.0/8Public data networks (per 2008-02-10,
available for use[1])
RFC
1700
127.0.0.0/8 LoopbackRFC
3330
128.0.0.0/16 Reserved (IANA) RFC
8/8/2019 32226993-IPV4
http://slidepdf.com/reader/full/32226993-ipv4 7/16
3330
169.254.0.0/16 Link-LocalRFC
3927
172.16.0.0/12 Private network
RFC
1918
191.255.0.0/16 Reserved (IANA)RFC
3330
192.0.0.0/24 Reserved (IANA)RFC
3330
192.0.2.0/24 Documentation and example codeRFC
3330
192.88.99.0/24 IPv6 to IPv4 relay RFC3068
192.168.0.0/16 Private networkRFC
1918
198.18.0.0/15 Network benchmark testsRFC
2544
223.255.255.0/
24Reserved (IANA)
RFC
3330
224.0.0.0/4 Multicasts (former Class D network) RFC3171
240.0.0.0/4 Reserved (former Class E network)RFC
1700
255.255.255.25
5Broadcast
Private networks
Main article: private network
Of the approximately four billion addresses allowed in IPv4, three ranges of address are reserved
for private networking use. These ranges are not routable outside of private networks and private
machines cannot directly communicate with public networks. They can, however, do so throughnetwork address translation.
The following are the three ranges reserved for private networks (RFC 1918):
8/8/2019 32226993-IPV4
http://slidepdf.com/reader/full/32226993-ipv4 8/16
Name Address rangeNumber of
addressesClassful description
Largest CIDR
block
24-bit
block
10.0.0.0–
10.255.255.25516,777,216 Single Class A 10.0.0.0/8
20-bit
block
172.16.0.0–
172.31.255.2551,048,576
16 contiguous Class B
blocks172.16.0.0/12
16-bit
block
192.168.0.0–
192.168.255.25565,536
Contiguous range of
256 class C blocks
192.168.0.0/1
6
Link-local addressing
RFC 3330 defines an address block, 169.254.0.0/16, for the special use in link-local addressing.
These addresses are only valid on the link, such as a local network segment or point-to-point
connection, that a host is connected to. These addresses are not routable and like privateaddresses cannot be the source or destination of packets traversing the Internet. Link-localaddresses are primarily used for address autoconfiguration (Zeroconf ) when a host cannot obtain
an IP address from a DHCP server or other internal configuration methods.
When the address block was reserved, no standards existed for mechanisms of addressautoconfiguration. Filling the void, Microsoft created an implementation that called Automatic
Private IP Addressing (APIPA). Due to Microsoft's market power, APIPA has been deployed on
millions of machines and has, thus, become a de facto standard in the industry. Many years later,
the IETF defined a formal standard for this functionality, RFC 3927, entitled Dynamic
Configuration of IPv4 Link-Local Addresses.
Localhost
Main article: localhost
The address range 127.0.0.0–127.255.255.255 (127.0.0.0/8 in CIDR notation) is reserved for
localhost communication. Addresses within this range should never appear outside a hostcomputer and packets sent to this address are returned as incoming packets on the same virtual
network device (known as loopback ).
Main article: IPv4 subnetting reference
It is a common misunderstanding that addresses ending in 255 or 0 can never be assigned tohosts. This is only true of networks with subnet masks of at least 24 bits — Class C networks in
the old classful addressing scheme, or in CIDR, networks with masks of /24 to /32 (or
255.255.255.0–255.255.255.255).
In classful addressing (now obsolete with the advent of CIDR ), there are only three possible
subnet masks: Class A, 255.0.0.0 or /8; Class B, 255.255.0.0 or /16; and Class C, 255.255.255.0
or /24. For example, in the subnet 192.168.5.0/255.255.255.0 (or 192.168.5.0/24) the identifier
8/8/2019 32226993-IPV4
http://slidepdf.com/reader/full/32226993-ipv4 9/16
192.168.5.0 refers to the entire subnet, so it cannot also refer to an individual device in that
subnet.
A broadcast address is an address that allows information to be sent to all machines on a givensubnet, rather than a specific machine. Generally, the broadcast address is found by obtaining the
bit complement of the subnet mask and performing a bitwise OR operation with the network identifier. In other words, the broadcast address is the last address in the range belonging to the
subnet. In our example, the broadcast address would be 192.168.5.255, so to avoid confusion thisaddress also cannot be assigned to a host. On a Class A, B, or C subnet, the broadcast address
always ends in 255.
However, this does not mean that every addresses ending in 255 cannot be used as a host
address. For example, in the case of a Class B subnet 192.168.0.0/255.255.0.0 (or 192.168.0.0/16), equivalent to the address range 192.168.0.0–192.168.255.255, the broadcast
address is 192.168.255.255. However, one can assign 192.168.1.255, 192.168.2.255, etc. (though
this can cause confusion). Also, 192.168.0.0 is the network identifier and so cannot be assigned,
but 192.168.1.0, 192.168.2.0, etc. can be assigned (though this can also cause confusion).
With the advent of CIDR, broadcast addresses do not necessarily end with 255.
In general, the first and last addresses in a subnet are used as the network identifier and broadcast
address, respectively. All other addresses in the subnet can be assigned to hosts on that subnet.
Address resolution
Main article: Domain Name System
Hosts on the Internet are usually known not by IP addresses, but by names (e.g.,
www.wikipedia.org, www.whitehouse.gov, www.freebsd.org, www.berkeley.edu). The routingof IP packets across the Internet is not directed by such names, but by the numeric IP addresses
assigned to such domain names. This requires translating (or resolving) domain names toaddresses.
The Domain Name System (DNS) provides such a system for converting names to addresses and
addresses to names. Much like CIDR addressing, the DNS naming is also hierarchical and allowsfor subdelegation of name spaces to other DNS servers.
The domain name system is often described in analogy to the telephone system directory
information systems in which subscriber names are translated to telephone numbers.
Address space exhaustion
Main article: IP address exhaustion
Since the 1980s it has been apparent that the number of available IPv4 addresses is being
exhausted at a rate that was not initially anticipated in the design of the network. This was the
8/8/2019 32226993-IPV4
http://slidepdf.com/reader/full/32226993-ipv4 10/16
driving factor for the introduction of classful networks, for the creation of CIDR addressing, and
finally for the redesign of the Internet Protocol, based on a larger address format (IPv6).
Today, there are several driving forces for the acceleration of IPv4 address exhaustion:
•
Mobile devices — laptop computers, PDAs, mobile phones• Always-on devices — ADSL modems, cable modems• Rapidly growing number of Internet users
The accepted and standardized solution is the migration to IPv6. The address size jumps
dramatically from 32 bits to 128 bits, providing a vastly increased address space that allowsimproved route aggregation across the Internet and offers large subnet allocations of a minimum
of 264 host addresses to end-users. Migration to IPv6 is in progress but is expected to take
considerable time.
Methods to mitigate the IPv4 address exhaustion are:
• Network address translation (NAT)• Use of private networks• Dynamic Host Configuration Protocol (DHCP)• Name-based virtual hosting• Tighter control by Regional Internet Registries on the allocation of addresses
to Local Internet Registries• Network renumbering to reclaim large blocks of address space allocated in
the early days of the Internet
As of April 2008, predictions of exhaustion date of the unallocated IANA pool seem to convergeto between February 2010[2] and May 2011[3]
Assistive protocols:
The Internet Protocol is the protocol that defines and enables internetworking at the Internet
Layer and thus forms the Internet. It uses a logical addressing system. IP addresses are not tied in
any permanent manner to hardware identifications and, indeed, a network interface can havemultiple IP addresses. Hosts and routers need additional mechanisms to identify the relationship
between device interfaces and IP addresses, in order to properly deliver an IP packet to the
destination host on a link. The Address Resolution Protocol (ARP) perform this IP address tohardware address (MAC address) translation for IPv4. In addition the reverse correlation is often
necessary, for example, when an IP host is booted or connected to a network it needs to
determine its IP address, unless an address is preconfigured by an administrator. Protocols for such inverse correlations exist in the Internet Protocol Suite. Currently used methods are
Dynamic Host Configuration Protocol (DHCP) and, infrequently, inverse ARP.
8/8/2019 32226993-IPV4
http://slidepdf.com/reader/full/32226993-ipv4 11/16
Subnetwork:
A subnetwork , or subnet, describes networked computers and devices that have a common,
designated IP address routing prefix.
Subnetting is used to break the network into smaller more efficient subnets to prevent excessiverates of Ethernet packet collision in a large network. Such subnets can be arranged hierarchically,
with the organization's network address space (see also Autonomous System) partitioned into a
tree-like structure. Routers are used to manage traffic and constitute borders between subnets.
A routing prefix is the sequence of leading bits of an IP address that precede the portion of theaddress used as host identifier. In IPv4 networks, the routing prefix is often expressed as a
"subnet mask", which is a bit mask covering the number of bits used in the prefix. An IPv4
subnet mask is frequently expressed in quad-dotted decimal representation, e.g., 255.255.255.0 isthe subnet mask for the 192.168.1.0 network with a 24-bit routing prefix (192.168.1.0/24). For
IPv6 networks, routing prefixes are always expressed in the standardized CIDR notation
consisting of the network address and the mask length, e.g., 2001:db8::/32.
All hosts within a subnet can be reached in one "hop" (time to live = 1), implying that all hosts ina subnet are connected to the same link.
A typical subnet is a physical network served by one router, for instance an Ethernet network
(consisting of one or several Ethernet segments or local area networks, interconnected by
network switches and network bridges) or a Virtual Local Area Network (VLAN). However,subnetting allows the network to be logically divided regardless of the physical layout of a
network, since it is possible to divide a physical network into several subnets by configuring
different host computers to use different routers.
While improving network performance, subnetting increases routing complexity, since eachlocally connected subnet is typically represented by one row in the routing tables in each
connected router. However, with a clever design of the network, routes to collections of more
distant subnets within the branches of a tree-hierarchy can be aggregated by single routes.Existing subnetting functionality in routers made the introduction of Classless Inter-Domain
Routing seamless.
Network address and logical address:
The term network address sometimes refers to logical address, i.e. network layer address such
as the IP address, and sometimes to the first address (the base address) of a classful address rangeto an organization.
Computers and devices that are part of an internetworking network such as the Internet each
have a logical address. The network address is unique to each device and can either bedynamically or statically configured. An address allows a device to communicate with other
devices connected to a network. The most common network addressing scheme is IPv4. An IPv4
address consists of a 32 bit address written, for human readability, into 4 octets and a subnet
8/8/2019 32226993-IPV4
http://slidepdf.com/reader/full/32226993-ipv4 12/16
mask of like size and notation. In order to facilitate the routing process the address is divided into
two pieces:
• The network prefix (some contiguous range of higher-order bits) that issignificant for routing decisions at that particular topological point.
• The network host (the remaining bits) that specify a particular device in thenetwork.
This works much like a postal address in that network prefix would represent the city and thenetwork host would represent the address of a specific house on that street. The subnet mask
(e.g. 255.255.192.0 to specify the top 18 bits; in binary:
11111111.11111111.11000000.00000000) or CIDR suffix address (e.g. /18) is used in
conjunction with the network address to determine how many higher-order bits are used for thenetwork prefix. For instance, the following are equivalent:
• 192.168.0.0 with netmask 255.255.0.0• 192.168.0.0/16
Binary subnet masks:
While subnet masks are often represented in dot-decimal form, their use becomes clearer in
binary. Looking at a network address and a subnet mask in binary, a device can determine which
part of the address is the network address and which part is the host address. To do this, it performs a bitwise "AND" operation.
Example
Dot-decimal
Address Binary
IP address 192.168.5.10 11000000.10101000.00000101.00001010
Subnet Mask 255.255.255.0 11111111.11111111.11111111.00000000
Network
Portion192.168.5.0 11000000.10101000.00000101.00000000
Host Portion 0.0.0.10 00000000.00000000.00000000.00001010
Subnet masks consist of 32 bits, usually a block of ones (1) followed by a block of 0s. The last
block of zeros (0) designate that part as being the host identifier. This allows a classful network
to be broken down into subnets. A classful network is a network that has a subnet mask of 255.0.0.0, 255.255.0.0 or 255.255.255.0.
IPv4 classes
Main article: IPv4 subnetting reference
8/8/2019 32226993-IPV4
http://slidepdf.com/reader/full/32226993-ipv4 13/16
IPv4 addresses are broken down into three parts: the network part, the subnet part (now often
considered part of the network part, although originally it was part of the rest part), and the host
part. Even though classful networks are obsolete, both classful and classless networks are shownin the following table.
ClassLeading
bitsStart End
Default Subnet Mask in
dotted decimal
A (CIDR /
8)0 0.0.0.0
127.255.255.
255255.0.0.0
B (CIDR /
16)10
128.0.0
.0
191.255.255.
255255.255.0.0
C (CIDR /
24) 110
192.0.0
.0
223.255.255.
255 255.255.255.0
D 1110224.0.0
.0
239.255.255.
255
E 1111240.0.0
.0
255.255.255.
254
While the 127.0.0.0/8 network is in the Class A area, it is designated for loopback and cannot be
assigned to a network.
Class D multicasting
Class E reserved
Subnetting is the process of allocating bits from the host portion as a network portion. The aboveexample shows the bitwise "AND" process being performed on a classful network.
Example
Dot-decimal
Address
Binary
IP address 192.168.5.13011000000.10101000.00000101.1
0000010
Subnet Mask 255.255.255.19211111111.11111111.11111111.1
1000000
8/8/2019 32226993-IPV4
http://slidepdf.com/reader/full/32226993-ipv4 14/16
Network
Portion192.168.5.128
11000000.10101000.00000101.1
0000000
In this example two bits were borrowed from the original host portion. This is beneficial because
it allows this network to be split into four smaller networks. A /24 suffix (Class C block) allows254 hosts; split into four parts, the prefix is /26, each has 62 hosts.
Subnets and host count:
It is possible to determine the number of hosts and subnetworks available for any subnet mask.
In the above example two bits were borrowed to create subnetworks. Each bit can take the value
1 or 0, giving 4 possible subnets (22 = 4)
Network Network (binary)Broadcast
address
192.168.5.0/26
11000000.10101000.00000101.00000000
192.168.5.63
192.168.5.64/
26
11000000.10101000.00000101.0
1000000192.168.5.127
192.168.5.128
/26
11000000.10101000.00000101.1
0000000192.168.5.191
192.168.5.192
/26
11000000.10101000.00000101.1
1000000192.168.5.255
According to the RFC 950 standard the subnet values consisting of all zeros and all ones are
reserved, reducing the number of available subnets by 2. However due to the inefficiencies
introduced by this convention it is no longer used on the public Internet, and is only relevantwhen dealing with legacy equipment that does not understand CIDR. The only reason not to use
the all-zeroes subnet is that it is ambiguous when the exact suffix length is not available. All
CIDR-compliant routing protocols transmit both length and suffix. See RFC 1878 for asubnetting table with extensive examples.
The remaining bits after the subnet are used for addressing hosts within the subnet. In the above
example the subnet mask consists of 26 bits, leaving 6 bits for the address (32 − 26). This allows
for 64 possible combinations (26), however the all zeros value and all ones value are reserved for the network ID and broadcast address respectively, leaving 62 addresses.
In general the number of available hosts on a subnet can be calculated using the formula 2n − 2,
where n is the number of bits used for the host portion of the address.
RFC 3021 specifies an exception to this rule when dealing with 31 bit subnet masks (i.e. 1 host
bit). According to the above rule a 31 bit mask would allow for 21 − 2 = 0 hosts. The RFC makesallowances in this case for certain types of networks ( point-to-point) to disregard the network
and broadcast address, allowing two host addresses to be allocated.
8/8/2019 32226993-IPV4
http://slidepdf.com/reader/full/32226993-ipv4 15/16
Possible subnets for a /24 suffix (traditional Class C):
CIDR
notation
Network
Mask
Available
Networks
Available Hosts per
network
Total usable
hosts
/24255.255.255.
01 254 254
/25255.255.255.
1282 126 252
/26255.255.255.
1924 62 248
/27255.255.255.
2248 30 240
/28255.255.255.
24016 14 224
/29255.255.255.
24832 6 192
/30255.255.255.
25264 2 128
/31255.255.255.
254128 2 * 256
* only applicable on point-to-point links
Subnetting in IPv6 networks:
The primary reason for subnetting in IPv4 was to improve efficiency in the utilization of the
relatively small address space available, particularly to enterprises. Subnetting is also used inIPv6 networks. However, in IPv6 the address space available even to end-users is so large thataddress space restrictions no longer exist. The recommended allocation for a site is an address
space comprising 80 address bits (prefix /48), but may be as small as a prefix /56 allocation (72
bits) for a residential customer network.[1] This provides 65,536 subnets for a site, and aminimum of 256 subnets for the residential size. An IPv6 subnet always has a /64 prefix which
provides 64 bits for the host portion of an address. Although it is technically possible to use
smaller subnets, they are impractical for local area networks because stateless addressautoconfiguration of network interfaces (RFC 4862) requires a /64 address. Subnetting, based on
the concepts of Classless Inter-Domain Routing is however used in the routing between networks
both locally and globally.
Example routing scenario based on subnet concept:
Suppose a home network consists of computers named Foo and Bar, connected to a router, andthen via a cable modem to the Internet. The home network is configured as a subnet: address
17.76.99.1 is assigned to Foo, address 17.76.99.2 to Bar, and address 17.76.99.100 to the router.
The subnet has been configured so that the first three octets of its members' addresses are all the
8/8/2019 32226993-IPV4
http://slidepdf.com/reader/full/32226993-ipv4 16/16
same subnet id, 17.76.99, and this fact is expressed by the subnet mask 255.255.255.0 (binary
11111111 11111111 11111111 00000000) configured in the router.
When Foo sends data to example.com at 208.77.188.166, the router performs a logical AND of the destination example.com address with the subnet mask. It also performs a logical AND of the
origin address (17.76.99.1) and recognizes that these two results are different, and thereforesends the data over the Internet, via the subnet's default gateway.
When Foo sends data to Bar, however, it determines that the results of the two AND operationsare the same, therefore the destination lies within the subnet and the default gateway is not
required. The data is transmitted directly from Foo to Bar within the home network.