0% found this document useful (0 votes)
2K views21 pages

Computer Network Lab: Lab 3: Ipv4 Address Subnetting

1) Network ID: 192.14.2.0 Default subnet mask: 255.255.255.0 Number of bits needed for subnet ID: n = 3 (2^3 = 8 subnets) Custom subnet mask: 255.255.255.224 (224 = 11100000 in binary) First 3 subnet ranges: 192.14.2.0 - 192.14.2.31 192.14.2.32 - 192.14.2.63 192.14.2.64 - 192.14.2.95 2) Number of subnetworks = 8

Uploaded by

Eng.sul
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)
2K views21 pages

Computer Network Lab: Lab 3: Ipv4 Address Subnetting

1) Network ID: 192.14.2.0 Default subnet mask: 255.255.255.0 Number of bits needed for subnet ID: n = 3 (2^3 = 8 subnets) Custom subnet mask: 255.255.255.224 (224 = 11100000 in binary) First 3 subnet ranges: 192.14.2.0 - 192.14.2.31 192.14.2.32 - 192.14.2.63 192.14.2.64 - 192.14.2.95 2) Number of subnetworks = 8

Uploaded by

Eng.sul
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/ 21

COMPUTER NETWORK

LAB
110814220

Lab 3: IPv4 Address Subnetting


Classful Addressing

• The original IP addressing scheme is set up so


that the dividing line occurs only in one of a
few locations: on octet boundaries. There are
five classes of available IP ranges: Class A, Class
B, Class C, Class D and Class E, while only A, B,
and C are commonly used. Each class allows for
a range of valid IP addresses. They allow the
Internet to provide addressing for a small
number of very large networks, a moderate
number of medium-sized organizations, and a
large number of smaller companies.
IP Address Classes
IP Address Classes
Special Address Patterns
• Network ID: All Host bits are zeros
• Broadcast ID: All Host bits are Ones.
• Subnet Mask: All Network bits are Ones and all Host bits are zeros.
• 112.16.254.1/8
• 192.16.254.1/24

• Network ID: 172.16.0.0/16


• Broadcast ID: 172.16.255.255
• Subnet mask: 255.255.0.0
Private/Unregistered/Non-Routable
Addresses
Subnetted “Classful” Addressing
• In the subnet addressing system, the two-tier network/host division of the IP
address is made into a three-tier system by taking some number of bits from a
class A, B or C host ID and using them for a subnet identifier or number.
• The network ID is unchanged. The subnet ID is used for routing within the
different subnetworks that form a complete network, providing extra flexibility
for administrators. For example, consider a class C address that normally uses the
first 24 bits for the network ID and remaining 8 bits for the host ID. The host ID
can be split into, say, 3 bits for a subnet ID and 5 for the host ID.
• This system is based on the original “Classful” scheme, so the dividing line
between the network ID and “full” host ID is based on the first few bits of the
address as before. The dividing line between the subnet ID and the “sub-host” ID
is indicated by a 32-bit number called a subnet mask.
Classless Addressing
• In the classless system, the division between the network ID and host
ID can occur at an arbitrary point, not just on octet boundaries like
in the “Classful” scheme.
• The dividing point is indicated by putting the number of bits used for
the network ID, called the prefix length, after the address.
• For example, if 227.82.157.177 is part of a network where the first 27
bits are used for the network ID, that network would be specified as
227.82.157.160/27. The “/27” is the same as the 255.255.255.224
subnet mask, since it has 27 one bits followed by 5 zeroes.

11111111 . 11111111 . 11111111 . 11100000


255 . 255 . 255 . 224
IP Subnet Masks, Notation and Subnet
Calculations
• In a Subnetting environment, Subnet mask this is a 32-bit number commonly called a subnet
mask. The mask is used both for calculating subnet and host addresses, and by routers for
determining how to move IP datagram's around a Subnetted network.
• The additional information about which bits are for the subnet ID and which for the host ID
must be communicated to devices that interpret IP addresses.
• The mask is a 32-bit number, just as the IP address is a 32-bit number. Each of the 32 bits in
the subnet mask corresponds to the bit in the IP address in the same location in the number.
• The bits of the mask in any given Subnetted network are chosen so that the bits used for
either the network ID or subnet ID are ones, while the bits used for the host ID are zeroes.
• Instead of specifying “IP address of 154.71.150.42 with subnet mask
of 255.255.248.0”, we can just say “154.71.150.42/21”. This is
sometimes called slash notation or CIDR notation.
• It is more commonly used in variable-length masking (VLSM)
environments, and as the second name implies, is also the standard
for specifying classless addresses under the CIDR addressing scheme.
However, it is also sometimes seen in regular Subnetting discussions.
IP Default Subnet Masks for Address
Classes A, B and C
• Just as is always the case, the subnet mask for a default, unsubnetted class A, B or C network has ones
for each bit that is used for network ID or subnet ID, and zeroes for the host ID bits. This is called the
default subnet mask for each of the IP address classes. This default subnet masks will always have 255s
or 0s when expressed in decimal notation.
Deciding How Many Subnet Bits to Use
• The key decision in Subnetting is how many bits to take from the host ID portion of the IP
address to put into the subnet ID.
• The number of subnets possible on our network is two to the power of the number of bits
we use to express the subnet ID (2n),
• and the number of hosts possible per subnet is two to the power of the number of bits left
in the host ID (less two, which are reserved for the Network ID (All hosts bits are 0) and
Broadcast ID (Net bits ones and hosts 0).
• Thus, the decision of how many bits to use for each of the subnet ID and host ID represents
a fundamental trade-off in subnet addressing:
• Each bit taken from the host ID for the subnet ID doubles the number of subnets that are
possible in the network.
• Each bit taken from the host ID for the subnet ID (approximately) halves the number of hosts
that are possible within each subnet on the network
Trading Off Bit Allocations to Meet
Subnetting Requirements
• This is the key design decision in Subnetting is how to divide the “Classful” host ID into
subnet ID and host ID bits.
• We must make this choice based on:
• our requirements for the number of subnets that exist in the network,
• and also on the maximum number of hosts that need to be assigned to each subnet in the
network.
• The number of hosts allowed in each subnet is the binary power of the number of host ID
bits remaining after Subnetting, less two. The reduction by two occurs because the all-
zeroes and all-ones host IDs within each subnet are reserved for two “special meaning”
addresses: to refer to the sub network itself and its local broadcast address. In some
implementations, the number of subnets is also reduced by two because the all-zeroes
and all-ones subnet IDs were originally not allowed to be used.
IP Subnetting Summary Tables For Class A,
Class B and Class C Networks
• Since there are only a few options for how to subnet each of Class A, Class B and
Class C networks, Three tables have been listed for each class These tables can
help you quickly decide how many bits to use for subnet ID and host ID, and then
what the subnet mask is for their selection.
128 64 32 16 8 4 2 1
Subnetting 1 1 1 1 1 0 0 0

• You have been asked to create 19 Subnetwork for n 2n


Rules • 176.16.0.0 1 2

1. Define the IP class IP Class B 176.16.0.0 2 4


2. Net ID and Hosts ID NW 176.16.0.0 Hosts 3 8
3. Apply Defualt Subnet Mask 4 16
Default SM 255 . 255 . 0 . 0
4. Convert the Mask to Binary 5 32
Default SM 11111111.11111111.00000000.00000000
5. Use 2n-2 ≥ needed 6 64
subnetworks, to determine 7 128
the custom Subnetmask 11111111.11111111.11111000.00000000
Custom SM 255 . 255 . 248 . 0 LSB = 8
6. Determine the LSB range it 11111000 2n - 2 ≥ 19
gives the 1st subnet + Number of subnets are 32 and the First subnet is 8 n = ??
range. 1st Subnetwork range 176.16.0.1 - 176.16.7.254 n= 5 or 6 or 7
2nd Subnetwork range 176.16.8.1 - 176.16.15.254
3rd Subnetwork range 176.16.16.1 - 176.16.23.254
4th Subnetwork range 176.16.24.1 - 176.16.23.254
…..
Exercise

Suppose that you have been asked to create 6


Subnetworks for the Network 192.14.2.0
1) Write the first 3 subnets ranges,
2) how many subnetworks in the network?

You might also like