Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Unit Vi

Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

Computer Network 1

Unit VI: IP Subnetting


Facilitator: Frank
Course code: CS 8137
Email: frankibrahim25@gmail.com
 What happens if you wanted to take one network
address and create six networks from it?
 You would have to do something called subnetting.
 Subnetting is a process of taking one larger
network and break it into a bunch of smaller
networks.
 The word subnet is a shortened version of the
phrase subdivided network.
 There are loads of reasons in favor of subnetting.
 Reduced network traffic: With routers, most
traffic will stay on the local network; only
packets destined for other networks will pass
through the router.
 Optimized network performance: This is a result
of reduced network traffic.
 Simplified management: It’s easier to identify and
isolate network problems in a group of smaller
connected networks than within one gigantic
network.
 Facilitated spanning of large geographical
distances: a single large network that spans long
distances can create problems in every area listed
above. Connecting multiple smaller networks makes
the system more efficient.

How to Create Subnets


 Creating subnetworks is essentially the act of taking
bits from the host portion of the address and
reserving them to define the subnet address
instead.
 Steps for creating a subnet
1. Determine the number of required network IDs:
 One for each LAN subnet
 One for each wide area network connection
2. Determine the number of required host IDs per
subnet:
 One for each TCP/IP host
 One for each router interface
3. Based on the previous requirements, create the
following:
 A unique subnet mask for your entire
network
 A unique subnet ID for each physical segment
 A range of host IDs for each subnet
Subnet Masks
 For the subnet address scheme to work, every
machine on the network must know which part
of the host address will be used as the subnet
address.
 This condition is met by assigning a subnet mask
to each machine.
 A subnet mask is a 32-bit value that allows the
device that’s receiving IP packets to distinguish
the network ID portion of the IP address from the
host ID portion of the IP address.
 Not all networks need subnets, and if not, it really means
that they’re using the default subnet mask, which is basically
the same as saying that a network doesn’t have a subnet
 Table below shows the default subnet masks for
Classes A, B, and C.
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)


 Classless Inter-Domain Routing (CIDR). It’s
basically the method that Internet service
providers (ISPs) use to allocate a number of
addresses to a company, a home their customers.
 They provide addresses in a certain block size
 When you receive a block of addresses from an
ISP, what you get will look something like this:
192.168.10.32/28.
 This is telling you what your subnet mask is.
 The slash notation (/) means how many bits are
turned on (1s).

Subnetting
 Determining the number of subnets, valid hosts,
and broadcast addresses of a subnet that the
mask provides, all you need to do is answer five
simple questions:
 How many subnets? = number of subnets. x is
the number of masked bits, or the 1s. For
example, in 11000000, the number of ones gives
us 22 subnets. In this example, there are 4
subnets.
 How many hosts per subnet? – 2 = number of hosts
per subnet. y is the number of unmasked bits, or the 0s.
For example, in 11000000, the number of zeros gives
us 26 – 2 hosts.
 What are the valid subnets? 256 – subnet mask = block
size, or increment number. An example would be 256 –
192 = 64. The block size of a 192 mask is always 64.
 What’s the broadcast address for each subnet? the
broadcast address is always the number right before
the next subnet. And remember, the broadcast of the
last subnet (the subnet with the same interesting
octets as the mask) is always 255 for Class C.
 What are the valid hosts? Valid hosts are the
numbers between the subnets, omitting all the 0s
and all 1s.
 For example, if 64 is the subnet number and 127 is the
broadcast address, then 65–126 is the valid host
range it’s always the numbers between the
subnet address and the broadcast address.

Practice Examples:
1. 255.255.255.192 /26
2. 255.255.255.224 /27
3. 198.168.11.0/26
4. 255.255.255.240 /28
Subnetting Class B Addresses
 The process of subnetting a Class B network
is pretty much the same as it is for a Class C,
except that you just have more host bits.
 Use the same subnet numbers for the third
octet with Class B that you used for the
fourth octet with Class C, but add a zero to
the network portion and a 255 to the
broadcast section in the fourth octet.
 Example 255.255.192.0 /18
172.16.0.0 = Network address
255.255.192.0 = Subnet mask
 Subnets? = 4.
 Hosts? – 2 = 16,382 (6 bits in the third octet,
and 8 in the fourth).
 Valid subnets? 256 – 192 = 64. 0, 64, 128, 192.
 Remember the subnetting is performed in the
third octet, so the subnet numbers are really 0.0,
64.0, 128.0, and 192.0, as shown in the next
table.
Subnet 0.0 64.0 128.0 192.0
First host 0.1 64.1 128.1 192.1
Last host 63.254 127. 254 191.254 255.254
Broadcast 63.255 127.255 191.255 255.255
 Example 2: 255.255.240.0 (/20)
172.16.0.0 = Network address
255.255.240.0 = Subnet mask
 Subnets = 16.
 Hosts – 2 = 4094.
 Valid subnets? 256 – 240 = 0, 16, 32, 48, etc., up
to 240.
 The following table shows the first four subnets,
valid hosts, and broadcast addresses in a Class B
255.255.240.0 mask:
Subnet 0.0 16.0 32.0 48.0
First host 0.1 16.1 32.1 48.1
Last host 15.254 31.254 47.254 63.254
Broadcast 15.255 31.255 47.255 63.255
Practice Example
a) 255.255.248.0 (/21) 172.16.0.0 = Network
address
b) 255.255.252.0 (/22) 172.16.0.0 = Network
address

Subnetting Class A Addresses


 When you look at an IP address and a
subnet mask, you must be able to distinguish
the bits used for subnets from the bits used
for determining hosts.
Practice Example
 255.255.0.0 (/16) Class A addresses use a
default mask of 255.0.0.0, which leaves 22
bits for subnetting because you must leave 2
bits for host addressing.
 The 255.255.0.0 mask with a Class A
address is using 8 subnet bits:
 Subnets? = 256.
 Hosts? – 2 = 65,534.
 Valid subnets? What is the interesting octet? 256
– 255 = 1. 0, 1, 2, 3, etc. (all in the second octet).
The subnets would be 10.0.0.0, 10.1.0.0, 10.2.0.0,
10.3.0.0, etc., up to 10.255.0.0.
 Broadcast address for each subnet?
 Valid hosts?
 The following table shows the first two and
the last two subnets, the valid host range and
the broadcast addresses for the private Class
A 10.0.0.0 network:
More subnetting examples
1. You have been allocated a class A network address of
29.0.0.0.You need to create at least 20 networks and each
network will support a maximum of 160 hosts. Would the
following two subnet masks Work? 255.255.0.0 and or
255.255.255.0
2. You have been allocated a class B network address of
135.1.0.0 and need to create 4 subnets each with around
200 hosts what is the easiest mask to use to satisfy the
criteria?
3. Write the IP address 222.1.1.20 mask 255.255.255.192 in
CIDR notation
4. Write the IP address 135.1.1.25 mask 255.255. 248.0 in
CIDR notation
5. Subnet the Class C IP Address 195.1.1.0 So that you have
10 subnets each with a maximum 12 hosts on each subnet.
List the Address on host 1 on subnet 0,1,2,3,10
6. Subnet the Class C IP Address 205.11.2.0 so
that you have 30 subnets.
a) What is the subnet mask for the maximum
number of hosts?
b) How many hosts can each subnet have?
c) What is the IP address of host 3 on subnet
2?
7. 192.168.60.55/20 find
(1) Network ID
(2) Broadcast ID
(3) Usable IPs
6. 172.10.85.60/22
a. Network ID
b. Broadcast ID
c. Usable IPs
7. 172.10.60.16/29
a. Network ID
b. Broadcast ID
c. Usable IPs
Variable Length Subnet Masks (VLSM)
 A serious limitation of using only a single subnet
mask across a given network prefix (the number of
network or 1 bits in the mask) was that an
organization is locked into a fixed number of fixed
sized subnets.
 VLSM enables a network number to be configured
with different subnet masks on different interfaces.
 Subnet an already subnetted network address.
 Conserves IP addresses.
 More efficient use of available address space.
 Allows for more hierarchical levels within an
addressing plan.
 VLSM is the process of breaking down subnets into
smaller subnets, according to the need of individual
 If you know how to subnet, you can do VLSM.
What’s the trick?
 Always satisfy the requirements of your biggest
LAN and then work your way down
Steps for VLSM
1. List the number of hosts required per network
beginning with the largest to the smallest.
2. Convert the subnet mask to binary.
3. Draw a line where the network portion ends.
4. Ask yourself the question How many bits do I need
to support the required number of hosts?
5. Move the line to show your new network portion.
6. Determine your new magic number.
7. Finish subnetting using the new magic number.
VLSM network example 01
192.168.55.0
Example 02
192.168.1.0/27
VLSM network example 03

You might also like