0% found this document useful (0 votes)
87 views

Subnetting

The document discusses IP addressing and subnetting concepts including: - IP addresses are made up of 32 binary bits that can be divided into a network and host portion using a subnet mask. - Common subnet masks for IP address classes include 255.0.0.0 for Class A, 255.255.0.0 for Class B, and 255.255.255.0 for Class C. - Subnetting allows creating multiple logical networks within a single Class A, B, or C network by borrowing bits from the host portion to extend the network portion. This increases the number of available subnets.

Uploaded by

Diom Shrestha
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)
87 views

Subnetting

The document discusses IP addressing and subnetting concepts including: - IP addresses are made up of 32 binary bits that can be divided into a network and host portion using a subnet mask. - Common subnet masks for IP address classes include 255.0.0.0 for Class A, 255.255.0.0 for Class B, and 255.255.255.0 for Class C. - Subnetting allows creating multiple logical networks within a single Class A, B, or C network by borrowing bits from the host portion to extend the network portion. This increases the number of available subnets.

Uploaded by

Diom Shrestha
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/ 29

IP Addressing & Subnetting

 IP Addressing
 Subnetting
 VLSM
 CIDR
IP Address Classes
IP Addresses

 An IP address is an address used to uniquely identify a device on an IP


network.

 The address is made up of 32 binary bits which can be divisible into a


network portion and host portion with the help of a subnet mask.

32 binary bits are broken into four octets (1 octet = 8 bits)

Dotted decimal format (for example, 172.16.81.100)


IP Address Classes
 Class A: The first octet is the network portion. Octets 2,
3, and 4 are for subnets/hosts

 Class B: The first two octets are the network portion.


Octets 3 and 4 are for subnets/hosts

 Class C: The first three octets are the network portion.


Octet 4 is for subnets/hosts
Private Address Range
Network Masks

 Distinguishes which portion of the address identifies the network and


which portion of the address identifies the Host.
 Default masks:

 Class A: 255.0.0.0
 Class B: 255.255.0.0
 Class C: 255.255.255.0
Network Masks

Creates multiple logical networks that exist within a single Class A, B, or C


network.

If you do not subnet, you will only be able to use one network from your
Class A, B, or C network, which is unrealistic

Each data link on a network must have a unique network ID and unique
broadcast address.
Subnetting a Class A/B/C Address
 How many subnets does the chosen subnet mask produce?

 How many valid hosts per subnet are available?

 What are the valid subnets?

 What’s the broadcast address of each subnet?

 What are the valid hosts in each subnet?


 In IPv4, addresses are 32-bit binary numbers. However, for ease of use by
people, binary patterns representing IPv4 addresses are expressed as
dotted decimals. This is first accomplished by separating each byte (8 bits)
of the 32-bit binary pattern, called an octet, with a dot. It is called an octet
because each decimal number represents one byte or 8 bits.
The binary address: 11000000 10101000 00001010 00001010 ::
192.168.10.10
Binary Numbering System
 In the binary numbering system, the radix is 2. Therefore, each position
represents increasing powers of 2. In 8-bit binary numbers, the positions
represent these quantities:
 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
 128 64 32 16 8 4 2 1
Example 1: An octet containing all 1s: 11111111
A 1 in each position means that we add the value for that position to the
total. All 1s means that the values of every position are included in the
total, therefore, the value of all 1s in an octet is 255.
128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255
Example 2: An octet containing all 0s: 00000000
 A 0 in each position indicates that the value for that position is not
included in the total. A 0 in every position yields a total of 0.
0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 = 0
 Each octet is made up of 8 bits and each bit has a value, either 0 or 1. The four groups of 8 bits have
the same set of valid values in the range of 0 to 255 inclusive. The value of each bit placement, from
right to left is 1, 2, 4, 8, 16, 32, 64, and 128.
 Determine the value of the octet by adding the values of positions wherever there is a binary 1
present.
 If there is a 0 in a position, do not add the value.
 If all 8 bits are 0s, 00000000, the value of the octet is 0.
 If all 8 bits are 1s, 11111111, the value of the octet is 255 (128+64+32+16+8+4+2+1)
 If the 8 bits are mixed, the values are added together. For example, the octet 00100111 has a value of
39 (32+4+2+1).
In the examples in the figures, only the last octet is shown in binary because only bits from
the host portion can be borrowed.
 As shown in Figure 1, the 192.168.1.0/24 network has 24 bits in the network portion and
8 bits in the host portion, which is indicted with the subnet mask 255.255.255.0 or /24
notation. With no subnetting, this network supports a single LAN interface. If an
additional LAN is needed, the network would need to be subnetted.
 In Figure 2, 1 bit is borrowed from the most significant bit (leftmost bit) in the host
portion, thus extending the network portion to 25 bits. This creates 2 subnets identified by
using a 0 in the borrowed bit for the first network and a 1 in the borrowed bit for the
second network. The subnet mask for both networks uses a 1 in the borrowed bit position
to indicate that this bit is now part of the network portion.
 As shown in Figure 3, when we convert the binary octet to decimal we see that the first
subnet address is 192.168.1.0 and the second subnet address is 192.168.1.128. Because a
bit has been borrowed, the subnet mask for each subnet is 255.255.255.128 or /25.
Fig-1

Fig-3

Fig-2
Example
we considered an internetwork that required 3 subnets. To achieve the goal of creating four subnets we
borrowed 2 bits from the 8 hosts bits available with an IP address that has a default mask of
255.255.255.0, or a /24 prefix. The resulting subnet mask was 255.255.255.192, and a total of 4
possible subnets were created.
Practice Example: 255.255.255.128 (/25)
Network 192.168.10.0

 How many subnets? Since 128 is 1 bit on (10000000), the answer would be 2 1= 2.
 How many hosts per subnet? We have 7 host bits off (10000000), so the equation would be 2 7–
2 = 126 hosts.
 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.
 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 128, so the broadcast of the 0 subnet is 127.
 What are the valid hosts? These are the numbers between the subnet and broadcast address
Practice Example: 255.255.255.224 (/27)
Network 192.168.10.0
How many subnets? 224 is 11100000, so our equation would be 23 = 8.
How many hosts? 25– 2 = 30.
What are the valid subnets? 256 – 224 = 32. We just start at zero and count to
the subnet mask value in blocks (increments) of 32: 0, 32, 64, 96, 128, 160,
192, and 224.
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)?
Practice Example : 255.255.255.224 (/27)
Network 192.168.10.0
Practice Example : 255.255.128.0 (/17)
Network 172.16.0.0

Subnets? 21 = 2

Hosts? 215– 2 = 32,766 (7 bits in the third octet, and 8 in the fourth)

Valid subnets? 256 – 128 = 128. 0, 128. Remember that subnetting is


performed in the third octet, so the subnet numbers are really 0.0 and 128.0, as
shown in the next table

Broadcast address for each subnet?

Valid hosts?
Practice Example: 255.255.128.0 (/17)
Network 172.16.0.0
Variable Length Subnet Mask(VLSM)
Subnet with requirements shown?
5 subnets needed
Can be assigned as follows:
Net A: 204.15.5.0/27 host address range 1 to 30
Net B: 204.15.5.32/27 host address range 33 to 62
Net C: 204.15.5.64/27 host address range 65 to 94
Net D: 204.15.5.96/27 host address range 97 to 126
Net E: 204.15.5.128/27 host address range 129 to 158
Example
 Given the same network and requirements as in Sample Exercise 1 develop a subnetting scheme
using VLSM, given:
◦ Net A: must support 14 hosts
◦ Net B: must support 28 hosts
◦ Net C: must support 2 hosts
◦ Net D: must support 7 hosts
◦ Net E: must support 28 host
 Determine what mask allows the required number of hosts.
◦ Net A: requires a /28 (255.255.255.240) mask to support 14 hosts
◦ Net B: requires a /27 (255.255.255.224) mask to support 28 hosts
◦ Net C: requires a /30 (255.255.255.252) mask to support 2 hosts
◦ Net D: requires a /28 (255.255.255.240) mask to support 7 hosts
◦ Net E: requires a /27 (255.255.255.224) mask to support 28 hosts
CIDR: Classless Interdomain Routing

The lack of a network class of a size which is appropriate for mid-sizes organization;

- class C, with a max of 254 hosts, is too small,


- while class B, with a max of 65534 hosts, is too large.
 Allocate blocks of class C instead and downside is more routes entry in routing table

a) requires fewer than 256 addresses 1 class C network


b) requires fewer than 512 addresses 2 contiguous class C networks
c) requires fewer than 1024 addresses 4 contiguous class C networks
d) requires fewer than 2048 addresses 8 contiguous class C networks
e) requires fewer than 4096 addresses 16 contiguous class C networks
f) requires fewer than 8192 addresses 32 contiguous class C networks
g) requires fewer than 16384 addresses 64 contiguous class C networks
Routing Table problems

 Issue multiple (block) class C addresses (instead single class B address) solves a running out of
class B address but
 Introduces a problem of routing table
 By default, a routing table contains an entry for every network
 How large a routing table should be for all Class C networks?
 Growth of routing table in the Internet routers beyond the ability of current software and
hardware to manage
Route Non-Aggregation
Route Aggregation
 Class C address’s concept becomes meaningless on these route between ‘domains’, the technique is
called Classless Interdomain Routing or CIDR (pronounce cider)

 Key concept is to allocate multiple IP addresses in the way that allow summarization into a smaller
number of routing table (route aggregate)

 CIDR is supported by BGP4 and based on route aggregation e.g 16 class C addresses can be
summarized to a single routing entry (router can hold a single route entry for the main trunks
between these areas
Supernetting

 CIDR is also called Supernetting in contrast to subnetting

 An organization has been allocated a block of class C addresses in 2n with contiguous address space

 Archive by using bits which belongs to the network address as host bits.

 class C example : altering the default class C subnet mask such that some bit change from 1 to 0
 Here we have rules for the supernetting
1) Network should be contiguous
For eg – 192.168.10.0
- 192.168.11.0
- 192.168.12.0
- 192.168.13.0
2) Same of network should be same also with in form 2^n.
- 192.168.10.0/24
- 192.168.11.0/24
- 192.168.12.0/24
- 192.168.13.0/24
here equal value of 2^n
3) Any network address of given is divisible by total number subnet
- 4 * 2^8 = 2^10
192.168.10.0/22

You might also like