Source: Feleke Merin (Dr.-Engr.)
1
Source: Feleke Merin(Dr. –Engr.)
Senior Asst. Professor
Topic: How to create subnetworks
Objectives
Identify the advantages of subnettinga
physical network
Identify the steps to subnet a classfulnetwork.
Source: Feleke Merin (Dr.-Engr.)
2
IP Subnetting concept
Dividing a huge network into smaller
manageable networks
Source: Feleke Merin (Dr.-Engr.)
3
Advantages of subnetting
Benefits of subnettinga physical network include:
reduced network traffic,
optimized network performance, and
simplified network management.
Source: Feleke Merin (Dr.-Engr.)
4
How to Create Subnets?
Creating subnetworksis the act of taking bits
from the host portion of the address and
reserving them to define the subnet address
instead.
Source: Feleke Merin (Dr.-Engr.)
5
Subnet Masks
A subnet maska 32-bit value that allows the device that’s
receiving IPpackets to distinguish the network ID portion of the IP
addressfromthehostIDportionoftheIPaddress.
The function of the subnet mask is to differentiate among the
network address, the host addresses, and the directed broadcast
address.
Source: Feleke Merin (Dr.-Engr.)
6
Default subnet masks
Defaultsubnet masks for Classes A, B, and C
Source: Feleke Merin (Dr.-Engr.)
7 IP Class Format
Default Subnet Mask
A Network . Node . Node . Node
255. 0. 0. 0
B Network . Network . Node . Node
255. 255. 0. 0
C Network . Network . Network . Node
255 . 255. 255. 0
Classless Inter-Domain Routing (CIDR)
CIDR allows the creation of net works of a size more than the
three classfulsubnet masks.
192.168.10.32/26. Telling you what your subnet mask is.
Subnet mask: 255.255.255.192
The slash notation (/) means how many bits are turned on (1s).
Source: Feleke Merin (Dr.-Engr.)
8
SubnettingClass C Addresses
In a Class C address, only 8 bits
available for defining hosts.
Remember that subnet bits start at
the leftand move to the right
Source: Feleke Merin (Dr.-Engr.)
9
Binary Subnet Mask CIDR value
5Stepsfor SubnettingClass C Addresses
When you are givena particular address and subnet mask, identify
whether the address is a network, host, or directed broadcast address ,
thenyou should usethe following five steps:
1.How many subnets does the chosen subnet mask produce?
2.How many valid hosts per subnet are available?
3.What are the valid subnets?
4.What’s the broadcast addressof each subnet?
5.What are the valid host range in each subnet?
Source: Feleke Merin (Dr.-Engr.)
10
SubnettingClass C IP Addresses
Example 1:Given: IP address 192.168.1. 132/26.
Telling you what your subnet mask is. 255.255.255.192
Step 1: How many subnets?
??????
= number of subnets.
x
is the number of masked bits, or the 1s.
For example, in 11000000, the number of 1s gives us ??????
??????
= 4 subnets.
Source: Feleke Merin (Dr.-Engr.)
11
SubnettingClass C IP Addresses
Source: Feleke Merin (Dr.-Engr.)
12 Step 2: How many hosts per subnet?
??????
–2
)
= n
umber of hosts per subnet. yis the number
of unmasked bits, or the 0s.
For example, in 11000000, the number of 0s gives
us :??????
??????
–2) hosts, or 62 hosts per subnet.
You need to subtract 2 for the subnet address and
the broadcast address, which are not valid hosts.
The subnet also has a network and broadcast address, which is the reason the formula subtracts 2.
SubnettingClass C IP Addresses
Step 3: What are the valid subnets?
256 –subnet mask
=
block size, or increment number.
An example would be the 255.255.255.192 mask,
256 –192 = 64. Start counting at zero in blocks of 64 until you
reach the subnet mask value
The network numbers in our example, gives us fournetworks:
192.168.1.0, 192.168.1. 64, 192.168.1.128, and 192.168.1.192.
Source: Feleke Merin (Dr.-Engr.)
13
SubnettingClass C IP Addresses
Step 4: What’s the broadcast address of each subnet?
Subnetsin the last section as 0, 64, 128, and 192, the broadcast address is always
the number right before the next subnet .
The 0 subnet has a broadcast address of 63because the next subnet is 64.
The 64 subnet has a broadcast address of 127 because the next subnet is 128, and so
on.
Remember, the broadcast address of the last subnet is always 255 .
Source: Feleke Merin (Dr.-Engr.)
14
SubnettingClass C IP Addresses
Step 5: What are the valid hosts in each subnet?
Valid host range: numbers between subnet address and broadcast address.
Source: Feleke Merin (Dr.-Engr.)
15
SubnettingClass C IP Addresses
Our address, 192.168.1.132,is a hostaddress based on this table, where its
network number is 192.168.1.128 and its directed broadcast is 192.168.1.191 .
Source: Feleke Merin (Dr.-Engr.)
16
Determining Class CIP Address Components
Example #2 :
Given: Network address: 192.168.1.0and
Subnet mask address: 255.255.255.128.
or 192.168.1.0/25
Step 1: How many subnets? Answer: 2 Subnets
Since 128 is 1 bit on (10000000), the answer
would be ??????
??????
= 2 Subnets.
Source: Feleke Merin (Dr.-Engr.)
17
Determining Class CIP Address Components
Step 2: How many hosts per subnet?
We have 7host bits off (10000000), so the equation
would be (
??????
–2) = 126 hosts.
Step 3: What are the valid subnets?
256 –128 = 128. Remember, we’ll start at zero and
count in our block size, so our subnets are 0, 128.
We have two subnets, each with 126 hosts .
Source: Feleke Merin (Dr.-Engr.)
18
Determining Class CIP Address Components
Step 4: What’s the broadcast address for each subnet?
The number rightbefore the value of the next subnet is all
host bits turned on and equals the broadcast address.
For the zero subnet, the next subnet is 128, so the
broadcast of the 0 subnet is 127.
Source: Feleke Merin (Dr.-Engr.)
19
Determining Class CIP Address Components
Step 5: What are the valid hosts?
The easiest way to find the host s is to write out the subnet ad dress
and the broadcast address.
The following table shows
the 0 and 128 subnets, the
valid host ranges of each,
and the broadcast address
of both subnets.
Source: Feleke Merin (Dr.-Engr.)
20
Implementinga Class C /25 logical network
Source: Feleke Merin (Dr.-Engr.)
21
Router#showiproute
[output cut]
C 192.168.10.0is directly connected to Ethernet 0
C 192.168.10.128is directly connected to Ethernet 1
Determining Class CIP Address Components
Example #3: Network address 192.168.10.0
Subnet mask address 255.255.255.192
or 192.168.1.0/26
How many subnets? 192is 11000000, so our equation
would be
??????
= 4 Subnets.
How many hosts?
–2) = 62 hosts per subnet.
Source: Feleke Merin (Dr.-Engr.)
22
Determining Class CIP Address Components
What are the valid subnets?
256 –192 = 64.
Remember to start at zero and count in our block size.
This means our subnets are 0, 64, 128, and 192 .
We can see we have a block size of 64, so we have
4 subnets, each with 62 hosts .
Source: Feleke Merin (Dr.-Engr.)
23
Determining Class CIP Address Components
What’s the broadcast address for each subnet?
The number right before the value of the next subnet
is all host bits turned on and equals the broadcast address.
For the zero subnet, the next subnet is 64, so the
broadcast address for the zero subnet is 63 .
Source: Feleke Merin (Dr.-Engr.)
24
Determining Class CIP Address Components
What are the valid hosts?
The following table shows the 0, 64, 128, and 192 subnets, the valid
host ranges of each, & the broadcast address of each subnet:
Source: Feleke Merin (Dr.-Engr.)
25
Implementing a class C /26 (with three networks)
Source: Feleke Merin (Dr.-Engr.)
26
You can use the first valid
hostin each subnet asthe
router’s interface address .
Determining Class CIP Address Components
Example #3:
192.168.10.0 = Network address
255.255.255.224= Subnet mask; or 192.168.10.0/ 27
How many subnets? 224 is 11100000, so our equation
= 8
.
How many hosts?
??????
–2) = 30hosts per subnet.
What are the valid subnets? 256 –224= 32.
We just start at zero and count to the subnet mask value in bl ocks
(increments) of 32: 0, 32, 64, 96, 128, 160, 192, and 224 .
Source: Feleke Merin (Dr.-Engr.)
27
Determining Class CIP Address Components
What’s the broadcast address for each subnet (always the number
right before the next subnet)?
What are the valid hosts (the numbers between the subnet number
and the broadcast address)?
Source: Feleke Merin (Dr.-Engr.)
28
Determining Class CIP Address Components
Example #4: 192.168.10.0 = Network address
255.255.255.240= Subnet mask or 192.168.10.0/28
How many subnets? 240is 111100000, so
??????
= 16.
How many hosts?
–2) = 14hosts per subnet.
Source: Feleke Merin (Dr.-Engr.)
29
Determining Class CIP Address Components
What’s the broadcast address for each subnet (always the
number right before the next subnet)?
What are the valid hosts (the numbers between the subnet
number and the broadcast address)?
Source: Feleke Merin (Dr.-Engr.)
31
Addressing for 192.168.1.0/28
Source: Feleke Merin (Dr.-Engr.)
32
Addressing for 192.168.1.0/28
Source: Feleke Merin (Dr.-Engr.)
33
Subnet Practice #1
Given: 192.168.10.50 = Node address
255.255.255.224 = Subnet mask
Determine the subnet and broadcast address of the network in wh ich the previous
IP address resides.
256 – 224 = 32.
Now just count by our increments of 32 until we pass the
host address:
0, 32, 64, and so on.
The address of 50falls between the two subnets of 32
and 64 and must be part of the 192.168.10.32 subnet.
The next subnet is 64, so the broadcast address of the
32 subnet is 63.
The valid host range equals the numbers between the subnet and broadcast address,
or 33–62.
Source: Feleke Merin (Dr.-Engr.)
34
Subnet Practice #2
Given: 192.168.10.50 = Node address
255.255.255.240 = Subnet mask
What is the subnet and broadcast address of the network of whic h the previous
IP address is a member?
256 – 240 = 16. Now just count by our increments of 16 until we
pass the host address: 0, 16, 32, 48, 64 and so on.
The host address is between the 48 and 64 subnets. The subnet is 192.168.10.48,
and the broadcast address is 63 , because the next subnet is 64.
The valid host range equals the numbers between the subnet numb er
and the broadcast address, or 49–62.
Source: Feleke Merin (Dr.-Engr.)
35
Subnet Practice #3
Given: a node address of 192.168.10.174 with a mask of 255.255.255.240.
What is the valid host range? The mask is 240, so we’d do a 256 – 240 = 16. This is our block size. Just keep
adding 16 until we pass the host address of 174, starting at z ero, of course:
0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176.
The host address of 174 is between 160 and 176 , so the subnet is 160.
The broadcast address is 175; the valid host range is 161–174 .
Source: Feleke Merin (Dr.-Engr.)
36
Subnet Practice #4
Given: 192.168.10.17 = Node address; 255.255.255.252 = Subnet mask
What is the subnet and broadcast address of the subnet in which the previous IP
address resides?
256 – 252 = 4. Now just count by our increments of 4 until we pass the host
address: 0, 4, 8, 12, 16, 20, etc.
The host address is between the 16 and 20 subnets.
The subnetis 192.168.10.16, and the broadcast address is 19.
The valid host range is 17–18.
Source: Feleke Merin (Dr.-Engr.)
37
What do we know about a /X ?
Source: Feleke Merin (Dr.-Engr.)
38
What do you know about a /X ?
Source: Feleke Merin (Dr.-Engr.)
39
Review Questions
Part I: Descriptive 1. Define the purpose of an IP Address (IPv4).
2. List down components of an IP Address.
3. What is the purpose of the following command when typed in on your computer? ping 127.0.0.1
4. ipconfigallows you to view a Windows PC TCP/IP configuration. Say true or false.
5. Write down IP address classes, class ranges in decimal and in binary format.
6. Which IP Address class has few hosts per network?
7.191.75.39.24is a Class __________ address.
8. What are the advantages of subnetting a physical network?
9. Explain how to Create Subnets? Consider Class C IP Address.
10. Discuss default subnet masks for Classes A, B, and C .
11. For the following IP Address give the subnet mask: 192.168.10.32/28.
12. What are the five steps used to subnet an IP Address?
Source: Feleke Merin (Dr.-Engr.)
40
Review Questions (contd.)
Part II: Workout Questions 1. For the following CIDR value /28, write down its Subnet mask and binary value.
2. What is the maximum number of subnets in class C networks usi ng the following masks?
a) 255.255.255.192
b) 255.255.255.224
c) 255.255.255.240
d) 255.255.255.0
3. Given: IP Address : 200.34.22.156 Mask: 255.255.255.240
Required: Using table write down the subnetwork address, valid host address and direct
broadcast address. (Hint: Use the table like Lecture slide numb er 32 or 33).
Source: Feleke Merin (Dr.-Engr.)
41
Review Questions (contd.)
4.Write the subnetwork address , valid host range and broadcast a ddress for
question a) through f)
a) 192.168.100.25/30
b) 192.168.100.37/28
c) 192.168.100.66/27
d) 192.168.100.17/29
e) 192.168.100.99/26
f) 192.168.100.99/25
5. What is the broadcast address of 192.168.192.10/29?
6. How many hosts are available with a Class C /29 mask?
Source: Feleke Merin (Dr.-Engr.)
42
Answers for question 4 a) to f )
a) 192.168.100.25/30. A /30 is 255. 255.255.252. The valid subnet is 192.168.100.24,
broadcast is 192.168.100.27, and valid hosts are 192.168.100.25 and 26.
b) 192.168.100.37/28. A /28 is 255.255.255.240. The fourth oct et is a block size of 16. Just
count by 16s until you pass 37. 0, 16, 32, 48. The host is in t he 32 subnet, with
a broadcast address of 47. Valid hosts 33–46.
c) A /27 is 255.255.255.224. The fourth octet is a block size of 32. Count by 32s until you
pass the host address of 66. 0, 32, 64, 96. The host is in the 64 subnet, and the broadcast
address is 95. Valid host range is 65–94.
Source: Feleke Merin (Dr.-Engr.)
43
Answers for question 4 a) to f )
d) 192.168.100.17/29. A /29 is 255. 255.255.248. The fourth octet is a block size of 8. 0, 8, 16, 24.
The host is in the 16 subnet, broadcast of 23. Valid hosts 17–2 2.
e) 192.168.100.99/26. A /26 is 255.255.255.192. The fourth oct et has a block size of 64. 0, 64, 128.
The host is in the 64 subnet, broadcast of 127. Valid hosts 65– 126.
f) 192.168.100.99/25. A /25 is 255. 255.255.128. The fourth octet is a block size of 128. 0, 128.
The host is in the 0 subnet, broadcast of 127. Valid hosts 1–12 6.
Source: Feleke Merin (Dr.-Engr.)
44
Review Questions (contd.)
Part III: Multiple Choice 1. 172.16.240.256 is a Class __________ address.
a. A b. B c. Cd. None of the above
2. What is the maximum number of IP addresses that can be as signed to hosts
on a local subnet that uses the 255.255.255.224 subnet mask?
a. 14 b. 15 c. 16d. 30e. 31 f. 62
3. You have a network that needs 29 subnets while maximizing the number of host
addresses available on each subnet. How many bits must you bor row from the host
field to provide the correct subnet mask?
a. 2 b. 3 c. 4d. 5 e. 6 f. 7
4. What is the subnetwork address for a host with the IP addr ess 200.10.5.68/28?
a. 200.10.5.56 b. 200.10.5.32c. 200.10.5.64 d. 200.10.5.0
Source: Feleke Merin (Dr.-Engr.)
45
Review Questions (contd.)
5. What is the network ID for a network that contains the group of IP addresses from
194.73.44.1 through 194.73.44.254 and is not subnetted?
a) 194.1.1.1
b) 194.73.0.0
c) 194.73.44.1 d) 194.73.44.255e) 194.73.44.0
6. What is the default subnet mask for the following IP addre ss: 154.13.44.87?
a) 255.255.255.255
b) 255.255.255.0
c) 255.255.0.0 d) 255.0.0.0 e) 0.0.0.0
Source: Feleke Merin (Dr.-Engr.)
46
Review Questions (contd.)
7.You need to configure a server that is on the subnet 192.168.19 .24/29. The router has the
first available host address. Which of the following should yo u assign to the server?
a) 192.168.19.0 255.255.255.0
b) 192.168.19.33 255.255.255.240
c)192.168.19.26 255.255.255.248
d)192.168.19.31 255.255.255.248
e)192.168.19.34 255.255.255.240
Source: Feleke Merin (Dr.-Engr.)
47
Review Questions (contd.)
8. You need to subnet a network that has 5 subnets, each wit h at least 16 hosts. Which classful
subnet mask would you use?
a) 255.255.255.192
b) 255.255.255.224
c) 255.255.255.240
d) 255.255.255.248 9. You are given the following addressing information: 192.168.3 7.192/25. What type of
address is this?
a) Network b) Directed broadcastc) Host
Source: Feleke Merin (Dr.-Engr.)
48
Review Questions (contd.)
10.You have an interface on a route r with the IP address of 192.16 8.192.10/29. Including the router
interface, how many hosts can have IP addresses on the LAN attached to the router interface?
a)6b) 8 c) 30 d) 62 e) 126
11. You are given a Class C network with a subnet mask of 255. 255.255.248. How many
host addresses are there on each subnet?
a) 4 b) 6 c) 8 d) 14
12. You have an interface on a router with the IP address of 1 92.168.192.10/29. What is the
broadcast address the hosts will use on this LAN?
a) 192.168.192.15
b) 192.168.192.31 c) 192.168.192.63d) 192.168.192.127 e) 192. 168.192.255
============= The End ! ===============
Source: Feleke Merin (Dr.-Engr.)
49