0% found this document useful (0 votes)
68 views61 pages

Ccna Cisco Certified Network Associate لبقتسملا تاراهم ةردابم بردملا ـمسا جاحلا ىيحي

- The document discusses subnetting a Class C IP address range. It explains how to borrow host bits to create subnets and calculate the number of available subnets and hosts. - It provides examples of subnetting the Class C range 200.15.10.0/24 using /31, /30, and /29 subnet masks. A /31 provides 128 subnets with 2 hosts each, /30 provides 64 subnets with 2 hosts each, and /29 would provide 32 subnets. - Key aspects of subnetting covered are borrowing host bits, calculating subnets and hosts, and determining valid subnet and host IP ranges.

Uploaded by

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

Ccna Cisco Certified Network Associate لبقتسملا تاراهم ةردابم بردملا ـمسا جاحلا ىيحي

- The document discusses subnetting a Class C IP address range. It explains how to borrow host bits to create subnets and calculate the number of available subnets and hosts. - It provides examples of subnetting the Class C range 200.15.10.0/24 using /31, /30, and /29 subnet masks. A /31 provides 128 subnets with 2 hosts each, /30 provides 64 subnets with 2 hosts each, and /29 would provide 32 subnets. - Key aspects of subnetting covered are borrowing host bits, calculating subnets and hosts, and determining valid subnet and host IP ranges.

Uploaded by

Yahya Al Haj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 61

CCNA

Cisco Certified Network Associate


DAY2
‫مبادرة مهارات المستقبل‬
‫اسمـ المدرب‬
Subnetting
To understand this lecture, think about it from the point of view of the
originally intended IPv4 design again, where all hosts which can
communicate on the Internet have a public IP address.
Let’s say we’re the network designer for a small business with four
departments spread over two offices, and we want to manage our
own public address space.
Rather than purchasing separate address ranges for the different
departments, we can purchase a single range and subnet it into
smaller portions.
Borrowing Host
Bits
Let’s say we’ve been allocated Class C 200.15.10.0/24
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0

To subnet the network into smaller subnets, we need to ‘borrow’ host


bits and add them to the network portion of the address
The network address line always moves to the right when we subnet
The further to the right we go, the more subnets we’ll have of that size
but less hosts
Calculating the Number of
Networks
To calculate the number of available subnets, the formula is 2subnet-bits
If a Class C network uses a /28 subnet mask then we’ve borrowed 4 bits
from the default of /24
24 = 16 available subnets
If a Class B network uses a /28 subnet mask then we’ve borrowed 12 bits
from the default of /16
212 = 4096 available subnets
Hosts on different subnets need to go via a router if they want to
communicate with each other
Calculating the Number of
Hosts
To calculate the number of available hosts, the formula is 2host-bits minus 2
We subtract 2 because the network address and broadcast address
cannot be assigned to hosts
If a Class C network uses a /28 subnet mask then we have 4 bits left for
hosts
24 - 2 = 14
If a Class B network uses a /28 subnet mask then we have 4 bits left for
hosts
24 - 2 = 14
A Quick Note on ip subnet-
zero
Just like we have to subtract 2 to get the number of valid hosts, we used
to have to subtract 2 to get the number of available networks also
In the original Internet standards, it was not allowed to use network bits
of all 0’s or all 1’s (just like we can’t use all host bits of all 0’s or all 1’s)
There wasn’t really any practical need for this and it wasted address
space
The ip subnet-zero command on a router overrides the limitation,
and is enabled by default
Class C /31
Subnet
Let’s say we’ve been allocated Class C 200.15.10.0/24
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0

If we move the line all the way to the right we’re now using /31 (or
255.255.255.254)
This leaves one bit for the host address, with a possible value of 0 or 1
It borrows 7 bits for the network address
This gives us 128 subnets (27) which accommodate 2 hosts each
Class C /31
Subnet
.Let’s say we’ve been allocated Class C 200.15.10.0/24
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0

We subnet using /31. Valid host addresses:


‒ 200.15.10.0 to 200.15.10.1
‒ 200.15.10.2 to 200.15.10.3
‒ Etc., to:
‒ 200.15.10.254 to 200.15.10.255
But
!Wait
.Let’s say we’ve been allocated Class C 200.15.10.0/24
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0

What about the network and broadcast address?!


/31 breaks the standard rules of IP addressing.
/31 subnets are supported on Cisco routers for point to point links
(which have no need for a network or broadcast address.)
Class C /30
Subnet
Let’s say we’ve been allocated Class C 200.15.10.0/24
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0

Let’s move the line back a place. We’re now using /30 (or 255.255.255.252)
This leaves 2 bits for the host address, 22 = 4, minus 2 for the network and
broadcast address = 2 possible hosts
It borrows 6 bits for the network address
This gives us 64 subnets (26) which accommodate 2 hosts each
Class C /30
Subnet
.Notice that the line is after the 4. The network address goes up in values of 4
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0

Valid host addresses:


‒ 200.15.10.1 to 200.15.10.2 (network .0, broadcast .3)
‒ 200.15.10.5 to 200.15.10.6 (network .4, broadcast .7)
‒ Etc., to:
‒ 200.15.10.253 to 200.15.10.254 (network .252, broadcast .255)
vs 31/
/30
/31 and /30 both accommodate 2 hosts per subnet
/31 supports 128 subnets, /30 only 64
/31 is useful if you need to maximise use of your address space
/30 is more standard and commonly used
For the CCNA exam, use /30 when a subnet to support 2 hosts is
required, unless told to use /31
Class C /29
Subnet
Let’s say we’ve been allocated Class C 200.15.10.0/24
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0

Let’s move the line back a place. We’re now using /29 (or 255.255.255.248)
This leaves 3 bits for the host address, 23 minus 2 = 6 possible hosts
It borrows 5 bits for the network address
This gives us 32 subnets (25) which accommodate 6 hosts each
Class C /29
Subnet
.Notice that the line is after the 8. The network address goes up in values of 8
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0

Valid host addresses:


‒ 200.15.10.1 to 200.15.10.6 (network .0, broadcast .7)
‒ 200.15.10.9 to 200.15.10.14 (network .8, broadcast .15)
‒ Etc., to:
‒ 200.15.10.249 to 200.15.10.254 (network .248, broadcast .255)
Other Class C Subnet
Masks
We can carry on moving the line back a place

/28 (or 255.255.255.240) = 16 networks of 14 hosts each


/27 (or 255.255.255.224) = 8 networks of 30 hosts each
/26 (or 255.255.255.192) = 4 networks of 62 hosts each
/25 (or 255.255.255.128) = 2 networks of 126 hosts each
/24 (or 255.255.255.0) = 1 network of 254 hosts
Variable Length Subnet Masks
VLSM
Early routing protocols only supported Fixed Length Subnet Masking
(FLSM) where all subnets had to be the same size. You couldn’t have a
subnet with 14 hosts and another subnet with 64 hosts in the same
network.
All modern routing protocols support Variable Length Subnet Masking.
This allows us to size subnets differently according to how many hosts
they have.
Subnetting Practice
Question
What are the network address, broadcast address, and valid host
addresses for the IP address 198.22.45.173/26?
What is the subnet mask in dotted decimal notation?
Pause the video here and answer the questions.
Practice Question
Answer
Let’s figure out the subnet mask in dotted decimal notation first
because that’s easy…
/26 borrows the first 2 bits in the last octet
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0

128 + 64 = 192
So the subnet mask is 255.255.255.192
Practice Question
Answer
Next let’s calculate the address range for this subnet
Write out 198.22.45.173/26
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 0 1 1 0 0 0 0 1 0 1 1 0 0 0 1 0 1 1 0 1 1 0 1 0 1 1 0 1

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0

The network portion of the address is the first 26 bits


198.22.45.128 is the network address
The line is after 64, so add 64 to get the network address of the next subnet
The next subnet begins at 198.22.45.192
So the broadcast address is 198.22.45.191
And the valid host addresses are 198.22.45.129 to 198.22.45.190
Practice Question
Answer
198.22.45.173/26
128 64 32 16 8 4 2 1
1 0 1 0 1 1 0 1

128 64 32 16 8 4 2 1
1 1 0 0 0 0 0 0

Note that when we subnet a Class C address the magic is all going to
happen in the last subnet
So we didn’t really need to write out the 198.22.45 part
Variable Length Subnet Masks
VLSM
Early routing protocols only supported Fixed Length Subnet Masking
(FLSM) where all subnets had to be the same size. You couldn’t have a
subnet with 14 hosts and another subnet with 64 hosts in the same
network.
All modern routing protocols support Variable Length Subnet Masking.
This allows us to size subnets differently according to how many hosts
they have.
Subnetting
Considerations
How many locations do we have in the network?
How many hosts are in each location?
What are the IP addressing requirements for each location? (Should
different departments or types of host be in different subnets?)
What size is appropriate for each subnet? (Don’t waste addresses, but
leave room for growth.)
Network Topology
Diagram
Sales: Sales:
14 Hosts 7 Hosts
New York Boston
The router interfaces
need IP addresses
.so count as hosts
The router interface Point to point link:
PCs = 14 hosts 13 + 2 Hosts
Eng: Eng:
28 Hosts 28 Hosts

We’ve been allocated the Class C network 200.15.10.0/24


Subnetting Design
Steps
Find the largest segment and allocate a suitable subnet size for it.
Allocate this subnet at the start of the address space.
Continue going down the list.

In the real world you want a scalable design – you will likely allocate spare
subnets for future growth, and leave space in the subnets for additional
hosts.
In the CCNA exam do exactly what the question asks, don’t worry about
whether it’s best practice or not.
Engineering
Departments
The Engineering departments in both sites have 28 hosts.
For our example we’ve been told that the departments will not grow and
we need to use the smallest subnets possible to maximise our address
space.
calculate the optimal subnet mask for the Engineering
departments.
Also determine the network and broadcast addresses that will be allocated
to both Engineering departments, and the range of host addresses.
Engineering
Departments
We’ve been allocated 200.15.10.0/24
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0

/27 (or 255.255.255.224) supports 30 hosts


New York Engineering subnet Boston Engineering subnet
Network Address: 200.15.10.0/27 Network Address: 200.15.10.32/27
Broadcast Address: 200.15.10.31 Broadcast Address: 200.15.10.63
Hosts: 200.15.10.1 to 30 Hosts: 200.15.10.33 to 62
New York Sales
Department
The next largest subnet is New York Sales which requires 14 hosts.
Pause the video here and calculate the optimal subnet mask.
Also determine the network and broadcast addresses that we will allocate,
and the range of host addresses.
New York Sales
Department
We’ve been allocated 200.15.10.0/24
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0

/28 (or 255.255.255.240) supports 14 hosts


200.15.10.0 to 200.15.10.63 are already in use by the Engineering
departments, so this network address will start at 200.15.10.64
The network address goes up in values of 16, so the next one is
200.15.10.80
Our broadcast address is 200.15.10.79
Valid host addresses are 200.15.10.65 to 200.15.10.78
Boston Sales
Department
The next largest subnet is Boston Sales which requires 7 hosts.
Pause the video here and calculate the optimal subnet mask.
Also determine the network and broadcast addresses that we will allocate,
and the range of host addresses.
Boston Sales
Department
We’ve been allocated 200.15.10.0/24
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0

/28 (or 255.255.255.240) supports 14 hosts


/29 does not support 8 hosts! Remember to subtract 2 for the network and
broadcast address
200.15.10.0 to 200.15.10.79 are already in use, so this network address will start at
200.15.10.80
The network address goes up in values of 16, so the next one is 200.15.10.96
Our broadcast address is 200.15.10.95
Valid host addresses are 200.15.10.81 to 200.15.10.94
Subnetting

We’re done, right?

Not so fast, don’t forget the links between routers

You also need to allocate address space for your router loopback
interfaces, we’ll talk about those later. (Not required in our example.)
New York to Boston
Link
The last subnet is the link between the New York and Boston routers.
Pause the video here and calculate the optimal subnet mask.
Also determine the network and broadcast addresses that we will allocate,
and the range of host addresses.
New York to Boston
Link
We’ve been allocated 200.15.10.0/24
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0

/30 (or 255.255.255.252) supports 2 hosts


200.15.10.0 to 200.15.10.95 are already in use, so our network
address will be 200.15.10.96
The network address goes up in values of 4, so the next one is
200.15.10.100
Our broadcast address is 200.15.10.99
Valid host addresses are 200.15.10.97 to 200.15.10.98
Network Topology
Diagram
Revisit the network topology diagram again on the next slide
Update the diagram with the IP addressing information for each subnet
Also enter the IP addresses on the router
The default gateway address should be the first available address in each
subnet
Network Topology
Diagram
Sales: Sales:
14 Hosts 7 Hosts
New York Boston

Point to point link:


2 Hosts
Eng: Eng:
28 Hosts 28 Hosts

We’ve been allocated the Class C network 200.15.10.0/24


Network Topology
Diagram
New York Boston
Sales:
Sales:
200.15.10.64/28
200.15.10.80 /28
65. 200.15.10.96/30 81.
97. 98.
Eng: 1. 33. Eng:
200.15.10.0/27 200.15.10.32/27
Subnetting Large
Networks
Let’s say we’ve been allocated Class B 135.15.0.0/16

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Example 1 – Class B on 4th
Octet
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0

If we subnet this into /29 subnets, we have 3 bits for host addressing.
This allows 6 hosts per network (23 - 2) , the same as if we used /29
with a Class C address.
Because we were allocated a Class B /16 address range, we have 13
bits for network addresses
This allows 8192 subnets (213)
Example 1 – Class B on 4th
Octet
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 1 0 0 0 1 0 1 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0

For the IP address 135.15.10.138/29, what is the network address,


broadcast address, and range of valid IP addresses?
Example 1 – Class B on 4th
Octet
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 1 0 0 0 1 0 1 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0

For the IP address 135.15.10.138/29, what is the network address,


broadcast address, and range of valid IP addresses?
The line is after the 8, so the network address goes up in multiples of 8
Network address = 135.15.10.136
Next network address = 135.15.10.144
Broadcast address = 135.15.10.143
Valid host addresses = 135.15.10.137 to 142
The Magic Number Method –
Example 1
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 1 0 0 0 1 0 1 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0

For the IP address 135.15.10.138/29, what is the network address, broadcast


address, and range of valid IP addresses?
The subnet mask is 255.255.255.248
Subtract the value in the subnetted octet from 256: 256 – 248 = 8
The network address goes up in multiples of 8
Network address = 135.15.10.136
Next network address = 135.15.10.144
Broadcast address = 135.15.10.143
Valid host addresses = 135.15.10.137
to 142
Example 2A – Class A on 4th
Octet
For this example we’re allocated Class A 60.0.0.0/8
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

If we apply the subnet mask 255.255.255.240, how many subnets do


we have and how many hosts per subnet?
Example 2A – Class A on 4th
Octet
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0

255.255.255.240 subnet mask is /28


14 hosts per network (24 - 2)
Because we were allocated a Class A /8 address range, we have 20 bits
for network addresses
This allows 1,048,576 subnets (220)
Example 2B – Class A on 4th
Octet
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 1

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0

For the IP address 60.15.10.75/28, what is the network address,


broadcast address, and range of valid IP addresses?
Example 2B – Class A on 4th
Octet
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 1

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0

For the IP address 60.15.10.75/28, what is the network address,


broadcast address, and range of valid IP addresses?
The line is after the 16, so the network address goes up in multiples of 16
Network address = 60.15.10.64
Next network address = 60.15.10.80
Broadcast address = 60.15.10.79
Valid host addresses = 60.15.10.65 to 78
The Magic Number Method
Example 2B
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 1

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0

For the IP address 60.15.10.75/28, what is the network address, broadcast


address, and range of valid IP addresses?
The subnet mask is 255.255.255.240
Subtract the value in the subnetted octect from 256: 256 – 240 = 16
The network address goes up in multiples of 16
Network address = 60.15.10.64
Next network address = 60.15.10.80
Broadcast address = 60.15.10.79
Valid host addresses = 60.15.10.65
to 78
Example 3A – Class A on 3rd
Octet
For this example we’re allocated Class A 60.0.0.0/8
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

If we subnet this into /19 networks, how many subnets do we have


and how many hosts per subnet?
Example 3A – Class A on 3rd
Octet
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0

8190 hosts per network (213 - 2)


Because we were allocated a Class A /8 address range, we have 11 bits
for network addresses
This allows 2048 subnets (211)
Example 3B – Class A on 3rd
Octet
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 1

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0

For the IP address 60.15.10.75/19, what is the network address,


broadcast address, and range of valid IP addresses?
Example 3B – Class A on 3rd
Octet
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 1

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0

For the IP address 60.15.10.75/19, what is the network address,


broadcast address, and range of valid IP addresses?
We’re subnetting on the third octet
The line is after the 32, so the network address goes up in multiples of 32
Network address = 60.15.0.0
Next network address = 60.15.32.0
Broadcast address = 60.15.31.255
Valid host addresses = 60.15.0.1 to
The Magic Number Method
Example 3B
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 1

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0

For the IP address 60.15.10.75/19, what is the network address, broadcast


address, and range of valid IP addresses?
The subnet mask is 255.255.224.0
Subtract the value in the subnetted octect from 256: 256 – 224 = 32
The network address goes up in multiples of 32
Network address = 60.15.0.0
Next network address = 60.15.32.0
Broadcast address = 60.15.31.255
Valid host addresses = 60.15.0.1 to
60.15.31.254
Subnetting Large Networks –
Example 4
You have been asked to subnet the 134.65.0.0 network into at least six
different networks.
What subnet mask do you use?
Example 4 – Class B on 3rd
Octet
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 0 0 0 0 1 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1


1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0

134.65.0.0 is a Class B network so we’ll be subnetting on the third octet


to get 6 subnets
3 bits would provide 8 subnets (23)
So the answer is /19 or 255.255.224.0
Network addresses would be 134.65.0.0, 134.65.32.0, 134.65.64.0 etc.
8190 hosts in each subnet (213 -2)
RFC 1918 Private
Addresses
There is a range of private addresses in each address class.
10.0.0.0 – 10.255.255.255
‒ 10.0.0.0/8
‒ 10.0.0.0 255.0.0.0
172.16.0.0 – 172.31.255.255
‒ 172.16.0.0/12
‒ 172.16.0.0 255.240.0.0
192.168.0.0 – 192.168.255.255
‒ 192.168.0.0/16
‒ 192.168.0.0 255.255.0.0
RFC 1918 Example
1
Bank A Internet
Bank B
Public Public
175.11.0.0/24 196.14.10.0/24

Private Private
10.10.10.0/24 172.18.5.0/24
RFC 1918 Example
2
Bank A Internet
Bank B
Public Public
175.11.0.0/24 196.14.10.0/24

Private Private
192.168.10.0/24 192.168.10.0/24
The IPv4 Global Address Space
Problem
The designers of IPv4 did not envision the explosive growth of its use
4.3 billion addresses seemed more than enough
The protocol is not particularly efficient in its use of the available
space, with many addresses being wasted
IPv6
The Internet authorities started to predict address exhaustion in the
late 1980’s, and IPv6 was developed in the 90’s as the long term
solution
IPv6 uses a 128 bit address, compared to IPv4’s 32 bit address
IPv6 provides more than 7.9×1028 times as many addresses as IPv4
The IPv6 Problem and
NAT
There is not a seamless migration path from IPv4 to IPv6
NAT (Network Address Translation) was implemented as a temporary
workaround to mitigate the lack of IPv4 addresses until organisations
had time to migrate to IPv6
An organisation can use private IP addresses on their inside network,
but still grant their hosts Internet access by translating them to their
outside public IP address
Many hosts on the inside can share a few or a single public IP address
on the outside
Private Addresses and
NAT
Office A Office B
Internet
Public Public
175.11.0.1/28 196.14.10.25/29
14 Addresses 6
Addresses

Private Private
192.168.10.0/24 192.168.10.0/24
Hosts 200 100
Hosts
END of DAY2

You might also like