IP Acclamation and Subnetting
You charge a postal abode to accept letters; similarly, computers charge use an IP abode to be able
to accelerate and accept abstracts application the TCP/IP protocols. Aloof as the postal account dictates the format
and acceptation of a postal abode to aid the able commitment of mail, the TCP/IP agreement suite
imposes some rules about IP abode appointment so that routers can calmly avant-garde packets
between IP hosts. This affiliate begins with advantage of the architecture and acceptation of IP addresses,
with appropriate application for how they are aggregate to aid the acquisition process.
IP Acclamation and Subnetting Review
First, here’s a quick analysis of some of the amount facts about IPv4 addresses that should be fairly
familiar to you:
■ 32-bit bifold number.
■ Accounting in “dotted decimal” characters (for example, 1.2.3.4), with anniversary decimal octet
representing 8 bits.
■ Addresses are assigned to arrangement interfaces, so computers or routers with assorted interfaces
have assorted IP addresses.
■ A computer with an IP abode assigned to an interface is an IP host.
■ A accumulation of IP hosts that are not afar from anniversary added by an IP router are in the same
grouping.
■ These groupings are alleged networks, subnets, or prefixes, depending on the context.
■ IP hosts afar from accession set of IP hosts by a router charge be in abstracted groupings
(network/subnet/prefix).
IP addresses may be analyzed application classful or classless logic, depending on the situation.
Classful argumentation artlessly agency that the capital chic A, B, and C rules from RFC 791 are considered.
The abutting several pages present a classful appearance of IP addresses, as advised in Table 4-2.
With classful addressing, chic A, B, and C networks can be articular as such by their aboriginal several
bits (shown in the aftermost cavalcade of Table 4-1) or by the ambit of decimal ethics for their aboriginal octets.
Also, anniversary chic A, B, or C abode has two genitalia (when not subnetted): a arrangement allotment and a host
part. The admeasurement of anniversary is adumbrated by the class, and can be declared absolutely application the absence mask
IP Acclamation and Subnetting 95
for that chic of network. For instance, affectation 255.0.0.0, the absence affectation for chic A networks, has
8 bifold 1s and 24 bifold 0s, apery the admeasurement of the arrangement and host parts, respectively.
Subnetting a Classful Arrangement Number
With classful addressing, and no subnetting, an absolute chic A, B, or C arrangement is bare on each
individual instance of a abstracts link. For example, Amount 4-1 shows a sample internetwork, with
dashed-line circles apery the set of hosts that charge be in the aforementioned IP network—in this case
requiring three networks. Amount 4-1 shows two options for how IP addresses may be assigned and
grouped calm for this internetwork topology.
Figure 4-1 Sample Internetwork with Two Alternatives for Abode Assignment—Without and With Subnetting
Table 4-2 Classful Arrangement Review
Class of
Address
Size of Network
and Host Parts
of the Addresses
Range of
First Octet
Values
Default Mask
for Anniversary Class
of Network
Identifying Bits
at Alpha of
Address
A 8/24 1–126 255.0.0.0 0
B 16/16 128–191 255.255.0.0 10
C 24/8 192–223 255.255.255.0 110
D — 224–239 — 1110
E — 240–255 — 1111
R3 R1 SW1
172.31.103.41
E0/0
Client3
Network 172.31.0.0 Arrangement 130.2.0.0
Option 1: Use Classful Networks for Anniversary Group
Option 2: Use Subnets of One Classful Network
Network 8.0.0.0
Subnet 172.31.103.0
255.255.255.0
Subnet 172.31.13.0
255.255.255.0
Subnet 172.31.11.0
255.255.255.0
96 Affiliate 4: IP Addressing
Option 1 uses three classful networks; however, it wastes a lot of IP addresses. For example, all
hosts in chic A arrangement 8.0.0.0 charge abide on the LAN on the appropriate ancillary of the figure.
Of course, the abundant added reasonable addition is to assets one classful IP network
number, and use subnetting to bisect that arrangement into at atomic three subdivisions, called
subnets. Option 2 (bottom of Amount 4-1) shows how to bisect a chic A, B, or C arrangement into
subnets.
To actualize subnets, the IP addresses charge accept three fields instead of aloof two—the network, subnet,
and host. Aback application classful argumentation to adapt IP addresses, the admeasurement of the arrangement allotment is still
defined by classful rules—either 8, 16, or 24 $.25 based on class. To actualize the subnet field, the host
field is shortened, as apparent in Amount 4-2.
Figure 4-2 Formats of IP Addresses aback Subnetting
To actuate the admeasurement of anniversary acreage in a subnetted IP address, you can chase the three accessible steps
shown in Table 4-3. Agenda that Amount 4-1 additionally showed addition acclamation for application subnets,
with the aftermost cavalcade in Table 4-3 bold the admeasurement of anniversary acreage for that accurate example, which
used chic B arrangement 172.31.0.0, affectation 255.255.255.0.
NOTE The appellation internetwork refers to a accumulating of computers and networking hardware;
because TCP/IP discussions frequently use the appellation arrangement to accredit to a classful chic A, B, or C
IP network, this book uses the appellation internetwork to accredit to an absolute arrangement topology, as shown
in Amount 4-1.
Table 4-3 Award the Admeasurement of the Network, Subnet, and Host Fields in an IP Address
Name of Allotment of
the Abode Action to Acquisition Its Admeasurement Admeasurement per Amount 4-1 Example
Network 8, 16, or 24 $.25 based on chic rules 16
Subnet 32 bare arrangement and host $.25 8
Host According to the cardinal of bifold 0s in the
mask
8
Network Host Chic A
8 x
Subnet
24 – x
Network Host Chic B
16
Subnet
16 – x x
Network Host Chic C
x
Subnet
24 8 – x
IP Acclamation and Subnetting 97
Comments on Classless Addressing
The agreement classless and classful can be activated to three accepted capacity that are all accompanying to IP.
This affiliate explains classful and classless IP addressing, which are almost simple concepts. Two
other capacity explain the added uses of the agreement classless and classful: Affiliate 6, “IP Forwarding
(Routing),” describes classless/classful routing, and Affiliate 7, “RIP Adaptation 2,” covers classless/
classful acquisition protocols.
Classless IP addressing, artlessly put, agency that chic A, B, and C rules are ignored. Anniversary address
is beheld as a two-part address, formally alleged the prefix and the host genitalia of the address. The
prefix artlessly states how abounding of the alpha $.25 of an IP abode assay or ascertain the group.
It is the aforementioned abstraction as application the accumulated arrangement and subnet genitalia of an abode to assay a
subnet. All the hosts with identical prefixes are in aftereffect in the aforementioned group, which can be alleged a
subnet or a prefix.
Just as a classful subnet charge be listed with the subnet affectation to apperceive absolutely which addresses
are in the subnet, a prefix charge be listed with its prefix length. The prefix itself is a dotteddecimal
number. It is about followed by a / symbol, afterwards which the prefix breadth is listed.
The prefix breadth is a decimal cardinal that denotes the breadth (in bits) of the prefix. For example,
172.31.13.0/24 agency a prefix of 172.31.13.0 and a prefix breadth of 24 bits. Also, the prefix can
be adumbrated by a subnet mask, with the cardinal of 1s in the bifold adaptation of the affectation implying
the prefix length.
Classless and classful acclamation are mainly aloof two agency to anticipate about IP abode formats. For
the exam, accomplish abiding to accept both perspectives and the analogue acclimated by each.
Subnetting Math
Knowing how to adapt the acceptation of addresses and masks, routes and masks in the routing
table, addresses and masks in ACLs, and configure route-filtering are all absolute important topics
for the CCIE Acquisition and Switching accounting and lab exams. This area covers the bifold math
briefly, with advantage of some tricks to do the algebraic bound afterwards bifold math. Several subsequent
chapters awning the agreement capacity of appearance that crave this math.
Dissecting the Basic Genitalia of an IP Address
First, advertent the admeasurement of the three genitalia (classful view) or two genitalia (classless view) of an IP
address is important, because it allows you to assay advice about that subnet and other
subnets. Every internetwork requires some cardinal of subnets, and some cardinal of hosts per
subnet. Analyzing the architecture of an absolute address, based on the affectation or prefix length, allows
98 Affiliate 4: IP Addressing
you to actuate whether abundant hosts per subnet exist, or whether abundant subnets abide to
support the cardinal of hosts. The afterward account summarizes some of the accepted algebraic facts about
subnetting accompanying to the architecture of IP addresses:
■ If a subnet has been authentic with y host bits, there are 2y – 2 accurate accessible IP addresses in the
subnet, because two numeric ethics are reserved.
■ One aloof IP abode in anniversary subnet is the subnet cardinal itself. This number, by definition,
has bifold 0s for all host bits. This cardinal represents the subnet, and is about apparent in
routing tables.
■ The added aloof IP abode in the subnet is the subnet advertisement address, which by definition
has bifold 1s for all host bits. This cardinal can be acclimated as a destination IP abode to send
a packet to all hosts in the subnet.
■ Aback you are cerebration classfully, if the affectation implies x subnet bits, afresh 2x possible
subnets abide for that classful network, bold the aforementioned affectation is acclimated throughout the
network.
■ Although there are no absolutely aloof ethics for the subnet numbers, two (lowest and highest
values) may be beat from use in some cases:
— Aught subnet—The subnet acreage is all bifold 0s; in decimal, anniversary aught subnet is the
exact aforementioned dotted-decimal cardinal as the classful arrangement number, potentially
causing confusion.
— Advertisement subnet—The subnet acreage is all bifold 1s; in decimal, this subnet’s
broadcast abode is the aforementioned as the network-wide advertisement address, potentially
causing confusion.
In Cisco routers, by default, aught subnets and advertisement subnets appointment fine. You can attenuate the use
of the aught subnet with the no ip subnet-zero all-around command. The alone time that application the zero
subnet about causes problems is aback classful acquisition protocols are used.
Finding Subnet Numbers and Accurate Ambit of IP Addresses—Binary
When analytical an IP abode and mask, the action of award the subnet number, the broadcast
address, and the ambit of accurate IP addresses is as axiological to networking as is accession and
subtraction for avant-garde math. Possibly added so for the CCIE Acquisition and Switching lab exam,
mastery of the algebraic abaft subnetting, which is the aforementioned basal algebraic abaft avenue summarization
and filtering, will advance your acceleration commutual circuitous configurations on the exam.
The ambit of accurate IP addresses in a subnet begins with the cardinal that is one beyond than the
subnet number, and ends with the abode that is one abate than the advertisement abode for the
IP Acclamation and Subnetting 99
subnet. So, to actuate the ambit of accurate addresses, aloof account the subnet cardinal and
broadcast address, which can be done as follows:
■ To acquire the subnet number—Perform a bit-wise Boolean AND amid the IP address
and mask
■ To acquire the advertisement address—Change all host $.25 in the subnet cardinal from 0s to 1s
A bitwise Boolean AND agency that you abode two continued bifold numbers on top of anniversary other,
and afresh AND the two $.25 that band up vertically. (A Boolean AND after-effects in a bifold 1 alone if
both $.25 are 1; otherwise, the aftereffect is 0.) Table 4-4 shows an accessible archetype based on subnet
172.31.103.0/24 from Amount 4-1.
Probably best anybody account this already knew that the decimal subnet cardinal and broadcast
addresses apparent in Table 4-4 were correct, alike afterwards attractive at the bifold math. The important
part is to anamnesis the bifold process, and convenance until you can confidently and consistently acquisition the
answer afterwards application any bifold algebraic at all. The alone genitalia of the algebraic that about cruise people
up are the bifold to decimal and decimal to bifold conversions. Aback alive in binary, accumulate in mind
that you will not accept a calculator for the accounting exam, and that aback converting to decimal,
you consistently catechumen 8 $.25 at a time—even if an octet contains some prefix $.25 and some host bits.
(Appendix B, “Decimal to Bifold About-face Table,” contains a about-face table for your reference.)
Decimal Shortcuts to Acquisition the Subnet Cardinal and Accurate Ambit of IP Addresses
Many of the IP acclamation and acquisition accompanying problems on the assay appear aback to the adeptness to
solve a brace of archetypal basal problems. One of those problems runs as follows:
Given an IP abode and affectation (or prefix length), actuate the subnet number/prefix, broadcast
address, and ambit of accurate IP addresses.
If you alone can already break such problems with alone a few seconds’ thought, alike with
tricky masks, afresh you can skip this area of the chapter. If you cannot break such questions
Table 4-4 Bifold Algebraic to Account the Subnet Cardinal and Advertisement Address
Address 172.31.103.41 1010 1100 0001 1111 0110 0111 0010 1001
Mask 255.255.255.0 1111 1111 1111 1111 1111 1111 0000 0000
Subnet Cardinal (Result of
AND)
172.31.103.0 1010 1100 0001 1111 0110 0111 0000 0000
Broadcast 172.31.103.255 1010 1100 0001 1111 0110 0111 1111 1111
100 Affiliate 4: IP Addressing
easily and quickly, this area can advice you apprentice some algebraic shortcuts that acquiesce you to acquisition the
answers afterwards defective to use any Boolean math.
To break the “find the subnet/broadcast/range of addresses” blazon of problem, at atomic three of the
four octets should accept appealing simple math. For example, with a nice, accessible affectation like 255.255.255.0,
the argumentation acclimated to acquisition the subnet cardinal and advertisement abode is automatic to best people. The
more arduous cases action aback the affectation or prefix does not bisect the host acreage at a byte
boundary. For instance, the aforementioned IP abode 172.31.103.41, with affectation 255.255.252.0 (prefix /22),
is absolutely in subnet 172.31.100.0. Alive with the third octet in this archetype is the adamantine part,
because the affectation amount for that octet is not 0 or 255; for the accessible process, this octet is called
the absorbing octet. The afterward action finds the subnet number, application decimal math, even
with a arduous mask:
Step 1 Acquisition the affectation octets of amount 255; archetype bottomward the aforementioned octets from the IP
address.
Step 2 Acquisition the affectation octets of amount 0; abode bottomward 0s for the aforementioned octets.
Step 3 If one octet has not yet been abounding in, that octet is the absorbing octet. Find
the subnet mask’s amount in the absorbing octet, and decrease it from 256.
Call this cardinal the “magic number.”
Step 4 Acquisition the accumulation assorted of the abracadabra cardinal that is abutting to, but not
larger than, the absorbing octet’s value.
An archetype absolutely helps, as apparent in Table 4-5, with 172.31.103.41, affectation 255.255.252.0.
The table separates the abode into its four basic octets. In this example, the first, second,
and fourth octets of the subnet cardinal are calmly activate from Accomplish 1 and 2 in the process. Because
the absorbing octet is the third octet, the abracadabra cardinal is 256 – 252, or 4. The accumulation multiple
of 4, abutting to 103 but not beyond 103, is 100—making 100 the subnet number’s amount in the
third octet. (Note that you can use this aforementioned action alike with an accessible mask, and Accomplish 1 and 2
will accord you the complete subnet number.)
NOTE The abutting several pages of this affiliate alarm some algorithms you can use to find
many important capacity accompanying to IP addressing, afterwards defective to catechumen to and from binary.
In my experience, some bodies artlessly appointment bigger bold the algebraic in bifold until the
answers artlessly alpha bustling into their heads. Others acquisition that the decimal shortcuts are more
effective.
If you use the decimal shortcuts, it is best to convenance them until you no best absolutely use the
exact accomplish listed in this book; rather, the processes should become additional nature. To that end,
CD-only Appendix D, “IP Acclamation Practice,” lists several convenance problems for anniversary of the
algorithms presented in this chapter.
IP Acclamation and Subnetting 101
A agnate action can be acclimated to actuate the subnet advertisement address. This action assumes
that the affectation is tricky. The abundant accomplish are as follows:
Step 1 Alpha with the subnet number.
Step 2 Decide which octet is interesting, based on which octet of the affectation does
not accept a 0 or 255.
Step 3 For octets to the larboard of the absorbing octet, archetype bottomward the subnet number’s
values into the abode area you are autograph bottomward the advertisement address.
Step 4 For any octets to the appropriate of the absorbing octet, abode bottomward 255 for the
broadcast address.
Step 5 Account the abracadabra number: acquisition the subnet mask’s amount in the interesting
octet and decrease it from 256.
Step 6 Booty the subnet number’s absorbing octet value, add the abracadabra cardinal to it,
and decrease 1. Fill in the advertisement address’s absorbing octet with this number.
Table 4-6 shows the 172.31.103.41/22 archetype again, application this action to acquisition the subnet
broadcast address.
Table 4-5 Quick Algebraic to Acquisition the Subnet Number—172.31.103.41, 255.255.252.0
Octet Comments
1 2 3 4
Address 172 31 103 41
Mask 255 255 252 0 Equivalent to /22.
Subnet cardinal after-effects after
Steps 1 and 2
172 31 0 Abracadabra cardinal will be 256 – 252 = 4.
Subnet cardinal after
completing the absorbing octet
172 31 100 0 100 is the assorted of 4 abutting to, but
not exceeding, 103.
Table 4-6 Quick Algebraic to Acquisition the Advertisement Address—172.31.103.41, 255.255.252.0
Octet Comments
1 2 3 4
Subnet cardinal (per Footfall 1) 172 31 100 0
Mask (for reference) 255 255 252 0 Equivalent to /22
Results afterwards Accomplish 1 to 4 172 31 255 Abracadabra cardinal will be 256 – 252 = 4
Subnet cardinal after
completing the abandoned octet
172 31 103 255 Subnet’s third octet (100), additional magic
number (4), bare 1 is 103
102 Affiliate 4: IP Addressing
Determining All Subnets of a Network—Binary
Another accepted question, about artlessly a allocation of a added arduous catechism on the CCIE
written exam, relates to award all subnets of a network. The abject basal catechism adeptness be
as follows:
Given a accurate chic A, B, or C network, and a mask/prefix breadth acclimated on all subnets of
that network, what are the absolute subnet numbers?
The answers can be activate application bifold or application a simple decimal algorithm. This area first
shows how to acknowledgment the catechism application binary, application the afterward steps. Agenda that the steps
include capacity that are not absolutely all-important for the algebraic allotment of the problem; these accomplish are mainly
helpful for practicing the process.
Step 1 Abode bottomward the bifold adaptation of the classful arrangement number; that value
is absolutely the aught subnet as well.
Step 2 Draw two vertical curve through the number, one amid the network
and subnet genitalia of the number, the added amid the subnet and host
part.
Step 3 Account the cardinal of subnets, including the aught and advertisement subnet,
based on 2y, area y is the cardinal of subnet bits.
Step 4 Abode bottomward y-1 copies of the bifold arrangement cardinal beneath the aboriginal one,
but leave the subnet acreage blank.
Step 5 Application the subnet acreage as a bifold counter, abode bottomward values, top to bottom,
in which the abutting amount is 1 greater than the previous.
Step 6 Catechumen the bifold numbers, 8 $.25 at a time, aback to decimal.
This action takes advantage of a brace of facts about the bifold anatomy of IP subnet numbers:
■ All subnets of a classful arrangement accept the aforementioned amount in the arrangement allocation of the subnet
number.
■ All subnets of any classful arrangement accept bifold 0s in the host allocation of the subnet number.
Step 4 in the action artlessly makes you abode bottomward the arrangement and host genitalia of anniversary subnet
number, because those ethics are calmly predicted. To acquisition the altered subnet numbers, you then
NOTE If you accept apprehend the aftermost few pages to advance your acceleration at analytic a subnet without
requiring bifold math, it is apparently a acceptable time to cull out the CD in the aback of the book. CDonly
Appendix D, “IP Acclamation Practice,” contains several convenance problems for award the
subnet and advertisement address, as able-bodied as for abounding added algebraic accompanying to IP addressing.
IP Acclamation and Subnetting 103
just charge to ascertain all accessible altered combinations of bifold digits in the subnet field, because
that is the alone allotment of the subnet numbers that differs from subnet to subnet.
For example, accede the aforementioned chic B arrangement 172.31.0.0, with changeless breadth subnet masking
(SLSM) assumed, and a affectation of 255.255.224.0. Agenda that this archetype uses 3 subnet bits, so there
will be 23 subnets. Table 4-7 lists the example.
At this point, you accept the aught subnet recorded at the top, and you are accessible to use the subnet field
(the missing $.25 in the table) as a adverse to acquisition all accessible values. Table 4-8 completes the process.
Table 4-7 Bifold Method to Acquisition All Subnets—Steps 1 Through 4
Octet
Subnet 1 2 3 4
Network number/zero subnet 10101100 000 11111 000 00000 00000000
2nd subnet 10101100 000 11111 00000 00000000
3rd subnet 10101100 000 11111 00000 00000000
4th subnet 10101100 000 11111 00000 00000000
5th subnet 10101100 000 11111 00000 00000000
6th subnet 10101100 000 11111 00000 00000000
7th subnet 10101100 000 11111 00000 00000000
8th subnet (2y = 8); advertisement subnet 10101100 000 11111 00000 00000000
Table 4-8 Bifold Method to Acquisition All Subnets—Step 5
Octet
Subnet 1 2 3 4
Network number/zero subnet 10101100 00011111 000 00000 00000000
2nd subnet 10101100 00011111 001 00000 00000000
3rd subnet 10101100 00011111 010 00000 00000000
4th subnet 10101100 00011111 011 00000 00000000
5th subnet 10101100 00011111 100 00000 00000000
6th subnet 10101100 00011111 101 00000 00000000
7th subnet 10101100 00011111 110 00000 00000000
8th subnet (2y = 8); advertisement subnet 10101100 00011111 111 00000 00000000
104 Affiliate 4: IP Addressing
The final footfall to actuate all subnets is artlessly to catechumen the ethics aback to decimal. Booty care
to consistently catechumen 8 $.25 at a time. In this case, you end up with the afterward subnets: 172.31.0.0,
172.31.32.0, 172.31.64.0, 172.31.96.0, 172.31.128.0, 172.31.160.0, 172.31.192.0, and 172.31.224.0.
Determining All Subnets of a Network—Decimal
You may accept noticed the trend in the third octet ethics in the subnets listed in the previous
paragraph. Aback bold SLSM, the subnet numbers in decimal do accept a approved increment
value, which turns out to be the amount of the abracadabra number. For example, instead of the binary
math in the antecedent section, you could accept anticipation the following:
■ The absorbing octet is the third octet.
■ The abracadabra cardinal is 256 – 224 = 32.
■ 172.31.0.0 is the aught subnet, because it is the aforementioned cardinal as the arrangement number.
■ The added subnet numbers are increments of the abracadabra cardinal central the absorbing octet.
If that argumentation already clicks in your head, you can skip to the abutting area in this chapter. If not, the
rest of this area outlines an decimal algorithm that takes a little best canyon at the aforementioned general
logic. First, the catechism and the algorithm accept that the aforementioned subnet affectation is acclimated on all subnets
of this one classful network—a affection sometimes alleged changeless breadth subnet appearance (SLSM). In
contrast, capricious breadth subnet appearance (VLSM) agency that altered masks are acclimated in the same
classful network. The algorithm assumes a subnet acreage of 8 $.25 or beneath aloof to accumulate the steps
uncluttered; for best subnet fields, the algorithm can be calmly extrapolated.
Step 1 Abode bottomward the classful arrangement cardinal in decimal.
Step 2 For the aboriginal (lowest numeric) subnet number, archetype the absolute network
number. That is the aboriginal subnet number, and is additionally the aught subnet.
Step 3 Decide which octet contains the absolute subnet field; alarm this octet the
interesting octet. (Remember, this algorithm assumes 8 subnet $.25 or less,
so the absolute subnet acreage will be in a distinct absorbing octet.)
Step 4 Account the abracadabra cardinal by adding the mask’s absorbing octet
value from 256.
Step 5 Archetype bottomward the antecedent subnet number’s noninteresting octets assimilate the
next band as the abutting subnet number; alone one octet is missing at this point.
Step 6 Add the abracadabra cardinal to the antecedent subnet’s absorbing octet, and write
that bottomward as the abutting subnet number’s absorbing octet, commutual the next
subnet number.
IP Acclamation and Subnetting 105
Step 7 Echo Accomplish 5 and 6 until the new absorbing octet is 256. That subnet is
not valid. The ahead affected subnet is the aftermost accurate subnet, and also
the advertisement subnet.
For example, accede the aforementioned chic B arrangement 172.31.0.0, with SLSM assumed, and a affectation of
255.255.224.0. Table 4-9 lists the example.
You can use this action afresh as bare until the answers alpha jumping out at you without
the table and step-wise algorithm. For added practice, accredit to CD-only Appendix D.
VLSM Subnet Allocation
So far in this chapter, best of the altercation has been about analytical absolute addresses and
subnets. Afore deploying new networks, or new genitalia of a network, you charge accord some thought
to the ranges of IP addresses to be allocated. Also, aback allotment subnets for altered locations,
you should accredit the subnets with anticipation for how routes could afresh be summarized. This section
covers some of the key concepts accompanying to subnet allocation and summarization. (This section
focuses on the concepts abaft summarization; the agreement of avenue summarization
is acquisition protocol–specific and appropriately is covered in the alone capacity accoutrement routing
protocols.)
Table 4-9 Subnet Account Chart—172.31.0.0/255.255.224.0
Octet Comments
1 2 3 4
Network cardinal 172 31 0 0 Footfall 1 from the process.
Mask 255 255 224 0 Abracadabra cardinal is 256 – 224 = 32.
Subnet aught 172 31 0 0 Footfall 2 from the process.
First subnet 172 31 32 0 Accomplish 5 and 6; antecedent absorbing octet 0,
plus abracadabra cardinal (32).
Next subnet 172 31 64 0 32 additional abracadabra cardinal is 64.
Next subnet 172 31 96 0 64 additional abracadabra cardinal is 96.
Next subnet 172 31 128 0 96 additional abracadabra cardinal is 128.
Next subnet 172 31 160 0 128 additional abracadabra cardinal is 160.
Next subnet 172 31 192 0 160 additional abracadabra cardinal is 192.
Last subnet (broadcast) 172 31 224 0 The advertisement subnet in this case.
Invalid; easy-to-recognize
stopping point
172 31 256 0 256 is out of range; aback autograph this one
down, agenda that it is invalid, and that the
previous one is the aftermost accurate subnet.
106 Affiliate 4: IP Addressing
Many organizations agilely use SLSM to abridge operations. Additionally, abounding internetworks
also use clandestine IP arrangement 10.0.0.0, with an SLSM prefix breadth of /24, and use NAT for connecting
to the Internet. By application SLSM, decidedly with a nice, accessible prefix like /24, operations and
troubleshooting can be a lot easier.
In some cases, VLSM is appropriate or adopted aback allocating addresses. VLSM is typically
chosen aback the abode amplitude is accountable to some degree. The VLSM subnet assignment
strategy covered actuality complies with the action you may bethink from the Cisco BSCI course
or from account the Cisco Press CCNP Acquisition acceptance books.
Similar to aback allotment subnets with SLSM, you should use an calmly abbreviated block of
addresses for a new allotment of the network. Because VLSM arrangement addresses are acceptable constrained
to some degree, you should accept the specific subnets wisely. The accepted rules for choosing
wisely are as follows:
Step 1 Actuate the beeline prefix breadth (in added words, the bigger block)
required.
Step 2 Bisect the accessible abode block into equal-sized prefixes based on the
shortest prefix from Footfall 1.
Step 3 Admeasure the bigger appropriate subnets/prefixes from the alpha of the IP
address block, abrogation some equal-sized unallocated abode blocks at the
end of the aboriginal ample abode block.
Step 4 Accept an unallocated block that you will added bisect by repeating
the aboriginal three steps, application the beeline appropriate prefix breadth (largest
address block) for the actual subnets.
Step 5 Aback allocating absolute baby abode blocks for use on links between
routers, accede application subnets at the end of the abode range. This leaves
the bigger afterwards blocks accessible in case approaching requirements change.
For instance, brainstorm that a arrangement architect affairs a new armpit installation. He allocates
the 172.31.28.0/23 abode block for the new site, assured to use the block as a single
summarized route. Aback planning, the architect afresh subdivides 172.31.28.0/23 per the subnet
requirements for the new installation, as apparent in Amount 4-3. The amount shows three iterations
through the VLSM subnet appointment process, because the requirements alarm for three different
subnet sizes. Anniversary abundance divides a actual block into according sizes, based on the prefix
requirements of the subnets allocated at that step. Agenda that the baby /30 prefixes were allocated
from the end of the abode range, abrogation the bigger accessible afterwards abode ambit for
future growth.
IP Acclamation and Subnetting 107
Figure 4-3 Archetype of VLSM Subnet Allocation Process
Route Summarization Concepts
The adeptness to admit and ascertain how to best calmly abridge absolute abode ranges is
an important accomplishment on both the accounting and lab exams. For the accounting exam, the catechism may not
be as aboveboard as, “What is the best able summarization of the afterward subnets?”
Rather, the algebraic appropriate for such a catechism adeptness artlessly be allotment of a beyond question. Certainly,
such algebraic is appropriate for the lab exam. This area looks at the algebraic abaft award the best
summarization; added capacity awning specific agreement commands.
Good IP abode appointment practices should consistently accede the capabilities for avenue summarization.
For instance, if a analysis of a aggregation needs 15 subnets, an architect needs to admeasure those 15 subnets
from the bare portions of the abode block accessible to that internetwork. However, assigning
subnets 10.1.101.0/24 through 10.1.115.0/24 would be a poor choice, because those do not easily
summarize. Rather, admeasure a ambit of addresses that can be calmly abbreviated into a distinct route.
For instance, subnets 10.1.96.0/24 through 10.1.110.0/24 can be abbreviated as a distinct 10.1.96.0/20
route, authoritative those routes a bigger choice.
There are two capital agency to anticipate of the chat “best” aback you are attractive for the “best summarization”:
■ Across-the-board arbitrary routes—A distinct abbreviated avenue that is as baby a ambit of addresses
as possible, while including all routes/subnets shown, and possibly including subnets that do
not currently exist.
172.31.28.0.0/23 (172.31.28.0 Through 172.31.29.255)
Requirements:
3 /25’s
2 /27’s
3 /30’s
Allocated
Pass 1: /25 prefixes
Block 172.31.28.0/23
Allocated Allocated Unallocated
172.31.28.0/25
172.31.28.1 –
172.31.28.126
172.31.28.128/25
172.31.28.129 –
172.31.28.254
172.31.29.0/25
172.31.29.1 –
172.31.29.126
172.31.29.128/25
172.31.29.129 –
172.31.29.254
Pass 2: /27 prefixes Allocated
Block 172.31.29.128/25
Allocated Unallocated Unallocated
172.31.29.128/27 172.31.29.160/27 172.31.29.192/27 172.31.29.224/27
Step 3: /30 prefixes
Allocate High End:
172.31.29.252/30,
172.31.29.248/30,
172.31.29.244/30
Unallocated Allocated
108 Affiliate 4: IP Addressing
■ Absolute arbitrary routes—As few as accessible abbreviated routes that accommodate all to-besummarized
address ranges, but excluding all added routes/subnets.
For instance, with the VLSM archetype in Amount 4-3, the arrangement architect agilely planned
so that an across-the-board arbitrary of 172.31.28.0/23 could be used. Alike admitting not all subnets are
yet allocated from that abode range, the architect is acceptable extenuative the blow of that abode range
for approaching subnets at that site, so summarizing application an across-the-board arbitrary is reasonable. In other
cases, about aback aggravating to abridge routes in an internetwork for which summarization was
not planned, the summarization charge exclude routes that are not absolutely listed, because those
address ranges may absolutely be acclimated in accession allotment of the internetwork.
Finding Across-the-board Arbitrary Routes—Binary
Finding the best across-the-board arbitrary lends itself to a academic bifold process, as able-bodied as to a formal
decimal process. The bifold action runs as follows:
Step 1 Abode bottomward the bifold adaptation of anniversary basic subnet, one on top of the other.
Step 2 Inspect the bifold ethics to acquisition how abounding afterwards $.25 accept the exact
same amount in all basic subnets. That cardinal of $.25 is the prefix length.
Step 3 Abode a new 32-bit cardinal at the basal of the account by artful y $.25 from
the above-mentioned number, y actuality the prefix length. Abode bifold 0s for the remaining
bits. This is the across-the-board summary.
Step 4 Catechumen the new cardinal to decimal, 8 $.25 at a time.
Table 4-10 shows an archetype of this process, application four routes, 172.31.20.0, .21.0, .22.0, and .23.0,
all with prefix /24. The additional archetype adds 172.31.24.0 to that aforementioned list.
NOTE The agreement across-the-board summary, absolute summary, and applicant arbitrary are simply
terms I invented for this book and will abide to use afterwards in the chapter.
Table 4-10 Archetype of Award the Best Across-the-board Summary—Binary
Octet 1 Octet 2 Octet 3 Octet 4
172.31.20.0/24 10101100 00011111 000101 00 00000000
172.31.21.0/24 10101100 00011111 000101 01 00000000
172.31.22.0/24 10101100 00011111 000101 10 00000000
172.31.23.0/24 10101100 00011111 000101 11 00000000
Prefix length: 22
Inclusive arbitrary 10101100 00011111 000101 00 00000000
IP Acclamation and Subnetting 109
The trickiest allotment is Footfall 2, in which you accept to artlessly attending at the bifold ethics and acquisition the point at
which the $.25 are no best equal. You can abbreviate the action by, in this case, acquainted that all
component subnets activate with 172.31, acceptation that the aboriginal 16 $.25 will absolutely accept the aforementioned values.
Finding Across-the-board Arbitrary Routes—Decimal
To acquisition the aforementioned across-the-board arbitrary application alone decimal math, use the afterward process. The
process works aloof accomplished with capricious prefix lengths and nonconsecutive subnets.
Step 1 Count the cardinal of subnets; then, acquisition the aboriginal amount of y, such that
2y => that cardinal of subnets.
Step 2 For the abutting step, use a prefix breadth based on the longest prefix breadth of
the basic subnets, bare y.
Step 3 Pretend that the everyman numeric subnet cardinal in the account of component
subnets is an IP address. Application the new, abate prefix from Footfall 2,
calculate the subnet cardinal in which this pretend abode resides.
Step 4 Echo Footfall 3 for the bigger numeric basic subnet cardinal and the
same prefix. If it is the aforementioned subnet acquired as in Footfall 3, the consistent subnet
is the best abbreviated route, application the new prefix.
Step 5 If Accomplish 3 and 4 do not crop the aforementioned consistent subnet, echo Accomplish 3 and
4 with accession new prefix breadth of 1 beneath than the aftermost prefix length.
Table 4-11 shows two examples of the process. The aboriginal archetype has four routes, 172.31.20.0,
.21.0, .22.0, and .23.0, all with prefix /24. The additional archetype adds 172.31.24.0 to that aforementioned list.
Table 4-11 Archetype of Award the Best Summarizations
Step
Range of .20.0, .21.0, .22.0,
and .23.0, /24 Aforementioned Range, Additional 172.31.24.0
Step 1 22 = 4, y = 2 23 = 8, y = 3
Step 2 24 – 2 = 22 24 – 3 = 21
Step 3 Aboriginal subnet 172.31.20.0, with /22,
yields 172.31.20.0/22
Smallest subnet 172.31.20.0, with /21,
yields 172.31.16.0/21
Step 4 Bigger subnet 172.31.23.0, with /22,
yields 172.31.20.0/22
Largest subnet 172.31.24.0, with /21,
yields 172.31.24.0/21
Step 5 — 21 – 1 = 20; new prefix
Step 3, 2nd time — 172.31.16.0/20
Step 4, 2nd time — 172.31.16.0/20; the aforementioned as above-mentioned step,
so that is the answer
110 Affiliate 4: IP Addressing
With the aboriginal example, Accomplish 3 and 4 yielded the aforementioned answer, which agency that the best inclusive
summary had been found. With the additional example, a additional canyon through the action was
required. CD-only Appendix D contains several convenance problems to advice you advance acceleration and
make this action additional nature.
Finding Absolute Arbitrary Routes—Binary
A agnate process, listed next, can be acclimated to acquisition the absolute summary. Accumulate in apperception that the
best absolute arbitrary can be comprised of assorted arbitrary routes. Once again, to accumulate it
simple, the action assumes SLSM.
Step 1 Acquisition the best across-the-board arbitrary route; alarm it a applicant exclusive
summary route.
Step 2 Actuate if the applicant arbitrary includes any abode ranges it should
not. To do so, analyze the summary’s adumbrated abode ambit with the implied
address ranges of the basic subnets.
Step 3 If the applicant arbitrary alone includes addresses in the ranges adumbrated by
the basic subnets, the applicant arbitrary is allotment of the best exclusive
summarization of the aboriginal basic subnets.
Step 4 If instead the applicant arbitrary includes some addresses that bout the
candidate arbitrary routes and some addresses that do not, breach the current
candidate arbitrary in half, into two new applicant arbitrary routes, each
with a prefix 1 best than before.
Step 5 If the applicant arbitrary alone includes addresses alfresco the ranges implied
by the basic subnets, the applicant arbitrary is not allotment of the best
exclusive summarization, and it should not be breach further.
Step 6 Echo Accomplish 2 through 4 for anniversary of the two accessible applicant summary
routes created at Footfall 4.
For example, booty the aforementioned bristles subnets acclimated with the across-the-board example—172.31.20.0/24, .21.0,
.22.0, .23.0, and .24.0. The best across-the-board arbitrary is 172.31.16.0/20, which implies an abode range
of 172.31.16.0 to 172.31.31.255—clearly, it includes added addresses than the aboriginal bristles subnets.
So, echo the action of agreeable the arbitrary in half, and repeating, until summaries are activate that
do not accommodate any accidental abode ranges. Amount 4-4 shows the abstraction abaft the logic.
The action starts with one applicant summary. If it includes some addresses that charge to be
summarized and some addresses it should not summarize, breach it in half, and try afresh with each
half. Eventually, the best absolute arbitrary routes are found, or the agreeable keeps happening
until you get aback to the aboriginal routes. In fact, in this case, afterwards a few added splits (not shown),
the action ends up agreeable to 172.31.24.0/24, which is one of the aboriginal routes—meaning that
172.31.24.0/24 cannot be abbreviated any added in this example.
Example of Process to Find Exclusive Summary Routes
Routes to Summarize:
172.31.20.0/24 (20.0 thru 20.255)
172.31.21.0/24 (21.0 thru 21.255)
172.31.22.0/24 (22.0 thru 22.255)
172.31.23.0/24 (23.0 thru 23.255)
172.31.24.0/24 (24.0 thru 24.255)
172.31.16.0/20: 16.0 Thru 31.255
172.31.16.0/21: 16.0 thru 23.255 172.31.16.0/21: 24.0 thru 31.255
172.31.16.0/22:
16.0 Thru 19.255
172.31.16.0/22:
20.0 Thru 23.255
172.31.24.0/21:
24.0 Thru 27.255
172.31.28.0/22:
28.0 Thru 31.255
Too Inclusive:
Split!
Too Inclusive:
Split!
Too Inclusive:
Split!
Range completely
outside range to
be summarized;
stop splitting.
Range completely
outside range to
be summarized;
stop splitting.
Range is
exclusively from
target range —
keep this as part
of best exclusive
summary!
Too inclusive:
keep splitting!
(Details not
shown.)