You are on page 1of 16

Course 640-801 : CCNA

2.0 - Subnetting

[Author: CCNA640801@nym.hush.com]

Planning & Designing


Objective 2
Design an IP addressing scheme to meet design requirements
Implementation & Operation
Objective 8
Configure IP addresses, subnet masks, and gateway addresses on routers and hosts
Troubleshooting
Objective 21
Troubleshoot IP addressing and host configuration

Binary: powers of 2 (from right to left)


2^8
2^7
2^6
2^5
2^4
2^3
128
64
32
16
8
4

2^1
2

2^0
1

Hexadecimal: powers of 16 (from right to left)


16^3
16^1
16^0
512
16
1

A host or node is a computer or device on a TCP/IP network. Every TCP/IP host is uniquely identified by its IP
address. An IP address consists of a network ID and a host ID. If two different hosts belong to the same network,
they have the same network ID. The two hosts will have different host IDs and can communicate with each other
locally without going through a router. If two hosts have different network IDs, they belong to different segments
on the network and they must communicate with each other remotely through a router or default gateway.
An IP address consists of 32 binary bits, where each bit is either a 0 or 1. We write the 32 bits into four 8 bit
numbers (octets) separated by periods.
Developing a TCP/IP addressing scheme
Hosts for a LAN subnet mask
One for each router interface
Subnet mask
Number of subnets on the network

One for each NIC on each host


Number of host IDs on each subnet

IP Address Classes
The Class of the address determines which part is the network address and which part is the host address. There
are 5 different address classes. Classes can be distinguished by the decimal notation of the very first octet. The
following Address Class table illustrates how you can determine to which class an address belongs.
Private IP Addresses
You can use certain IP addresses privately within you own Intranet as long as they are not seen by the global
community.
Class
A
Network (8 bits)
Host (24 bits)

Valid Network
Numbers
1.x.x.x to 127.x.x.x

Octet
0 - 127

Miscellaneous
Private Use reserved

10.x.x.x

Default subnet
mask
255.0.0.0

Loopback reserved
127.x.x.x
(127.0.0.1 loopback test)

B
Network (16 bits)
Host (16 bits)

128.x.x.x to 191.x.x.x

128 - 191

Autoconfig reserved

169.254.x.x

255.255.0.0

C
Network (24 bits)
Host (8 bits)

192.x.x.x to 223.x.x.x

224 to 239

Multicasts

n/a

240 to 255

Reserved for future InterNIC use

n/a

Private Use reserved 172.16-31.x.x


192 - 223

Private Use reserved

192.168.x.x

255.255.255.0

Class A IP addresses allow the most number of hosts


Class C IP addresses allow the least number of hosts
Using this table we can see the IP address in 193.10.30.2 is a Class C address.
1 / 15

Course 640-801 : CCNA

2.0 - Subnetting

[Author: CCNA640801@nym.hush.com]

We can also see which part of that IP address is the Network ID and which is the Host ID.
Network ID:
Host ID:

(first 3 Octets)
(remaining Octets)

= 193.10.30
=2

Addressing types
Cisco IOS software support 3 types of addressing:
Unicast
o Directed to a valid host address on a segment
Multicast
o Directed to a group of devices on a segment
o are sent to a particular network and are allowed to transit by a router
o all 1s in the host portion of the address.
o e.g. If you want to send a broadcast to the third subnet of the 172.16 network the address would
be 172.16.3.255
o e.g. If you want to send a broadcast to all the subnets of 172.16 network the address would be
172.16.255.255
Broadcast
o Directed to every device on the same segment
o Flooded broadcasts are considered local and are represented by 255.255.255.255 or
FFFF.FFFF.FFFF
Whenever you want to refer to your entire network with an IP address, the host section is set to all 0s
(binary=00000000) = 0 For example 172.16.0.0 specifies the network for the above address.
Subnetting
SUBNETTING CREATES MORE NETWORKS WITH FEWER HOSTS AVAILABLE (on each network)
subnet bits are borrowed from the Node/Host portion.
you may use all but 2 bits when subnetting (cant borrow all bits from the host portion of an address)
Network address 207.103.56.105 with a SM of 255.255.255.240 is a class C address with 4 bits borrowed
This creates a^4 = 16-2 means you can have 14 valid subnets with the same number of hosts per subnets
Directed/only subnet broadcast address
Flooded/total network broadcast address

N.N.S.255 (this is for class B)


N.N.255.255 (this is for class B)

Subnetting is the process used to divide the total available IP addressed (hosts) for your Network into smaller
subnetworks (subnets). For example, the Network ID we used in the discussion above (193.10.30.0). This
network would consist of 256 possible IP addresses (193.10.30.0 - 193.10.30.255).
We know this because in a Class C address, only the last octet is available for host IDs (0000000 11111111) or
(0 255). Since 0 is used to identify the whole network and 255 is reserved for broadcasts, that leaves us with 254
possible hosts (193.10.30.1 193.10.30.254).
Suppose we wanted to divide those 254 addresses up into 6 smaller subnets. This can be done by using what is
referred to as a Subnet Mask. By looking at the above table we can see Class C addresses all have a default
subnet mask of 255.255.255.0. Since the last octet of the subnet mask is 0, it means that the host IDs have not
been subdivided into smaller subnets. However, if we choose to divide our network into a few smaller segments
(subnets), then we would change the default subnet mask by replacing the last octet with one of the valid subnet
masks.
255.255.255.240 = 11111111.11111111.11111111.11110000

(/ 20)

2 / 15

Course 640-801 : CCNA

2.0 - Subnetting

[Author: CCNA640801@nym.hush.com]

Class
Network address range
address format
valid host ids
-----------------------------------------------------------------------------------A
0|000.0000 =
0
N.H.H.H
N. 0. 0. 1
0|111.1111 = 127
N.H.H.H
N.255.255.254
range is 1-127
B

10|00.0000
10|11.1111
range is 128-191

= 128
= 191

N.N.H.H
N.N.H.H

N.
N.

N. 0. 1
N.255.254

110|0.0000
110|1.1111
range is 192-223

= 192
= 223

N.N.N.H
N.N.N.H

N.
N.

N.
N.

N. 1
N.254

SUBNETTING CLASS C 8 bits to use for subnetting


Binary
decimal
# of bits
shorthand
# subnets
# hosts
---------------------------------------------------------------------------------1000.0000
255.255.255.128
/25
<----- invalid
1100.0000
255.255.255.192
2
/26
2
62
1110.0000
255.255.255.224
3
/27
6
30
1111.0000
255.255.255.240
4
/28
14
14
1111.1000
255.255.255.248
5
/29
30
6
1111.1100
255.255.255.252
6
/30
62
2
1111.1110
255.255.255.254
/31
class C is an exception whereby we remove 2 hosts from each of the ranges because we
are already subnetting the 4th octet and consequently dont have room for the network
and broadcast addresses weird heh?
example
Subnet 192.168.10.0
SM
255.255.255.128

/25

Cannot use this subnet mask as it involves only using one bit for subnetting
Subnet 192.168.10.0
SM
255.255.255.192 (/26)

example

A. how many valid subnets?


192 is 2 masked-bits and 6 host-bits
2 ^ MaskedBits - 2 = 2^2-2 = 2
B. how many valid hosts/subnet?
2 ^ host-bits - 2 = 2^6-2 = 62
C. first valid subnet and incremental value
256 192 = 64, 128
... until 192 (which is invalid as it is the SM)
D. broadcast address for each subnet ?
i.e. the number before the next subnet
1st is 64, therefore 128-1=127
2nd is 128, therefore 192-1=191
E. valid hosts ?
3 / 15

Course 640-801 : CCNA

2.0 - Subnetting

Network
0
64
128
192

invalid
1st
2nd
invalid

[Author: CCNA640801@nym.hush.com]

First host

Last host

Broadcast address

65
129

126
190

127
191

First host

Last host

Broadcast address

33
65
97
129
161
193

62
94
126
158
190
222

63
95
127
159
191
223

example
Subnet 192.168.10.0
SM
255.255.255.224 (/27)
A. how many valid subnets?
224 is 3 MB and 5 HB
2 ^ MB - 2 = 2^3-2 = 6
B. how many valid hosts/subnet?
2 ^ HB - 2 = 2^5-2 = 30
C. first valid subnet and incremental value
256 224 = 32, 64, 96, 128, 160, 192
... until 224 (which is invalid as it is the SM)
D. broadcast address for each subnet ?
i.e. the number before the next subnet
1st
2nd
3rd
4th
5th
6th
7th

is
is
is
is
is
is
is

32,
64,
96,
128,
160,
192,
224,

therefore
therefore
therefore
therefore
therefore
therefore
therefore

32-1= 31
64-1= 63
96-1= 95
128-1=127
160-1=159
192-1=191
224-1=223

E. valid hosts ?
invalid
1st
2nd
3rd
4th
5th
6th
invalid

Network
0
32
64
96
128
160
192
224

Subnet 192.168.10.0 / 28
SM
255.255.255.240

example

A. how many valid subnets?


240 is 4 MB and 4 HB
2 ^ MB - 2 = 2^4-2 = 14
B. how many valid hosts/subnet?
2 ^ HB-2 = 2^4-2 = 14
C. first valid subnet and incremental value
256 240 = 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240
... until 240 (which is invalid as it is the SM)

4 / 15

Course 640-801 : CCNA

2.0 - Subnetting

[Author: CCNA640801@nym.hush.com]

D. broadcast address for each subnet ?


i.e. the number before the next subnet
31, 47, 63, 79, 95, 111, 127, 143, 175, 191, 207, 223, 239
E. valid hosts ?
invalid
1st
2nd
3rd
4th
5th
6th
7th
8th
9th
10th
11th
12th
13th
14th
invalid

Network
0
16
32
48
64
80
96
112
128
144
160
176
192
208
224
240

First host

Last host

Broadcast address

17
33
49
65
81
97
113
129
145
161
177
193
209
225

30
46
62
78
94
110
126
142
158
174
190
206
222
238

31
47
63
79
95
111
127
143
159
175
191
207
223
239

First host

Last host

Broadcast address

9
17
25
33
41
...
241

14
22
30
38
46
...
246

15
23
31
39
47
...
247

example
SM
255.255.255.248 /29
Subnet 192.168.10.0
A. how many valid subnets?
248 is 5 masked-bits and 3 host-bits
2^MB-2 = 2^5-2 = 30
B. how many valid hosts/subnet?
2^HB-2 = 2^3-2 = 6
C. first valid subnet and incremental value
256-248 = 8, 16, 24, 32, 40, 48, ... 240
... until 248 (which is invalid as it is the SM)
D. broadcast address for each subnet ?
i.e. the number before the next subnet
15, 23, 31, 39, ... 247
E. valid hosts ?
invalid
1st
2nd
3rd
4th
5th
...
30th
invalid

Network
0
8
16
24
32
40
...
240
248

Subnet 192.168.10.0 /30


SM
255.255.255.252

example

5 / 15

Course 640-801 : CCNA

2.0 - Subnetting

[Author: CCNA640801@nym.hush.com]

A. how many valid subnets?


252 is 6 MB and 2 HB
2^MB-2 = 2^6-2 = 62
B. how many valid hosts/subnet?
2^host-bits-2 = 2^2-2 = 2
C. first valid subnet and incremental value
256-252 = 4, 8, 16, 32, ... 248
... until 252 (which is invalid as it is the SM)
4 is the first subnet and the base number
D. broadcast address for each subnet ?
i.e. the number before the next subnet
7, 11, 15, ... 251
E. valid hosts ?
invalid
1st
2nd
3rd
4th
5th
...
invalid

Network
0
4
8
12
16
20
...
252

First host

Last host

Broadcast address

5
9
13
17
21
...

6
10
14
18
22
...

7
11
15
19
23
...

SUBNETTING CLASS B 16 bits to use for subnetting


Binary
decimal
shorthand
-------------------------------------------------------------1000.0000 0000.0000
255.255.128.0
/17
<----- invalid
1100.0000 0000.0000
255.255.192.0
/18
1110.0000 0000.0000
255.255.224.0
/19
1111.0000 0000.0000
255.255.240.0
/20
1111.1000 0000.0000
255.255.248.0
/21
1111.1100 0000.0000
255.255.252.0
/22
1111.1110 0000.0000
255.255.254.0
/23
1111.1111 0000.0000
255.255.255.0
/24
1111.1111 1000.0000
255.255.255.128
/25
1111.1111 1100.0000
255.255.255.192
/26
1111.1111 1110.0000
255.255.255.224
/27
1111.1111 1111.0000
255.255.255.240
/28
1111.1111 1111.1000
255.255.255.248
/29
1111.1111 1111.1100
255.255.255.252
/30
Given a class B address 172.16 from NIC.
A typical subnetting scheme for a class B network would be to use an 8 bit subnet
mask. Since the 3rd octet is the first free octet for class B, you will start there.
So, if an 8 bit subnet mask would be 255.255.255.0, this means you have 254 subnets
available and 254 addresses for nodes per subnet (there are only 254 subnets

6 / 15

Course 640-801 : CCNA

2.0 - Subnetting

[Author: CCNA640801@nym.hush.com]

available and not 256 because you cannot use subnets 0 or subnet 1, as these are
broadcast addresses.
example

Subnet 172. 16. 0.0 /18


SM
255.255.192.0
A. how many valid subnets?
192 is 2 MB and 6+8 (14) HB
2 ^ MB-2 = 2^2-2 = 2

B. how many valid hosts/subnet?


2 ^ HB - 2 = 2^14-2 = (2^6 * 256) 2 = (64 * 256) 2 = 16,382
C. first valid subnet and incremental value
256-192 = 64
... until 192 (which is invalid as it is the SM)
i.e. 64 + 64 = 128 + 64 = 192
valid subnets are 64 and 128
D. broadcast address for each subnet ?
i.e. the number before the next subnet
1st
2nd

is 64.0, therefore 128.0-1 = 127.255


is 128.0, therefore 192.0-1 = 191.255

E. valid hosts ?
Network
0.0
64.0
128.0
192.0

invalid
1st
2nd
invalid

First host

Last host

Broadcast address

64.1
128.1

127.254
191.254

127.255
191.255

example

Subnet 150. 4. 0.0 /19


SM
255.255.224.0
A. how many valid subnets?
224 is 3 MB and 13 HB
2 ^ MB-2 = 2^3-2 = 6

B. how many valid hosts/subnet?


2 ^ HB-2 = 2^13-2 = (2^5 * 256) 2 = (32 * 256) 2 = 8190
C. first valid subnet and incremental value
256-224 = 32
... until 224 (which is invalid as it is the SM)
i.e. 32 + 32 = 64 + 32 = 96 + 32 = 128 + 32 = 160 + 32 = 192 + 32 = 224
valid subnets are 32, 64, 96, 128, 160, and 192
D. broadcast address for each subnet ?
i.e. the number before the next subnet
1st
2nd

is
is

32.0, therefore 64.0-1 = 63.255


64.0, therefore 96.0-1 = 95.255

E. valid hosts ?
Network

First host

Last host

Broadcast address
7 / 15

Course 640-801 : CCNA

invalid
1st
2nd
3rd
4th
5th
6th
invalid

2.0 - Subnetting

0.0
32.0
64.0
96.0
128.0
160.0
192.0
224.0

32.1
64.1
96.1
128.1
160.1
192.1

[Author: CCNA640801@nym.hush.com]

63.254
95.254
127.254
159.254
191.254
223.254

63.255
95.255
127.255
159.255
191.255
223.255

example

Subnet 172.16.0.0
SM
255.255.240.0 /20
A. how many valid subnets?
240 is 4 MB and 12 HB
2^MB-2 = 2^4-2 = 14

B. how many valid hosts/subnet?


2^HB-2 = 2^12 -2 = 2^4*256 2 = (16 * 256) 2 = 4094
C. first valid subnet and incremental value
256-240= 16
... until 240 (which is invalid as it is the SM)
i.e. 16 + 16 = 32 + 16 = 48 + 16 = 64 + 16 = 80 + 16 = 96 + 16 = 112 + 16 = 128 + 16
= 144 + 16 = 160 + 16 = 176 + 16 = 192 + 16 = 208 + 16 = 224 + 16 = 240
valid subnets are 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224
D. broadcast address for each subnet ?
i.e. the number before the next subnet
1st
2nd
...

is
is

16.0, therefore
32.0, therefore

32.0-1
48.0-1

224.0, therefore 240.0-1

=
=

31.255
47.255

= 239.255

E. valid hosts ?
invalid
1st
2nd
3rd
...
14th
invalid

Network
0.0
16.0
32.0
48.0
...
224.0
240.0

Subnet 172.16.0.0
SM
255.255.254.0 /23

First host

Last host

Broadcast address

16.1
32.1
48.1
...
224.1

31.254
47.254
63.254
...
239.254

31.255
47.255
63.255
...
239.255

example

A. how many valid subnets?


254 is 7 MB and 9 HB
2^MB-2 = 2^7-2 = 126
B. how many valid hosts/subnet?
2^HB-2 = 2^9-2 = 2^1*256 = 510
C. first valid subnet and incremental value
256-254 = 2
... until 254 (which is invalid as it is the SM)
8 / 15

Course 640-801 : CCNA

2.0 - Subnetting

[Author: CCNA640801@nym.hush.com]

i.e. 2, 4, 6, 8, ... 252


D. broadcast address for each subnet ?
i.e. the number before the next subnet
1st
2nd
...

is
is

2.0, therefore
4.0, therefore

4.0 -1
6.0 -1

=
=

252.0, therefore 254.0 -1

3.255
5.255

= 253.255

E. valid hosts ?
Network
0.0
2.0
4.0
6.0
...
252.0
254.0

invalid
1st
2nd
3rd
...
126th
invalid
Subnet 172.16.0.0
SM
255.255.255.0

First host

Last host

Broadcast address

2.1
4.1
6.1
...
252.1

3.254
5.254
7.254
...
253.254

3.255
5.255
7.255
...
253.255

First host

Last host

Broadcast address

1.1
2.1
3.1
...
254.1

1.254
2.254
3.254
...
254.254

1.255
2.255
3.255
...
254.255

example
/24

A. how many valid subnets?


255 is 8 masked-bits and 8 host-bits
2^MB-2 = 2^8-2 = 254
B. how many valid hosts/subnet?
2^HB-2 = 2^8-2 = 254
C. first valid subnet and incremental value
256-255= 1
... until 254 (which is invalid as it is the SM)
i.e. 1,2,3,4,5, ... 254
D. broadcast address for each subnet ?
i.e. the number before the next subnet
1st
2nd
...

is
is

1.0, therefore
2.0, therefore

2.0-1
3.0-1

254.0, therefore 255.0-1

=
=

1.255
2.255

= 254.255

E. valid hosts ?
invalid
1st
2nd
3rd
...
254th
invalid

Network
0.0
1.0
2.0
3.0
...
254.0
255.0

a host of 172.16.10.50 would be in subnet 10.16.10.0 of range 10.16.10.1-254 with a


broadcast of 176.16.10.255
example
9 / 15

Course 640-801 : CCNA

2.0 - Subnetting

[Author: CCNA640801@nym.hush.com]

Subnet 172.16.0.0
SM
255.255.255.128 /25
A. how many valid subnets?
9 MB and 7 HB
2^MB-2 = 2^9-2=2^1*256 -2 = 510
B. how many valid hosts/subnet?
2^HB-2 = 2^7-2 = 126
C. first valid subnet and incremental value
Because we are subnetting more than 8 bits, we use the range 0-255 and divide within
that.
i.e. 1,2,3,4...255
and each subnet is actually 2 subnets (i.e. each 4th octet value defines two ranges)
i.e. 0-127 and 128-255
E. valid hosts ?
invalid
1st
2nd
3rd
4th
5th
6th
7th
8th
9th
...
508
509
510
invalid

Network
0.0
0.128
1.0
1.128
2.0
2.128
3.0
3.128
4.0
4.128
...
254.0
254.128
255.0
255.128

First host
0.129
1.1
1.129
2.1
2.129
3.1
3.129
4.1
4.129
...
254.1
254.129
255.1

Last host

Broadcast address

0.254
1.126
1.254
2.126
2.254
3.126
3.254
4.126
4.254
...
254.126
254.254
255.126

0.255
1.127
1.255
2.127
2.255
3.127
3.255
4.127
4.255
...
254.127
254.255
255.127

example
Subnet 172.16.0.0
SM
255.255.255.192

/26

A. how many valid subnets?


10 MB and 6 HB
2^MB-2 = 2^10-2=2^2*256 -2 = 1022
B. how many valid hosts/subnet?
2^HB-2 = 2^6-2= 62
C. first valid subnet and incremental value
256-192=64 + 64 = 128 + 64 = 192
the 3rd octet all 0s OR 1s lead to invalid subnets
E. valid hosts ?
Notice that 0.0 and 255.192 are invalid as per the rule defined above
invalid
1st
2nd

Network
0.0
0.64
0.128

First host

Last host

Broadcast address

0.65
0.129

0.126
0.190

0.127
0.191
10 / 15

Course 640-801 : CCNA

3rd
4th
5th
6th
7th
8th
9th
10th
11th
...
1020
1021
1022
invalid

2.0 - Subnetting

0.192
1.0
1.64
1.128
1.192
2.0
2.64
2.128
2.192
...
255.0
255.64
255.128
255.192

Subnet 172.16.0.0/27
SM
255.255.255.224

0.193
1.1
1.65
1.129
1.193
2.1
2.65
2.129
2.193
...
255.1
255.65
255.129

[Author: CCNA640801@nym.hush.com]

0.254
1.62
1.126
1.190
1.254
2.62
2.126
2.190
2.254
...
255.62
255.126
255.190

0.255
1.63
1.127
1.191
1.255
2.63
2.127
2.191
2.255
...
255.63
255.127
255.191

example

A. how many valid subnets?


11 MB and 5 HB
2^MB-2 = 2^13-2=2^3*256 -2 = 2044
B. how many valid hosts/subnet?
2^HB-2 = 2^5-2 = 30
C. first valid subnet and incremental value
256-224=32, 64, 96, 128, 160, 192 and 224
the 3rd octet all 0s OR 1s lead to an invalid subnets
E. valid hosts ?
Notice that 0.0 and 255.224 are invalid as per the rule defined above
invalid
1st
2nd
3rd
4th
5th
6th
7th
8th
9th
10th
11th
12th
13th
14th
15th
...
2040
2041
2042
2043
2044
2045

Network
0.0
0.32
0.64
0.96
0.128
0.160
0.192
0.224
1.0
1.32
1.64
1.96
1.128
1.160
1.192
1.224
...
255.0
255.32
255.64
255.96
255.128
255.160

First host

Last host

Broadcast address

0.33
0.65
0.97
0.129
0.161
0.193
0.225
1.1
1.33
1.65
1.97
1.129
1.161
1.193
1.225
...
255.1
255.33
255.65
255.97
255.129
255.161

0.62
0.94
0.126
0.158
0.190
0.222
0.254
1.30
1.62
1.94
1.126
1.158
1.190
1.222
1.254
...
255.30
255.62
255.94
255.126
255.158
255.190

0.63
0.95
0.127
0.159
0.191
0.223
0.255
1.31
1.63
1.95
1.127
1.159
1.191
1.223
1.255
...
255.31
255.63
255.95
255.127
255.159
255.191
11 / 15

Course 640-801 : CCNA

2046
invalid

2.0 - Subnetting

255.192
255.224

255.193

[Author: CCNA640801@nym.hush.com]

255.222

255.223

SUBNETTING CLASS A - 24 bits to use for subnetting


Binary
decimal
shorthand
-----------------------------------------------------------------------------------1000.0000 0000.0000 0000.0000
255.128.0. 0
/9
<----- invalid
1110.0000 0000.0000 0000.0000
255.192.0. 0
/10
1110.0000 0000.0000 0000.0000
255.224.0. 0
/11
1111.0000 0000.0000 0000.0000
255.240.0. 0
/12
1111.1000 0000.0000 0000.0000
255.248.0. 0
/13
1111.1100 0000.0000 0000.0000
255.252.0. 0
/14
1111.1110 0000.0000 0000.0000
255.254.0. 0
/15
1111.1111 0000.0000 0000.0000
255.255.0. 0
/16
1111.1111 1000.0000 0000.0000
255.255.128.0
/17
1111.1111 1100.0000 0000.0000
255.255.192.0
/18
1111.1111 1110.0000 0000.0000
255.255.224.0
/19
1111.1111 1111.0000 0000.0000
255.255.240.0
/20
1111.1111 1111.1000 0000.0000
255.255.248.0
/21
1111.1111 1111.1100 0000.0000
255.255.252.0
/22
1111.1111 1111.1110 0000.0000
255.255.254.0
/23
1111.1111 1111.1111 0000.0000
255.255.255.0
/24
1111.1111 1111.1111 1000.0000
255.255.255.128
/25
1111.1111 1111.1111 1100.0000
255.255.255.192
/26
1111.1111 1111.1111 1110.0000
255.255.255.224
/27
1111.1111 1111.1111 1111.0000
255.255.255.240
/28
1111.1111 1111.1111 1111.1000
255.255.255.248
/29
1111.1111 1111.1111 1111.1100
255.255.255.252
/30
example

Subnet 10.0.0.0 /16


SM
255.255.0.0
255 is 8 masked-bits and 16 host-bits
A. how many valid subnets?
2^MB-2 = 2^8-2 = 254

B. how many valid hosts/subnet?


2^HB-2 = 2^16 -2 = 2^8*256 2 = (256 * 256) 2 = 65534
C. first valid subnet and incremental value
256-255= 1,2,3
... until 254
D. broadcast address for each subnet ?
i.e. the number before the next subnet
1st is
2nd is
...
last is

1.0.0, therefore
2.0.0, therefore

2.0.0-1
3.0.0-1

=
=

1.255.255
2.255.255

254.0.0, therefore

255.0.0-1

254.255.255

E. valid hosts ?
invalid
1st
2nd
3rd

Network
0.0.0
1.0.0
2.0.0
3.0.0

First host

Last host

Broadcast address

1.0.1
2.0.1
3.0.1

1.255.254
2.255.254
3.255.254

1.255.255
2.255.255
3.255.255
12 / 15

Course 640-801 : CCNA

...
254th
invalid

2.0 - Subnetting

...
254.0.0
255.0.0

...
254.0.1

[Author: CCNA640801@nym.hush.com]

...
254.255.254

...
254.255.255

First host

Last host

Broadcast address

0.16.1
0.32.1
.
.
.
.
.
.
.
.
.
.
.
0.224.1
0.240.1
1.0.1
1.16.1
...
254.224.1

0.31.254
0.47.254
.
.
.
.
.
.
.
.
.
.
.
0.239.254
0.255.254
1.15.254
1.31.254
...
254.239.254

0.31.255
0.47.255
.
.
.
.
.
.
.
.
.
.
.
0.239.255
0.255.255
1.15.255
1.31.255
...
254.239.255

example
Subnet 10.0.0.0 /20
SM
255.255.240.0
A. how many valid subnets?
240 is 12 MB and 12 HB
2^masked-bits-2 = 2^12-2=2^4*256 2 = 4094
B. how many valid hosts/subnet?
2^HB-2 = 2^12-2=2^4*256 2 = 4094
C. first valid subnet and incremental value
256-240 = 16, 32, 48, ... 240
D. broadcast address for each subnet ?
E. valid hosts ?
invalid
1st
2nd
3rd
4th
5th
6th
7th
8th
9th
10th
11th
12th
13th
14th
15th
16th
17th
...
4094th
invalid

Network
0.0.0
0.16.0
0.32.0
.
.
.
.
.
.
.
.
.
.
.
0.224.0
0.240.0
1.0.0
1.16.0
...
254.224.0
255.240.0

SM
255.255.255.192 /26
Subnet 10.0.0.0

example

A. how many valid subnets?


192 is 18 MB and 6 HB
2^MB-2 = 2^18-2= 262144-2 = 262142
B. how many valid hosts/subnet?
2^HB-2 = 2^6-2=64 2 = 62
C. first valid subnet and incremental value
256-192= 64, 128, 192
D. broadcast address for each subnet ?
13 / 15

Course 640-801 : CCNA

2.0 - Subnetting

[Author: CCNA640801@nym.hush.com]

E. valid hosts ?
invalid
1st
2nd
3rd
4th
5th
6th
7th
8th
9th
10th
11th

...
...
...
...
invalid

Network
0.0. 0
0.0. 64
0.0. 128
0.0. 192
0.1. 0
0.1. 64
0.1. 128
0.1. 192
0.2. 0
0.2. 64
0.2. 128
0.2. 192
0.3. 0
0.3. 192
0.255.192
1.0. 0
...
10.0. 0
...
254.224.128
...
255.255.128
255.255.192

First host

Last host

Broadcast address

0.0.65
0.0.129
0.0.193
0.1.1
0.1.65
0.1.129
0.1.193
0.2.1
0.2.65
0.2.129
0.2.193
0.3.1
0.3.193
0.255.193
1.0.1
...
10.0.0
...
254.224.129
...
255.255.129

0.0.126
0.0.190
0.0.254
0.1.62
0.1.125
0.1.190
0.1.254
0.2.62
0.2.126
0.2.190
0.2.254
0.3.62
0.3.254
0.255.254
1.0.62
...
10.255.254
...
254.224.190
...
255.255.190

0.0.127
0.0.191
0.0.255
0.1.63
0.1.127
0.1.191
0.1.255
0.2.63
0.2.127
0.2.191
0.2.255
0.3.63
0.3.255
0.255.255
1.0.63
...
10.255.255
...
254.224.191
...
255.255.191

Keypoints
Know that 6 bits of subnetting is the most you can have with a class C address.
Know that it is the subnet mask that actually determines which parts of the IP address are the Network
Number and the Host Node
Only practice Class B & C in anticipation that Class A will not come up in the exam

5 WAYS THAT THE EXAM WILL TEST YOUR IP ADDRESSING


KNOWLEDGE
Given an IP address + mask, what is the network/subnet number?
Given an IP address + mask, what is the network/subnet broadcast
address?
Given an IP address + mask, what are the assignable IP address
in that network/subnet?
Given a network number and static subnet mask, what are the
valid subnet numbers?
Given a network number and static subnet mask, how many hosts
per subnet, and how many subnets?
14 / 15

Course 640-801 : CCNA

2.0 - Subnetting

[Author: CCNA640801@nym.hush.com]

15 / 15

Course 640-801 : CCNA

2.0 - Subnetting

[Author: CCNA640801@nym.hush.com]

SUBNETTING QUICK REFERENCE

1
2
3
4
5
6
7
8

0
8
16
24
32
40
48
56
64
72
80
88
96
104
112
120
128
136
144
152
160
168
176
184
192
200
208
216
224
232
240
248
256

x
128
192
224
240
248
252
254
255

256-x
128
64
32
16
8
4
2
1

x
1
2
3
4
5
6
7
8
9
10
11
12
0

2^x
2
4
8
16
32
64
128
256
512
1024
2048
4096

16
32

32

48
64

64

64

80
96

96

112
128

128

128

128

144
160

160

176
192

192

192

208
224

224

240
256

256

256

256
16 / 15